Support » Plugin: WooCommerce PDF Invoices & Packing Slips » Next Invoice number not working

  • Resolved clairew11

    (@clairew11)


    Hi, i have just installed your plugin but i can not seem to set the invoice number to what i need. I can see you can change it in ‘next invoice number’ but when i add it, save and then go to my order to ‘create pdf invoice’ it doesn’t create the number at all. The invoice number is blank. When going back to ‘next invoice number’ it is blank. What am i missing?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Ewout

    (@pomegranate)

    Hello Claire,
    It’s possible that your server has a specific database configuration that is not compatible with the way this plugin generates invoice numbers. Could you try to enable ‘calculate document numbers (slow)’ in the Status tab of the plugin settings?

    Let me know if that fixes the issue!

    Hi, so that got an invoice number of 1 in the ‘next invoice number’ but it will not generate a new number after that, so the next one is still 1.

    Plugin Author Ewout

    (@pomegranate)

    can you edit the ‘next invoice number’ though? What happens if you do that and then refresh that settings page? You may want to try again setting the number to something other than ‘nothing’ and then generate an invoice.

    No, i can not edit the number it says at 1. I have tried changing it completely but no luck.

    Plugin Author Ewout

    (@pomegranate)

    Very strange, I haven’t come across this before. It sounds as if the plugin is unable to create the required tables in the database of your website. Do you know if the website has a customized database setup?

    I have a feeling it is something to do with the theme. Once we have it sorted I will see if it fixes it.

    Plugin Author Ewout

    (@pomegranate)

    Ok, let us know what you find and we’ll do our best to help if required.

    Hello,

    LATER EDIT (MAYBE IT HELPS)
    On my custom installation of WooCommerce I have change Woocommerce admin panel name to something else. After I've removed the code and revert to "WooCommerce" default name for shop settings, the invoice number became editable again and I could set the number to 1 or whatever

    ————————————————
    I have this problem too.
    I’m preparing for live now after a set of tests. In “Documents” tab, my current invoice number is 21 with no option to change it (it shows as a disabled field).

    Mention: I have deleted all orders after the tests so currently I don’t have any orders in DB.

    Woocommerce 3.4.5
    WP 4.9.8
    Server type: LiteSpeed
    MySQl: 5.5.5-10.2.16-MariaDB

    Plugin Author Ewout

    (@pomegranate)

    Hi! I’m sorry to hear you’re having this issue, though I’m glad you found a temporary workaround – the woocommerce admin panel change certainly is a good lead on the root cause of this. Could you tell me exactly how & what you changed so I can try to reproduce this myself?

    Thanks!

    Hello,

    Thank you for your rapid response.
    Of course, here is the snippet:

    /**
    |------------------------------------------------------------------------------------------
     *Change Woocommerce admin panel name to something else
     */
    function mdan_remove_woocommerce_text_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
        case 'WooCommerce' :
            $translated_text = __( 'custom_name_here', 'woocommerce' );
            break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'mdan_remove_woocommerce_text_strings', 20, 3 );

    Thanks,
    Daniel

    Plugin Author Ewout

    (@pomegranate)

    I see, that’s quite a high level approach, which not only changes the text translations, but also the screen names and (!) internal identifiers. This stops the scripts from working.

    If you’re not afraid to edit plugin files, could you try to apply this change?
    https://github.com/wpovernight/woocommerce-pdf-invoices-packing-slips/commit/3157d7e007aa4439ec9ff0e4f132ec1310360712

    I think that would resolve the issue.

    Hi

    Yes, I agree it’s a little rough but it does the job. I’m not actually that good with PHP at the moment but I’m working on it 🙂

    I’ve tried the above solution provided by you and that does the trick. The edit invoice number field is back again functional for custom named admin panel shop.

    Great support, I’m amazed at how fast you tackled this.
    I hope this would help others too.

    Thank you,
    Daniel

    Plugin Author Ewout

    (@pomegranate)

    Glad to hear that Daniel! I’m going to include this fix in the next official release too, so you don’t have to worry about plugin updates.

    Happy selling!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Next Invoice number not working’ is closed to new replies.