Cancel an order with status is Processing

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 1 reply thread
  • Author
    Posts
    • #69246
      gjergjib2332
      Participant

      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,

    • #69785
      WCFM Forum
      Member

      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

Viewing 1 reply thread
  • You must be logged in to reply to this topic.