Including a php file

  • Posts: 249
  • Thank you received: 21
7 months 4 days ago #355316

Simple question. Can I use an include statement to call a php file rather than include the whole script in the Mass Action PHP field?
I have created a plugin to pass selected transactions to Xero and would like to trigger this with a mass action button in the orders list page.

Please Log in or Create an account to join the conversation.

  • Posts: 249
  • Thank you received: 21
7 months 4 days ago #355318

Found a solution. For anyone trying to do something similar, I used header("Location: www.example.com/?### "); to redirect to the url and parameters to trigger the php file. Initially I was getting an error but realised I needed to add exit; in the next line so the working solution is:

header("Location: www.example.com/?### ");
exit;

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum