• Resolved mogo

    (@mogomogo)


    Thanks for the plugin.
    How can I send sms on my own plugin or theme’s function.php file using texty plugin? Which function should I call and should I include anything before using your function?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @mogomogo,

    I am not pretty sure about your goal. Would you mind explaining a bit more what the goal that you want to achieve so that I can connect more with your query?

    Thanks!

    Thread Starter mogo

    (@mogomogo)

    I have custom plugin which we add members to a waiting list. And when their turn is came, we want to send sms messages to members. So we want to use your plugin’s function to send the sms via a php function.

    Thread Starter mogo

    (@mogomogo)

    Nevermind. I found the solution. I used this: texty()->gateways()->send( $to, $message ); function for sending sms from my custom plugin and my function to send sms is:

    function myfunction_to_send_sms( $to, $message)
    {
        $status = texty()->gateways()->send( $to, $message );
    
        $response = [
            'success' => is_wp_error( $status ) ? false : true,
            'message' => is_wp_error( $status ) ? $status->get_error_message() : '',
        ];
    
        return rest_ensure_response( $response );
    
    }
    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @mogomogo,

    Great to know that your issue has been resolved. As the purpose of this ticket has been served, I am marking this as resolved. Feel free to open a new one if you encounter any further issues.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Send sms via texty from Php’ is closed to new replies.