Advertisement
verygoodplugins

Untitled

Feb 10th, 2021
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1.  
  2. function wpf_only_allow_completed( $order_data, $order ) {
  3.  
  4. if ( 'completed' !== $order->get_status() && ! wpf_has_tag( 'Clienti - Ordine Completato - Identificazione Effettuata', $order->get_user_id() ) ) {
  5.         return null;
  6.     }
  7.  
  8.     return $order_data;
  9.  
  10. }
  11.  
  12. add_filter( 'wpf_woocommerce_customer_data', 'wpf_only_allow_completed', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement