Hi @joaoalbuquerque, this is strange error because I tested the plugin in local and works fine.
However, I added a fix for this and you find it in next plugin release. To fix it please open the file class.yith-vendors-credit.php located in wp-content/plugins/yith-woocommerce-multi-vendor-premium/includes/ and go to line 130, you find this code:
// save the amount to pay for each commission of vendor
foreach ( $vendor->commissions_to_pay() as $commission_id ) {
$commission = YITH_Commission( $commission_id );
$data[] = array(
'paypal_email' => $vendor->paypal_email,
'amount' => round( $commission->get_amount(), 2 ),
'request_id' => $commission->id
);
// save the commissions with other to set 'paid' after success payment
$commissions[] = $commission;
}
Please, replace the previous code with this instead:
if( $vendor instanceof YITH_Vendor && $vendor->is_valid() ){
// save the amount to pay for each commission of vendor
foreach ( $vendor->commissions_to_pay() as $commission_id ) {
$commission = YITH_Commission( $commission_id );
$data[] = array(
'paypal_email' => $vendor->paypal_email,
'amount' => round( $commission->get_amount(), 2 ),
'request_id' => $commission->id
);
// save the commissions with other to set 'paid' after success payment
$commissions[] = $commission;
}
}
This fixed code solve your issue.
Thanks for your reporting.
Have a nice day
YITH
-
This reply was modified 8 years, 2 months ago by
YITHEMES. Reason: edit code