On woocommerce storefront header, for not-logged users, I want to replace the search box area with 2 gold bootstrap buttons: “Login”, “Register” (like the stackoverflow landing-page header), to send guests to my customized login/register urls. With your help I have this PHP and CSS snippets that work fine to hide the search box for no-logged users, but I don’t know
Tag: woocommerce
How to do 301 redirections after WordPress Permalinks change
I changed the Woocommerce permalink structure of my site and I would need some 301 redirections Help. Woocommerce product permalinks were configured according to the structure: And now according to the structure: What lines do I need to add to the .htaccess file to do 301 redirections, please? UPDATE: /shop/%product_cat%/ is a Permalink Structure in WordPress that means example.com/shop/category1/subcategory1/MyProduct and
How to hide the storefront search box for not logged users?
On woocommerce storefront header, I want to hide the search box for not-logged users, and replace it with 2 yellow buttons: “Login”, “Register” (like the stackoverflow landing-page header) that send to my customized login/register urls. I tried this CSS code that works to hide the search box, but I don’t know what to do next: Answer You can use the
How to clear specific billing field value from WooCommerce checkout
I am trying to clear the billing_po_no field value from my WooCommerce checkout billing Form, by adding the following code into my functions.php file: But it does not appear to be working. Can someone point me in the right direction? Answer Try the following instead: Code goes in functions.php file of the active child theme (or active theme). It should
Remove out of stock products from WooCommerce related products custom WP query
hello I want to show related products based on my custom query but I just want to show ‘in_stocks’ products and meta_query not working with tax_query. anyone can help me? $query_args = array( ‘…
WooCommerce Price Filter – trigger on change instead of submit
Does anyone know how I can customize the WooCommerce price filter widget to filter on a ‘change’ trigger instead of having the submit button? It is located in templates/content-widget-price-filter.php – but since it is made as a form, does that mean I HAVE to use a submit button to trigger the event? Answer In your child theme, you could create
Add an email attachment to WooCommerce notifications based on product category
For some of my product I need to send an additional pdf (not an invoice) to my customers. With the help of this post: https://wordpress.org/support/topic/attach-pdf-to-confirmation-email-for-specific-product/ I was able to attach an attachment to every order confirmation email. Then I tried to change the code to filter by product sku. In this post I found some infos about the variables that
Automatically generate username based on user ID in WooCommerce
I’m working on a WooCommerce project where each user have an ID number. I would like to use the default WooCommerce username field for this user ID. When creating an account, can I automatically generate an account username for the customer based on their user ID? Example: User ID = 101, Auto generated Username = 101 Is it possible? Any
Hiding element (row) in woocommerce account page
I want to hide one row in the table on account page in woocommerce. This item is called ‘end’ or ‘end date’ in the table class = shop_table subscription_details. https://github.com/wp-premium/woocommerce-subscriptions/blob/master/templates/myaccount/subscription-details.php How can I do it will a CSS snippet? Answer You should not use CSS to hide this but rather replace the template in your child theme. Woocommerce uses a