wpovernight / woocommerce-pdf-invoices-packing-slips

Create, print & automatically email PDF invoices & packing slips for WooCommerce orders.
https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
Other
99 stars 46 forks source link

Improvements for "PDF document data" metabox #756

Open MohamadNateqi opened 6 months ago

MohamadNateqi commented 6 months ago

This https://github.com/wpovernight/woocommerce-pdf-ips-pro/pull/374 had the intention to solve the issue of not displaying generated document data in the PDF document data metabox, but it doesn't fix the underlying issue

This issue can still be reproduced when, for instance, three documents are created automatically for a specific order. Changing the priority doesn't make a difference because the issue is that these documents are being generated via AS. When changing the order status via the order edit page, these documents haven't been generated yet when the page reloads.

The only solution would be to check for pending AS actions on page loading. And display a message like 'Invoice is being generated in the background. Please reload the page to see the document data.'

It would be even better to run a callback when the action is finished and load the document data via AJAX.

This issue also has been mentioned here: https://github.com/wpovernight/woocommerce-pdf-ips-pro/issues/388.