Product Icon

WooCommerce Subscriptions

by  Woo
Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.

Warning: Division by zero

vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php line 2266:
$signup_fee_portion = $sign_up_fee / $line_item_total;

When $line_item_total is zero we get a warning on order-received.
This can easily be solved this way:
if($line_item_total > 0){
$signup_fee_portion = $sign_up_fee / $line_item_total;
} else {
$signup_fee_portion = 0;
}

Author

Heine Lund Thunbo

Current Status

Open

Last updated: May 15, 2023

0 comments

Log in to comment on this feature request.