Hi,
Please add this snippet to your site –
add_action( 'wcfmmp_new_store_created', function( $member_id, $wcfmmp_settings ) {
$vendor_data = get_user_meta( $member_id, 'wcfmmp_profile_settings', true );
$vendor_data['payment']['method'] = 'woo_wallet';
update_user_meta( $member_id, 'wcfmmp_profile_settings', $vendor_data );
}, 100, 2 );
Add custom code(s) to your child theme’s functions.php
In case you do not have child theme then add those using this plugin – https://wordpress.org/plugins/code-snippets/
Thank You
Hello there ! Thank you for the quick response.
That solution would work it if I didnt had to change manually the cliente role directy on wordpress, the reason:
I sell products for people and sometimes one buyer wants me to sell their products, causing a client to became a seller.
would not be possible for the admin to set de default payment method? There is another way?
I try to activate de function when I change the role from customer do store vendor, but without success:
add_action( ‘set_user_role’, ‘custom_user_change_function’, 10, 3 );
function custom_user_change_function( $user_id, $role, $old_roles )
{
if(in_array(‘customer’, $old_roles))
{
add_action( ‘wcfmmp_new_store_created’, function( $member_id, $wcfmmp_settings )
{
$vendor_data = get_user_meta( $member_id, ‘wcfmmp_profile_settings’, true );
$vendor_data[‘payment’][‘method’] = ‘woo_wallet’;
update_user_meta( $member_id, ‘wcfmmp_profile_settings’, $vendor_data );
}, 100, 2 );
}
}
can you help me out? I am not expert on WordPress but I try 🙂
HI,
would not be possible for the admin to set de default payment method? There is another way?
– For which users you want to set this? Customer users?
Between, I have provided you that code for “vendor” users, on registration their preferred withdrawal payment method will auto-set “wallet”
Thank You
Hello again! I apreciate the code.
I Want to chance from customer tô store vendor, and this user tô have woowallet pre selected.
Thank again for your attention qnd Hope u are well
HI,
Well, I have already gave you code for the purpose. On registration vendor’s preferred payment method will be set “Wallet” –
add_action( 'wcfmmp_new_store_created', function( $member_id, $wcfmmp_settings ) {
$vendor_data = get_user_meta( $member_id, 'wcfmmp_profile_settings', true );
$vendor_data['payment']['method'] = 'woo_wallet';
update_user_meta( $member_id, 'wcfmmp_profile_settings', $vendor_data );
}, 100, 2 );
Thank You
Well my friend, I try everything and its not working 🙁
the client profile migrated to vendor profile stay with the option “Choose Withdrawal Payment Method”.
Any ideias?
the client profile migrated to vendor profile stay with the option “Choose Withdrawal Payment Method”.
– How you have migrated this?
Sorry, maybe I was not so clear:
“That solution would work it if I didnt had to change manually the cliente role directy on wordpress”
I mean to say that I go “User” tab inside wordpress admin, then I go on the user and select his role to be storevendor.
Please don’t do that.
Many things will not work if you create/edit vendor users like that.
What is the correct way of transforming a user into a seller?
Vendors can be created two ways –
1. They can register themselves
2. Admin can add from WCFM dashboard
You may enable vendor application approval as well. But then also approve application form WCFM dashboard.
Thank You
so no way i can migrate a user to became a seller?
Sure, you may do so. But then vendor profile default setting will not set. You have to configure those manually form WCFM vendor manage page.
OK 🙁
didnt know would be so hard for the administrator to set default withdraw method.