WC_REST_Paypal_Buttons_Controller::validate_create_order_request
Validate the create order request.
Method of the class: WC_REST_Paypal_Buttons_Controller{}
No Hooks.
Returns
true|false. True if the create order request is valid, false otherwise.
Usage
$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) (required)
- The request object.
WC_REST_Paypal_Buttons_Controller::validate_create_order_request() WC REST Paypal Buttons Controller::validate create order request code WC 10.3.6
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;
}