How to get the complete state name from a WooCommerce order?

I’m new to WordPress and WooCommerce plugins and such. I’m writing a plugin and I need to send some data to a SOAP API, the case is that the API only accepts the state full name but I’m only getting …

Add, update or remove product custom field in WooCommerce

I use the following lines to save a Value to the database. I have one question regarding this code, when I delete input it still keeps it. The only way to delete that is to put (space) as input. $…

how to get specific key and its value from object

How do I get specific key and its value from object? Example I have output of my query: “attribute_summary”:”Color: Red”, “meta_data”:[ { “id”:…

WooCommerce – Can’t add a inside the return

I’m using the following code to change the add to cart button text in WooCommerce. add_filter( ‘woocommerce_product_add_to_cart_text’, ‘custom_add_to_cart_price’, 20, 2 ); // Shop and other archives …

Include some javascript code in HEAD on WooCommerce Order received

Goal: I need to include an event snippet for specific tracking on the Woocommerce Order Confirmation page (the page immediately following a purchase). I must pass order_id, currency and total to the …

WooCommerce: Add additional form field attributes to WC Vendors Pro

Apologies if I use some of the wrong terminology in my question. I am self-taught and still learning. The code below is part of a form template. I would like to add some additional attributes to the …

WooCommerce programmatically created product ignores prices sorting filter

I have following function to create new woocommerce product on the frontend. parse_str($_POST[‘form_data’], $form_data); $insertPost = array( //’ID’ => $post_id, ‘post_title’ => …

WooCommerce: Set country by default in checkout page for unlogged users

How to make the country default for regular (unregistered users). But if the buyer has a personal account and entered the country there, he would not be thrown into default in checkout? I have tried …

Display a custom delivery notice on WooCommerce orders and email notifications

With the following code I display a custom message on WooCommerce checkout page. When a customer places an order on a Saturday and Sunday, the order will be delivered on the next Monday. If a customer …

WooCommerce – removing country field from my-account page prevents from saving address

I sell and ship products only to one country so I don’t want to display billing_country and shipping_country field to the customers. I removed the fields from both checkout and my-account addresses …