Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the easy-digital-downloads domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/danigirol0/www/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/danigirol0/www/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the metform domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/danigirol0/www/wp-includes/functions.php on line 6121
Cambiar el estado de un pedido en woocomerce desde funcion, actualizar estado pedido - Dani Girol

Cambiar el estado de un pedido en woocomerce desde funcion, actualizar estado pedido

$order = new WC_Order( ID );
$order->update_status( ‘wc-completed’ );

/*
‘wc-pending’ => _x( ‘Pending Payment’, ‘Order status’, ‘woocommerce’ ),
‘wc-processing’ => _x( ‘Processing’, ‘Order status’, ‘woocommerce’ ),
‘wc-on-hold’ => _x( ‘On Hold’, ‘Order status’, ‘woocommerce’ ),
‘wc-completed’ => _x( ‘Completed’, ‘Order status’, ‘woocommerce’ ),
‘wc-cancelled’ => _x( ‘Cancelled’, ‘Order status’, ‘woocommerce’ ),
‘wc-refunded’ => _x( ‘Refunded’, ‘Order status’, ‘woocommerce’ ),
‘wc-failed’ => _x( ‘Failed’, ‘Order status’, ‘woocommerce’ ),
*/