I want to check whether any user have permission or not to download any file. I have product id and user id so How I can check? I have explored a lot on google and in woocommerce documentation but didn’t find any solution. Any help? Thanks in advance. Answer 2020 – Code update for WooCommerce 3+ H…
Tag: woocommerce
Woocommerce – Get shipping costs on the product page
I’m using WordPress 3.9.14. I use the flat_rate method for my shipping costs. It contains a default cost_per_order and I use 2 shipping_classes inside flat_rate for additional costs for some …
Woocommerce – How to send custom emails based on payment type
Here is the problem. My woocommerce website has 3 different payment options – Check Payment Western Union Cash On Delivery If my buyer checkout with “Check Payment” I want to send him an automated …
WooCommerce Paypal Standard Gateway – IPN Received but order status stuck on ‘processing’
I have a WordPress setup with WooCommerce using the standard Paypal Gateway. Payments are being received and going through fine. Paypal IPN is being received by the site and marked as “Completed” for an order, but the order status remains unchanged in WooCommerce and still reads as “Processi…
Adding a promotional product when a certain cart amount is reached
I am looking for the right hook in WooCommerce because I need to add a promotional product to the cart when a certain cart amount of is reached, such as 100 conventional units. I have also used the …
Disable add to cart button for an array of products IDs in WooCommerce
In WooCommerce, I’m trying to disable add to cart button for an array of product IDs but I can’t find the problem. I am trying to use this function: And this is my check() function code (update): But this doesn’t work. What am I doing wrong? Thanks Answer Updated for WooCommerce 3+ Use in_ar…
WooCommerce membership plugin
In WooCommerce membership plugin there is a file with name class-wc-memberships-restrictions.php this file have the following class and constructor and that constructor have lots of filters, but I want to remove this filter from my child theme functions.php file How can I remove this filter from child theme f…
Allow checkout only when a product of a mandatory category is in cart
I’d like to stop any customer advancing to the checkout if they do not have a particular product category in their basket. I would also like to tell them with an error message that they need to add a certain product. I’ve found some code but cannot it to work. I’ve added it as a code snippet…
WooCommerce – Remove downloads from menu in my account page
I would like to remove downloads menu from my account page. How can I do this? Is it any hook to remove a specific item from the menu? Thanks. Answer Go to WooCommerce > Settings > Advanced and remove the entry for Downloads in the Account endpoints section, just leave it blank. And the menu will not be…
WooCommerce action hooks and overriding templates
I have started to learn how to create templates with WooCommerce and I had faced with a little problem. For instance, in the php file content-single-product.php of Woocommerce plugin I have strings …