decimals don’t work
-
Hi, the decimals of the price are not take in woocommerce cart.
I dont know why, I tested several things for change the price after with hook of woocommerce like :
add_action( 'woocommerce_after_cart_totals', 'add_custom_price', 100, 1 ); function add_custom_price( $cart_object ) { $custom_price = 50; // This will be your custome price foreach ( $cart_object->cart_contents as $key => $value ) { $value['data']->set_price($custom_price); } }
but that doesn’t change the price of the item. If that would have changed it I could have taken the url parameter and reset the value of the article with decimal digits.
I make a video for explain the issue : https://www.loom.com/share/78c7cd80a3954221b3cc83607f8d9d1f
I need decimals because I have to change the currency to bitcoin, so the payments are for example 0.0001 bitcoin and not 1.00 bitcoin.
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘decimals don’t work’ is closed to new replies.