Skip to main content
deleted 2 characters in body; edited title
Source Link
butlerblog
  • 5.1k
  • 3
  • 26
  • 42

Wordpress WordPress SMS API integration without plugin error

iI have created a code for WordPress to integrate my custom SMS apiAPI.but the The API URL works fine when I type it on the URL bar.butbar; but when it in the code I think, the API URL will not call.so when customer place order So this code not working... when the customer places an order:

add_action( 'woocommerce_order_status_processing','mysite_woocommerce_order_status_processing' );
function mysite_woocommerce_order_status_processing( $order_id ) {

    $billing_phone="0729424391";
    $message="yep";
    
    $url="http://realcam.club:9710/http/send-message?username=admin&password=admin&to=".$billing_phone."&messagetype=sms.automatic&message=".$message."'";

  $response = file_get_contents( $url );

  //print_r($response);

}

Wordpress SMS API integration without plugin error

i have created a code for WordPress to integrate my custom SMS api.but the API URL works fine when I type it on the URL bar.but when it in the code I think the API URL will not call.so when customer place order this code not working...

add_action( 'woocommerce_order_status_processing','mysite_woocommerce_order_status_processing' );
function mysite_woocommerce_order_status_processing( $order_id ) {

    $billing_phone="0729424391";
    $message="yep";
    
    $url="http://realcam.club:9710/http/send-message?username=admin&password=admin&to=".$billing_phone."&messagetype=sms.automatic&message=".$message."'";

  $response = file_get_contents( $url );

  //print_r($response);

}

WordPress SMS API integration without plugin error

I have created a code for WordPress to integrate my custom SMS API. The API URL works fine when I type it on the URL bar; but when it in the code, the API URL will not call. So this code not working when the customer places an order:

add_action( 'woocommerce_order_status_processing','mysite_woocommerce_order_status_processing' );
function mysite_woocommerce_order_status_processing( $order_id ) {

    $billing_phone="0729424391";
    $message="yep";
    
    $url="http://realcam.club:9710/http/send-message?username=admin&password=admin&to=".$billing_phone."&messagetype=sms.automatic&message=".$message."'";

  $response = file_get_contents( $url );

  //print_r($response);

}
Source Link

Wordpress SMS API integration without plugin error

i have created a code for WordPress to integrate my custom SMS api.but the API URL works fine when I type it on the URL bar.but when it in the code I think the API URL will not call.so when customer place order this code not working...

add_action( 'woocommerce_order_status_processing','mysite_woocommerce_order_status_processing' );
function mysite_woocommerce_order_status_processing( $order_id ) {

    $billing_phone="0729424391";
    $message="yep";
    
    $url="http://realcam.club:9710/http/send-message?username=admin&password=admin&to=".$billing_phone."&messagetype=sms.automatic&message=".$message."'";

  $response = file_get_contents( $url );

  //print_r($response);

}