$synced_fields Fields the multilingual plugin keeps identical across translations. */ public function __construct( private readonly array $synced_fields ) {} /** * Whether a field is synced. * * @param ProductField $field Field to check. */ public function is_synced( ProductField $field ): bool { return in_array( $field, $this->synced_fields, true ); } /** * All synced fields. * * @return list */ public function synced_fields(): array { return $this->synced_fields; } /** * All fields that are not synced, in enum order. * * @return list */ public function unsynced_fields(): array { return array_values( array_filter( ProductField::cases(), fn ( ProductField $field ): bool => ! $this->is_synced( $field ) ) ); } }