Hi @glepera2
The plugin does not have this functionality currently. You will have to add some custom code to do this. You can use the filter ‘woocommerce_my_account_my_orders_actions’ to add the button on the My Account page.
Add the following code in your theme’s functions.php file –
add_filter( '
woocommerce_my_account_my_orders_actions', 'delivery_button_account_page', 10, 2 );
function delivery_button_account_page( $actions, $order ) {
if( get_option( 'wcdn_print_button_on_my_account_page' ) == 'yes' ) {
$wdn_order_id = ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', ">=" ) ) ? $order->get_id() : $order->id;
$actions['print-delivery'] = array(
'url' => wcdn_get_print_link( $wdn_order_id, 'delivery-note' ),
'name' => __( 'Print Delivery Note', 'woocommerce-delivery-notes' )
);
}
return $actions;
}
Let me know if you have any problems.
Regards,
Rashmi