• 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 56
    
    

    Viewing 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.

    • This topic was modified 3 years, 4 months ago by Chad Cloman . Reason: scroll bar overwrites code section unless there's an extra blanc line at the end
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.