diff --git a/includes/class-wc-shortcodes.php b/includes/class-wc-shortcodes.php index 7ae190acc24..e450a1b4ff5 100644 --- a/includes/class-wc-shortcodes.php +++ b/includes/class-wc-shortcodes.php @@ -491,6 +491,9 @@ class WC_Shortcodes { $product = wc_setup_product_data( $product_data ); + if ( ! $product ) + return; + ob_start(); ?>
diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php index 9a1b38ef643..a59bd4c9e1a 100644 --- a/includes/gateways/paypal/class-wc-gateway-paypal.php +++ b/includes/gateways/paypal/class-wc-gateway-paypal.php @@ -464,7 +464,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { ' . implode( '', $paypal_args_array) . '