Tweaks

1.Tweaks Overview #

WCFM Dashboard is most flexible one, you may change anything as per your requirement very easily. Now if we create setting option for all these then it will be a painful job for you to find out the right one for your purpose.

We have kept possibilities to tweak those easily by adding 1-2 lines of code. You may add those codes in two ways –

  1. Add codes at your child theme’s functions.php
  2. Install code snippet (https://wordpress.org/plugins/code-snippets/) plugin and add using this

Find below, some of the most popular tweaks people looking for!

Yes No

2.Products #

2.1.New Product Notification #

Well, Admin receive new Product email only if “Product Approval” enabled.
 
If it’s disabled then Admin does not receive email for All new products added by vendors.
 
But, if you really want to this email then add this line –
 
add_filter( 'wcfm_is_allow_new_product_notification_email', '__return_true' );
Yes No

2.2.Set Attributes Required #

By default product attributes are not required when you are adding products, but you may add this restriction by adding this code –

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);

Yes No

3.Orders #

3.1.Order Status with Label #

WCFM Order listing page by default shows order status by icon. But you may change this and show status as icon+text as well.

You have to use this code snippet –

add_filter( 'wcfm_order_status_display', function( $label, $the_order ) {
$label .= '<br />' . wc_get_order_status_name( $the_order->get_status() );
return $label;
}, 50, 2 );

Hence it will look like this –

Yes No

4.Marketplace #

4.1.Archive Sold By #

Well, in WC product archive pages “Sold By” store label visible with products – 

Now, if you do not want to have this then add this to hide this – 

add_filter( 'wcfmmp_is_allow_archive_product_sold_by', '__return_false' );

Now, this sold by label has many parts – 

  • Sold By Label (as per setting)
  • Store Logo
  • Store Name
  • Store Rating
  • Store Badges (available using WCFM Ultimate)

You also allowed to manage all these components –

1. Hide “Sold By” label –

add_filter( 'wcfmmp_is_allow_sold_by_label', '__return_false' );

2. Hide Store Logo –

add_filter( 'wcfmmp_is_allow_sold_by_logo', '__return_false' );

3. Hide Store Review – 

add_filter( 'wcfmmp_is_allow_sold_by_review', '__return_false' );

4. Hide Store Badges – 

add_filter( 'wcfm_is_allow_badges_in_loop', '__return_false' );

Yes No

4.2.Store List Mobile Sidebar #

Well, in mobile view Store List by default sidebar comes under store lists. Now you may tweak this and show sidebar first and then stores. 

add_filter( 'wcfmmp_is_allow_mobile_sidebar_at_bottom', '__return_false' );

Yes No

4.3.Store Page Mobile Sidebar #

Well, in mobile view Store Page by default sidebar comes under store lists. Now you may tweak this and show sidebar first and then stores. 

add_filter( 'wcfmmp_is_allow_mobile_sidebar_at_bottom', '__return_false' );

Yes No

5.Vendor Registration #