Skip to content

Commit

Permalink
Merge branch 'update/dont-sync-set-object-terms-action-for-blackliste…
Browse files Browse the repository at this point in the history
…d-taxonomies' of github.com:Automattic/jetpack into update/dont-sync-set-object-terms-action-for-blacklisted-taxonomies
  • Loading branch information
darssen committed Oct 8, 2024
2 parents 3dbbf37 + 7b9831f commit 2a2c925
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/packages/sync/src/modules/class-terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function filter_blacklisted_taxonomies( $args ) {
*/
public function filter_set_object_terms_no_update( $args ) {
// Check if the taxonomy is blacklisted. $args[3] is the taxonomy.
if ( in_array( $args[3], Settings::get_setting( 'taxonomies_blacklist' ), true ) ) {
if ( isset( $args[3] ) && in_array( $args[3], Settings::get_setting( 'taxonomies_blacklist' ), true ) ) {
return false;
}
// There is potential for other plugins to modify args, therefore lets validate # of and types.
Expand Down

0 comments on commit 2a2c925

Please sign in to comment.