Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WOO: условие вывода для отельной категории
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