diff --git a/templates/cart/cart.php b/templates/cart/cart.php index 32b38fbb543..c3558f9cb36 100755 --- a/templates/cart/cart.php +++ b/templates/cart/cart.php @@ -9,8 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce; - wc_print_notices(); do_action( 'woocommerce_before_cart' ); ?> diff --git a/templates/cart/cross-sells.php b/templates/cart/cross-sells.php index 78781f51e6a..7a9b6009424 100644 --- a/templates/cart/cross-sells.php +++ b/templates/cart/cross-sells.php @@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $product, $woocommerce, $woocommerce_loop; +global $product, $woocommerce_loop; $crosssells = WC()->cart->get_cross_sells(); diff --git a/templates/cart/mini-cart.php b/templates/cart/mini-cart.php index 454982bcaad..23fad31738d 100644 --- a/templates/cart/mini-cart.php +++ b/templates/cart/mini-cart.php @@ -10,8 +10,6 @@ */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly - -global $woocommerce; ?> diff --git a/templates/cart/shipping-calculator.php b/templates/cart/shipping-calculator.php index d3290c542d6..89c2c17ba40 100644 --- a/templates/cart/shipping-calculator.php +++ b/templates/cart/shipping-calculator.php @@ -9,8 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce; - if ( get_option( 'woocommerce_enable_shipping_calc' ) === 'no' || ! WC()->cart->needs_shipping() ) return; ?> diff --git a/templates/checkout/form-checkout.php b/templates/checkout/form-checkout.php index d455b80ed2d..0331d2edd05 100644 --- a/templates/checkout/form-checkout.php +++ b/templates/checkout/form-checkout.php @@ -9,8 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce; - wc_print_notices(); do_action( 'woocommerce_before_checkout_form', $checkout ); diff --git a/templates/checkout/form-coupon.php b/templates/checkout/form-coupon.php index 051d1a18405..05fe2335219 100644 --- a/templates/checkout/form-coupon.php +++ b/templates/checkout/form-coupon.php @@ -9,8 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce; - if ( ! WC()->cart->coupons_enabled() ) { return; } diff --git a/templates/checkout/form-pay.php b/templates/checkout/form-pay.php index 0b8dd141228..db495e74f64 100644 --- a/templates/checkout/form-pay.php +++ b/templates/checkout/form-pay.php @@ -8,8 +8,6 @@ */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly - -global $woocommerce; ?>
diff --git a/templates/checkout/thankyou.php b/templates/checkout/thankyou.php index 13e268e33d5..669723c11f1 100644 --- a/templates/checkout/thankyou.php +++ b/templates/checkout/thankyou.php @@ -9,8 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce; - if ( $order ) : ?> has_status( 'failed' ) ) : ?> diff --git a/templates/emails/email-order-items.php b/templates/emails/email-order-items.php index 1dfd706eaee..4ea127d0f99 100644 --- a/templates/emails/email-order-items.php +++ b/templates/emails/email-order-items.php @@ -11,8 +11,6 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } -global $woocommerce; - foreach ( $items as $item ) : $_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item ); $item_meta = new WC_Order_Item_Meta( $item['item_meta'], $_product ); diff --git a/templates/emails/plain/email-order-items.php b/templates/emails/plain/email-order-items.php index 22d01fe46ee..d6826690727 100644 --- a/templates/emails/plain/email-order-items.php +++ b/templates/emails/plain/email-order-items.php @@ -11,8 +11,6 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } -global $woocommerce; - foreach ( $items as $item ) : $_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item ); $item_meta = new WC_Order_Item_Meta( $item['item_meta'], $_product ); diff --git a/templates/loop/result-count.php b/templates/loop/result-count.php index c728babb9de..5fd93ea93e9 100644 --- a/templates/loop/result-count.php +++ b/templates/loop/result-count.php @@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce, $wp_query; +global $wp_query; if ( ! woocommerce_products_will_display() ) return; diff --git a/templates/order/form-tracking.php b/templates/order/form-tracking.php index 6c3ac6b68fc..95304afe4fe 100644 --- a/templates/order/form-tracking.php +++ b/templates/order/form-tracking.php @@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce, $post; +global $post; ?> diff --git a/templates/order/order-details.php b/templates/order/order-details.php index 9f53ce94b68..0f2a64ff065 100755 --- a/templates/order/order-details.php +++ b/templates/order/order-details.php @@ -9,8 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce; - $order = wc_get_order( $order_id ); ?>

diff --git a/templates/single-product-reviews.php b/templates/single-product-reviews.php index 7629eb3aa26..0e351f576e6 100644 --- a/templates/single-product-reviews.php +++ b/templates/single-product-reviews.php @@ -6,7 +6,7 @@ * @package WooCommerce/Templates * @version 2.1.0 */ -global $woocommerce, $product; +global $product; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/templates/single-product/add-to-cart/simple.php b/templates/single-product/add-to-cart/simple.php index d2bd8768805..97c34117e59 100644 --- a/templates/single-product/add-to-cart/simple.php +++ b/templates/single-product/add-to-cart/simple.php @@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce, $product; +global $product; if ( ! $product->is_purchasable() ) return; ?> diff --git a/templates/single-product/add-to-cart/variable.php b/templates/single-product/add-to-cart/variable.php index 1227aa523e1..d807a21e253 100644 --- a/templates/single-product/add-to-cart/variable.php +++ b/templates/single-product/add-to-cart/variable.php @@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce, $product, $post; +global $product, $post; ?> diff --git a/templates/single-product/tabs/description.php b/templates/single-product/tabs/description.php index f8e4792cb6b..69b163dec4d 100644 --- a/templates/single-product/tabs/description.php +++ b/templates/single-product/tabs/description.php @@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -global $woocommerce, $post; +global $post; $heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Product Description', 'woocommerce' ) ) ); ?>