Skip to content

Instantly share code, notes, and snippets.

@webdados
Last active Aug 11, 2019
Embed
What would you like to do?
Configure scheduling of automatic documents on Invoicing with InvoiceXpress for WooCommerce
<?php
/* Schedule invoicing documents */
add_filter( 'invoicexpress_woocommerce_delay_automatic_invoice', '__return_true' );
add_filter( 'invoicexpress_woocommerce_delay_automatic_invoice_time', function() {
return 'PT2M'; //2 minutes
});
/* Schedule transport guides */
add_filter( 'invoicexpress_woocommerce_delay_automatic_guide', '__return_true' );
add_filter( 'invoicexpress_woocommerce_delay_automatic_guide_time', function() {
return 'PT2M'; //2 minutes
});
/*
* DateInterval formats - https://www.webfx.com/blog/web-design/php-dateinterval-class/
* 'PT2M' - 2 minutes
* 'PT2H' - 2 hours
* 'P2D' - 2 days
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment