Created
May 20, 2013 14:55
-
-
Save lucasstark/5612750 to your computer and use it in GitHub Desktop.
WooCommerce Dynamic Pricing - Display the discounts available for a particular product category.
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
add_action('woocommerce_single_product_summary', 'my_after_woocommerce_single_product_summary', 21); | |
function my_after_woocommerce_single_product_summary() { | |
global $post, $product; | |
if (is_object_in_term($post->ID, 'product_cat', array('tshirts'))) { | |
echo 'Your Custom Pricing Table'; | |
} | |
} |
This must be April 1st solution.
Here is what i got to show the pricing table. But we might need to made some customization to suit out need.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All that happens when I put this code in my functions.php file is that I get the text "Your Custom Pricing Table", which of course makes sense because that's all in the echo command. But how do I get the dynamic pricing table to actually display?