• Resolved Atik

    (@onlinetravelgear)


    Hi team,

    I have a custom status on which I want to create the invoice but I cannot find that status in the Attach to option under Invoices which is under Documents tab. Could you help me understand why I cannot see that status here?

    screenshot

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    The setting in your screenshot shows a list of emails, but you mention a custom status. Is it possible you have not created an email for the custom status yet?

    Thread Starter Atik

    (@onlinetravelgear)

    Hi @pomegranate

    You mean email under Screenshot

    which is woocommerce >> settings >> emails ?

    Plugin Contributor Ewout

    (@pomegranate)

    Correct, as you can see, all the order emails listed on that page are also listed in the “Attach to” setting of our plugin. In your emails screenshot I don’t see any emails for custom statuses, so that’s why our plugin cannot attach the PDF to it.

    Thread Starter Atik

    (@onlinetravelgear)

    I have a custom status called “Shipped”. As you have already seen, I do not have an email for the same.
    Is it possible to generate invoice as soon as the order status is changed to this custom status “Shipped”? I do not wish to send this invoice on email, I just want to generate it on the system.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hello @onlinetravelgear,

    Try with this code snippet:

    /**
     * Generate an invoice when changing the order status to "Shipped"
     */
    add_action('woocommerce_order_status_shipped', 'wpo_wcpdf_create_invoice_number_when_shipped');
    function wpo_wcpdf_create_invoice_number_when_shipped ( $order_id ) {
    	$order = wc_get_order( $order_id );
    	$invoice = wcpdf_get_document( 'invoice', $order, true );
    }

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Let us know if it works! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cannot see custom status’ is closed to new replies.