Stripe split payment – stripe connect not configured

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Stripe split payment – stripe connect not configured

Viewing 6 reply threads
  • Author
    Posts
    • #96620
      aemr45
      Participant

      Hi guys,

      In testing mode, I just configured a new vendor but skipped the Store configuration, then I published a new product and I buy it with a customer user. All worked correctly but since the vendor had no Stripe Connect configured, the total amount was sent to my administrator stripe account.

      In order to prevent this to happen, Is there a way to disable sales from the seller who has not set up stripe connect? or, Make it mandatory to set up the stripe connect account before you can publish products or accept payments from customers by credit or debit card?

      Thanks

    • #96621
      sdel_nevo
      Participant

      Hi

      i had the same question ages ago, i purchased some code via a custom job

      this works for me really well, it prevents the vendor publishing products until the stripe account has been connected

      //  vendors can import them and assign a category, but products must not be published until a stripe account is connected
      add_action( 'after_wcfm_products_manage_meta_save', function( $new_product_id, $wcfm_products_manage_form_data ) {
      	global $WCFM;
      	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'] ) : '' ;
        	$stripe_user_id = get_user_meta( $vendor_id, 'stripe_user_id', true );
        	if( !$payment_mode || !$stripe_user_id ) {
      			wcfm_staging_site_set_product_status( $new_product_id );
      		}
      	}
      }, 550, 2 );
      
      function wcfm_staging_site_set_product_status( $new_product_id, $status = 'draft' ) {
      	if( !wcfm_is_vendor() ) return;
      	$update_product = array(
      														'ID'           => $new_product_id,
      														'post_status'  => $status,
      														'post_type'    => 'product',
      													);
      		wp_update_post( $update_product, true );
      }

      hope this helps

      Steve

    • #96622
      aemr45
      Participant

      You’re the man Steve! thank you! I’ll test it and let you know.

    • #96624
      sdel_nevo
      Participant

      you’re more than welcome mate

      it works well for me,

      hope you’re able to make use of it

      Steve

    • #96635
      aemr45
      Participant

      It works really well! It was a success in all the tests I did!

      Thank you so much, this solves many of the problems I had anticipated.

    • #96636
      sdel_nevo
      Participant

      That’s great

      you’re most welcome

      Steve

    • #96729
      WCFM Forum
      Member

      Thanks @Steve

Viewing 6 reply threads
  • The topic ‘Stripe split payment – stripe connect not configured’ is closed to new replies.