MinnPost / object-sync-for-salesforce

WordPress plugin that maps and syncs data between Salesforce objects and WordPress objects.
https://wordpress.org/plugins/object-sync-for-salesforce/
GNU General Public License v2.0
95 stars 51 forks source link

Pre-match fails when using postmeta value on posts and attachments #484

Closed MannyAdumbire closed 2 years ago

MannyAdumbire commented 2 years ago

Trying to use the plugin Settings to prematch on a meta key ( "salesforce_id" ) fails.

obj-sync-prematch-setting

obj-sync-prematch-postmeta-exists

obj-sync-prematch-posts-exists

During the first mapping event, a duplicate post is create -

obj-sync-prematch-fail-duplicate and used in the mapping obj-sync-prematch-mapped-duplicate

I traced the issue to a call to get_results() method which doesn't exist on WP_Query class.

https://github.com/MinnPost/object-sync-for-salesforce/blob/90816beb7e8c08c0d297df6e88c87c3c7be1742d/classes/class-object-sync-sf-wordpress.php#L1684

obj-sync-prematch-bug