Custom Product / Capabilities

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
    • #31659
      info31
      Guest

      With your code provided, I have added a custom product (Tickets). I have enabled it in Capabilities.
      However, my product creation form, doesn’t seem to reflect the options / changes. Is there something I’m missing?

      https://cl.ly/22ef06/Screen%252520Recording%2525202018-09-14%252520at%25252010.05%252520PM.gif

    • #31694
      WCFM Forum
      Member

      Hi,

      Please add this code as well and please correct product type, I have added placeholder “Tickets” –

      function wcfmcap_is_allow_custom_product_types( $product_types ) {
      	$wcfm_capability_options = apply_filters( 'wcfm_capability_options_rules', get_option( 'wcfm_capability_options', array() ) );
      	$ickets = ( isset( $wcfm_capability_options['Tickets'] ) ) ? $wcfm_capability_options['Tickets'] : 'no';
      	if( $tickets == 'yes' ) unset( $product_types[ 'Tickets' ] );
      	return $product_types;
      }
      add_filter( 'wcfm_product_types', 'wcfmcap_is_allow_custom_product_types', 700 );

      Thank You

    • #31884
      info31
      Participant

      Thank you for all the help.

      I might need some assistance. We’ve used the code provided, but can’t seem to get it to work.

      Even when we disable SIMPLE PRODUCTS, all new product added shows up as a Simple Product and not a Custom Product (Tickets).
      Would you have an idea why? (We’ve cleared the cache as well).

      Racking our brains and we can’t figure this out. It’s been a few weeks.

    • #32032
      WCFM Forum
      Member

      Hi,

      Kindly send me codes you have written for adding new product types, I think there has some flaws.

      Did you checked, are you able to create such product types from wp-admin area using WC default product editor?

      Be careful with product type slug, is this in capital “Tickets”?

      Thank you

Viewing 3 reply threads
  • The topic ‘Custom Product / Capabilities’ is closed to new replies.