Advertisement
verygoodplugins

Untitled

Jan 5th, 2020
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. function custom_apply_tags() {
  2.  
  3.     // Don't run if WPF isn't active
  4.  
  5.     if ( ! function_exists( 'wp_fusion' ) ) {
  6.         return;
  7.     }
  8.  
  9.     if ( isset( $_POST['plan_id'] ) && $_POST['plan_id'] == 'OutdoorBodyMembership' ) {
  10.  
  11.         wp_fusion()->user->apply_tags( array( 'Outdoor Body Membership' ) );
  12.  
  13.     } elseif ( isset( $_POST['plan_id'] ) && $_POST['plan_id'] == 'Elite' ) {
  14.  
  15.         wp_fusion()->user->apply_tags( array( 'Elite Membership' ) );
  16.  
  17.     }
  18.  
  19.  
  20. }
  21.  
  22. add_action( 'init', 'custom_apply_tags' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement