Skip to content

Commit

Permalink
BUG FIX: values not matching
Browse files Browse the repository at this point in the history
* BUG FIX: Fixed an issue where values didn't match correctly.
  • Loading branch information
andrewlimaza committed Apr 4, 2023
1 parent 5f7c7ef commit 48424c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/class-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ public function yh_nyp_add_cart_validation( $passed, $product_id, $quantity, $va

$amount = apply_filters( 'yh_nyp_get_price', floatval( $amount ) );

if ( ! empty( $set_values ) ) {

if ( ! empty( $set_values ) && ! empty( $set_values[0] ) ) {
// Loop through each option, make sure a value matches. If it doesn't, throw an error
$price_match = false;
foreach ( $set_values as $key => $value ) {
Expand Down

0 comments on commit 48424c0

Please sign in to comment.