• Resolved pixelpete79

    (@pixelpete79)


    Hi,

    Previously I have used the action:
    add_filter(‘acfe/form/load/term_id/form=supplier-edit’, ‘supplier_edit_term_source’, 10, 3);
    The above worked

    With the latest update in 0.9.0.2 I have updated this to use:
    add_filter(‘acfe/form/load_term_id/form=supplier-edit’, ‘supplier_edit_term_source’, 10, 3);
    The above returns nothing

    Could you please help me understand if there are additional changes in 902 that also impact this action?
    Or is there a known bug?

    I have reverted the plugin for now and all works again.

    Thanks for your help (and the amazing plugin)
    Pete.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    In fact, if your “Term Action” has the setting “Source = Current Term”, and the form is displayed on a post (and not on a term), then this issue might happen. The hook acfe/form/load_term_id will not be correctly loaded.

    The current version is a bit too restrictive, the upcoming patch will fix this issue. In the meantime, you can fix it by simply changing the setting “Source = Current Term” to “Term Selector” and select any term. See screenshot.

    Then your acfe/form/load_term_id hook will be executed, and use the term id you defined in your code instead.

    Sorry for the inconvenience.

    Regards.

    Thread Starter pixelpete79

    (@pixelpete79)

    Thanks for your fast response.

    My use needs to be more dynamic than setting the Term selector and needs to pull based on logged user.

    I’ll leave the plugin reverted until the patch. When is that likely to be released?

    Thanks again.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Yes, don’t worry I understood.

    The “Term Selector” trick I described is just here so the load_term_id hook can be correctly executed. Your custom logic in the code will override the Term selected in the UI.

    The next update is almost ready, it should come out in the coming days.

    Thanks!

    Regards.

    Thread Starter pixelpete79

    (@pixelpete79)

    Amazing, this worked.

    I selected Term Selector and selected an unrelated term. As you mentioned it loaded the correct source through my filter.

    Thanks for your help.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Awesome!

    I’ll let you know once the new patch is up, so you can set the “Source” setting back to default.

    Thanks, and sorry again for the inconvenience.

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Just a heads up to let you know the latest 0.9.0.3 version fixed this issue. You can set back the “Source = Current Term” setting. Your hook you’ll continue to work, and override the term id as it should.

    Thanks, and sorry again for the inconvenience.

    Have a nice day!

    Regards.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘load_term_id not working’ is closed to new replies.