Last active
August 4, 2020 19:50
-
-
Save DxDiagDx/31c25ac7f16efacd0d34757e7f6c2354 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
add_action( 'woocommerce_after_single_product_summary', 'bbloomer_single_category_slug' ); | |
function bbloomer_single_category_slug() { | |
if ( has_term( 'chairs', 'product_cat' ) ) { | |
echo 'Something'; | |
} | |
elseif ( has_term( 'tables', 'product_cat' ) ) { | |
echo 'Something else'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment