• Resolved bobparsons

    (@bobparsons)


    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

    (@jonathanstegall)

    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.