A multi-section WordPress store [closed]

It’s possible to build a multi-section online store using WordPress and WooCommerce but it does come with its complexities. Having the three sections integrated within the same site can be advantageous in terms of shared traffic, cross-selling opportunities, and providing a diverse product/service mix to your visitors. However, this setup will be more complex and … Read more

Hook for Woocommerce checkout fields

Your code seems to be correct and should generally work for all fields. However, the ‘billing_postcode’ and ‘billing_city’ fields may be processed differently or not be considered required based on the customer’s country or other settings, which could explain why they’re not being modified. If you want to ensure a message appears for all fields, … Read more

Restricted category in Woocommerce [closed]

The function that solves it should do the following : Loops through each product in the category For each item, retrieve the list of categories the product is in. If there is only one category and it’s the ‘restricted’ category, then the product is excluded from the query. Here’s an example : function exclude_category_archive_products( $q … Read more

Add text below WooCommerce short description if metabox value is true

Following the suggestion by @1inmillion, I put the second filter inside the first IF statement, which works nicely. This is the combined code: // 1. Add text below short description function bja_product_unavailable_text( $content ) { $content .= ‘<div class=”bja_product_unavailable”>This product is unavailable</div>’; return $content; } // 2. Remove add to cart button if product is … Read more