woocommerce how to cancel order

WooCommerce Docs

Documentation, Reference Materials, and Tutorials for your WooCommerce products

WooCommerce Refunds

With WooCommerce 2.2 and newer, you can now process refunds directly from within an order automatically if your payment gateway supports it or you can do so manually.

Continue reading or jump to those sections for automatic or manually refunds: Automatically or Manually

Automatic Refunds ↑ Back to top

If your payment gateway supports automatic refunds, there will be new settings in your gateway’s settings to fill in. Make sure those are setup correctly or refunds won’t work as they should. Refunds extend to products, taxes, and shipping fees and can be processed through your order page.

Settings > Payment > Your Payment Gateway if your Payment Gateway supports automatic refunds. " width="728" height="270" srcset="https://docs.woocommerce.com/wp-content/uploads/2014/09/Automatic-Refund-API.png 728w, https://docs.woocommerce.com/wp-content/uploads/2014/09/Automatic-Refund-API-550×203.png 550w" sizes="(max-width: 728px) 100vw, 728px" /> Here is an example of the settings you would see when you go to WooCommerce > Settings > Checkout > Your Payment Gateway if your Payment Gateway supports automatic refunds.

Adding the API keys in your Payment Gateway settings will allow for quick, automatic refunds through the WooCommerce admin interface. Next see the steps below on how to process a refund on an order.

  1. Go to: WooCommerce > Orders
  2. Select the order you wish to refund.
  3. Click the grey Refund button to start.
  4. Specify the quantity of the product(s) to be refunded in the text box(es) that appear for each line item. The refund amount will automatically adjust based on the products refunded. If inventory levels are not managed, you can also simply enter the Refund amount, without adjusting the product quantity. If the quantities of items are not set when issuing a refund then the order is not marked as refunded and the email that is sent will say “partial refund.”
  5. Add refund notes, if desired.
  6. Click Refund $X via [Your Gateway]

In the Order Items there will be a note that has been added to let you that a refund has been processed. If a refund had been completed for the entire order, the order status will be automatically changed to refunded. If a partial refund was awarded, the status will not change.

When using automatic refunds through the WooCommerce interface you will not need to log into your payment gateway’s dashboard to process the refund as this provides a seamless WooCommerce experience. ��

Manual Refunds ↑ Back to top

Refunding manually allows you to utilize any WooCommerce payment gateway, regardless of automatic refund support. This will not automatically send the refund to your payment gateway, but allow you to mark the order as refunded on the order. Refunds extend to products, taxes, and shipping fees and must be processed directly with your Payment Gateway.

To manually refund an order:

  1. Go to: WooCommerce > Orders
  2. Select the order you wish to refund.
  3. Select the Refund button.
  4. Enter amount to refund.
  5. Add refund notes.
  6. Click Refund Manually

The items selected for the refund will be noted as refunded. You will need to manually change the Order Status accordingly if you wish to see the order status changed to “Refunded”.

Once the refund has been applied to the order it will look like this:

Products Stock ↑ Back to top

Please note that when processing a refund you have the choice to restock products by checking the following option:

FAQ ↑ Back to top

How do I find out if my payment gateway is refund compatible? ↑ Back to top

Refer to our list below to see if the gateway you’ve purchased from WooCommerce.com supports refunds. These do.

If you are using a payment gateway not included on this list, see: How to check if your payment gateway supports refunds.

Relevant Links

How to Get Help

WooCommerce – the most customizable eCommerce platform for building your online business.

Woocommerce how to cancel order

In My WooCommerce website I am using this plugin WooCommerce Order Cancel for Customers which allow customers to cancel their order based on payment type and on a time delay. But the cancel button only appears on the " woocommerce_order_details_after_order_table ".

I would like this cancel button to appear in the "My account" > "Orders list" near the "View" button:

I have tried to edit the plugin and adding this code: add_filter(‘woocommerce_my_account_my_orders_actions’, array($this, ‘order_cancel_button’), 10, 2);

But it doesn’t work: the View button is gone and the Cancel button is not displayed.

Here is the whole code:

How can I make the "Cancel" button appear in My account > Orders list, in the action column?

Old Update regarding your comment: The cancel button is available 3 days (from creation date) and solved a bug issue when the cancel button is pressed (maid on January 2018)

Without editing or using this plugin, you can make enable the cancel button in My Account > Order list in the action column, using this little snippet of code where you will set:

  • The order statuses: where you want the "Cancel" button to appear
  • The duration (in days) from the order creation date.

Here is that code:

Code goes in function.php file of your active child theme (or theme) or also in any plugin file.

This code is tested on Woocommerce 3+ and works. You will get something like:

Note: The default order statuses returned in this function are ‘pending’ and ‘failed’

You can also use the WC_Order object argument in the function to set some custom conditions.

Description

A WooCommerce extension that will empower your customers to cancel order within a certain amount of time. You can set the time within when they can cancel an order. The order button will appear on order details page ( domain.com/my-account/view-order/20/ ). Once Your customer cancel the order then You will get an email about that and you can take necessary actions.

You can set the following settings in the plugin:
– Activate/De-Activate Cancel Order Feature
– Eligible Order Status for Cancel
– Threshold Time for Cancel order ( in minutes )
– Order Cancel success message
– Notification email data

Screenshots

  • Admin Panel Settings
  • Cancel Order Section in Order Details Page
  • Cancel Status in All Orders Sections – User
  • Cancel order in Admin Section
  • Email Copy to Admin Email Inbox

Installation

Automatic installation

To do an automatic install of this plugin, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type “WooCommerce Order Cancel for Customers” and click Search Plugins. Once you’ve found this plugin, you can now install it by simply clicking “Install Now”.

Manual installation

The manual installation method involves downloading this plugin and uploading it to your webserver via your favourite FTP application. The WordPress codex contains instructions on how to do this here.

Automatic installation

To do an automatic install of this plugin, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type “WooCommerce Order Cancel for Customers” and click Search Plugins. Once you’ve found this plugin, you can now install it by simply clicking “Install Now”.

Manual installation

The manual installation method involves downloading this plugin and uploading it to your webserver via your favourite FTP application. The WordPress codex contains instructions on how to do this here.

Can I set by when a customer can cancel an order?

Yes Sure! You can set that in the settings page of this plugin

Can I customize the features?

Yes sure! All the actions and data are hookable. Please check the source code and it’s really easy to extend the functions

How can I get support?

Please create an issue in the github/support forum. I will try to provide support.
GitHub repository ��

Can I contribute?

Yes you can! Join in on our GitHub repository ��

Leave a Reply

Your email address will not be published. Required fields are marked *