Order and booking status capability

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
    • #33608
      Vinz
      Participant

      Hi WC LOVERS,

      I would like to limit order and booking status options choices to Vendors (but not to admin)
      I just would like to give him only those choices :

      > for orders :
      – Canceled
      – Complete

      > For booking :
      – Confirmed
      – Canceled

      Is it possible to implement this?

      Thanks !!

    • #33619
      WCFM Forum
      Keymaster

      Hi,

      Kindly add this code for Order status restriction –

      function wcfmmp_allowed_0910_order_status( $order_status ) {
      	if( function_exists( 'wcfm_is_vendor' ) && wcfm_is_vendor() ) {
      		$order_status = array(
      													'wc-completed' => 'Completed',
      													'wc-cancelled' => 'Cancelled',
      													);
      	}
      	return $order_status;
      }
      add_filter( 'wcfm_allowed_order_status',  'wcfmmp_allowed_0910_order_status', 500 );

      I will give you code for booking status as well.

      Thank You

    • #33678
      Vinz
      Participant

      I will try it!
      Ok, I’m waiting for your booking code 🙂

      Many thanks!

    • #35350
      WCFM Forum
      Keymaster

      Hi,

      I am really sorry for such delay.

      Kindly use this code for restricting Booking Status –

      function wcfm_allowed_3110_booking_status( $booking_status ) {
      	if( function_exists( 'wcfm_is_vendor' ) && wcfm_is_vendor() ) {
      		$booking_status = array(
      													'confirmed' => 'Confirmed',
      													'cancelled' => 'Cancelled',
      													);
      	}
      	return $booking_status;
      }
      add_filter( 'wcfm_allowed_booking_status',  'wcfm_allowed_3110_booking_status', 500 );

      Please be sure you have WCFM 5.1.7

      Thank You

    • #35399
      Vinz
      Participant

      Thanks, it works!

Viewing 4 reply threads
  • The topic ‘Order and booking status capability’ is closed to new replies.