Including a php file

  • Posts: 259
  • Thank you received: 22
1 year 3 months 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: 259
  • Thank you received: 22
1 year 3 months 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.063 seconds
Powered by Kunena Forum