How to delete the order of woocommerce

Looking for the best way to delete the order of woocommerce

? In this guide, we will show you various methods to delete orders in your e -commerce store. Before we understand how to operate, let us better understand the reason you may need to delete orders.

Why delete orders in Woocommerce?

As an e -commerce business owner, it is always a good thing to receive a large number of orders. By default, you can use order status to manage orders and automatically change them. You can view the products that have been delivered or canceled as well as a refund and failure state.

Due to all these records,

in your database loaded a lot of order data

. Orders are also a type of post, which means they are stored in the WordPress database. Although WordPress does not have any restrictions on users, posts, pages, and plug -ins, your hosting server must have restrictions.

Having a large database will affect the performance of your website, Because of your server It takes more time to receive information from the database table. This will cause the website to load slowly, and in most cases, your website may collapse.

Therefore, it is very important to delete the order of Woocommerce to clean up the database and maintain the best performance of the website.

How to delete the order of woocommerce?

The main method of deleting woocommerce The following are the following three types :

Use the default WooCommerce option

Use plug -in

  1. Use SQL to query by programming
  2. Let us check each method in detail.

1. Use the default WOOCOMMERCE option to delete orders

Woocommerce provides you with some default options to delete various orders in Woocommerce. First, let’s see how to delete a single order in Woocommerce.

1.1) Edit order page You can easily delete the order from the editing order page. Just turn on your WordPress dashboard to

WooCommerce \u0026 GT; Order

. Here, you can view all orders and their own date and status.

Then, click the order deleted from the database, you will be redirected to the editing order page.

You can edit the date of editing the order page, change the order status, add remarks, and add customer bills and transportation details. But to delete the order of woocommerce, you need to click the \”

to move to the trash can 删除 woocommerce 订单\” link on the right side of the screen.

It will move the order to the trash bin.

However, the order is not completely deleted because it is only in the trash bin. If you want to delete orders permanently, you must also delete it from the trash can.

删除woocommerce订单 Therefore, turn to

woocommerce \u0026 gt; order

, and then click

garbage

tag. Then, select the check box for the order you want to delete completely, and then select permanently in the batch operation drop -down menu . Finally, click to apply to permanently delete orders.

If you want to permanently delete all orders in the trash can, you can also simply click [123 ] Clear the trash can .

1.2) Batch delete order

It is easy to delete a single order. However, if you have to delete multiple WOOCOMMERCE orders one by one, this may be very time -consuming.

从垃圾箱中删除删除woocommerce订单 But the default WOOCOMMERCE dashboard also allows you to delete them in batches. You can even delete orders according to the order status.

For this, please turn to

WooCommerce \u0026 GT; Order

. If you have orders for different order status, such as to pay, processing, suspension, completion, etc., you can choose them from the order list.

Assuming you want to delete all the completed orders. In this case, you can choose \” to complete\”

status option.

There, you can find all the completed orders and the checkbox next to it. You can click on the order check box, which will automatically choose all orders that have been completed. Therefore, instead of clicking the check box, it is easier to make things easier and faster.

Now, select [123 123 in the batch operation drop -down option [123 ] Move to the waste bin option, and then click to apply . Keep in mind that this will not delete orders, but move to trash can.

Similarly, to delete orders permanently, please transfer to the trash can and select all the orders you want to delete. Finally, click in the drop -down menu to permanently delete the option. Finally, click

\”Application

\” button. 删除 woocommerce 订单批量操作

As mentioned earlier, you can also click

to clear the trash can

to permanently delete all orders in the trash can. 1.3) Filtering option (Date/Registered Customer)

You can also use the filter option on the on the WooCommerce dashboard to delete the WooCommerce order

. You can find the filter option above the order list.

If you click \” All Date

\”, you will get a drop -down menu displayed by month and year. After that, what you need to do is

Click the order of a specific month

. Here, we chose an order in November 2021.

As you can see, all orders and order status are Show in the selected month. Just like the previous steps, we can

select the order and move them to the trash can , and then delete them permanently. Similarly, we can also use registered customer options to filter our orders. You can type and search for the name of the client of your Woocommerce store. Then, click the filter

button. After that, you can see all orders from registered customers to be deleted.

删除 woocommerce 订单过滤器选项

Once again, we repeatedly delete the order and move it to the trash can . Then we can finally passClear the trash can to delete them.

That’s it! You have successfully deleted the Woocommerce order from the WooCommerce dashboard . By default,

Woocommerce lists 25 orders at a time

, which means that you can only select and delete 25 orders from the order page. Yes, you can delete more than 25 orders by changing the screen options. But manual operation may take a lot of time, and you must clean up the garbage to permanently delete orders.

Not only that, you will receive the same request over and over again, which may be [123 123 ] Cause server errors.

But in order to avoid these restrictions, you can use a special plug -in to delete the Woocommerce order.

2. Use plug -in to delete the WooCommerce order

You can also use the plug -in to delete the WooCommerce order. Many plugins can help you delete orders in Woocommerce. But for this tutorial, we will show you how to use

Smart Manager for Woocommerce plug -in to delete the WooCommerce order. As the name implies, the plug -in allows you to manage the type of Woocommerce post in a very intelligent way. You can management orders, products, blog articles, coupons and other post types , and even manages any custom fields of other plug -ins. These post types can even be searched with conditions for filtering with the help of this plug -in.

2.1) Install and activate the plug -in

] To start using the plug -in, you need to install and activate it first. So from your WordPress dashboard to

plug -in \u0026 gt; add a new and search for plug -ins. After displaying the plug -in, click to install immediately

to install the plug -in. After the installation is completed,

activates the plug -in. If you want to use the high -end version of the plug -in, you can and install the plug -in manually. Please check this guide to understand how to manually install the WordPress plug -in to get more information.

2.2) The best part of this plugin is removed from the plug -in interface 删除woocommerce订单

You don’t need additional configuration and settings. After activating the plug -in, you only need to turn from the WordPress instrument board to

Smart Manager

, which will redirect you to the plug -in dashboard.

At the top, you can see the navigation bar, you can use the drop -down option to select the type of post. Generally, the default post type is displayed as \” Product \” or \” post \”. You need to set this option to Orders

.

Click After the order , you can view all the data of the WooCommerce order in a table. If you need to screen orders according to the order status, you can also enter your order status in the next option . Here, we chose the order status of completed

.

Now you can start to choose an order to be deleted in the check box. Under the navigation bar, you can see a operating bar . You can edit data from batch data, print orders invoice, add records, copy and delete and export CSV.

When hovering the mouse on the \”Delete\” option, you will get two options, 删除 woocommerce 订单智能管理器, that is, permanently delete the order

or move the order to the trash bin. Select the option you like, and the plug -in will delete the order accordingly.

2.3) Use high -level search and conditions to delete orders or, you can also use Advanced search to delete orders. You can find a high -level search switch on the navigation bar. Enable switching will enter a page, you can select orders with multiple condition options in them. This option is unavailable in the WooCommerce default instrument board.

删除woocommerce订单

Here, we chose the order we want The order status is to be paid. Select the order status from the drop -down menu and click

Search

.

You will be able to see everything in the resultOrder for processing status. Choose an order you want to delete and delete them permanently, or move them to the trash bin like the previous step.

3. Delete the WoOOCOMMERCE order by programming-use SQL query

We can see that compared with the default WOOCOMMERCE option, delete special plug-ins using deleted plug-ins. Woocommerce orders are very fast and convenient. However, if you don’t want to add additional weights to your website by adding a plug -in, then you can also use a programmatic method to delete the Woocommerce order. We will add SQL query to your database to delete orders using this method. To visit your database, you need to log in to your phpmyadmin . If you do not have a PHPMYADMIN credential, you can access it through CPANEL or contact your hosting service provider.

Note

: Make sure to always create a website and a database before editing core files Backup. This ensures that you can always restore your site and data when you have problems. It is best to try these SQL queries on the local host deposit site.

After logging in to PHPMYADMIN, you need to find your website database.

According to your WordPress database, the prefix can be different, not \”

wp_ \”. By default, it is \”

wp_

\”, which is the same in our example. However, if your surface prefix is \u200b\u200bother things, please replace \”

wp_

\” to your custom WordPress database prefix.

Now go to the SQL tab and add the following code segment in the query section. And click GO . Update wp_posts set post_status \u003d \u0026#39; trash \u0026#39; where post_type \u003d \u0026#39; shop_order \u0026#39;;

