Conditional Cancel Button on my account orders list in Woocommerce
问题 This is in reference to Add Cancel button on My account Orders list using Woo Cancel for Customers Plugin answer: I also tried adding the function into functions.php and also get the too few arguments error: I did the same function provided by LoicTheAztec: add_filter( 'woocommerce_valid_order_statuses_for_cancel', 'custom_valid_order_statuses_for_cancel', 10, 2 ); function custom_valid_order_statuses_for_cancel( $statuses, $order ){ // Set HERE the order statuses where you want the cancel