Advertisement
GochiSiyan

subscription

Nov 8th, 2021
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. add_action('wp_head',function (){
  2. $users = [];
  3. array_push ( $users, get_user_by('login','the_user_name') );
  4. array_push ( $users, get_user_by('login','username2') );
  5.  
  6. foreach ($users as $user) {
  7. //update subscription
  8. update_user_option( $user->ID, 'jpw_subscribe_status', 'ACTIVE' );
  9. update_user_option( $user->ID, 'jpw_expired_date', date( 'Y-m-d H:i:s', strtotime( '+1 week' ) ) );//subscription time
  10. update_user_option( $user->ID, 'jpw_stripe_subs_id', 'demo_user_id_subscription' );
  11. update_user_option( $user->ID, 'jpw_subs_type', 'stripe' );
  12. }
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement