Hide pending and on-hold orders from vendors

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 4 reply threads
  • Author
    Posts
    • #57730
      d-n-13
      Participant

      Hello,

      I want to hide orders with pending and on-hold from vendors so they don’t complete unpaid orders by mistake I want to only show processing/completed/failed/shipped.

      Thank You

    • #57821
      WCFM Forum
      Member

      Hi,

      Please use this code snippet –

      add_filter( 'wcfm_allowed_order_status', function( $order_status ) {
      	if( isset( $order_status['wc-pending'] ) ) unset( $order_status['wc-pending'] );
      	return $order_status;
      }, 50 );
      add_filter( 'wcfmp_order_list_allowed_status', function( $allowed_status ) {
      	$allowed_status = "'pending','completed','processing','failed'";
      	return $allowed_status;
      });
      add_filter( 'wcfmmp_is_allow_order_status_filter', '__return_true' );

      Thank You

    • #57900
      d-n-13
      Participant

      hi,

      On-Hold still showing to Vendors.

    • #59444
      d-n-13
      Participant

      is it possible to hide on hold as well ?

      Thank you

    • #59811
      WCFM Forum
      Member

      Sure, use this code –

      add_filter( 'wcfm_allowed_order_status', function( $order_status ) {
      	if( isset( $order_status['wc-on-hold'] ) ) unset( $order_status['wc-on-hold'] );
      	return $order_status;
      }, 50 );

      Thank You

Viewing 4 reply threads
  • The topic ‘Hide pending and on-hold orders from vendors’ is closed to new replies.