Advertisement
GochiSiyan

1 week subscription time

Apr 3rd, 2022
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. add_action('wp_head',function (){
  2. $users = [];
  3. array_push ( $users, get_user_by('login','jegtest') );//change the user name to the user who you wished to modify the paywall status
  4.  
  5. foreach ($users as $user) {
  6. //update subscription
  7. update_user_option( $user->ID, 'jpw_subscribe_status', 'ACTIVE' );
  8. update_user_option( $user->ID, 'jpw_expired_date', date( 'Y-m-d H:i:s', strtotime( '+1 week' ) ) );//1 week subscription time
  9. update_user_option( $user->ID, 'jpw_stripe_subs_id', 'demo_user_id_subscription' );
  10. update_user_option( $user->ID, 'jpw_subs_type', 'stripe' );
  11. }
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement