Merge pull request #6047 from GeertDD/wc_global
Removed unused global $woocommerce variable from the templates
This commit is contained in:
commit
a54cf4b189
|
@ -9,8 +9,6 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
|
||||
wc_print_notices();
|
||||
|
||||
do_action( 'woocommerce_before_cart' ); ?>
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_mini_cart' ); ?>
|
||||
|
|
|
@ -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;
|
||||
?>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
|
||||
wc_print_notices();
|
||||
|
||||
do_action( 'woocommerce_before_checkout_form', $checkout );
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! WC()->cart->coupons_enabled() ) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
?>
|
||||
<form id="order_review" method="post">
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
|
||||
if ( $order ) : ?>
|
||||
|
||||
<?php if ( $order->has_status( 'failed' ) ) : ?>
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce, $post;
|
||||
global $post;
|
||||
?>
|
||||
|
||||
<form action="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" method="post" class="track_order">
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce;
|
||||
|
||||
$order = wc_get_order( $order_id );
|
||||
?>
|
||||
<h2><?php _e( 'Order Details', 'woocommerce' ); ?></h2>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @package WooCommerce/Templates
|
||||
* @version 2.1.0
|
||||
*/
|
||||
global $woocommerce, $product;
|
||||
global $product;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) )
|
||||
exit; // Exit if accessed directly
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce, $product;
|
||||
global $product;
|
||||
|
||||
if ( ! $product->is_purchasable() ) return;
|
||||
?>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $woocommerce, $product, $post;
|
||||
global $product, $post;
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_add_to_cart_form' ); ?>
|
||||
|
|
|
@ -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' ) ) );
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue