Created
August 7, 2020 06:30
-
-
Save DxDiagDx/2ba0eb2d5b63377217d9ab8ef9fd7427 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_shop_loop_item', 'bbloomer_loop_per_product' ); | |
function bbloomer_loop_per_product() { | |
if ( has_term( 'chairs', 'product_cat' ) ) { | |
echo 'Great chairs!'; | |
} elseif ( has_term( 'tables', 'product_cat' ) ) { | |
echo 'Awesome tables!'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment