pramo15
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: WP REST API Custom POST Endpoint Not Working, 404 errorHi,
I’m defining custom endpoint route using controller method, which is extending WP_REST_Controller. I’ve used this code in a custom file called api.php in my active theme.class Slug_Custom_Route extends WP_REST_Controller { public function register_routes() { register_rest_route('my-route', 'my-phrase', array( 'methods' => 'POST', 'callback' => 'custom_phrase', ) ); } public function custom_phrase(WP_REST_Request $request) { $param = $request['param']; return rest_ensure_response('Hello World! This is my first REST API' . $param); } } add_action('rest_api_init', 'register_routes');It’s populating the result – 404 rest_no_route.
As I’m new to all of this, Kindly help me to resolve.
- This reply was modified 5 years, 10 months ago by pramo15.
Forum: Plugins
In reply to: [Shiprocket] Does anyone care about this plugin in Shiprocket?As per your suggestion, I’ve configured the plugin with Shiprocket registered email & also added weight & dimension for woocommerce products. But still it’s showing “pincode isn’t servicable”. So any suggestion is highly appreciated!
Forum: Plugins
In reply to: [Shiprocket] Plugin features not workingHI,
I’ve updated dimensions and weight information of all products. But still all pincodes are showing as non-servicable.
Viewing 3 replies - 1 through 3 (of 3 total)