• Hi,

    I’ve got an issue with PDF invoices generation, it worked great before but now when I try to generate them through Woocommerce > Orders > PDF Invoice action I get a message “The document of type “invoice” for the selected order(s) could not be generated”.

    Can you please help me out with this ?

    Thanks for your support.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @phareweb35

    Are you using any code snippet that might interfere with the document generation process?

    Thread Starter phareweb35

    (@phareweb35)

    Hi,

    Yes I am, I’m using this code snippet in order to remove invoice generation for products paid with rechargeable wallet (plugin by StandaloneTech). Here is the code snippet :

    add_filter( 'wpo_wcpdf_document_is_allowed', function( $allowed, $document ) {
    if ( ! empty( $document->order) && 'invoice' === $document->get_type() ) {
    $order = $document->order;
    $payment_method = is_callable( array( $order, 'get_payment_method' ) ) ? $order->get_payment_method() : '';

    if ( 'wallet' === $payment_method ) {
    $allowed = false;
    }
    }

    return $allowed;
    }, 10, 2 );

    I also use other code snippets for Woocommerce but none of them are related to your plugin.

    Thanks for support.

    Paul

    Plugin Contributor alexmigf

    (@alexmigf)

    That’s strange. Do you think you could send us an email to further investigate this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.