Using Woocommerce 2.6.8 , I can’t get the Order Item Data information as described in the docs and here on SO. All I want is to get the Line Item price and Quantity, which should be as simple as: Looking closer at what gets returned returned This is all using documented Woocommerce methods, why is the i…
Tag: wordpress
WordPress: Check if plugin is installed (ACF)
I want to prevent fatal error in my theme if the ACF plugin is deactivated or not installed. The main function of the plugin is get_field(). I wrote this code in my functions.php to check: if ( !…
How do I stop WordPress from redirecting certain links automatically on homepage?
I want to display filtered results on the homepage of a WooCommerce shop by editing the URL. I have a filtering option by tag, category and price range. The URL for filtering by tag would look like this: And that redirects automatically to Which I don’t want because I want to add other filtering options…
Check if user have permission or not to download any file in WooCommerce
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…
Sorry, you are not allowed to access this page. – wordpress
i am getting this error message “Sorry, you are not allowed to access this page”. when i go to my page http://localhost/wordpressstuff/wp-admin/options-general.php?page=editstuff?id=4 that is when i get the error but when i remove ?id=4 it removes the error i am trying to do a edit mysql table row…
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…