Automattic\WooCommerce\Internal\Admin\EmailPreview
EmailPreviewRestController::get_args_for_send_preview()
Get the accepted arguments for the POST send-preview request.
Метод класса: EmailPreviewRestController{}
Хуков нет.
Возвращает
Массив[]
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_args_for_send_preview();
Код EmailPreviewRestController::get_args_for_send_preview() EmailPreviewRestController::get args for send preview WC 9.6.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 ), ), 'email' => array( 'description' => __( 'Email address to send the email preview to.', 'woocommerce' ), 'type' => 'string', 'format' => 'email', 'required' => true, 'validate_callback' => 'rest_validate_request_arg', ), ); }