WC()->cart->cart_contents_total is null in my Plugin
-
Hi,
I try to make a plugin and in it I neeed to access to the Woo cart total.
Before I create a plugin I have made my code works within the theme customizer.
The target of this plugin is to create a free shipping banner with a ttarget amount and then calculate with the actual cart amount the rest amount to get free shipping.In short, WC()->cart->cart_contents_total work in the theme customizer but return null if I try to access to it in my plugin.
How can I access to this value in my plugin please ?
Thanks.
- The topic ‘WC()->cart->cart_contents_total is null in my Plugin’ is closed to new replies.