I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Reply To: Getting the following error when paying out WCMP Commissions

#8286
d3vnu77
Participant

In line 144 of classes/class-wcmp-ledger.php, WCMP is looking for unpaid commissions… by calling:

$unpaid_commission_total = WCMp_Commission::get_commissions_total_data( $args, $vendor->id );

On line 645 of classes/class-wcmp-post-commissions.php in the get_commissions_total_data from above it checks if the commissions have posts, this returns false, which sets unpaid_commission_total from above to null.

if( $commissions->get_posts() ) :

Then back to the previous file, in line 155 of classes/class-wcmp-ledger.php, WCMP tries to set:

$data['balance'] = $unpaid_commission_total['total']

This has not been set however and sets it as null which can not be inserted into the database.