Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCTransactionalEmailPostsManager::get_email_template_post_id
Gets the post ID for a specific email template type.
Method of the class: WCTransactionalEmailPostsManager{}
No Hooks.
Returns
Int|false. The post ID if found, false otherwise.
Usage
$WCTransactionalEmailPostsManager = new WCTransactionalEmailPostsManager(); $WCTransactionalEmailPostsManager->get_email_template_post_id( $email_type );
- $email_type(string) (required)
- The type of email template e.g. 'customer_new_account' from the WC_Email->id property.
WCTransactionalEmailPostsManager::get_email_template_post_id() WCTransactionalEmailPostsManager::get email template post id code WC 10.3.6
public function get_email_template_post_id( $email_type ) {
$option_name = $this->get_option_name( $email_type );
return get_option( $option_name );
}