How to hide backorders

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 3 reply threads
  • Author
    Posts
    • #65901
      Jose
      Participant

      Hi,

      I use this code to hide from product detail:

      add_filter( 'wcfm_product_fields_stock', function( $stock_fields, $product_id, $product_type ) {
      	$stock_fields = wcfm_hide_field( 'backorders', $stock_fields );
        return $stock_fields;
      }, 50, 3 );

      But if I go to Stock manager still the option to setting backorders.

      Can you please help me to resolve this one ?

      Regards,

    • #66069
      WCFM Forum
      Member

      HI,

      Please use this code snippet –

      add_filter( 'wcfm_stocks_screen_manage', function( $wcfm_screen_manager_data ) {
      	$wcfm_screen_manager_data[7] = 'yes';
      	return $wcfm_screen_manager_data;
      }, 50 );

      Thank You

    • #66082
      Jose
      Participant

      Hi,

      Thanks you so much !! work perfect !!

      Best regards,

    • #66107
      WCFM Forum
      Member

      Welcome 🙂

Viewing 3 reply threads
  • The topic ‘How to hide backorders’ is closed to new replies.