I have a problem trying to do some calculations with woocommerce_before_cart_table custom values and passing them to woocommerce_cart_calculate_fees. The problem is that woocommerce_before_cart_table is loading first and I am not able to pass that values from woocommerce_before_cart_table to woocommerce_cart_calculate_fees hook… How can I pass that calculation on woocommerce_cart_calculate_fees hook? Thanks Answer So If I understand you are making some test
Tag: woocommerce
WooCommerce Show Product Total Sales after Custom a Date in Frontend
I want to show product total sales after custom date: I have this code, but I would like to custom it for showing only the total sales after a custom date for example 05/26/2016 Answer total_sales holds the total sales count of all time, So you need to write custom query to get sold count between specific date. Code goes
Is there a way to Export Product Variations from WooCommerce and into a ‘.csv’/Excel file?
I am currently working on a WordPress website, with WooCommerce functionality. I would like to provide the client with a full breakdown of all the product variations that are currently on the website. For 1 product alone, there are over 500 Product Variations. Rather than type all these up manually, is there not a way I could export these into
Adding an image near the footer on WooCommerce completed orders email notification
I’m trying this code to insert images just near the footer in WooCommerce completed orders email notification, but unfortunately it doesn’t work! Here’s the code I’m trying: Any Clue please? Thanks Answer You should better use a custom hooked function in woocommerce_email_customer_details action hook for example, this way: You could also use woocommerce_email_footer action hook instead which have only one
Get all Orders IDs from a product ID in Woocommerce
How can I get an array with Order IDs by Product ID? I mean receive all orders where specific product is presented. I know how to do this by MySQL, but is there a way to do this by WP_Query function? Answer Updates: 2017 – SQL query changed to “SELECT DISTINCT” instead of “SELECT” to avoid duplicated Order IDs in
Remove WooCommerce checkout fields values
I’m trying to apply autocomplete=”off” on my WooCommerce checkout fields but it just doesn’t work. Is there a way to do that for the checkout form? I checked the docs and there’s nothing available …
How to insert Google Merchant Review JS code in WooCommerce Order Complete page
I want to complete the variables the Google Merchant Review codes asks to be completed on the checkout page: &…
Pre-filing checkout post code with a custom value
I have been using this custom function below in the previous versions of WooCommerce in order to pre-fill the City and ZIP code fields: It has been working great until the new WC updates. The city still works, but the default ZIP code field doesn’t seem to work anymore. It doesn’t automatically pre-polulate the value. Anything changed? Is there any
Grey out Woocommerce product variation based on conditions?
I’ve got a customized WooCommerce shop where I want to be able to grey out certain product variations based on conditions, but I’m not sure where in the code to do it. I have two prices for each item, one is a member price and one is a retail price. I want everyone to see each variation but not be
Requiring minimum variation quantity for customer from a specific state
In our Woocommerce shop, we have 2 variable products (a soft drink) in 330 ml and 500 ml. The 330 ml product has variations: 1 six pack 2 six packs 3 six packs 4 six packs 1 carton (24 bottles) The 500 ml product has variations: 1 six pack 2 six packs 3 six packs 4 six packs 1 carton