WordPress SMS API integration without plugin

I think this is the error. The last variable $msg is incorrectly inserted. Here is the corrected code. function mysite_woocommerce_order_status_processing( $order_id ) { $mobile=”123456″; $url=”****/api.php?username=******&password=1234&source=UPDATE&dmobile=”.$mobile.”&message=””.$msg.”””; $response = wp_remote_get( $url ); //print_r($response); } add_action( ‘woocommerce_order_status_processing’,’mysite_woocommerce_order_status_processing’ );

How to login via wordpress api and get user details?

1. Install and activate JWT Authentication for WP REST API plugin, also install WP REST API plugin 2. Now you can run any wordpress default api from mobile app or any other source or by postman. for example hit this url from your app or by postman. https://example.com/wp-json/wp/v2/posts 3. By app or by postman, When … Read more

modify buddpress adminbar only in admin pages

You ca use the conditional tag is_admin() to check if you are on the front-end or back-end like this: function bp_adminbar_currentsite_menu() { global $bp; if (!is_admin()){ ?> <li> <!– Insert your link url or relative url, and your link text below –> <a href=”http://EXAMPLE.COM”>EXAMPLE LINK TEXT</a> </li> <?php } } // Call The Function Above … Read more

$_POST[‘message’] gives a 404 [duplicate]

To insert a post into the WordPress database, whether you are doing it as a logged in user to the current WordPress installation or over XML-RPC (or any other remote methodology) you need to be using something along the lines of; $the_post = array( ‘post_title’ => ‘Post Title’, ‘post_content’ => ‘My post content’, ‘post_status’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)