0

I'm facing a problem where I couldn't disable the order item link for the backend (user role: shop manager). I've found some solutions but only tackle to the front end (customer-order page).

However, I added a code to functions.php to target only on shop_order order item link

add_filter( 'woocommerce_order_items_shop_order', '__return_false' );

But it doesn't work. Does this require adding javascript in order to disable the order item link on the backend? Been struggling with this for a long time.

enter image description here

0

You can do using this way -

This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-details.php

if ( $sent_to_admin ) {
    /* translators: %s: Order link. */
    echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n";
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.