Skip to content

Commit 4497baa

Browse files
Fix for quantity field not loading when inventory payment is turned off
1 parent 2b47d3a commit 4497baa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public/class-paystack-forms-public.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ function kkd_pff_paystack_form_shortcode($atts)
947947
<input type="hidden" value="'.$amount.'" id="pf-qamount"/>
948948
<select class="form-control" id="pf-quantity" name="pf-quantity" >';
949949
$max = $quantity + 1;
950-
if($max > ($stock +1)){
950+
951+
if($max > ($stock +1) && $useinventory == 'yes'){
951952
$max = $stock + 1 ;
952953
}
953954
for ($i=1; $i < $max; $i++) {

0 commit comments

Comments
 (0)