Skip to content

Instantly share code, notes, and snippets.

View hirejordansmith's full-sized avatar

Jordan Smith hirejordansmith

View GitHub Profile
@hirejordansmith
hirejordansmith / woocommerce-class-values.php
Last active April 22, 2024 14:20
WooCommerce Class Values
<?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