Home › Forums › WoodMart support forum › Cancel order in account settings Cancel order in account settings This topic has 3 replies, 2 voices, and was last updated 1 year, 3 months ago by Aizaz Imtiaz Awan. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts August 22, 2023 at 10:40 am #490359 bogdan-4113Participant Hello there, I want to add a cancel order button in my account->order status, but i don`t know how. May you help me? Thx Attachments:You must be logged in to view attached files. August 23, 2023 at 2:23 pm #490732 Aizaz Imtiaz AwanKeymaster Hello, Try to add the below code to the functions.php file in your child theme. add_filter('woocommerce_valid_order_statuses_for_cancel', 'my_cancellable_statuses', 10, 2); function my_cancellable_statuses($statuses, $order){ return array('pending', 'processing', 'on-hold'); } Best Regards. August 24, 2023 at 11:37 am #490988 bogdan-4113Participant Hello, Where exactly i have to put that code? Thx August 24, 2023 at 5:43 pm #491100 Aizaz Imtiaz AwanKeymaster Hello, From the dashboard, go to “Appearance” and then click on “Theme Editor.” Click on the functions.php file to open it in the code editor. Inside the code editor, add your code snippet: After adding your code, click the “Update File” button to save your changes. Best Regards. Author Posts Tagged: cancel order Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to create new topics. Login / Register