最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

woocommerce offtopic - change in form-checkout.php by using code in functions.php

programmeradmin3浏览0评论

Specific, how do i remove "Your order" or the full function? By using a code snippet in functions.php (child-theme)

It can be found by:

<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>

in form-checkout.php.

I would prefer some code instead of coping the file to child-theme and alter the file.

Specific, how do i remove "Your order" or the full function? By using a code snippet in functions.php (child-theme)

It can be found by:

<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>

in form-checkout.php.

I would prefer some code instead of coping the file to child-theme and alter the file.

Share Improve this question asked Nov 19, 2019 at 21:07 ChristianChristian 1313 bronze badges 2
  • 1 you can try with CSS #order_review_heading { display : none; } – Kaperto Commented Nov 19, 2019 at 22:13
  • You are right, add .woocommerce-checkout #order_review_heading { display:none; } to the style.css also does it! thanks. – Christian Commented Nov 21, 2019 at 21:12
Add a comment  | 

1 Answer 1

Reset to default 2

By injecting CSS (not optimal):

function remove_message_text() {
      echo '<style type="text/css">#order_review_heading { display: none; } </style>'; // Remove original text "Your Order"
      }
      add_action( 'woocommerce_checkout_before_order_review', 'remove_message_text');
发布评论

评论列表(0)

  1. 暂无评论