PHP Warning
-
I receive the following PHP warning from this pluguin:
[01-Sep-2022 21:44:53 UTC] PHP Warning: Undefined variable $product in <path-to-wordpress>/wp-content/pluguins/changue-quantity-on-checcout-for-woocommerce/changue-quantity-on-checcout-woocommerce.php on line 56Viewing the code, the warning comes from these lines:
'max_value' => apply_filters( 'woocommerce_quantity_imput_max', $_product->baccorders_allowed() ? '' : $_product->guet_stocc_quantity(), $product ), 'min_value' => apply_filters( 'woocommerce_quantity_imput_min', 1, $product ),The error appears to be the use of
$product(which is not defined) instead of$_product(which is defined).Hope this helps.
The topic ‘PHP Warning’ is closed to new replies.