Vendor Settings Menu
-
Anyway to combine the Dashboard and Settings Menus? I am worried that vendors will not be able to locate Payment and Shipping, and therefore could list a product without filling out the necessary payment and shipping info.
Is there a way to force a vendor to complete shipping and payment before listing a new product?
Thanks!
-
Hi,
Well, that will be difficult.
But you may add these two code snippet to your site to restrict vendors from creating product before setting up payment and shipping –
https://docs.wclovers.com/tweaks/#restrict-add-product-without-payment-setting
https://docs.wclovers.com/tweaks/#restrict-add-product-without-shipping-settingAdd this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
Thank you so much! One more issue now… not sure if you can help. I am using Dokan Pro plugin… and from your vendor dashboard, under the shipping tab, I am getting the error:
” Dokan Pro Shipping Settings: Please ask your Store Admin to upgrade your dashboard to access this feature.”
I have set up shipping zones in WooCommerce Shipping settings, but they still wont show up on your vendor dashboard. Am I missing something?
Thanks for your help!
Hi,
WCFM Ultimate (https://wclovers.com/product/woocommerce-frontend-manager-ultimate/) will require for accessing this feature.
Between, those code will not work for you. I have gave you code for WCFM Marketplace, those will not work for Dokan.
Thank You
Thank you.. So to be clear, if I purchase the Ultimate Plugin, that will fix the Dokan shipping issue that I’m experiencing?
Thanks
Yeah right, you will able to create shipping as vendor.
Between, which payment options you will allow for vendors for withdrawal? I will give you those revised codes for Dokan.
THANK YOU!!! I will be purchasing your plugin soon.
Paypal And Stripe will be the methods for vendor withdrawl!
Thanks again.
Will you be posting the code on this thread?
Thanks
Hello, I have purchased your ultimate plugin! Any update on this code?
Thanks
Hi,
Please use this codes –
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, 'dokan_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_connect_access_key', 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 ); add_filter( 'wcfm_is_allow_pm_add_products', function( $is_allow ) { global $wp, $WCFM, $wpdb; if( $is_allow && function_exists( 'wcfm_is_vendor' ) && wcfm_is_vendor() ) { $vendor_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() ); $dps_shipping_enable = get_user_meta( $vendor_id, '_dps_shipping_enable', true ); $dps_country_rates = get_user_meta( $vendor_id, '_dps_country_rates', true ); $sql = "SELECT * FROM {$wpdb->prefix}dokan_shipping_zone_methods WHERE <code>seller_id</code>={$vendor_id}"; $results = $wpdb->get_results( $sql ); if( empty($results) && ( !$dps_shipping_enable || ( $dps_shipping_enable && ( $dps_shipping_enable != 'yes' ) ) || ( $dps_shipping_enable && ( $dps_shipping_enable == 'yes' ) && empty( $dps_country_rates ) ) ) ) { $is_allow = false; if( isset( $wp->query_vars['wcfm-products-manage'] ) ) { wcfm_restriction_message_show( __( "Please setup your store shipping before to add product!", "wc-fronend-manager" ), false, true ); } } } return $is_allow; }, 60 );
Thank You
THANK YOU…How can I edit the first code if vendors can only withdrawl with paypal and not with stripe? Thanks.
Hi,
Please remove previous code and use this for payment profile set check –
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, 'dokan_profile_settings', true ); $paypal = isset( $vendor_data['payment']['paypal']['email'] ) ? esc_attr( $vendor_data['payment']['paypal']['email'] ) : '' ; $skrill = isset( $vendor_data['payment']['skrill']['email'] ) ? esc_attr( $vendor_data['payment']['skrill']['email'] ) : '' ; $stripe_user_id = get_user_meta( $vendor_id, '_stripe_connect_access_key', true ); if( !$stripe_user_id && !$paypal && !$skrill ) { if( isset( $wp->query_vars['wcfm-products-manage'] ) || isset( $wp->query_vars['wcfm-products-import'] ) ) { wcfm_restriction_message_show( __( "Payment account not yet setup!", "wc-fronend-manager" ), false, true ); } $is_allow = false; } } return $is_allow; }, 750 );
Thank You
THANK YOU SO MUCH!
Great … thanks for the update 🙂
- The topic ‘Vendor Settings Menu’ is closed to new replies.