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 );
}
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!