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…
Tag: wordpress
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 an…
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 …
Filter WP REST API by taxonomy value (value1, value2, value3 etc…)
I’m trying to filter my Custom post type taxonomy by values, but I haven’t had any success. I wondered if anyone else knew how to you’d go about doing this, or maybe I’m taking the wrong approach here? Thanks Answer You can pass tax_query in your post query like this: Also you can filt…
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 …
WordPress – Showing custom menu links while showing child pages
I have this loop that simply shows all child pages of the current page:
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. Answ…
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->…
Change order status for virtual, downloadable, free or backorder products in WooCommerce
i try to slightly modify with +1 check for plugin located here So , for all Virtual Downloadable Free (price=0,00) & on Backorder products I want Woocommerce to set order status ‘Processing’ the …