Pending status
-
I recently did an update to current WooCommerce version. I have the code that sets any orders that are paid with COD as a customer status. That works but as soon as it gets set, something else is changing it to ‘pending’
Here is the code I am using within my functions.php theme file:
add_action(‘woocommerce_thankyou_cod’, ‘action_woocommerce_thankyou_cod’, 10, 1);
function action_woocommerce_thankyou_cod($order_id)
{
$order = wc_get_order($order_id);
$order->update_status(‘awaiting-customer’);
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Pending status’ is closed to new replies.