Last active
April 22, 2024 14:20
-
-
Save hirejordansmith/880f3ecec9031a9755997915eba6c847 to your computer and use it in GitHub Desktop.
WooCommerce Class Values
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 | |
// Returns subtotal price ($5.00) | |
$cart_subtotal = WC()->cart->get_cart_subtotal(); | |
// Returns subtotal number value (5) | |
$cart_subtotal = WC()->cart->subtotal; | |
/*======================================== | |
Single Product | |
========================================*/ | |
// Return Single Product Price in number format(5) | |
$product->get_price(); | |
// Return Single Product Price in display format ($5.00) | |
$product->get_price_html(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment