Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCTransactionalEmailPostsManager::delete_email_template
Deletes 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->delete_email_template( $email_type );
- $email_type(string) (required)
- The type of email template e.g. 'customer_new_account' from the WC_Email->id property.
WCTransactionalEmailPostsManager::delete_email_template() WCTransactionalEmailPostsManager::delete email template code WC 10.3.6
public function delete_email_template( $email_type ) {
$option_name = $this->get_option_name( $email_type );
if ( ! get_option( $option_name ) ) {
return;
}
delete_option( $option_name );
}