Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1287253
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 3 years ago.
Improve this questionI'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.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 3 years ago.
Improve this questionI'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.
Share Improve this question asked Sep 30, 2021 at 18:38 ColeCole 31 bronze badge1 Answer
Reset to default 0You 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";
}
本文标签: phpWoocommerce disable order item link (backend)
版权声明:本文标题:php - Woocommerce disable order item link (backend) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741291636a2370584.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论