Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCTransactionalEmailPostsManager::save_email_template_post_idpublicWC 1.0

Saves the post ID for a specific email template type.

Method of the class: WCTransactionalEmailPostsManager{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WCTransactionalEmailPostsManager = new WCTransactionalEmailPostsManager();
$WCTransactionalEmailPostsManager->save_email_template_post_id( $email_type, $post_id );
$email_type(string) (required)
The type of email template e.g. 'customer_new_account' from the WC_Email->id property.
$post_id(int) (required)
The post ID to save.

WCTransactionalEmailPostsManager::save_email_template_post_id() code WC 10.3.6

public function save_email_template_post_id( $email_type, $post_id ) {
	$option_name = $this->get_option_name( $email_type );
	update_option( $option_name, $post_id );
}