• Resolved nimashahin

    (@nimashahin)


    Hi there,

    I have a question , i don’t want to create PDF invoice for all Orders. Wir have two place to deliver our product and we want to create PDF invoice just for One Place. Is it possible?

    Best regards

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Yes this is possible but this will require some custom code. Here’s an example (that will require some additional code to make this work, depending on your setup):

    
    add_filter( 'wpo_wcpdf_document_is_allowed', 'wpo_wcpdf_disable_for_location', 10, 2 );
    function wpo_wcpdf_disable_for_location( $is_allowed, $document ) {
        if ( !empty( $document->order ) ) {
            $order = $document->order;
            $delivery_needs_pdf = true; // add your own logic here to determine whether this order is for the one delivery place
            
            return $delivery_needs_pdf;
        }
        return $is_allowed;
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Create Invoice for only one delivery location’ is closed to new replies.