Custom price not working anymore on cart page after upgrading to 3.0.2
-
I had created one custom price calculator plugin for a client where I had coded to update price cart with using woocommerce_before_calculate_totals hook. But client had reported now that this is not working anymore. Can someone please help me out to let me know what Woocommerce had changed recently which cause this issue and any suitable fix?
function tbs_apply_custom_price_to_cart_item( $cart_object ) { if( !WC()->session->__isset( "reload_checkout" )) { foreach ( $cart_object->cart_contents as $key => $value ) { $custom_price = 30; $value['data']->price = $custom_price; } } } add_action( 'woocommerce_before_calculate_totals', 'tbs_apply_custom_price_to_cart_item', 99 );
I mentioned code above anyone can please help me to fix it. I’m very disappointed with this update and it’s more than 24 hours there is no support from the woocommerce support team. Please help me to solve it.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom price not working anymore on cart page after upgrading to 3.0.2’ is closed to new replies.