verygoodplugins

Untitled

Jan 12th, 2021
638
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wpf_only_allow_completed( $order_data, $order ) {
  2.  
  3.     // Only sync the order details if the order status is completed and the customer already has the tag MY TAG NAME
  4.  
  5.     if ( 'completed' == $order->get_status() && wpf_has_tag( 'MY TAG NAME', $order->get_user_id() ) ) {
  6.         return $order_data;
  7.     } else {
  8.         return null;
  9.     }
  10.  
  11. }
  12.  
  13. add_filter( 'wpf_woocommerce_customer_data', 'wpf_only_allow_completed', 10, 2 );
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×