Missing parameter for register_rest_route
-
As of WordPress 5.5, if register_rest_route omits
permission_callback
WordPress generates a notice. You can update theiwp_woocommerce_shipment_rest()
function inincludes/woocommerce-shipment-tracking.php
as below:public function iwp_woocommerce_shipment_rest() { /* Initialize */ register_rest_route( 'iwp/shipment-tracking/v1', '/initialize', array( 'methods' => 'POST', 'callback' => [$this, 'iwp_initialize'], 'permission_callback' => '__return_true', ) ); /* Submit */ register_rest_route( 'iwp/shipment-tracking/v1', '/submit', array( 'methods' => 'POST', 'callback' => [$this, 'iwp_submit'], 'permission_callback' => '__return_true', ) ); }
More info about the notice
- The topic ‘Missing parameter for register_rest_route’ is closed to new replies.