Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCEmailTemplateSyncBackfill::status_for_caseprivate staticWC 1.0

Map a case to the initial status meta value.

Cases A and B produce in_sync (both result in post content matching the canonical core render, so the stamp and the content agree). Case C deliberately seeds core_updated_customized — see class docblock.

Method of the class: WCEmailTemplateSyncBackfill{}

No Hooks.

Returns

String. One of the WCEmailTemplateDivergenceDetector::STATUS_* constants.

Usage

$result = WCEmailTemplateSyncBackfill::status_for_case( $case_id ): string;
$case_id(string) (required)
One of self::CASE_A/B/C.

WCEmailTemplateSyncBackfill::status_for_case() code WC 10.8.1

private static function status_for_case( string $case_id ): string {
	if ( self::CASE_C === $case_id ) {
		return WCEmailTemplateDivergenceDetector::STATUS_CORE_UPDATED_CUSTOMIZED;
	}

	return WCEmailTemplateDivergenceDetector::STATUS_IN_SYNC;
}