Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpf_add_custom_order_status() {
- // Add all statuses.
- foreach ( array_keys( wc_get_order_statuses() ) as $orderKey ) {
- $orderStatusName = str_replace( 'wc-', '', $orderKey );
- add_action( 'woocommerce_order_status_'.$orderStatusName, array( wp_fusion()->integrations->woocommerce, 'process_order' ) );
- }
- }
- add_action( 'wp_fusion_init', 'wpf_add_custom_order_status' );
Advertisement
Advertisement