With the latest plugin version, commissions are not inserted during the order placement. Bulk recalculation (from the Pro version) works well.
Looks like in the latest update, the strict comparison was added in WCV_Commission::insert_new_commission()
:
$count = self::check_commission_status( $order, 'paid' );
if ( 0 === $count ) {
...
The function WCV_Commission::check_commission_status()
is declared to return integer value, while it always return the string. Which fail the equation 0 === "0"
and the commissions are not inserted.
At other hand, the bulk processing in the Pro version wasn’t changed to strict comparison yet and thanks God it allows us to recalculate commissions.
The resolution is to fix the return type of WCV_Commission::check_commission_status()
, thank you in advance.