• Resolved wpshushu

    (@wpshushu)


    Hi,

    I’d like to remove print delivery notes / receipt from orders => bulk action. Is there a HOOK?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @wpshushu,

    Thank you for reaching out!

    At the moment, there isn’t a built-in option to remove the “Print Delivery Notes / Receipt” options from the bulk actions menu. However, I’ve passed your request along to our development team to explore whether it might be possible to achieve this through a custom hook or snippet.

    As soon as I hear back from them, I’ll follow up with you right away with more information or possible solutions.

    Appreciate your patience, and please feel free to reach out if you have any further questions in the meantime!

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @wpshushu,

    Our developer has reviewed your requirements and implemented customized code to meet your needs. You will need to add the code below to the “functions.php” file of your active theme. , and it will do its job.

    // Register only the bulk actions you want
    // This filter modifies bulk actions on the main Orders list page (WooCommerce -> Orders)
    add_filter( 'bulk_actions-edit-shop_order', 'custom_bulk_actions_only_invoice', 20, 1 );

    // This filter modifies bulk actions on the WooCommerce Orders submenu page (sometimes used in certain admin views)
    add_filter( 'bulk_actions-woocommerce_page_wc-orders', 'custom_bulk_actions_only_invoice', 20, 1 );

    function custom_bulk_actions_only_invoice( $bulk_actions ) {
    // Remove the unwanted bulk actions added by the WooCommerce Delivery Notes plugin
    unset( $bulk_actions['wcdn_print_delivery-note'] ); // Remove "Print Delivery Note"
    unset( $bulk_actions['wcdn_print_receipt'] ); // Remove "Print Receipt"

    // Add only the "Print Invoice" bulk action
    $bulk_actions['wcdn_print_invoice'] = apply_filters(
    'wcdn_change_text_of_print_invoice_in_bulk_option',
    __( 'Print Invoice', 'woocommerce-delivery-notes' )
    );

    return $bulk_actions;
    }

    Once you have added it, please check and let us know if it works as per your requirements.

    Feel free to ask if you have any further queries.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘customize menu items in orders bulk action’ is closed to new replies.