Created
January 28, 2021 03:56
-
-
Save Postnov/7972b65fdff37b9f275548397c28f718 to your computer and use it in GitHub Desktop.
Количество товаров в корзине WOO
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 | |
// Количество товаров | |
echo WC()->cart->get_cart_contents_count(); | |
// Проверить количество товаров: | |
if (WC()->cart->get_cart_contents_count()) {} | |
// Сумма товаров | |
echo WC()->cart->get_cart_subtotal(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment