Skip to content

Commit 460a21e

Browse files
fix: fatal error
1 parent 201841d commit 460a21e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

inc/woocommerce.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function ppom_woocommerce_update_cart_fees( $cart_items, $values ) {
329329
$ppom_item_order_qty = floatval( $cart_items['quantity'] );
330330

331331
// Getting option price
332-
$option_prices = json_decode( stripslashes( $values['ppom']['ppom_option_price'] ), true );
332+
$option_prices = json_decode( wp_unslash( $values['ppom']['ppom_option_price'] ), true );
333333
// ppom_pa($option_prices);
334334
$total_option_price = 0;
335335
$ppom_matrix_price = 0;
@@ -559,7 +559,7 @@ function ppom_woocommerce_add_fixed_fee( $cart ) {
559559
}
560560

561561
// Getting option price
562-
$option_prices = json_decode( stripslashes( $item['ppom']['ppom_option_price'] ), true );
562+
$option_prices = json_decode( wp_unslash( $item['ppom']['ppom_option_price'] ), true );
563563

564564
if ( $option_prices ) {
565565
foreach ( $option_prices as $fee ) {
@@ -947,7 +947,7 @@ function ppom_woocommerce_control_cart_quantity_legacy( $quantity, $cart_item_ke
947947
}
948948

949949
// Getting option price
950-
$option_prices = json_decode( stripslashes( $cart_item['ppom']['ppom_option_price'] ), true );
950+
$option_prices = json_decode( wp_unslash( $cart_item['ppom']['ppom_option_price'] ), true );
951951
$ppom_has_quantities = 0;
952952
// ppom_pa($option_prices);
953953

@@ -1011,7 +1011,7 @@ function ppom_woocommerce_item_subtotal( $item_subtotal, $cart_item, $cart_item_
10111011
}
10121012

10131013
// Getting option price.
1014-
$option_prices = json_decode( stripslashes( $cart_item['ppom']['ppom_option_price'] ), true );
1014+
$option_prices = json_decode( wp_unslash( $cart_item['ppom']['ppom_option_price'] ), true );
10151015

10161016
if ( empty( $option_prices ) ) {
10171017
return $item_subtotal;

0 commit comments

Comments
 (0)