Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Cancel an order with status is Processing
- This topic has 1 reply, 2 voices, and was last updated 5 years, 6 months ago by WCFM Forum.
- AuthorPosts
- June 24, 2019 at 9:45 am #69246gjergjib2332Participant
Hi guys,
Very nice job, congrats!I want to ask you, is it possible to cancel and order from My orders (user account) when the order is on status Processing?
I’ve seen that if the order is on status Pending Payment this option is available (I founded when I’ve created an order using the API request). But for the web part, when I create an order and proceed with the checkout, I’ve seen that the user have only the View option when he can view his order but not the Cancel option when he can cancel an order. that is with status Processing.
All the best,
- June 26, 2019 at 3:21 pm #69785WCFM ForumMember
HI,
Thanks for get in touch with us.
Please add this code to your child theme’s functions.php –
add_filter( 'woocommerce_valid_order_statuses_for_cancel', function( $status, $order ) { return array( 'pending', 'failed', 'processing' ); }, 50, 2 );
Thank You
- AuthorPosts
- You must be logged in to reply to this topic.