Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save musamamasood/3e7bd9c28cfe44dcd17c343b2b6f4ac2 to your computer and use it in GitHub Desktop.
Save musamamasood/3e7bd9c28cfe44dcd17c343b2b6f4ac2 to your computer and use it in GitHub Desktop.
WooCommerce Dynamic Pricing - Display the discounts available for a particular product category.
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';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment