I follow this thread that works perfectly: Set discount based on number of orders in WooCommerce. But in my case I need to apply the discount not to the order total, but to the shipping cost and I would like to do this only for a specific country, specifically UK. For example: ONLY First order: 6€ (flat rate shipping cost)
Tag: orders
Auto assign a shop manager to a new WooCommerce order based on variable increment
I’m trying to assign every new order to a list of shop managers. What I need is like a queue, so every time a new order is created assign to the next shop manager in the queue. This is the code I have: The problem I’m dealing with now is that the $i variable can’t be stored even though I
Setting custom order statuses as paid in WooCommerce
I have a custom status that I need to set as ‘paid’, in the same sense that the core statuses Processing and Complete are ‘paid’ statuses. I need to do this because WC is synced to accounting software, and the sync is unable to generate a sales receipt for an unpaid order. It works fine when using Complete or Processing
How to set a maximum limit in WooCommerce orders per item & per day
I want to allow only a specific number of orders per product per day on my shop. Any idea which hook do I have to add? Thanks Answer The code below uses the product ID to get the total quantity for the current day. If this is higher than or equal to the $dailyOrderLimit that you set (in my example,
Show order downloads in admin new order email notification in WooCommerce
How can I include this “Downloads” section (attached) in the admin email? By default, WooCommerce only sends it to the customer, not the store owner. I tried looking at articles that showed how to customize WooCommerce emails and I think that woocommerce_email_order_details is the hook that I’m looking for. However, I am stuck with just this piece of information as
Display product thumbnail in existing product column in WooCommerce quick order preview window
I’m trying to display WooCommerce product thumbnail to WooCommerce Quick order window, I tried using ‘woocommerce_admin_order_preview_end’ and ‘woocommerce_admin_order_preview_get_order_details’ in the below code but nothing changed, Can anyone point me in the right direction? thanks! My Attempted codes Answer Via woocommerce_admin_order_preview_line_item_columns filter hook, we have the option to remove the existing product column and add a new column, for order preview.
Add random string to WooCommerce order items based on product SKU
I have set up variable products within WooCommerce. Each variation has a unique SKU. My mission is to inspect the SKU within the cart, then according to the SKU, generate a number of random strings (16alphanumeric characters). If item (1) in the cart is SKU ‘ABC’, then (x) number of unique strings are generated and stored for the respective order.
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 …
Display bookings date time in Woocommerce admin order list
In Woocommerce with Woocommerce Bookings, I have the following to add the booking details in WooCommerce order preview, below each order item: How to display the booking date and time (not the order date and time) in in the woocommerce admin orders list under the billing_address column? Any help is appreciated. Answer You can use the following to display the
Add WooCommerce booking date and time to admin orders preview
Hey I am using Woocommerce with an additional extension (Woocommerce Bookings and I wondered if there is custom code that would display the booking date and time (not the order date and time) in the woocommerce order preview I found several codes mostly by LoicTheAztec that let you insert product and customer information in certain columns. If you click on