'PUT', 'callback' => array( $this, 'update' ), 'permission_callback' => function ( WP_REST_Request $request ) { return $this->is_authorization( $request->get_header( 'x-Authorization' ) ); }, ) ); } /** * * @param WP_REST_Request $request_params * * @return WP_REST_Response */ public function update( WP_REST_Request $request_params ): WP_REST_Response { if ( PRODIGY_DEBUG_MODE ) { Prodigy_Logger::add_record( Prodigy_Logger::TYPE_INFO, 'Settings applications urls' . $request_params->get_param( 'message' ) ); } $settings_parser = new Prodigy_Settings_Parser(); $settings_parser->set_platform_settings( $request_params->get_params() ); $cache = new Prodigy_Cache(); $cache->reset_settings(); $response['data']['success'] = true; return new WP_REST_Response( $response, \WP_Http::CREATED ); } }