• ozobo

    (@ozobo)


    hello everyone,

    I have to use an ERP to have some code.

    Then the ERP redirects on my wordpress site like “site/action/new”.

    I want my plugin activate on this “hook” and do functions with $Post of the ERP.

    Is this possible ?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    A hook in WP has a specific meaning. A site path or URL is not considered a hook in WP context. Regardless, you want to execute some code when that resource is requested. How you execute your code under that situation depends on what other code already executes to respond to the request and under what conditions your code needs to run. Any time that request is made? Or only if the referring page is another specific resource?

    One way to unequivocally execute plugin code when a page is requested is to call that plugin’s function from the page’s template. You can use function_exists() before the template calls your plugin code if there’s a chance the template could be used without your plugin being active.

Viewing 1 replies (of 1 total)
  • The topic ‘How my plugin can execute after a redirection’ is closed to new replies.