PHP Warning
-
I receive the following PHP warning from this plugin:
[01-Sep-2022 21:44:53 UTC] PHP Warning: Undefined variable $product in <path-to-wordpress>/wp-content/plugins/change-quantity-on-checkout-for-woocommerce/change-quantity-on-checkout-woocommerce.php on line 56
Viewing the code, the warning comes from these lines:
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(), $product ), 'min_value' => apply_filters( 'woocommerce_quantity_input_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.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Warning’ is closed to new replies.