Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCTransactionalEmailPostsManager::get_cache_key_for_post_idpublicWC 1.0

Gets the cache key for a specific post ID.

Method of the class: WCTransactionalEmailPostsManager{}

No Hooks.

Returns

String. The cache key e.g. 'post_id_to_email_type_123'.

Usage

$WCTransactionalEmailPostsManager = new WCTransactionalEmailPostsManager();
$WCTransactionalEmailPostsManager->get_cache_key_for_post_id( $post_id );
$post_id(int) (required)
The post ID.

WCTransactionalEmailPostsManager::get_cache_key_for_post_id() code WC 10.8.1

public function get_cache_key_for_post_id( $post_id ) {
	return 'post_id_to_email_type_' . $post_id;
}