Title: Add filter not calling function on push
Last modified: June 26, 2020

---

# Add filter not calling function on push

 *  Resolved [bobparsons](https://wordpress.org/support/users/bobparsons/)
 * (@bobparsons)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-filter-not-calling-function-on-push/)
 * I am new to using Object Sync for Salesforce and I am trying to trace down why
   an add_filter is not being executed on an existing site. I have successfully 
   traced the through is_push_allowed.
 * As of yet, I have not been able to make the filter call its assigned function.
 * Here is what I have:
 *     ```
       $push_allowed = apply_filters( $this->option_prefix . 'push_object_allowed', $push_allowed, $object_type, $object, $sf_sync_trigger, $mapping );
   
       add_filter( 'object_sync_for_salesforce_push_object_allowed', [$this, 'check_user_add_action_sched'], 10, 5 );
   
       public function check_user_add_action_sched( $push_allowed, $object_type, $object, $sf_sync_trigger, $mapping )
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-filter-not-calling-function-on-push/#post-13040992)
 * Well, the syntax you have looks fine. It may be that the hook is not running 
   yet. It runs right before a WordPress record would normally be pushed to Salesforce
   immediately, or added to the queue, depending on your settings.
 * I don’t really provide support for filter use here, beyond bug fixes and such.
   But certainly you do seem to have the right syntax.

Viewing 1 replies (of 1 total)

The topic ‘Add filter not calling function on push’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/add-filter-not-calling-function-on-push/#post-13040992)
 * Status: resolved