I need to remove wpautop from

display_value => wpautop( make_clickable( apply_filters( 'woocommerce_order_item_display_meta_value', $display_value, $meta, $this ) ) )

in plugins/woocommerce/includes/class-wc-order-item.php

I don't know where to add remove_filters and add_action. Please tell the way to remove wpautop without editing in woocommerce core file

  • class-wc-order-item.php is not a template. It's a core WooCommerce file, and a very important one at that. Why do you want to edit this? Modifications to core plugin functionality can typically be done with filters, and there is likely a filter that will let you do what you want to do, you just need to specify it. Editing the core file is not something you can safely do, so the answer to the question as written is: you can't. – Jacob Peattie Aug 28 '17 at 13:49
  • I need to customise this.So i want the way to overwrite it from my child theme. – Naresh Aug 28 '17 at 13:51
  • I added more to my question, probably while you were writing. Can you check it again. – Jacob Peattie Aug 28 '17 at 13:52
  • Actually i need to remove wpautop from display_value' => wpautop( make_clickable( apply_filters( 'woocommerce_order_item_display_meta_value', $display_value, $meta, $this ) ) ), How to add filters and where can i add – Naresh Aug 28 '17 at 13:56
  • Can you update your question with the specific problem you're trying to solve. – Jacob Peattie Aug 28 '17 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.