Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCEmailTemplateSyncTracker::record_selective_applied
Record _update_applied for the selective-applier success path (the REST /apply endpoint behind RSM-143's Review drawer).
The selective applier only runs against core_updated_customized posts, so had_customizations is statically true and auto_resolved is statically false.
Method of the class: WCEmailTemplateSyncTracker{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WCEmailTemplateSyncTracker::record_selective_applied( $post_id ): void;
- $post_id(int) (required)
- The
woo_emailpost that was just rewritten via selective merge.
Changelog
| Since 10.9.0 | Introduced. |
WCEmailTemplateSyncTracker::record_selective_applied() WCEmailTemplateSyncTracker::record selective applied code WC 10.9.1
public static function record_selective_applied( int $post_id ): void {
if ( self::should_suppress() ) {
return;
}
$payload = self::build_base_payload( $post_id );
if ( null === $payload ) {
return;
}
$payload['applied_from'] = self::APPLIED_FROM_SELECTIVE_REST;
$payload['auto_resolved'] = false;
$payload['had_customizations'] = true;
self::record( self::EVENT_UPDATE_APPLIED, $payload );
}