• Resolved jlarisch

    (@jlarisch)


    Hello there guys, first of all thank you for the awesome plugin! Its really rally great.

    Today my only payment method is to terawallet (old woo wallet), so I set to auto withdraw when the order status change to concluded.

    The problem is, because terawallet is my only withdraw I hide the settings->payment methods to the seller.

    I want to know if the seller has to manually select terawallet as the prefer payment method for this do work or if there is any way I can automatically set terawallet as the default payment method when the seller subscribe.

    I know I can change manually the method payment for the seller but I wanted to be automatic.

    thank you in advance for your time.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author WC Lovers

    (@wclovers)

    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://www.ads-software.com/plugins/code-snippets/

    Thank You

    Thread Starter jlarisch

    (@jlarisch)

    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 ??

    Plugin Author WC Lovers

    (@wclovers)

    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

    Thread Starter jlarisch

    (@jlarisch)

    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

    Plugin Author WC Lovers

    (@wclovers)

    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

    Thread Starter jlarisch

    (@jlarisch)

    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?

    Plugin Author WC Lovers

    (@wclovers)

    the client profile migrated to vendor profile stay with the option “Choose Withdrawal Payment Method”.

    – How you have migrated this?

    Thread Starter jlarisch

    (@jlarisch)

    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.

    Plugin Author WC Lovers

    (@wclovers)

    Please don’t do that.

    Many things will not work if you create/edit vendor users like that.

    Thread Starter jlarisch

    (@jlarisch)

    What is the correct way of transforming a user into a seller?

    Plugin Author WC Lovers

    (@wclovers)

    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

    Thread Starter jlarisch

    (@jlarisch)

    so no way i can migrate a user to became a seller?

    Plugin Author WC Lovers

    (@wclovers)

    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.

    Thread Starter jlarisch

    (@jlarisch)

    OK ??

    didnt know would be so hard for the administrator to set default withdraw method.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘default payment Method’ is closed to new replies.