Including a php file

  • Posts: 256
  • Thank you received: 21
1 year 1 month 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: 256
  • Thank you received: 21
1 year 1 month 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.057 seconds
Powered by Kunena Forum