WC_REST_Paypal_Buttons_Controller::register_routes
Register the routes for the PayPal buttons functionality handler.
Метод класса: WC_REST_Paypal_Buttons_Controller{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$WC_REST_Paypal_Buttons_Controller = new WC_REST_Paypal_Buttons_Controller(); $WC_REST_Paypal_Buttons_Controller->register_routes();
Код WC_REST_Paypal_Buttons_Controller::register_routes() WC REST Paypal Buttons Controller::register routes WC 11.3.0
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/create-order',
array(
'methods' => WP_REST_Server::CREATABLE,
'callback' => array( $this, 'create_order' ),
'permission_callback' => array( $this, 'validate_create_order_request' ),
)
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/cancel-payment',
array(
'methods' => WP_REST_Server::CREATABLE,
'callback' => array( $this, 'cancel_payment' ),
'permission_callback' => array( $this, 'validate_cancel_payment_request' ),
)
);
}