Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter xt

    (@xueting)

    Hi kluver,

    Thank you for the help, I have solved my problem now 🙂

    Thread Starter xt

    (@xueting)

    Hello Ewout,

    Thank you for your fast response.

    The problem has been solved by removing third party plugin. However, I am trying to reset the invoice number daily. I found the following code snippet:

    add_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 );
    }
    }

    How do I change the code snippet to make it reset the invoice number daily? I changed every word ‘monthly’ to ‘daily’ but it seems like it is not the correct way…

    Thread Starter xt

    (@xueting)

    In addition, how can I reset my invoice sequential unique identifier number daily? Because there is only an option to reset the number yearly. Do I need to edit coding scheme?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)