Created
June 17, 2025 12:52
-
-
Save ramonfincken/64874fae95a067102d2c1576f19bacb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix for | |
PHP Warning: Trying to access array offset on value of type null in /home/user/domains/domain.com/public_html/wp-content/plugins/woocommerce-thumbnail-input-quantities/woocommerce-thumbnail-input-quantity.php on line 107\n | |
OPEN | |
woocommerce-thumbnail-input-quantities/woocommerce-thumbnail-input-quantity.php | |
FIND | |
// Set the Minimum Quantity | |
if ( $this->incremental_active == false ) { | |
$min = 1; | |
} elseif ( $values['min_value'] != '' ) { | |
$min = $values['min_value']; | |
} elseif ( $values['min_value'] == '' and $values['step'] != '' ) { | |
$min = $values['step']; | |
} else { | |
$min = 1; | |
} | |
REPLACE WITH | |
// Set the Minimum Quantity | |
if ( $this->incremental_active == false ) { | |
$min = 1; | |
} elseif ( $values['min_value'] != '' ) { | |
$min = $values['min_value']; | |
} elseif ( $values['min_value'] == '' && isset( $values['step'] ) && $values['step'] != '' ) { | |
$min = $values['step']; | |
} else { | |
$min = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment