• Resolved chrisschwab1

    (@chrisschwab1)


    Hey,

    I have a very strange behaviour of the wp_sms_send function.
    I would like to put the number as a variable into the needed array:

    $final_tel= array( $monteur_tel );
    wp_sms_send( $final_tel, $msg, $is_flash);

    … but this is not working. $monteur_tel ist the same as “xxx”.
    But when i write the number directly in the array (xxx):

    $final_tel= array( ‘xxx’ );
    wp_sms_send( $final_tel, $msg, $is_flash);

    .. this works. “var_dump” of both shows exactly the same. Please help.

    • This topic was modified 4 years, 8 months ago by chrisschwab1.
    • This topic was modified 4 years, 8 months ago by chrisschwab1.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Try to use this one

    
    <?php
    $final_tel[] = $monteur_tel;
    wp_sms_send( $final_tel, $msg, $is_flash);
    Thread Starter chrisschwab1

    (@chrisschwab1)

    not working …

    Thread Starter chrisschwab1

    (@chrisschwab1)

    That ist really really strange. Do you have any idea?

    $monteur-tel=12345
    $final_tel[] = $monteur_tel; DOES NOT WORK
    $final_tel= array( $monteur_tel ); DOES NOT WORK
    $final_tel= array( ‘12345’ ); WORKS!

    Really strange.

    Thread Starter chrisschwab1

    (@chrisschwab1)

    Hey, could you plese give me information?

    Hello @chrisschwab1,

    I will check and tell you the result.

    Best Regards.

    Dear @chrisschwab1,

    As I’ve checked, there is no problem with the plugin, but a problem I’ve found from your sending method.

    You are using the phone number as an integer and the phone numbers starting with ‘0’ number, it will make an error on the PHP: “Invalid numeric literal”.

    Google it and you will see the result.

    Anyway, I will tell this to our head Developer and if need to change, we will update for it on the next version too.

    @mostafas1990

    Best Regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_sms_send not working with Variable’ is closed to new replies.