Posted on Leave a comment

Restrict Add Product without Payment Setting

You may restrict vendor’s “Add Product” permission if they not yet setup their payment setting –

add_filter( 'wcfm_is_allow_pm_add_products', function( $is_allow ) {
global $wp;
if( wcfm_is_vendor() ) {
$vendor_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );
$vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );
$payment_mode = isset( $vendor_data['payment']['method'] ) ? esc_attr( $vendor_data['payment']['method'] ) : '' ;
$paypal_email = isset( $vendor_data['payment']['paypal']['email'] ) ? esc_attr( $vendor_data['payment']['paypal']['email'] ) : '' ;
$stripe_user_id = get_user_meta( $vendor_id, 'stripe_user_id', true );
if( !$payment_mode || ( ( $payment_mode == 'stripe' ) && !$stripe_user_id ) || ( ( $payment_mode == 'paypal' ) && !$paypal_email ) ) {
if( isset( $wp->query_vars['wcfm-products-manage'] ) ) {
wcfm_restriction_message_show( __( "Payment account not yet setup!", "wc-fronend-manager" ), false, true );
}
$is_allow = false;
}
}
return $is_allow;
}, 750 );

Posted on Leave a comment

Live Chat Firebase Rules

Step 1 : Click on Database from left menu.

Step 2 : Switch to Rules tab

Step 3 : Replace code with the following code (same as shown in below image, if its not same already) and click on Publish button Code:
{
"rules": {
".read": "true",
".write": "true"
}
}

Step 4 : Click on Storage from left menu. 

Step 5 :  Click on Get Started 

Step 6 :  Click on Got It 

Step 7 :  Switch to Rules tab 

Step  8 : Add “|| request.auth == null” at the last in to the code

Step 9 : The code(same as into below image), then click on Publish button 

Posted on Leave a comment

Live Chat Capability

If you don’t want to have Chat Module in your site they you may disable just by on click.

Kindly go to WCFM Admin Dashboard -> Modules -> Chat Box -> Set this OFF

 

You may control “Chat Box” capability from WCFM Capability setting page.

 

 

You may control chat module availability as per vendor as well.

Membership specific chat box capability controller is also possible using WCFM – Group & Staff addon.