Skip to main content

Including a php file

More
3 years 1 day ago #355316 by rodfarrell
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.

More
3 years 21 hours ago #355318 by rodfarrell
Replied by rodfarrell on topic Including a php file
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.174 seconds
Powered by Kunena Forum