Questions tagged [woocommerce]

WooCommerce: a WordPress plugin. For how-to-use questions, ask their support team. It's mostly open source. On-topic questions: programming which changes or extends WooCommerce behavior. Questions about 3rd party plugins should be asked directly to the plugin support.

is a commercially supported open source available for .

It allow you to freely sell products from your WordPress site. WooCommerce is enterprise-level quality and is built in , , and .

WooCommerce It is now owned by its parent company Automattic.

Before submitting a question

  • Ensure you have the latest versions of WordPress, your theme and all plugins.
  • Check for theme or plugin conflicts. This includes switching to a default WordPress theme such as Twenty Seventeen and disabling all other plugins.
  • Remember, Stack Overflow is not an official support channel for WooCommerce. That support channel is here.

System Status Report
It may help to have a look at the System Status Report to detect some problems and warnings. This can be found in your WordPress dashboard and going to WooCommerce > System Status.

Useful Links


Related Tags

32907 questions
4
votes
0 answers

woocommerce cart page apply coupon form move to cart total

I have tried many coded to do this but not working at all. I tried to edit cart.php & cart-totals.php file to move apply coupon field form into cart total box before shipping calculated. But nothing work. Below is mentioned a code I have used but…
4
votes
1 answer

Change cart item prices based on specific product attribute value in Woocommerce

I am trying to change product price in cart using the following function: add_action( 'woocommerce_before_calculate_totals', 'add_custom_price', 10); function add_custom_price( $cart_obj ) { foreach ( $cart_obj->get_cart() as $key => $value ) { …
ehsan
  • 43
  • 2
4
votes
1 answer

Add a percentage discount based on customer total purchases sum in Woocommerce

In Woocommerce, I would like to set a percentage discount based on customer total purchases sum. For example if the total purchase sum greater or equal to 200$, customer get 5% discount. So, I have first part of code for showing the total…
4
votes
1 answer

Get user meta data from woocommerce_created_customer hook in Woocommerce

I am using woocommerce API to create a customer API is working fine and the new customer is creating fine into WP. But the issue is when I am using a hook "woocommerce_created_customer" I am not able to get user meta data like "first name", "last…
4
votes
3 answers

Adding first name and last name to new account email notification in Woocommerce

My particular problem is adding first and last names to the Customer new account email, and I have tried various methods to do so. Eventually, I ended up looking at the Codex, since woocommerce registration details are saved as user accounts. The…
bobfelstead
  • 71
  • 1
  • 5
4
votes
1 answer

Trigger update_checkout with custom select field in Woocommerce

Problem: The jQuery code doesn't triggers "update_checkout". I have added a custom select field on order review table for customers to choose the tip amount as shown: I want to trigger update_checkout when then select value changes, but it doesn't…
KronosL
  • 299
  • 3
  • 4
  • 11
4
votes
3 answers

Can we stop checkout process on woocommerce using javascript manually?

Can we stop checkout process on woocommerce using javascript manually? I am using this code for submit and want to stop process if certain condition occurs. I tried return false but it doesn't work. JQuery("form.woocommerce-checkout").on('submit',…
Rikhi Sahu
  • 655
  • 1
  • 7
  • 19
4
votes
2 answers

Remove standard css classes of checkout field wrappers in Woocommerce

I'm building an eCommerce website based on Wordpress and Woocommerce. So far everything is going great, but on the last page of the chec-out (billing and shipping), the standard classes of Woocommerce are interfering with the markup of Bootstrap…
user5930504
4
votes
3 answers

Get all orders and orderdata of a single customer in WooCommerce by user ID

I want to get all order amounts and the payment date of orders made by current user inside a plugin. I'm using this code, it currently prints order values: Like this 150001000 where 1st order is 0(starting from right) and 2nd is 100 and third is…
user2940097
  • 63
  • 1
  • 1
  • 6
4
votes
4 answers

Woocommerce how to display products by product SKU

One my client want to display all woocommerce product by product SKU. Normally i used following code for display products. $postArg = array('post_type'=>'product', 'post_status'=>'publish', …
Samir Sheikh
  • 2,283
  • 2
  • 19
  • 37
4
votes
1 answer

Change payment methods location before order details table in Woocommerce

I need to alter the default Woocommerce checkout a little bit. I need to move the payment options ABOVE the order review table, while keeping the "Place Order" button at the bottom below the order review table. I currently have …
Martina Schuberth
  • 105
  • 1
  • 3
  • 8
4
votes
1 answer

Custom editable field in Woocommerce admin edit order pages general section

In Woocommerce, the code below retrieves specific custom order item meta data and adds an editable custom field in the admin edit orders pages, under general section area: function editable_order_meta_general( $order_id ){ $order =…
Ben Tongue
  • 215
  • 4
  • 10
4
votes
2 answers

How to Change Custom Fee order (Ascending/Descending) on cart page (woocommerce )

In woocommerce, I have added a custom fee using the following code: add_action( 'woocommerce_cart_calculate_fees', 'custom_fee_based_on_cart_total', 10, 1 ); function custom_fee_based_on_cart_total( $cart_object ) { if ( is_admin() && !…
Nomal Afzal
  • 65
  • 10
4
votes
1 answer

Get the person type name from cart items in Woocommerce Bookings

I have enabled Woocommerce Bookings plugin and I should need to display person types on the checkout page which are added into cart. I can calculate persons count via this code: foreach(WC()->cart->get_cart() as $cart_item) { $person =…
4
votes
3 answers

Display price on add to cart button from the functions.php file in Woocommerce

Been trying to find something about this, but the solutions I found so far here do not work. I need, in the single product page, to display the add to cart button like this: ADD TO CART - JUST $PRICE It needs to be done from the functions.php file…
Juan
  • 143
  • 2
  • 12