Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print on pickup day #18

Open
pieth30 opened this issue Feb 15, 2022 · 2 comments
Open

Print on pickup day #18

pieth30 opened this issue Feb 15, 2022 · 2 comments

Comments

@pieth30
Copy link

pieth30 commented Feb 15, 2022

Hello,

Is it possible to print only the tickets for that specific day.
I let my custommers pick a specific pickup day on checkout, I would like to print all of the tickets for that day in the morning.

Is that possible with this plugin?
Maybe if I change the order status to pickup today and I set a trigger in the print plugin to print the 'pickup today' status?

@pieth30
Copy link
Author

pieth30 commented Feb 15, 2022

^as a addition, is it possible to change the trigger to a specific meta data column?
For example I have a column pickupday, is it possible to change the trigger to print when the pickupday is today?

@Lozrus
Copy link
Member

Lozrus commented Mar 31, 2022

@pieth30

Currently that is not possible, the trigger must be an action that we can hook into so can't be triggered by a data field. Our plugin only responds to changes in order status, and it feels that your request is for it to actually modify/decide the status which doesn't quite fit. There may be some external plugins that can schedule order status changes based on time/date, which is what I think you need.

You may be able to manage this now, if you arrange for new orders to not be assigned the "processing" state by default (e.g. add a new status named "preprocessing", or whatever suits your needs), then use another plug-in (or manually from the orders page) to assign them to "processing" when you are ready to process them, which will trigger the printing.

If you want to add another order status (e.g. your "pickup today" example) that should be used to trigger the printing, then this is relatively easy to add to our plugin. You can modify the function star_cloudprnt_setup_order_handler() in order-handler.inc.php to add additional print trigger actions.

simply adding something like:
add_action('woocommerce_order_status_pickup-today', 'star_cloudprnt_trigger_print', 1, 1);

Should be enough to trigger printing from your new "Pickup Today" status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants