What would you be the correct CSS code to hide the pay button for the failed or hold orders on My Account page. I tried this and it is not working. Thanks. Answer You could use the following: CSS PHP
Tag: woocommerce
Access the product attribute selected value in WooCommerce product page
I am building a store which has some product with variations. I want that based on the selection of the user on a select element (It’s an attribute of the product) to hide other elements. I wrote some JavaScript code which is added in the functions.php file to access the value of the select element whenever the user changes the
Display custom taxonomy terms on WooCommerce product archive pages
I’ve create a taxonomy called “couchages” for product with value : 1 couchage, 2 couchages, 3 couchages,… I would like to print the value of this taxonomy, for each product on the archive page, like …
Send an email notification with the generated password on WooCommerce user creation
In WooCommerce with code below I create new WP_User with a random password and set user role to “customer” (I want to create account on purchase automatically). Then I use WC_Emails to send login details to buyer. In that case I need plain password, but I really don’t know why all other data are attached (username, name,…), but the password
How to change woocommerce category id?
I want to change category id in woocommerce table. Example: change id=5 to id=20. I don’t want to delete my categories in my wordpress panel, just change that id from database. Answer why not just go to phpmyadmin and change it? This of course can cause conflicting issues if id=20 is already assigned and its not what you want
Can’t add product images to WooCommerce products
I’m simply trying to upload a product image for each product on the “Edit Product” page on the WordPress backend. However, there is no place to upload a product image. How do I get the product image …
Validate phone number in WooCommerce
I would like to add custom validation to the phone number (billing_phone) on the checkout page and the register page. With 05 Accept 10 numbers Validate phone number in woocommerce checkout page
Remove action buttons from WooCommerce Subscriptions dashboard for a specific user role
I’m looking to bring on a virtual assistant to help manage support tickets. This virtual assistant will need to have reading access to limited areas of WooCommerce (Subscriptions). I’m using ‘user …
Display custom order meta data value in email notifications WooCommerce
Based on the following code Add a custom checkbox in WooCommerce checkout which value shows in admin edit order I tried to add my_field_name to order confirmation email. As I understand I have to use woocommerce_email_customer_details. So I came to this solution, unfortunately without the desired result. Answer You have some minor mistakes, via the if condition “$email->id == …”
Set admin email as BCC for WooCommerce cancelled and failed orders
I am currently using this code to send out notifications on failed and cancelled orders. function wc_cancelled_order_add_customer_email( $recipient, $order ) { return $recipient . ‘,’ . $order->…