Skip to content

Jetpack_Sync_Defaults::$default_options_whitelist shouldn't be accessed directly #6887

@nabsul

Description

@nabsul

There are some places in the code where Jetpack_Sync_Defaults::$default_options_whitelist is being accessed directly. The problem with this is that Jetpack_Sync_Module_WooCommerce needs to modify the whitelist via the jetpack_sync_options_whitelist hook.

Sync function should be using: Jetpack_Sync_Defaults::get_options_whitelist(). There may be more than this, but I specifically ran into this problem in Jetpack_Sync_Module_Options

I think there is one exception to this rule: The checksum that is calculated across options. But I'm not 100% sure about this.

https://github.com/Automattic/jetpack/blob/master/sync/class.jetpack-sync-module-options.php#L74

Metadata

Metadata

Assignees

Labels

EnhancementChanges to an existing feature — removing, adding, or changing parts of it[Package] Sync[Pri] Normal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions