Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpf_only_allow_completed( $order_data, $order ) {
- // Only sync the order details if the order status is completed OR if the customer already has the tag MY TAG NAME
- if ( 'completed' == $order->get_status() || wpf_has_tag( 'MY TAG NAME', $order->get_user_id() ) ) {
- return $order_data;
- } else {
- return null;
- }
- }
- add_filter( 'wpf_woocommerce_customer_data', 'wpf_only_allow_completed', 10, 2 );
Add Comment
Please, Sign In to add comment