Automattic\WooCommerce\Internal\Admin\Emails

EmailListingRestController::get_args_for_recreate_email_postprivateWC 1.0

Get the accepted arguments for the POST recreate-email-post request.

Method of the class: EmailListingRestController{}

No Hooks.

Returns

Array[].

Usage

// private - for code of main (parent) class only
$result = $this->get_args_for_recreate_email_post();

EmailListingRestController::get_args_for_recreate_email_post() code WC 10.3.3

private function get_args_for_recreate_email_post() {
	return array(
		'email_id' => array(
			'description'       => __( 'The email ID to recreate the post for.', 'woocommerce' ),
			'type'              => 'string',
			'required'          => true,
			'validate_callback' => fn( $email_id ) => $this->validate_email_id( $email_id ),
			'sanitize_callback' => 'sanitize_text_field',
		),
	);
}