dashed-slug.net › Forums › WooCommerce Cryptocurrency Payment Gateway extension support › Getting the following error when paying out WCMP Commissions › Reply To: Getting the following error when paying out WCMP Commissions
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.