WC Lovers

WooCommerce Frontend Manager - Multivendor marketplace vendor dashboard

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!

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Single select #106246
    badianafaa
    Participant

    Idem with this snippet :

    add_filter( 'wcfm_product_custom_attributes', function( $taxonomy_fields, $att_taxonomy )
    		{
    			if( isset( $taxonomy_fields[$att_taxonomy] ) && isset( $taxonomy_fields[$att_taxonomy]['value'] ) )
    			{
    				$attributes = $taxonomy_fields[$att_taxonomy]['value'];
    				$wcfm_attributes = array();
    				if( !empty( $attributes ) )
    				{
    					foreach( $attributes as $acnt => $wcfm_attribute )
    					{
    						$wcfm_attributes[$acnt] = $wcfm_attribute;
    						$wcfm_attributes[$acnt]['is_active'] = 'enable';
    						$wcfm_attributes[$acnt]['is_visible'] = 'enable';
    					}
    				}
    				$taxonomy_fields[$att_taxonomy]['value'] = $wcfm_attributes;
    			}
    			return $taxonomy_fields;
    		}, 50, 2);

    Is it possible to make that 3 snippets work correctly together ?

    in reply to: Single select #106245
    badianafaa
    Participant

    Hello, this snippet work but only alone, beacause when i want to make all attributes required with this snippet :

    add_filter( 'wcfm_product_custom_attributes', function( $taxonomy_fields, $att_taxonomy )
    		{
    			if( isset( $taxonomy_fields[$att_taxonomy] ) && isset( $taxonomy_fields[$att_taxonomy]['options'] ) )
    			{
    				if( isset( $taxonomy_fields[$att_taxonomy]['options']['is_active'] ) )
    				{
    					$taxonomy_fields[$att_taxonomy]['options']['is_active']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Attributes are required' );
    				}
    				if( isset( $taxonomy_fields[$att_taxonomy]['options']['value'] ) )
    				{
    					$taxonomy_fields[$att_taxonomy]['options']['value']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Attributes are required' );
    				}
    			}
    			return $taxonomy_fields;
    		}, 50, 2);

    , the limit 1 snippet doesn’t work anymore. Is it possible to make the 2 snippets work correctly together ?

    in reply to: Hide archived products in vendor store #100276
    badianafaa
    Participant
    This reply has been marked as private.
Viewing 3 posts - 1 through 3 (of 3 total)