How can I include this “Downloads” section (attached) in the admin email? By default, WooCommerce only sends it to the customer, not the store owner. I tried looking at articles that showed how to customize WooCommerce emails and I think that woocommerce_email_order_details is the hook that I’m looking for. However, I am stuck with just this piece of information as
Tag: woocommerce
Add sale badge to product thumbnail on single product page and shop archive pages in WooCommerce
I use the following code to add a small badge topleft of every product with -%off. On my product page and it works. However when i try to do it on category page to all product listings with the following code: It does not work, there doesn’t seem to be any adjustment. Can I get some guidance into it? Answer
Add a specific word next to quantity input field for specific products on WooCommerce cart page
I have two products – ‘counseling’ and ‘testing’, and I want to display a specific word (‘sessions’ and ‘testings’) next to (or under) the quantity input field for each of them on the shopping cart page, but I can’t find a hook for this. How this can be achieved? Right now I display a generic word (‘items’) for both products,
How to disable Cash On Delivery for dokan vendors subscription
I am using WooCommerce Dokan (Version 3.2.6 ) multi-vendor plugin. In my website Cash on delivery and pay by card both methods are enable for users. But when any vendor purchasing a package, it is showing Cash On Delivey for that as well, due to which I have to keep track of every vendor manually whether he has paid or
How to check the weight of product in cart based on meta_key?
I am looking for a solution to check the weight in the cart based on meta. for example, it prints: : 5kg in your basket is Cold and Hot 2.5kg in your basket is other I use the following loop to check the meta_key: Then after checking products with a special meta, I want to calculate the weight. Would you
Create a custom user email
I actually wish to have a custom email when a user signs up on the website. Here is the existing code: current result: Thanks for creating an account on (website name). Your username is (user name). You can access your account area to view orders, change your password, and more at: https://www.(website name).com/beta/my-account/ I wish to have this message: Thank
WooCommerce shipping fileds required state
I’m using the function below to show / hide the shipping address section of the checkout based on if a customer chooses local pickup or not. It works fine, however some of the fields in the shipping section are required and so the checkout won’t work if local shipping is selected. Is there a way to make these fields not
How to skip duplicate data in foreach loop
I need help in removing or skipping duplicate data from foreach array, i try to use array_unique() but it doesn’t help. here’s my code. if i have more than 2 products of same category in cart it repeat the same data, which should not. this is what i get from print_r($term_prid) How can i get Answer Save the IDs you’ve
Disable auto-complete fields (auto-fill) on Woocommerce checkout except for some fields
I use below code to disable Autocomplete Fields in the woocommerce checkout page: Above code disables all autocomplete fields. How about I want to enable autocomplete for specific fields like Billing Country and Shipping Country? Answer You found the correct hook woocommerce_checkout_get_value. You just had to add a callback function to it and write logic to return the value of
Automatically add a percentage discount if WooCommerce cart contains at least X products
I am trying to create an automated discount that kicks in when and if the cart contains a minimum of three products or more. If and when that is, a discount of 10% should be given no matter if the customer is logged in or not. This is the code I’m trying to get to work (without success). Answer It