We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1019bf0 + a361808 commit b300692Copy full SHA for b300692
1 file changed
modules/upsell-order-bump/includes/OrderBump.php
@@ -108,6 +108,12 @@ public function bump_product_frontend_view() {
108
}
109
110
$_product = wc_get_product( $offer_product_id );
111
+
112
+ // FIX: If the offer product doesn't exist (deleted or invalid ID), skip it to avoid a fatal error.
113
+ if ( ! $_product ) {
114
+ continue;
115
+ }
116
117
$regular_price = $_product->get_regular_price();
118
// Use sale price if available, otherwise use regular price for discount calculation
119
$current_price = $_product->get_sale_price() ? $_product->get_sale_price() : $regular_price;
0 commit comments