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 9 years, 4 months ago by
YITHEMES. Reason: edit code
an new error appeared
Parse error: syntax error, unexpected ‘public’ (T_PUBLIC) in /home/portug24/public_html/wp-content/plugins/yith-woocommerce-multi-vendor-premium/includes/class.yith-vendors-credit.php on line 168
My site is down
on line 168, i made it a comment by inserting // and the error is gone.
However, the comissions managing page ain´t updating.
What can i do?
Hi,
you make an error during editing file, probably missing a }
I advice you to delete the multi vendor plugin and upload it again, you have a corrupted file.
Let me know.
Have a nice day
YITH