Advertisement
verygoodplugins

Untitled

Nov 28th, 2024
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. /**
  2.  * Resync a WooCommerce order to WP Fusion.
  3.  *
  4.  * @param int $order_id The order ID.
  5.  */
  6. function resync_woo_order( $order_id ) {
  7.  
  8.     if ( ! is_admin() || ! function_exists( 'wp_fusion_ecommerce' ) ) {
  9.         return;
  10.     }
  11.  
  12.     wp_fusion_ecommerce()->integrations->woocommerce->send_order_data( $order_id );
  13. }
  14.  
  15. add_action( 'woocommerce_process_shop_order_meta', 'resync_woo_order', 100 ); // 100 so it runs after other data is saved,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement