Bulk change the order status based on a date in Woocommerce
up vote
1
down vote
favorite
The following sql query will change order status:
update wp_posts set post_status = 'wc-completed' where post_type = 'shop_order' and post_status ='wc-processing' ;
How can I change the order status only on orders that are before a certain date?
mysql sql wordpress woocommerce orders
New contributor
add a comment |
up vote
1
down vote
favorite
The following sql query will change order status:
update wp_posts set post_status = 'wc-completed' where post_type = 'shop_order' and post_status ='wc-processing' ;
How can I change the order status only on orders that are before a certain date?
mysql sql wordpress woocommerce orders
New contributor
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
The following sql query will change order status:
update wp_posts set post_status = 'wc-completed' where post_type = 'shop_order' and post_status ='wc-processing' ;
How can I change the order status only on orders that are before a certain date?
mysql sql wordpress woocommerce orders
New contributor
The following sql query will change order status:
update wp_posts set post_status = 'wc-completed' where post_type = 'shop_order' and post_status ='wc-processing' ;
How can I change the order status only on orders that are before a certain date?
mysql sql wordpress woocommerce orders
mysql sql wordpress woocommerce orders
New contributor
New contributor
edited yesterday
LoicTheAztec
79.8k125992
79.8k125992
New contributor
asked yesterday
R Poole
132
132
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
To bulk change the order status before a date (for example before the 05 OCT 2018
) using this SQL query (making always a database backup before):
UPDATE `wp_posts`
SET `post_status` = 'wc-completed'
WHERE `post_type` = 'shop_order'
AND `post_status` ='wc-processing'
AND `post_date` < '2018-10-05 00:00:00';
Tested and works
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
To bulk change the order status before a date (for example before the 05 OCT 2018
) using this SQL query (making always a database backup before):
UPDATE `wp_posts`
SET `post_status` = 'wc-completed'
WHERE `post_type` = 'shop_order'
AND `post_status` ='wc-processing'
AND `post_date` < '2018-10-05 00:00:00';
Tested and works
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
add a comment |
up vote
0
down vote
accepted
To bulk change the order status before a date (for example before the 05 OCT 2018
) using this SQL query (making always a database backup before):
UPDATE `wp_posts`
SET `post_status` = 'wc-completed'
WHERE `post_type` = 'shop_order'
AND `post_status` ='wc-processing'
AND `post_date` < '2018-10-05 00:00:00';
Tested and works
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
To bulk change the order status before a date (for example before the 05 OCT 2018
) using this SQL query (making always a database backup before):
UPDATE `wp_posts`
SET `post_status` = 'wc-completed'
WHERE `post_type` = 'shop_order'
AND `post_status` ='wc-processing'
AND `post_date` < '2018-10-05 00:00:00';
Tested and works
To bulk change the order status before a date (for example before the 05 OCT 2018
) using this SQL query (making always a database backup before):
UPDATE `wp_posts`
SET `post_status` = 'wc-completed'
WHERE `post_type` = 'shop_order'
AND `post_status` ='wc-processing'
AND `post_date` < '2018-10-05 00:00:00';
Tested and works
answered yesterday
LoicTheAztec
79.8k125992
79.8k125992
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
add a comment |
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
Woohoo! 24739 rows affected. (Query took 0.6414 seconds.) Outstanding, thank you.
– R Poole
20 hours ago
add a comment |
R Poole is a new contributor. Be nice, and check out our Code of Conduct.
R Poole is a new contributor. Be nice, and check out our Code of Conduct.
R Poole is a new contributor. Be nice, and check out our Code of Conduct.
R Poole is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53416945%2fbulk-change-the-order-status-based-on-a-date-in-woocommerce%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown