WC_REST_Paypal_Buttons_Controller::validate_create_order_request
Validate the create order request.
Метод класса: WC_REST_Paypal_Buttons_Controller{}
Хуков нет.
Возвращает
true|false. True if the create order request is valid, false otherwise.
Использование
$WC_REST_Paypal_Buttons_Controller = new WC_REST_Paypal_Buttons_Controller(); $WC_REST_Paypal_Buttons_Controller->validate_create_order_request( $request );
- $request(WP_REST_Request) (обязательный)
- The request object.
Код WC_REST_Paypal_Buttons_Controller::validate_create_order_request() WC REST Paypal Buttons Controller::validate create order request WC 10.8.1
public function validate_create_order_request( WP_REST_Request $request ) {
if ( $request->get_header( 'Nonce' ) ) {
$nonce = $request->get_header( 'Nonce' );
return wp_verify_nonce( $nonce, 'wc_gateway_paypal_standard_create_order' );
}
return false;
}