Advertisement
verygoodplugins

Untitled

Jul 4th, 2024
788
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. function wpf_add_custom_order_status() {
  2.  
  3.     // Add all statuses.
  4.     foreach ( array_keys( wc_get_order_statuses() ) as $orderKey ) {
  5.         $orderStatusName = str_replace( 'wc-', '', $orderKey );
  6.         add_action( 'woocommerce_order_status_'.$orderStatusName, array( wp_fusion()->integrations->woocommerce, 'process_order' ) );
  7.     }
  8.  
  9. }
  10.  
  11. add_action( 'wp_fusion_init', 'wpf_add_custom_order_status' );
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement