简体   繁体   中英

Woocommerce 2.1.x - How remove View Order in /checkout/order-received/

I'm doing a custom payment plugin for Woocomerce. I need remove the detail of order by "/checkout/order-received/", ie I want remove "Order Details", "Customer details" and "Billing Address".

I had put in my plugin:

remove_action( 'woocommerce_view_order', 'woocommerce_order_details_table' );

but it doesn't work. I've also put in INI , but it still doesn't work.

function gowc_process_init() {
    remove_action( 'woocommerce_view_order', 'woocommerce_order_details_table' );
}
add_action('init', 'gowc_process_init');

Could you help me with this topic, please? PD: Remember that is a plugin, don't is a theme.

Ok, found the solution.

remove_action( 'woocommerce_view_order', 'woocommerce_order_details_table', 10 );
remove_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM