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

Fix undefined WP_Query method preventing prematch on posts. Thanks to @MannyAdumbire for this fix. #485

Closed MannyAdumbire closed 2 years ago

MannyAdumbire commented 2 years ago

What does this Pull Request do?

Fixes undefined WP_Query method bug #484

How do I test this Pull Request?

  1. Setup a mapping that Prematches on a metavalue for a metakey ( e.g. "salesforce_id" ).
  2. Create a post and add that postmeta key.
  3. Initiate a sync with a Salesforce record that has a value that matches the metavalue of a pre-existing post.
  4. Check that the new row created in wp_2020_object_sync_sf_object_map has the same post_id as the pre-existing post's ID, and a new/duplicate post is not created.