Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Woo: условие вывода по метке товара
add_action( 'woocommerce_after_single_product_summary', 'bbloomer_single_tag_slug' );
function bbloomer_single_tag_slug() {
if ( has_term( 'blue', 'product_tag' ) ) {
echo 'Something';
} elseif ( has_term( 'red', 'product_tag' ) ) {
echo 'Something else';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment