I am trying to generate a list of available coupons and to display them using a shortcode. I was hoping to generate the list using SQL and not “-1” since that’s heavier on the db from what I …
Tag: woocommerce
Remove WooCommerce Payment Gateways for defined groups of product categories
I’ve manged to get this code to work for removing ONE payment gateway based on one or more product categories. What I need help with is removing multiple payment gateways as well. In other words; it …
Automatically add a specific category and tags to a product when it goes out of stock after the order is placed [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Hi I’m facing an issue regarding wordpress and WooCommerce I want to automate the process”when ever product goes out of
Show or hide checkout postcode field based on chosen city in WooCommerce
In Woocommerce, I am trying to hide the checkout postcode field if a specific city field is selected. I found a working code that hides the billing phone if company field is empty: I don’t know how to alter this code to make the required postcode field to be hidden when a specific billing city is selected. Any help is
Switch product image on hover on WooCommerce archive page
Is there a way (maybe via functions.php) to change the product-image in woocommerce shops (archive page) on hover with the first attached gallery image of the product? I cannot find how to target both. I guess it must be sth like this: Answer What I think you’ll want to do, assuming your installation is a somewhat standard WooC installation, is
Add 50% discount per 3 products on the cheapest products (WooCommerce)
I’m adding the discount rule for every 3 products: 3,6,9,12,15.. on the cart and it should apply to discount 50% only the cheapest products. So if you have 9, only the 3 cheapest gets 50% off. This …
Check WooCommerce User Role and Payment Gateway and if they match – Apply fee
I’m struggling with applying a fee for an array of user roles if and when a specific payment gateway is selected. The code I’ve written works fine if I do not check the user role, but once I try and …
In a WordPress template, how can I detect if the current page is the WooCommerce cart or checkout page?
I would like to have a header banner hidden when a user is in the WooCommerce cart or checkout process. Is there a flag or variable that I can check to see if the current page is in either of these WooCommerce sections? I basically want to do something like the following: I realize I can make a custom page
Show message on WooCommerce cart and checkout page when cart contains backorder products
I currently have this code in functions.php in order to display a message on the checkout page saying the customer has backordered products in their cart: What do I need to do to also have this same message display on the CART page? (Before going to Checkout). Thanks in advance. Answer Note 1: I changed the code so that it
WooCommerce Memberships: How to adjust query to account for delayed content/content drip?
I’m trying to build a query that shows the latest post a member has access to, but I cannot find what parameters to add so that posts that they have access to in the future are removed from this list. Does anyone know how to do this? If not, can wc_memberships_is_post_content_restricted( ) be adapted into a custom loop? EDIT I