Title: Changing invoice number
Last modified: July 15, 2026

---

# Changing invoice number

 *  [bellabaciNL](https://wordpress.org/support/users/bellabacinl/)
 * (@bellabacinl)
 * [3 weeks, 5 days ago](https://wordpress.org/support/topic/changing-invoice-number/)
 * Is there a possibility to change the ” Next Invoice Number” into a lower number?
   
   We want to synchronize with our administration were also invoice are made.And
   when we make test invoices we loose several numbers but can’t change it into 
   a lower number.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchanging-invoice-number%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [anjitha21](https://wordpress.org/support/users/anjitha21/)
 * (@anjitha21)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/changing-invoice-number/#post-18967718)
 * Hi [@bellabacinl](https://wordpress.org/support/users/bellabacinl/)
 * Yes, it is possible to change the Next Invoice Number using the below filter:
 *     ```wp-block-code
       <?php/** * WCDN Invoice Number Reset * * Paste this code into your theme's functions.php file. * Remove this code once the invoice number has been reset. * * HOW TO USE: * 1. Set the value of WCDN_RESET_INVOICE_NUMBER below to your desired next invoice number * 2. Paste this code into functions.php and save * 3. Visit any page on your site (or WP admin) * 4. Check WCDN settings to verify the new number * 5. REMOVE this code from functions.php */define( 'WCDN_RESET_INVOICE_NUMBER', 1 ); // 👈 Set your desired next invoice number hereadd_action( 'init', function() {    // Run only once, not on every page load    $done_key = 'wcdn_invoice_reset_done_' . WCDN_RESET_INVOICE_NUMBER;    if ( get_option( $done_key ) ) {        return;    }    $next = (int) WCDN_RESET_INVOICE_NUMBER;    if ( $next < 1 ) {        return;    }    $counter_value = $next - 1;    update_option( 'wcdn_invoice_number_counter', $counter_value, false );    // Clear preview cache    delete_transient( 'wcdn_preview_data' );    // Mark as done so this does not run again    update_option( $done_key, 1, false );    // Show admin notice to confirm the reset    add_action( 'admin_notices', function() use ( $next ) {        if ( ! current_user_can( 'manage_options' ) ) return;        echo '<div class="notice notice-success is-dismissible"><p>';        echo '<strong>WCDN:</strong> Invoice number successfully reset. Next invoice number: <strong>' . esc_html( $next ) . '</strong>. You can now remove this code from functions.php.';        echo '</p></div>';    });}, 5 );
       ```
   
 * You can add this filter code via Code Snippets plugin.
 * Please note that once the data has been reset, the custom snippet should be removed
   from the site to prevent it from running unnecessarily in the future.
 * Please check this on your end and let us know if you need any further assistance.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchanging-invoice-number%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [anjitha21](https://wordpress.org/support/users/anjitha21/)
 * Last activity: [3 weeks, 3 days ago](https://wordpress.org/support/topic/changing-invoice-number/#post-18967718)
 * Status: not resolved