Problem with Subscription Product which has a price of 0
-
Since one of the last updates we see Server-Errors when Customers order our “free” subscription. (Woocommerce Product with a price of 0). This leads to an order cancellation. After some debugging I found the error in the following class:
/plugins/yith-woocommerce-subscription/includes/class.ywsbs-subscription-order.php
-> LINE 180 : $new_cart->cart_contents[ $new_cart_item_key ][‘data’]->set_price( $current_price );
calling the function “setPrice” leads to a NULLREFERENCE-Exception when the price is 0. My Quickfix was:
if( $current_price > 0 ) {
$new_cart->cart_contents[ $new_cart_item_key ][‘data’]->set_price( $current_price );
}
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Problem with Subscription Product which has a price of 0’ is closed to new replies.