You can execute this The simple SQL command moves all orders to the trash bin.

After moving all orders to the trash bin, make sure to turn to

WOOCOMMERCE \u0026 GT;Order \u0026 gt; trash can

and permanently delete the order. This is the same as mentioned in the previous steps.

However, if you have a large order and want to skip the trash can, you only need to add -force to the end of the command.

WP Post Delete $ (wp post list-POST_TYPE \u003d \u0026#39; Shop-Order \u0026#39;-Format \u003d IDS)-Force 删除woocommerce订单phpmyadmin

For order, you can also update the code segment like this:

Update wp_posts set post_status \u003d \u0026#39; trash \u0026#39; where post_type \u003d \u0026#39; Shop_order \u0026#39; and post_status \u003d \u0026#39; wcc -Completed \u0026#39;

If you want to delete orders with different states, the following is the available option you can replace:

wc- complete

 

wc- To be determined

Toilet processing

The toilet suspension

WC- cancellation Toilet refund

WC- failure

删除 woocommerce 订单清空垃圾箱

In addition, if you just want to delete orders according to the order status of multiple choices, instead of all orders or only choose order status, you can try the following inquiries:

Update wp_postsset post_status \u003d \u0026#39; garbage \u0026#39; where post_type \u003d \u0026#39; Shop_order \u0026#39; and Post_Status in (\u0026#39; WC-Pending \u0026#39; WC-Processing \u0026#39; WC-ON-Hold \u0026 #39 ;, \u0026#39; WC-Cancelled \u0026#39;, \u0026#39; WC-Refunded \u0026#39;, \u0026#39; WC-FAILED \u0026#39;) You can use any SQL as needed as needed Inquire. After saving each SQL query, turn to your WordPress dashboard and check whether the code is valid.

 That's it! This is how you can use SQL to query the way to delete the Woocommerce order. 

Reward: How to be in WoocommerceExport orders

 We provide you with several methods to delete the Woocommerce order. However, deleting orders may not always want what you want. Sometimes you may still need to export them. 

The simplest and fastest way to guide orders in Woocommerce is to use special plug -ins such as

Order Export \u0026 Amp; Order Import

    . Before the beginning, let us remind you that one of the compatible WoOOCOMMERCE themes set woocommerce in the correct way to avoid any theme or plug -in conflict.

  • Let us start with installation and activation plug -ins. Go to your
  • wordpress instrument board \u0026 gt; plug -in \u0026 gt; add a new

  • and search for order export and order introduction of WooCommerce in the search bar. Then click
  • to install the

  • button immediately and
  • to activate

  • it.
  • After activation, you can see new settings under the WoOOCOMMERCE in the sidebar.

You can export your customer order by configuration. For this reason, please go to

WOOCOMMERCE \u0026 GT; Order IM-EX.

 

After entering the plug -in configuration, you can choose the status and date range of the order you want to export. Select your order status, start date and end date for your order. Then, click

to export the order

.

Now, this plug -in will extract your WOOCOMMERCE order data and

create a custom CSV file

. You can save the file to any position on the computer.

As you can see, it is very easy to export the Woocommerce order. If you want to know more information about using various other plug -in export and importing Woocommerce orders, check this article.

Conclusion

In short, deleting orders from the store can help you avoid the risks caused by database overload. In this tutorial, we saw the three main methods of deleting orders in Woocommerce: instrument panel Bring plug -in

)

If you are looking for a fast and risk -free method, then use the plug -in to delete woocommercThe best way to order E.But if you don’t want to use a third -party tool and you are familiar with PHPMYADMIN, then you can also use SQL to query to delete the WooCommerce order .

We also mentioned the reward part of the export of Woocommerce orders in this article.If you want to know more information about Woocommerce orders, we even provide detailed guidelines for repeating WooCommerce orders, using automatic completion of WooCommerce orders to automatically complete orders or even refund orders.
At the same time, please see the following posts to obtain more information about the relevant database and Woocommerce orders:

How to update the WordPress database

The best order in woocommerce order is the best to repeat orders.Plug -in

How to test the WooCommerce order

If you think this article is useful, please share with your friends through social media channels.Have you tried any way?If so, please share your experience in the comment section.

Author:

Leave a Reply

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