Skip to content

Commit

Permalink
I think this was causing php errors, preventing the record type from …
Browse files Browse the repository at this point in the history
…being processed
  • Loading branch information
jonathanstegall committed Sep 8, 2021
1 parent 650413e commit 019b723
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/class-object-sync-sf-mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -1119,12 +1119,12 @@ private function prepare_fieldmap_data( $mappings, $record_type = '' ) {
$mappings[ $id ]['salesforce_record_types_allowed'] = isset( $mapping['salesforce_record_types_allowed'] ) ? maybe_unserialize( $mapping['salesforce_record_types_allowed'] ) : array();
$mappings[ $id ]['fields'] = isset( $mapping['fields'] ) ? maybe_unserialize( $mapping['fields'] ) : array();
$mappings[ $id ]['sync_triggers'] = isset( $mapping['sync_triggers'] ) ? maybe_unserialize( $mapping['sync_triggers'] ) : array();
if ( '' !== $record_type && ! in_array( $record_type, $mappings[ $id ]['salesforce_record_types_allowed'], true ) ) {
unset( $mappings[ $id ] );
}
// format the sync triggers.
$sync_triggers = $this->maybe_upgrade_sync_triggers( $mappings[ $id ]['sync_triggers'], $mapping['version'], $mapping['id'] );
$mappings[ $id ]['sync_triggers'] = $sync_triggers;
if ( '' !== $record_type && ! in_array( $record_type, $mappings[ $id ]['salesforce_record_types_allowed'], true ) ) {
unset( $mappings[ $id ] );
}
}
return $mappings;
}
Expand Down

0 comments on commit 019b723

Please # to comment.