Home > Software engineering >  Make 'item' hyperlink in WooCommerce orders (backend) unclickable for shop manager
Make 'item' hyperlink in WooCommerce orders (backend) unclickable for shop manager

Time:10-01

I'm using enter image description here

CodePudding user response:

An update on the alternative solution using enter image description here

After update the role, and under woocommerce > orders > click on order item enter image description here

It will shows 'Sorry, you are not allowed to edit this item'

enter image description here

Feel free to add answer asides from this.

CodePudding user response:

If you want you can do it by editing plugin file

woocommerce\includes\admin\meta-boxes\views\html-order-item.php

here you'll see the hyperlink change this line:

echo $product_link ? '<a href="' . esc_url( $product_link ) . '" class="wc-order-item-name">' . wp_kses_post( $item->get_name() ) . '</a>' : '<div class="wc-order-item-name">' . wp_kses_post( $item->get_name() ) . '</div>';

Just remove the tag

  • Related