[ad_1]
Hello @warrisr
Here is the content of your request for purposes of keeping it all in one place:
When an order is paid for using PayPal, the order status is set to ‘processing’. We need to have the order status set to ‘on-hold’ as we need to review and approve the order before it is processed. How can I configure the plugin to do this?
You can control the status of the order using filters provided by WooCommerce. Example:
add_filter('woocommerce_payment_complete_order_status', function($status, $order_id, $order = null){
if($order && in_array($order->get_payment_method(), ['ppcp'])){
$status="on-hold";
}
return $status;
}, 10, 3);
Kind Regards
Thanks! That solved the problem.
-
This reply was modified 4 minutes ago by
warrisr.