WordPress EndPoint URL Format
-
I have wrote an endpoint in WordPress and it works just fine. The problem is with the URL. The current format of the URL request must be like this:
https://iotkidsiq.com/wp-json/zaindob/v1/sync_order/key=011900/msisdn=019009
However, The URL request must be in this format:
https://iotkidsiq.com/wp-json/zaindob/v1/sync_order?key=011900&msisdn=019009
How to format that?
My current code:
register_rest_route( 'zaindob/v1', '/sync_order/' . 'key=' . '(?P<key>\d+)' . '/msisdn=' . '(?P<msisdn>\d+)' , array( 'methods' => 'GET', 'callback' => 'updatetable', ) ); } );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WordPress EndPoint URL Format’ is closed to new replies.