diff --git a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php index 006390d01..baebbd45f 100644 --- a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php +++ b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php @@ -667,13 +667,12 @@ public function ec_enqueue_scripts_product_page($is_mini_cart = false) { $this->testmode = AngellEYE_Utility::angelleye_paypal_for_woocommerce_is_set_sandbox_product(); } $js_value = array('is_page_name' => '', 'enable_in_context_checkout_flow' => ( $this->enable_in_context_checkout_flow == 'yes' ? 'yes' : 'no')); - if ( 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) { + if ( isset($post->ID) && 'checkout' === get_post_meta( $post->ID, 'wcf-step-type', true ) ) { $is_cartflow = "yes"; } else { $is_cartflow = "no"; } - $pre_checkout_offer = get_post_meta( $post->ID, 'wcf-pre-checkout-offer', true ); - if ( 'yes' == $pre_checkout_offer ) { + if( isset($post->ID) && 'yes' == get_post_meta( $post->ID, 'wcf-pre-checkout-offer', true ) ) { $pre_checkout_offer = "yes"; } else { $pre_checkout_offer = "no";