Created
October 14, 2014 14:10
-
-
Save growdev/3e084f833a3f27bf54af to your computer and use it in GitHub Desktop.
Getting WooCommerce Cart Subtotal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('woocommerce_cart_updated', 'growdev_woocommerce_cart_updated', 90); | |
function growdev_woocommerce_cart_updated ( $cart ){ | |
// output subtotal | |
error_log( "subtotal: " . WC()->cart->subtotal ); | |
// output the | |
error_log( "get_cart_subtotal: " . WC()->cart->get_cart_subtotal() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment