Hi @samgwd,
You could use this code snippet below and edit the section $order->update_status( 'completed' ); to be $order->update_status( 'processing' );.
https://docs.woocommerce.com/document/automatically-complete-orders/
It’s worth noting that nearly all payment gateways will themselves set a limit of 7 days for an authorised charge to be captured. After 7 days if that authorised payment is not captured the payment gateway would invalidate that.
This is not a limitation of WooCommerce or it’s order statuses and it’s the payment service provider themselves who would invalidate the authorised charge if not captured within their allowed timeframe.
Thread Starter
samgwd
(@samgwd)
Hi,
This code snippet seems like it would change the order status straight away. I only want the status changing after 7 days
Hi @samgwd,
If you would like to change the order status after 7 days that would require some more complex code development. If you’re familiar with PHP you may be able to adapt this code below to work for your purpose.
https://stackoverflow.com/questions/42422507/automatically-change-woocommerce-order-status-after-specific-time-has-passed
This Google Search may also contain some code samples which you could possibly edit for your purpose.
If you require some assistance with writing custom code functions you could also investigate hiring a developer to help you with such tasks. If you would like to explore that possibility further, you could reach out to the folks over at Codeable via this link below.
https://woocommerce.com/customizations/
Thread Starter
samgwd
(@samgwd)
Okay thank you for your help!