Automattic\WooCommerce\Internal\Admin\EmailPreview
EmailPreviewRestController::get_args_for_send_preview()
Get the accepted arguments for the POST send-preview request.
Method of the class: EmailPreviewRestController{}
No Hooks.
Return
Array[]
.
Usage
// private - for code of main (parent) class only $result = $this->get_args_for_send_preview();
EmailPreviewRestController::get_args_for_send_preview() EmailPreviewRestController::get args for send preview code WC 9.7.1
private function get_args_for_send_preview() { return array( 'type' => array( 'description' => __( 'The email type to preview.', 'woocommerce' ), 'type' => 'string', 'required' => true, 'validate_callback' => fn( $key ) => $this->validate_email_type( $key ), 'sanitize_callback' => 'sanitize_text_field', ), 'email' => array( 'description' => __( 'Email address to send the email preview to.', 'woocommerce' ), 'type' => 'string', 'format' => 'email', 'required' => true, 'validate_callback' => 'rest_validate_request_arg', 'sanitize_callback' => 'sanitize_email', ), ); }