Title: Undefined variable: style
Last modified: July 24, 2021

---

# Undefined variable: style

 *  Resolved [i1100a](https://wordpress.org/support/users/i1100a/)
 * (@i1100a)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/)
 * I’m getting the following warning on this file: `woo-payment-gateway/templates/
   applepay-button.php`
 * `Undefined variable: style`
 * Lines 7-8, to be more exact:
 *     ```
       <button class="apple-pay-button <?php echo $button ?>"
               style="<?php echo '-apple-pay-button-style: ' . $style . '; -apple-pay-button-type:' . apply_filters( 'wc_braintree_applepay_button_type', $type ) ?>"></button>
       ```
   
 * Any ideas on how can this be fixed?
 * Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14697199)
 * Hi [@i1100a](https://wordpress.org/support/users/i1100a/)
 * Are you using a custom template for the button or the default Braintree plugin
   template?
 * What plugin version are you running?
 * Kind regards
 *  Thread Starter [i1100a](https://wordpress.org/support/users/i1100a/)
 * (@i1100a)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14697332)
 * Hi [@mrclayton](https://wordpress.org/support/users/mrclayton/)
 * Thanks for the quick reply.
 * I’m using v3.2.26 of the plugin. About the template, I’m using the default settings.
   I’m still developing the website so although I have enabled the Apple Pay gateway
   I haven’t had the chance to do the actual integration with Apple yet…
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14697355)
 * Hi [@i1100a](https://wordpress.org/support/users/i1100a/),
 * I am not able to replicate this warning. The `$style` variable is correctly being
   imported into the template as expected.
 * What customizations have you done to your site?
 * Kind Regards,
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14707264)
 * Hi [@i1100a](https://wordpress.org/support/users/i1100a/),
 * Any update?
 * Kind Regards,
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14717839)
 * I did some more testing and found this notice is re-producible on the product
   and cart pages if Apple Pay is enabled. I’ll be including a fix for that in the
   next release.
 *  Thread Starter [i1100a](https://wordpress.org/support/users/i1100a/)
 * (@i1100a)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14719670)
 * Sorry [@mrclayton](https://wordpress.org/support/users/mrclayton/) I’ve been 
   swamped!
 * I’m glad you could reproduce it. Thanks for your time and effort. Great support!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Undefined variable: style’ is closed to new replies.

 * ![](https://ps.w.org/woo-payment-gateway/assets/icon-256x256.png?rev=2142799)
 * [Payment Plugins Braintree For WooCommerce](https://wordpress.org/plugins/woo-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-payment-gateway/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [i1100a](https://wordpress.org/support/users/i1100a/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-style/#post-14719670)
 * Status: resolved