Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( is_user_logged_in() ) {
- $user_id = get_current_user_id();
- $registration_field_1 = get_user_meta( $user_id, 'registration_field_1', true );
- $smsDone = get_user_meta( $user_id, 'smsDone', true );
- if(!empty($smsDone) && $smsDone === 'True'){
- }else{
- $respuesta = wp_remote_get( "http://apiWebsite.com/messageapi.asp?username=key&password=somepwd@1&sender=key2&mobile=".$registration_field_1."&message=Your%20Profile%20is%20registered%20successfully%20.%20You%20are%20precious%20to%20us%20and%20we%20are%20glad%20to%20serve%20you%20better.%20Regards,%20The%20Astrochannel%20Team.");
- update_user_meta( $user_id, 'smsDone','True' );
- }
- }
- add_action('user_register','send_sms');
- function send_sms($user_id){
- // Code for your SMS API Here
- }
Add Comment
Please, Sign In to add comment