WooCommerce Menu Cart - Version 2.9.1

Version Description

  • Fix: Menu issues on cart & checkout if Menu Cart was the only item in the menu
Download this release

Release Info

Developer wpovernight
Plugin Icon 128x128 WooCommerce Menu Cart
Version 2.9.1
Comparing to
See all releases

Code changes from version 2.9.0 to 2.9.1

Files changed (3) hide show
  1. css/wpmenucart-main.css +1 -0
  2. readme.txt +4 -1
  3. wp-menu-cart.php +9 -9
css/wpmenucart-main.css CHANGED
@@ -1,3 +1,4 @@
 
1
  .empty-wpmenucart {
2
  display: none !important;
3
  }
1
+ .hidden-wpmenucart,
2
  .empty-wpmenucart {
3
  display: none !important;
4
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, menu, bar, cart, basket, header, shopping cart, navigation, e
5
  Requires at least: 3.4
6
  Tested up to: 5.4
7
  Requires PHP: 5.3
8
- Stable tag: 2.9.0
9
 
10
  Automatically displays a shopping cart in your menu bar. Works with WooCommerce, WP-Ecommerce, EDD, Eshop and Jigoshop
11
 
@@ -85,6 +85,9 @@ Once the plugin is activated navigate to Settings > Menu Cart Setup. Select your
85
 
86
  == Changelog ==
87
 
 
 
 
88
  = 2.9.0 =
89
  * New: setting to include fees & shipping in cart total [WooCommerce]
90
  * New: hide on checkout & cart page by default (can be re-enabled via the settings) [WooCommerce]
5
  Requires at least: 3.4
6
  Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 2.9.1
9
 
10
  Automatically displays a shopping cart in your menu bar. Works with WooCommerce, WP-Ecommerce, EDD, Eshop and Jigoshop
11
 
85
 
86
  == Changelog ==
87
 
88
+ = 2.9.1 =
89
+ * Fix: Menu issues on cart & checkout if Menu Cart was the only item in the menu
90
+
91
  = 2.9.0 =
92
  * New: setting to include fees & shipping in cart total [WooCommerce]
93
  * New: hide on checkout & cart page by default (can be re-enabled via the settings) [WooCommerce]
wp-menu-cart.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Menu Cart
4
  * Plugin URI: www.wpovernight.com/plugins
5
  * Description: Extension for your e-commerce plugin (WooCommerce, WP-Ecommerce, Easy Digital Downloads, Eshop or Jigoshop) that places a cart icon with number of items and total cost in the menu bar. Activate the plugin, set your options and you're ready to go! Will automatically conform to your theme styles.
6
- * Version: 2.9.0
7
  * Author: Jeremiah Prummer, Ewout Fernhout
8
  * Author URI: www.wpovernight.com/
9
  * License: GPL2
@@ -14,7 +14,7 @@
14
 
15
  class WpMenuCart {
16
 
17
- protected $plugin_version = '2.9.0';
18
  public static $plugin_slug;
19
  public static $plugin_basename;
20
 
@@ -452,9 +452,6 @@ class WpMenuCart {
452
  // WooCommerce specific: check if woocommerce cart object is actually loaded
453
  if ( isset($this->options['shop_plugin']) && $this->options['shop_plugin'] == 'woocommerce' ) {
454
  if ( function_exists( 'WC' ) ) {
455
- if ( ( is_checkout() || is_cart() ) && empty($this->options['show_on_cart_checkout_page']) ) {
456
- return $items;
457
- }
458
  if ( empty( WC()->cart ) ) {
459
  return $items; // nothing to load data from, return menu without cart item
460
  }
@@ -467,12 +464,15 @@ class WpMenuCart {
467
  }
468
 
469
  $classes = 'menu-item wpmenucartli wpmenucart-display-'.$this->options['items_alignment'];
470
-
471
- if ($this->get_common_li_classes($items) != '')
472
  $classes .= ' ' . $this->get_common_li_classes($items);
 
 
 
 
 
473
 
474
- $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
475
-
476
  // Filter for <li> item classes
477
  /* Usage (in the themes functions.php):
478
  add_filter('wpmenucart_menu_item_classes', 'add_wpmenucart_item_class', 1, 1);
3
  * Plugin Name: WooCommerce Menu Cart
4
  * Plugin URI: www.wpovernight.com/plugins
5
  * Description: Extension for your e-commerce plugin (WooCommerce, WP-Ecommerce, Easy Digital Downloads, Eshop or Jigoshop) that places a cart icon with number of items and total cost in the menu bar. Activate the plugin, set your options and you're ready to go! Will automatically conform to your theme styles.
6
+ * Version: 2.9.1
7
  * Author: Jeremiah Prummer, Ewout Fernhout
8
  * Author URI: www.wpovernight.com/
9
  * License: GPL2
14
 
15
  class WpMenuCart {
16
 
17
+ protected $plugin_version = '2.9.1';
18
  public static $plugin_slug;
19
  public static $plugin_basename;
20
 
452
  // WooCommerce specific: check if woocommerce cart object is actually loaded
453
  if ( isset($this->options['shop_plugin']) && $this->options['shop_plugin'] == 'woocommerce' ) {
454
  if ( function_exists( 'WC' ) ) {
 
 
 
455
  if ( empty( WC()->cart ) ) {
456
  return $items; // nothing to load data from, return menu without cart item
457
  }
464
  }
465
 
466
  $classes = 'menu-item wpmenucartli wpmenucart-display-'.$this->options['items_alignment'];
467
+
468
+ if ($this->get_common_li_classes($items) != '') {
469
  $classes .= ' ' . $this->get_common_li_classes($items);
470
+ }
471
+
472
+ if ( ( is_checkout() || is_cart() ) && empty($this->options['show_on_cart_checkout_page']) ) {
473
+ $classes .= ' hidden-wpmenucart';
474
+ }
475
 
 
 
476
  // Filter for <li> item classes
477
  /* Usage (in the themes functions.php):
478
  add_filter('wpmenucart_menu_item_classes', 'add_wpmenucart_item_class', 1, 1);