• Hi, I would like to use this wonderful plugin to let the customers print / download the own invoice per order. Is it possible to add a shortcode that I can use on the my account page of the customer, which lets the customers print his own order invoice ?

    This would really be wonderful, as I would not need to print and send the invoice by hand for each order.

    Also, as I am selling digital downloads only, the customers don′t use shipping addresses and so the invoices don′t display the customers address. How can I fix this in the code ?

    Thanks,
    Martin

    https://www.ads-software.com/extend/plugins/woocommerce-delivery-notes/

Viewing 3 replies - 16 through 18 (of 18 total)
  • Hi there, any news about the print button on customer personal page?
    Thanks

    I figured it out:
    I added this code

    $var1 = wp_nonce_url( admin_url( 'admin-ajax.php?action=generate_print_content&template_type=invoice&order_id=' . $order->id ), 'generate_print_content' );
    
    $var2 = esc_attr_e( '', 'woocommerce-delivery-notes' );
    
    echo '<a href="'.$var1.'" class="button tips print-preview-button" target="_blank" data-tip="'.$var2.'"><span>PRINT INVOICE</span></a>';

    right after the View button in my-orders.php line 88:

    foreach( $actions as $key => $action ) {
    echo '<a href="' . esc_url( $action['url'] ) . '" class="button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>'; RIGHT HERE

    After this, I commented the wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); in class-wcdn-print.php line 68, 73, 78

    Great code, is there a way of not showing the invoice if the order has been cancelled? Thanks !

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘[Plugin: WooCommerce Print Invoices & Delivery Notes] Invoice button for customers ?’ is closed to new replies.