Page 1 of 1
Hook into orders.php
Posted: Wed May 25, 2022 7:11 am
by LeeFoster
I'm creating a hook to replace the buttons on admin/orders.php.
Is there already a good one to use or will I need to add one in? If I need to add one where is the best place?
Re: Hook into orders.php
Posted: Wed May 25, 2022 7:24 am
by ecartz
Which of the buttons? Infobox? Above the table? Below the table?
The buttons below the table are in the 'buttons' hook. Content in the infobox is in the 'infoBox' hook.
Re: Hook into orders.php
Posted: Wed May 25, 2022 7:41 am
by LeeFoster
ecartz wrote: ↑Wed May 25, 2022 7:24 am
Which of the buttons? Infobox? Above the table? Below the table?
The buttons below the table are in the 'buttons' hook. Content in the infobox is in the 'infoBox' hook.
Sorry should have been more clear, downside of writing a post before the school run.
I am looking to replace the 'Invoice' and 'Packing Slip' buttons
Re: Hook into orders.php
Posted: Wed May 25, 2022 8:29 am
by ecartz
So either 'contents' in the 'infoBox' hook or catch the invoice/packingslip links in 'hrefLink'. You can disable the button by returning an empty string for the link.
Re: Hook into orders.php
Posted: Wed May 25, 2022 9:38 am
by LeeFoster
ecartz wrote: ↑Wed May 25, 2022 8:29 am
So either 'contents' in the 'infoBox' hook or catch the invoice/packingslip links in 'hrefLink'. You can disable the button by returning an empty string for the link.
Should have also mentioned I'm on 1.0.8.5