I want to modify my WordPress site theme feature, and modify the search tool from header to show just related products, instead showing me blog post. I searched a little, and found that just need to …
Tag: wordpress
How to restrict a menu item and its content to logged users in WooCommerce
On WordPress, I’m setting up my online shop with WooCommerce plugin. I have a PHP script that generate a pricing table. But actually everyone can see it. How can I add it to my WordPress menu and no one could see it without being login in? Answer In your script you will add is_user_logged_in() in an IF …
Remove duplicated imported orders in Woocommerce
I have duplicate orders in Woocommerce and I would like to delete them to only keep unique for clean bookkeeping. I am not good at SQL, I wrote this request but it lists both duplicate when there is a duplicate. which gives me 307 results. How can I write the right request to delete the duplicates and only ke…
Display specific formatted product attributes in WooCommerce cart items [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago. Improve this question In woocommerce I am able to display some formatted product attributes under my products on t…
Remove default selected state from woocommerce checkout billing shipping fields
I have selected default country from admin end United State, but problem is that the state Oregon is coming as the default selected I want to leave state field not default selected so the customer can free to search and select the state any suggest: below is the screenshot country is ok but state need empty t…
Send failed order email notification to the customer in Woocommerce
I’m using the following code in my theme functions.php file to send order failed email only to customer instead of admin: And it works… But I’m getting the following error in php log file: How can I solve this error? Answer You need to replace billing_email by the WC_Order method get_billing_email…
Changing the titles on My Account pages in Woocommerce
I’ve seen loads of example of how to re-order / change the navigation and page with the WooCommerce my account dashboard. But i can’t for the life of me work out how to change the main titles for each section (My Account, Orders, Downloads, Addresses etc). I’ve searched through the templates…
Add a Contact Form to “Out of Stock” product Variations in WooCommerce
I have successfully added a contact form to a product if it is Out of Stock using But I also want to add the same form if a products variation is Out of Stock too. Just unsure as to which hook I can use to tie it in to the Out of Stock message for that variation… I feel like
Woocommerce Session cookie not set on ajax when using admin-ajax.php
I have a WordPress ajax function which is using the WC()->session to take session data and use it in the function. (for exmaple taking chosen shipping method from the session and displaying it). The …
Make WC_Cart add_to_cart method working for guests in Woocommerce
Im trying to get my code to work. Searching for hours now. I found similar questions like this one. But unfortunately noone seems to find a solution. In my custom plugin I want to add a specific …