Vendor Stores Configuration

Transcription

Vendor Stores Configuration
Home (http://ignitewoo.com) / Vendor Stores
Vendor Stores
Be sure to read all of the information below carefully so that you
Table of Contents
have a good understanding of how the software works.
Configuration
Navigate to WooCommerce ­> Settings ­> Integration ­> Vendor
Stores. Configure the settings as you like. Be sure to refer to
the setting descriptions below so that you understand the
implications and use of each setting.
General
Vendor Store Slug
The slug used for the store permalinks. WARNING: This can
only contain letters, numbers, dashes, and underscores
Configuration
Dashboard
Editing Products
Reports
Becoming a Vendor
Manually Creating Vendors
Warnings
Mass Pay Cron Jobs
Shipping
Shortcodes
Payment Accounts
Customization
Translators
Payment Gateway Developers
Vendor Registration
This determines how people can become vendors in your site.
Vendor Dashboard Page
The page on your site used for the Vendor Dashboard area, which is used by vendors to access their
settings, orders, etc. This page is created automatically when you enable the plugin. The default title for
the page is “Vendor Dashboard”
Default Commission
This is the default amount used if no commission is set in the vendor’s store settings. By default no
percentage is defined in a vendor store when the store is created – unless you manually set the
commission. When no commission is set in a vendor’s store this default commission setting is used.
You may use a percentage or a fixed amount. To define a percent for each product sold use a percent
symbol after the amount. Example: 25% or 45.5% To define a fixed amount per product sold enter a
number without a percent symbol. Example: 10 to give $10 commission, or 75% to give a 75%
commission. Keep in mind the commission is calculated on a per product basis, per quanity. Example: If
you set the commission to 75% and the vendor sells one person 5 yellow t­shirts $20 each in the same
order, the total sale amount is $100 and the vendor will receive $75 ( 75% of $100 ).
If no commission is defined then vendors recieve no commission unless you defined a commission in
their store settings. Note that per­product commission settings override vendor store commission
settings.
Default Commission For
This controls the default setting of who receives the commission when a new vendor store is created.
You can override this setting for any vendor store by editing the settings for the vendor store, or on a
per­product basis by editing individul products.
This setting lets you configure your store in a variety of ways. For example, you might want to take $5
from the sale of each product. In that case, set the Commission to $5 and set the Commission For to
“Store”
Or you might want to pay the vendor $10 for each item sold. In that case set the Commission to $10 and
set the Commission For to “Vendor”
You can override the defaults by editing the settings of any vendor store.
You can also override the settings at the product level by simply editing the product settings.
If no setting is defined the plugin gives commissions to the vendor.
Include Shipping
When enabled the per item shipping amount is included when calculating vendor commission. This
setting is only applicable when commission is a percentage and “Give per item shipping cost to vendor” is
enabled
Product Editing
Allowed Product Types
This determines which types of products a vendor can post in their store. We recommend allowing
Simple and Variable.
If you enable new plugins that add new product types ( for example, WooCommerce Subscriptions ) then
be sure to revisit this setting and make adjustments if you want vendors to be able to create products of
the new post type.
Hide Product Panels
The product data panels that you want to hide. This works for the following panels:
Inventory
Shipping
Linked Products
Attributes
Advanced
Any other panels added by other plugins must be removed or hidden using your own CSS or Javascript
Hide Product Fields
The product fields that you want to hide. This works for the following fields:
Taxes
SKU
Any other fields must be removed or hidden using your own CSS or Javascript
Hide Product Type Options
The product type options that you want to hide. This works for the following types:
Virtual
Downloadable
Any other type fields must be removed or hidden using your own CSS or Jvascript
New Product Notice Recipients
A list of addresses (comma separated) who receive notices when new products are posted by vendors.
Defaults to mark@simplercomputing.net
New Product Notice Title
Message subject. Use {blogname} to insert the site name
New Product Notice Message
Message content. Use {username} to insert the user name and {url} to insert a URL to view / edit the
post
Automatic Approval
If you enable this setting by defining a number, then when the vendor has the defined number of
products published the vendor will gain the ability to publish product any time they like with no notice sent
to the store admin. To disable this feature, leave the field totally empty. To grant every vendor the ability
to publish products without review set the value to 0 ( zero ).
Trusted Vendors
Any vendors selected can post products with no administrative review. This setting entirely bypasses the
automatic approval setting for the selected vendors.
Editor CSS
You can enter CSS in this field that is loaded when products are edited by vendors. For example you
may want to hide certain fields. You can use this CSS field to do that.
Product Display
Show “Sold By” in Cart
When enabled the product pages will show which vendor sells the product.
Show “Sold By” in Email
When enabled order confirmation emails will show which vendor sells the product.
Show Seller Tab
Show the seller tab on single product pages.
Seller Tab Label
The seller tab label on shown single product pages.
Add “Contact Seller” Tab
Add a tab to single product pages that allows a shopper to send the vendor a message. This feature
requires a free ReCaptcha account (https://www.google.com/recaptcha).
Contact Tab Label
The contact tab label on shown single product pages.
ReCaptcha Public Key
Enter your ReCaptcha public key
ReCaptcha Private Key
Enter your ReCaptcha private key
Coupons
This feature only works with WooCommerce 2.1.x or newer. When you enable the Vendor Coupons
option vendors can create and manage their own coupons. You must enable the coupon feature in
WooCommerce itself otherwise shoppers will not be able to use coupons!
There are some limitations in the way vendors can create coupons. Make note of these!
Vendors can create coupons just like an administrator can, however:
Vendors can only create coupon types of product discount and product percentage discount. NO
OTHER COUPON TYPES ARE ALLOWED.
Due to limitations in WooCommerce itself, vendors cannot set options for free shipping; whether
the coupon is applied before or after tax; whether the coupon can be used with other coupons;
whether or not the coupon excludes sale items; and whether the coupon requires a minimum cart
amount, and included and excluded product categories. IgniteWoo will attempt to address these
issues as the WooCommerce coupons API evolves in upcoming versions, but we can make no
guarantees one way or the other.
If a vendor configures a coupon for product discounts and does not set any included products then
the coupon is valid for all of the vendors products unless a product in the cart is set in the excluded
product settings of the coupon.
Also note that shop managers and site administrators will see an additional author field when editing
coupons. This field is added by Vendor Stores to allow shop manager and administrators to see which
vendor published the coupon and adjust the coupon ownership when necessary. Other than that, the
author of a coupon is present to help Vendors Stores control access to editing the coupon. This setting
has no affect on the use of the coupon by shoppers.
Orders
Show Email Address
Allow vendors to see buyer email addresses
Show Billing Address
Allow vendors to see buyer billing addresses
Show Phone Number
Allow vendors to see buyer phone numbers
Show Shipping Address
Allow vendors to see buyer shipping addresses
Add Vendor to Note
When a vendor adds a note to an order then prepend the vendor store name to the note
Give order item tax to vendor
If taxes are applied to items in the cart then give the tax to the vendor
Give per item shipping cost to vendor
If shipping costs are applied to items in the cart then give the shipping cost to the vendor ( currently only
works with Per Product shipping, Local Delivery, and International Delivery )
Packing Slips
This option is available when you use our PDF Invoices & Packing Slips Pro plugin. When enabled and
vendors are viewing their orders they will see a button they can click to print a packing slip.
Stores
Display Logos
Display store logo image on store archive pages
Logo Width
Logo width in pixels. Images are “soft cropped” to retain aspect ratio. Logos may not display at this
except size.
Logo Height
Logo height in pixels. Images are “soft cropped” to retain aspect ratio. Logos may not display at this
except size.
Allow HTML
Whether or not vendors can put HTML into their store descriptions
Payment Processing
Disable Instant PaymentsWith his option enabled, regardless of which payment gateway you have
installed no vendors will be paid automatically at the time a shopper places a new order. Instead all
commissions due will be recorded for processing at a later time
PayPal Required
With this option enabled all vendors will be required to supply their PayPal email address before being
able to publish products in your site
Payment Processing
PayPal Mass Payment – Automatic. Using this method you can pay your vendors automatically at
regular intervals using PayPal Mass Pay. The interval is controlled by your Payment Interval
settings
PayPay Mass Payment – Manual. .Using this method you process payments by exporting a CSV
of commissions due and uploading the CSV into your PayPal account’s Mass Pay interface.
Note that you must have a PayPal Premier or Business account to use Mass Pay.
You can enable any payment gateways you prefer, however only gateways officially supported by Vendor
Stores are capable of paying vendors immediately ( Currently this includes IgniteWoo’s PayPal Adaptive
Payments, WePay, and Stripe gateways).
If for example you enable an unsupported gateway and a shopper makes payment with that gateway
then the vendor cannot be paid immediately and as a result their commission will be recorded as
“Unpaid” in the commission table, and you will need to process payment to them in some other way ( via
Mass Pay, or mail them a check, etc ).
BE SURE TO PERIODICALLY REVIEW YOUR COMMISSION RECORDS to determine which vendors
need to be paid their commissions.
Payment Interval
ONLY USED FOR MASS PAY. Required if using Mass Pay in automatic mode. Automatically process
commission payments every X number of days from the date the commission is recorded.
PayPal Mass Pay API Settings
PayPal Transaction Mode
Sandbox or Production. Sandbox requires a PayPal Sandbox account with Adaptive Payments and Mass
Pay enabled in the Sandbox account. Contact PayPal for any assistance you may need with your PayPal
accounts.
PayPal Email Address
Your PayPal email address
PayPal Username
Your PayPal API username
PayPal Password
Your PayPal API Password
PayPal API Signature
Your PayPal API Signature
VENDOR DASHBOARD
Each vendor has a dashboard that gives them access to various aspects of their store – unless you
choose not to include such access in your site.
The plugin creates 2 aspects for the dashboard: The aspect on the frontend of your site, and the aspects
in the backend admin area of your site.
When the plugin is activated it creates a new page called Vendor Dashboard, and a shortcode is
automatically inserted into the page upon creation. You can link to this page on your site, or remove it
entirely.
The plugin includes a shortcode that lets you insert the frontend dashboard into any place on your site
that support shortcode processing ( see the Shortcode section for details ). For example, you may want
to add the shortcode to the standard WooCommerce “My Account” page to consolidate access to all
account features.
The frontend dashboard, seen in the image below, shows vendors the URL to their store; buttons to
access their store settings and reports; a button to export orders to a CSV file; and an overview of their
orders. Vendors can click to view an order, which only displays the items in the order that belong to the
specific vendor.
(http://ignitewoo.com/wp­content/uploads/2013/11/woocommerce­
vendor­stores­dashboard.png)
An example of the vendor’s view of an order is shown in the image below
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­stores­order.png)
Vendors can edit their store details in the backend dashboard, located in admin area of your site, as
seen in the image below. If you’re using IgniteWoo’s PayPal Adaptive Payments, WePay, or Stripe
plugins then vendors have additonal areas of the settings page where they can connect their associated
payment accounts. If you want to remove any of the account connection settings see the documentation
section “Payment Account Connections”
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­details.png)
As you can see in the image above, vendors have access to a limited set of menu items. Those consist
of Dashboard, which only shows a sales overview graph; the Products menu which allows vendors to
add, edit, and delete products from their store; a Tools menu which gives vendors access to their
reports; and the store details page to adjust settings.
To gain a thorough understanding of what the vendor experience is like simply create a vendor store and
login as the vendor, then peruse the features. You can also place an order in your store as shopper,
purchasing an item from the vendor. In that way you’ll gain an understanding of what the experience is
like for a shopper and the vendor, including the emails delivered, what the order review is like for the
vendor, etc.
EDITING PRODUCTS
Vendors can only edit products that belong to them. The same holds true for any uploaded media
files.And, vendors can only access the aspects of the product edit screen that you allow via the plugin
settings. Keep in mind that if you install other 3rd party plugins for WooCommerce that add aspects to
the product editor the Vendor Stores plugin may not be able to offer you direct control over those aspects
in terms of being able to hide them from use by vendors. In that case you either need to hide them via
CSS or custom PHP code.
You as an administrator can optionally add products for a vendor and assign those products to their
store.
Products that belong to specific vendors have two bits of information tied to the product:
­ Vendor User – this setting is equivalent to post author
­ Vendor Store – this the store that product belongs to
To manually assign products to specific vendors you must ensure BOTH SETTINGS are configured
properly
When vendors add products on their own these two settings are configured automatically by the plugin
and vendors cannot change these settings.
REPORTS
Two vendor store reporting interfaces exist in general: One for vendors and one for site administrators.
The site administrator can view reports at WooCommerce ­> Reports ­> Vendor Stores.
The overview report shows a general overview of vendor store sales. The Vendor Stores Sales report
lets you select a vendor and view their sales over the past several months. Vendor Commissions lets you
view a report of commissions for a specific vendor. Vendor Product Commissions lets you view a report
of commissions for a specific product. See the images below for general examples:
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­sales­overview­report.png)
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­recent­commission.png)
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­vendor­store­sales.png)
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­vendor­commissions.png)
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­vendor­product­sales­report.png)
Vendors can access a reporting interface in the admin area by navigating to Tools ­> Reports. Available
reports include Product Sales stats for specific products, Top sellers, and Top Earners. General
examples of those reports are shown below.
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­vendor­store­product­sales­report.png)
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­vendor­store­top­sellers­report.png)
(http://ignitewoo.com/wp­
content/uploads/2013/11/woocommerce­vendor­store­vendor­store­top­earners­report.png)
HOW A USER BECOMES A VENDOR
Logged in users can request to become a vendor from the My Account page, if you have this option
enabled.
The admin will receive a notice when someone requests access.
When access is granted the user will be sent a welcome email message.
To grant access to a vendor simply edit their user account, set their role to “Vendor” and save the
settings. When that happens the welcome message is automatically sent to the vendor and their store is
automatically created. You can then adjust the settings of the store if you need to. See the next section
for details on the various store settings.
HOW TO MANUALLY CREATE AND EDIT
HOW TO MANUALLY CREATE AND EDIT
VENDORS
To manually create a new vendor first add a user account for the vendor. Then navigate to Products ­>
Stores, and add a new vendor store. In the Store Administrator field select the user that you added for
this store. Adjust the other settings as you see fit.
(http://ignitewoo.com/wp­content/uploads/2013/11/woocommerce­
vendor­store­vendor­add­new.png)
Enter a title for the store. This is displayed on the public side of your site when a shopper is viewing the
vendor’s store. Keep in mind that vendor’s have the ability to change this title if they want to.
Optionally enter a slug for the store. This becomes part of the permalink URL for accessing the store on
the public side of your site. If you leave this field blank WordPress will automatically generate the slug for
you.
Enter a description for the store. Again, this is displayed on the public side of your site when a shopper is
viewing the vendor’s store. Keep in mind that vendor’s have the ability to change this if they want to.
PayPal email address is optional, but strongly encouraged if you intend to automate payments to
vendors. The address is used to automatically pay vendors when you use IgniteWoo’s PayPal Adaptive
Payments plugin.
Note that you do not have to enter a value for the commission. When you leave this blank the store
default is used. If you decide to enter a value then for a fixed currency commission only enter numbers.
For a percentage­based commission enter a number followed by a percentage symbol.
Be sure to check the “Commission is for” setting. This controls who the commission amount is for.
For example, to give the vendor $5 for each item sold enter 5. To give the vendor 10% for each item sold
enter 10%. In either case select “Vendor” in the “Commission is for” field. Or, if the $5 or 10% represents
how much the store should get then select “Site” in the “Commission is for” field.
You can optionally upload a logo for the store. The logo appears on the public side of your site when a
shopper is viewing the vendor’s store.
WARNINGS
Users can only be assigned to one store. DO NOT try to programmatically assign a user as the vendor of
more than one store.
Products can only be assigned to one store. DO NOT try to programmatically assign products to more
than one store.
MASS PAY CRON JOBS
If you’re using automatic MassPay payments and your site doesn’t receive much traffic you may want to
create a cron job in your hosting account to load a page on your site periodically so that automatic
MassPay payments are triggered.
You can use this URL format for setting up cron jobs to process automatic mass pay payments:
http://YOURDOMAIN.COM/?masspay=go
The payment interval setting is obeyed when using cron.
Commissions are recorded on a per item and per quantity basis. So for example if a shopper buys a
quantity of 2 of the exact item then the plugin will record 2 commissions – one for each qty. This allows
you to edit an order to add or remove an order item and then manually adjust commissions for the order
by simply adding a new commission or deleting an existing commission.
SHIPPING COSTS
When you want to give shipping costs for order items to the vendor associated with the item you do the
following:
1. Enabled the “Give per item shipping cost to vendor” setting in the plugin settings
2. Use one or more of the supported shipping methods listed below. NO OTHER SHIPPING METHODS
ARE SUPPORTED AT THIS TIME. You can enable other shipping methods, but when unsupported
shipping methods are selected by a shopper no shipping costs can be automatically given to the vendor
of shippable items.
Per Product Shipping – available at WooThemes.com
International Delivery – comes with WooCommerce. IMPORTANT: Set “Costs added” to “per item”
Local Delivery – comes with WooCommerce. IMPORTANT: Set “Fee type” to “fixed amount per
product”
IgniteWoo’s UPS Drop Shipping (http://ignitewoo.com/woocommerce­extensions­
plugins/woocommerce­ups­drop­shipping/), and our Fedex Drop Shipping Pro
(http://ignitewoo.com/woocommerce­extensions­plugins/woocommerce­fedex­drop­
shipping­pro/), and our USPS Drop Shipping Pro (http://ignitewoo.com/woocommerce­
extensions­plugins/woocommerce­usps­drop­shipping­pro/), and our Table Rate Shipping
Pro (http://ignitewoo.com/woocommerce­extensions­plugins/woocommerce­table­rate­
shipping/)
SHORTCODES
[vendor_store_dashboard] – shortcode to display vendor store dashboard page content
[vendor_total_earnings] – display a report interface for vendors to generate earnings reports
[vendor_month_earnings] – display earning for the current month
PAYMENT ACCOUNT CONNECTIONS:
Vendor Stores supports automatic payments out­of­the­box when you use IgniteWoo’s PayPal Payments
Advanced, WePay, or Stripe payment gateways.
Automatic payments DO NOT work with payment gateways from any other software developers unless
you’ve had them customized to support Vendor Stores.
When IgniteWoo’s payment gateways are enabled you can optionally remove any particular payment
method from the vendor dashboard if you don’t want vendors to connect the method to their account for
automatic payments. To do so you need to add some PHP code to your theme’s functions file:
Remove WePay connect button in vendor’s store settings:
remove_action( ‘ignitewoo_vendor_stores_add_payment_setting_fields’,
‘woocommerce_wepay_connect_user’ );
Remove Stripe connect button in vendor’s store settings:
remove_action( ‘ignitewoo_vendor_stores_add_payment_setting_fields’,
‘woocommerce_stripe_connect_user’ );
Remove PayPal email address field in vendor’s store settings:
Use the related plugin setting.
CUSTOMIZATION
The plugin comes with several template files used to display vendor store data on your site.
To customize the look and feel copy the “templates” subdirectory in this plugin to a “store_vendors”
subdirectory in your theme so that all template PHP files are located in “store_vendors”. Also copy
“assets/css/frontend.css” to your theme’s “store_vendors” subdirectory if you want to make changes to
the CSS.
You may then edit the templates without losing your changes when you upgrade the plugin.
TRANSLATORS
The text domain for this plugin is “ignitewoo_vendor_stores”
Create your mo/po files with a filename of “ignitewoo_vendor_stores­en_US.mo” where en_US is your
language code.
Put your language files in wp­content/languages subdirectory of your site.
PAYMENT GATEWAY DEVELOPERS:
Only gateways that can process multiple charges during the process_payment() function can be modified
to support Vendor Stores.
You must do the following to make a payment gateway compatible with splitting payments during the
checkout payment process.
In your process_payment function do the following:
­ gather a list of sellers whose items are in the cart
­ build a list of which sellers can be paid during this checkout transaction, mark any other sellers as
unpaid
­ if a seller cannot be paid using the gateway give the sale to the store for payment purposes
during this transaction
­ process the payments
­ update the order meta indicating which sellers were paid and which were not
With that done the Vendor Stores plugin will handle adding commission records for all sellers in the
order. Paid sellers will have their commissions marked paid, unpaid sellers have their commissions
marked as unpaid.
Below is SAMPLE CODE you can modify to insert into your process_payment() function. This example
assumes the payment gateway is Stripe Payments. You MUST modify this sample code to suit your
particular payment processing gateway:
// Tracks all sellers and whether they are paid or unpaid
$sellers = array();
// Tracks all payments to process
$receivers = array();
// If Vendors Stores is active build a list of sellers and receivers
if ( class_exists( 'IgniteWoo_Vendor_Stores' ) )
foreach( $order->get_items() as $item_key => $item ) {
$_product = $order->get_product_from_item( $item );
if ( empty( $_product ) )
continue;
// get the product author
$sql = 'select post_author from ' . $wpdb->posts . ' where ID =
' . $_product->id;
$post_author = $wpdb->get_var( $sql );
if ( empty( $post_author ) )
continue;
// check if author is a vendor
$vendor = get_user_vendor( $post_author );
// See if the vendor has an account linked to this payment gatew
ay
// For example, if this gateway is Stripe Payments check for the
ir Stripe access tokens
if ( !empty( $vendor->ID ) ) {
// Get user associated with vendor
$user = get_vendor_admins( $vendor->ID );
if ( !empty( $user[0]->ID ) )
// Get user's access token
$access_token = get_user_meta( $user[0]->ID, '_s
tripe_connect_access_key', true );
}
// Product has a vendor but no Stripe account is connected
// Note this so a commission of paid or unpaid can be recorded b
y the Vendor Stores plugin
if ( !empty( $vendor->ID ) && empty( $access_token ) )
$sellers[ $vendor->ID ] = 'unpaid';
else if ( !empty( $vendor->ID ) && !empty( $access_token ) )
$sellers[ $vendor->ID ] = 'paid';
// Give item amount to store Stripe account
if ( empty( $access_token ) || empty( $vendor->ID ) || 'yes' ==
$ignitewoo_vendors->settings['disable_instant_payment'] ) {
$total = $item['line_total'] + $item['line_tax'];
$shipping = $ignitewoo_vendors->shipping->get_shipping_d
ue( $order, $item, 0 );
$receivers[ 0 ][ $_product->id ] = array( 'line_total' =
> $item['line_total'], 'qty' => $item['qty'], 'total' => $total, 'app_fee' => 0,
'tax' => $item['line_tax'], 'shipping' => $shipping );
continue;
}
/**
app_fee is the store's cut
*/
$variation_id = $order->get_item_meta( $item_key, '_variation_id
', true );
if ( empty( $receivers[ $vendor->ID ][ $_product->id ] ) )
$total = 0;
else
$total = $receivers[ $vendor->ID ][ $_product->id ]['tot
al'];
if ( empty( $receivers[ $vendor->ID ][ $_product->id ] ) )
$app_fee = 0;
else
$app_fee = $receivers[ $vendor->ID ][ $_product->id ]['a
pp_fee'];
$comm = calculate_product_commission( $item['line_total'], $_pro
duct->id, $variation_id, $vendor->ID );
$total += $comm; // line total already takes item qty in conside
ration
$app_fee += $item['line_total'] - $total;
$tax = !empty( $item['line_tax'] ) ? (float)$item['line_tax'] :
0;
// Who gets the item tax? Store or vendor?
if ( 'yes' == $ignitewoo_vendors->settings['give_vendor_tax'] )
$total += $tax;
else
$app_fee += $tax;
$shipping = 0;
// Who gets the item shipping? Store or vendor?
if ( 'yes' == $ignitewoo_vendors->settings['give_vendor_shipping
'] ) {
if ( empty( $vendor->ID ) )
continue;
$shipping = $ignitewoo_vendors->shipping->get_shipping_d
ue( $order, $item, $vendor->ID );
$total += !empty( $shipping ) ? (float)$shipping : 0;
}
$receivers[ $vendor->ID ][ $_product->id ] = array( 'line_total'
=> $item['line_total'], 'qty' => $item['qty'], 'total' => $total, 'app_fee' =>
$app_fee, 'tax' => $tax, 'shipping' => $shipping );
// Add the vendor's Stripe access token
$receivers[ $vendor->ID ]['access_token'] = $access_token;
// Put the store's cut into the total field
$receivers[ 0 ][ $_product->id ] = array( 'line_total' => $item[
'line_total'], 'qty' => $item['qty'], 'total' => $app_fee, 'app_fee' => 0, 'tax'
=> $item['line_tax'], 'shipping' => $shipping );
}
// Required for Vendor Payments to track who can and can't be paid in th
is transaction
update_post_meta( $order_id, '_commission_recipients', $sellers );
// Now take the $receivers array and process payments for each receiver
in the array
// being careful to determine if the payment was successful. The total a
mount due to a receiver is in the 'total' array element for each receiver.
// MAKE NOTE THAT RECIEVER #0 IS THE STORE ITSELF
foreach( $receivers as $rec ) {
....
}
Design based on Ignition Theme™ by IgniteWoo
(http://ignitewoo.com)
Copyright © 2014 ­ IgniteWoo ­ All Rights
Reserved