• Resolved leodex

    (@leodex)


    Hello !

    Thank you for this plugin, it is simple and very functional!
    Just a question: is it possible to allow the download of the delivery slip instead of the invoice just the delivery slip? Yes otherwise is it possible to modify the template of the invoice, to turn it into a delivery note?

    Thank you in advance for your help !

    Nico

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

    (@pomegranate)

    Hello Nico,
    Do you mean download for the admin? You can simply uncheck the ‘enable’ checkbox for the invoice and it will not show the button to download the invoice.

    Ewout

    Thread Starter leodex

    (@leodex)

    Thank you for your reply.
    I misspelled, downloadable by a user, from the list of his order (as for the invoice, but instead a delivery note).

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Nico,
    That’s certainly possible, you can accomplish this with a small code snippet:

    
    add_filter( 'wpo_wcpdf_myaccount_actions', 'wpo_wcpdf_my_account_packing_slip', 20, 2 );
    function wpo_wcpdf_my_account_packing_slip ( $actions, $order ) {
    	// disable invoice download if present
    	unset($actions['invoice']);
    
      	// add packing slip
    	$actions['packing-slip'] = array(
    		'url'  => wp_nonce_url( admin_url( 'admin-ajax.php?action=generate_wpo_wcpdf&template_type=packing-slip&order_ids=' . $order->get_id() . '&my-account' ), 'generate_wpo_wcpdf' ),
    		'name' => __( 'Download Packing Slip (PDF)', 'woocommerce-pdf-invoices-packing-slips' ),
    	);
    	return $actions;
    }
    

    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 you need help with anything else!
    Ewout

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Download only the delivery slip’ is closed to new replies.