• Just updated from 3.0.7 to 3.1.2

    This notice appears in the body-tag:

    <body <br />
    <b>Notice</b>:  Undefined index: apple_pay in <b>wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-apple-pay.php</b> on line <b>290</b><br />
    class="home page-template-default page page-id-4647 logged-in">
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Andy, I had the same error. I disabled the Apple Pay option in the Woocommerce > Settings > Checkout Options > Stripe, and this stopped the error message.

    It would be good to have a little more info though as to how to enable Apple Pay without getting this error.

    Similarly there is an error message as follows when enabled: Apple Pay domain verification failed. Please check the log to see the issue.

    But the log is empty so doesn’t show why the domain verification failed.

    I hope this helps a little bit.

    Cheryl

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    Regarding this message:

    <body <br />
    <b>Notice</b>:  Undefined index: apple_pay in <b>wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-apple-pay.php</b> on line <b>290</b><br />
    class="home page-template-default page page-id-4647 logged-in">

    We haven’t had any further reports of it, beyond this forum post. Could you please both create a ticket at woocommerce.com and include both a system status log (via WooCommerce System Status Log) and mention this forum post? That will help us figure out what’s happening in this specific situation.

    Thanks!

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Similarly there is an error message as follows when enabled: Apple Pay domain verification failed. Please check the log to see the issue.

    I’m not sure why this isn’t showing up in the log, but you can verify the domain manually according to these steps:
    https://stripe.com/docs/apple-pay/web#going-live

    Thread Starter Andy Tschiersch

    (@tschan)

    Regarding this message:

    <body <br />
    <b>Notice</b>:  Undefined index: apple_pay in <b>wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-apple-pay.php</b> on line <b>290</b><br />
    class="home page-template-default page page-id-4647 logged-in">

    This is a simple thing. This notice (it’s not an error) occurs only until you saved the stripe settings page and the value for the checkbox “Enable Apple Pay” is set to yes or no. Let’s have a look on the code where this notice occurs:

    	public function body_class( $classes ) {
    		if ( 'yes' === $this->_gateway_settings['apple_pay'] && isset( $gateways['stripe'] ) ) {
    			$classes[] = 'wc-stripe-legacy';
    		}
    		return $classes;
    	}

    The isset() check should here be the first condition. Further I think $gateways[‘stripe’] is here irrelevant, because is not defined in this inside this function. It should look so:
    if ( isset( $this->_gateway_settings['apple_pay'] ) && 'yes' === $this->_gateway_settings['apple_pay'] ) {

    Plugin Author royho

    (@royho)

    That code was there for a test and was no longer in use since 3.1.2. Can you please download the plugin again and re-test?

    Hey, I have a similar error message. I have linked some pictures on this thread: https://wordpress.org/support/topic/message-error-and-moving/

    Does the error message appears only on the header of the shop page ?

    I also have the same issue locally, On my server I did not have this problem.

    I did disable apple pay but still get the error. I even disabled stripe ( in settings, not the plugin )

    Actually what I just noticed is that the products page act fine, In my case the error is on a Modern Tribe paid class.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Notice: Undefined index: apple_pay in class-wc-stripe-apple-pay.php on line 290’ is closed to new replies.