Reset Invoice Numbers Monthly
-
Hello,
I’m using your plugin long time ago. I was looking for possibility to reset invoice number monthly. Finally I was using the code below, however it stopped works. I don’t change anything I think due to the last update (image issue fix) the below code stopped works.
Could you check it please? Thank youadd_action( 'wpo_wcpdf_before_sequential_number_increment', 'wpo_wcpdf_reset_invoice_number_monthly', 10, 3 ); function wpo_wcpdf_reset_invoice_number_monthly( $number_store, $order_id, $date ) { $current_month = date('n'); $last_number_month = $number_store->get_last_date('n'); // check if we need to reset if ( $current_month != $last_number_month ) { $number_store->set_next( 1 ); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Reset Invoice Numbers Monthly’ is closed to new replies.