Changing a text label into an image

Changing the label text (text only) The text “Member discount!” can be changed using a translation filter, but it’s not possible to add an image or any HTML to that because it is escaped later in the code referenced in the question: $badge=”<span class=”onsale wc-memberships-member-discount”>” . esc_html( $label ) . ‘</span>’; Here is an example … Read more

Custom email template for a specific product category

Firstly extend WC_Email class to define the email header, subject, email template for content secondly, add custom email class to the default WooCommerce email classes using woocommerce_email_classes filter, with trigger that calls terms if ( has_term( ‘Your Cat’, ‘product_cat’, $item[‘product_id’] ) ) lastly, Create an email template to be used to generate email content for … Read more

WooCommerce Price Filter not working? [closed]

I were facing the same problem with the variable products. I have solved it by following below steps:- Step 1:- Read the whole documentation carefully and how to create the products or variable products https://docs.woocommerce.com/document/variable-product/ Step 2:- Check the variation tabs of products and click on each variation types you can see it will expand … Read more

How to search variable product by its variation id in woocommerce admin product search box?

Finally I have implement the above functionality by modifying the filter “posts_search”. By using bellow code you can search variable products by their variations id in woocommerce admin product search area. add_filter( ‘posts_search’, ‘product_search’ ); function product_search( $where ) { global $pagenow, $wpdb, $wp; if ( ‘edit.php’ != $pagenow || ! is_search() || ! isset( … Read more