WooCommerce Menu Cart - Version 2.7.5

Version Description

  • Fix: check if woocommerce version constant is defined
  • Fix: Prevent fatal errors when switching eCommerce plugins
  • Fix: Persian translations
  • Fix: Notices when not using icon
  • Marked tested up to WC3.6
  • Marked tested up to WP5.2
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce Menu Cart
Version 2.7.5
Comparing to
See all releases

Code changes from version 2.7.4 to 2.7.5

languages/wp-menu-cart-fa_IR.mo CHANGED
Binary file
languages/wp-menu-cart-fa_IR.po CHANGED
@@ -3,20 +3,20 @@ msgstr ""
3
  "Project-Id-Version: WP Menu Cart\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2013-04-27 17:22+0100\n"
6
- "PO-Revision-Date: 2014-02-05 00:00+0330\n"
7
  "Last-Translator: Vahid Masoomi <masoomi.vahid@gmail.com>\n"
8
  "Language-Team: Digital Samaneh-Vahid Masoomi <masoomi.vahid@gmail.com>\n"
9
  "Language: fa_IR\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Poedit-Basepath: ../\n"
18
  "X-Textdomain-Support: yes\n"
19
- "X-Generator: Poedit 1.5.5\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
  #: wp-menu-cart-pro.php:180 wp-menu-cart-pro.php:257 wp-menu-cart.php:166
@@ -39,7 +39,6 @@ msgstr "آغاز خرید"
39
  msgid "%d item"
40
  msgid_plural "%d items"
41
  msgstr[0] "%d محصول"
42
- msgstr[1] "%d itens"
43
 
44
  #: wp-menu-cart-pro.php:264 bundles/wp-menu-cart-pro/wp-menu-cart-pro.php:264
45
  msgid "your cart is currently empty"
@@ -112,8 +111,7 @@ msgstr "نمایش آیکون سبد خرید:"
112
 
113
  #: bundles/wp-menu-cart/includes/wpmenucart-settings.php:98
114
  #: bundles/wp-menu-cart-pro/includes/wpmenucart-settings-pro.php:108
115
- #: includes/wpmenucart-settings-pro.php:108
116
- #: includes/wpmenucart-settings.php:98
117
  msgid "Display cart contents in menu fly-out."
118
  msgstr "نمایش محتوای محصول در منوی سبد خرید"
119
 
3
  "Project-Id-Version: WP Menu Cart\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2013-04-27 17:22+0100\n"
6
+ "PO-Revision-Date: 2019-03-25 12:53+0100\n"
7
  "Last-Translator: Vahid Masoomi <masoomi.vahid@gmail.com>\n"
8
  "Language-Team: Digital Samaneh-Vahid Masoomi <masoomi.vahid@gmail.com>\n"
9
  "Language: fa_IR\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=1; plural=0;\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Poedit-Basepath: ..\n"
18
  "X-Textdomain-Support: yes\n"
19
+ "X-Generator: Poedit 1.8.12\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
  #: wp-menu-cart-pro.php:180 wp-menu-cart-pro.php:257 wp-menu-cart.php:166
39
  msgid "%d item"
40
  msgid_plural "%d items"
41
  msgstr[0] "%d محصول"
 
42
 
43
  #: wp-menu-cart-pro.php:264 bundles/wp-menu-cart-pro/wp-menu-cart-pro.php:264
44
  msgid "your cart is currently empty"
111
 
112
  #: bundles/wp-menu-cart/includes/wpmenucart-settings.php:98
113
  #: bundles/wp-menu-cart-pro/includes/wpmenucart-settings-pro.php:108
114
+ #: includes/wpmenucart-settings-pro.php:108 includes/wpmenucart-settings.php:98
 
115
  msgid "Display cart contents in menu fly-out."
116
  msgstr "نمایش محتوای محصول در منوی سبد خرید"
117
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: jprummer, pomegranate
3
  Donate link: https://www.wpovernight.com/
4
  Tags: woocommerce, menu, bar, cart, basket, header, shopping cart, navigation, edd, ecommerce, eshop, wp-ecommerce, jigoshop, wpec
5
  Requires at least: 3.4
6
- Tested up to: 5.1
7
  Requires PHP: 5.3
8
- Stable tag: 2.7.4
9
 
10
  Automatically displays a shopping cart in your menu bar. Works with WooCommerce, WP-Ecommerce, EDD, Eshop and Jigoshop
11
 
@@ -85,6 +85,14 @@ Once the plugin is activated navigate to Settings > Menu Cart Setup. Select your
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
 
 
 
88
  = 2.7.4 =
89
  * Tested up to WP5.1
90
 
3
  Donate link: https://www.wpovernight.com/
4
  Tags: woocommerce, menu, bar, cart, basket, header, shopping cart, navigation, edd, ecommerce, eshop, wp-ecommerce, jigoshop, wpec
5
  Requires at least: 3.4
6
+ Tested up to: 5.2
7
  Requires PHP: 5.3
8
+ Stable tag: 2.7.5
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.7.5 =
89
+ * Fix: check if woocommerce version constant is defined
90
+ * Fix: Prevent fatal errors when switching eCommerce plugins
91
+ * Fix: Persian translations
92
+ * Fix: Notices when not using icon
93
+ * Marked tested up to WC3.6
94
+ * Marked tested up to WP5.2
95
+
96
  = 2.7.4 =
97
  * Tested up to WP5.1
98
 
wp-menu-cart.php CHANGED
@@ -3,13 +3,13 @@
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.7.4
7
  * Author: Jeremiah Prummer, Ewout Fernhout
8
  * Author URI: www.wpovernight.com/
9
  * License: GPL2
10
  * Text Domain: wp-menu-cart
11
  * WC requires at least: 2.0.0
12
- * WC tested up to: 3.5.0
13
  */
14
 
15
  class WpMenuCart {
@@ -52,6 +52,9 @@ class WpMenuCart {
52
 
53
  if ( $this->good_to_go() ) {
54
  if (isset($this->options['shop_plugin'])) {
 
 
 
55
  switch ($this->options['shop_plugin']) {
56
  case 'woocommerce':
57
  include_once( 'includes/wpmenucart-woocommerce.php' );
@@ -123,13 +126,35 @@ class WpMenuCart {
123
  * Return true if one ore more shops are activated.
124
  * @return boolean
125
  */
126
- public function is_shop_active() {
127
- if ( count($this->get_active_shops()) > 0 ) {
128
- return TRUE;
 
 
 
 
129
  } else {
130
- return FALSE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
-
133
  }
134
 
135
  /**
@@ -271,7 +296,7 @@ class WpMenuCart {
271
  'wpmenucart',
272
  plugins_url( '/javascript/wpmenucart.js' , __FILE__ ),
273
  array( 'jquery' ),
274
- '2.7.4',
275
  true
276
  );
277
 
@@ -301,7 +326,7 @@ class WpMenuCart {
301
  'wpmenucart-edd-ajax',
302
  plugins_url( '/javascript/wpmenucart-edd-ajax.js', __FILE__ ),
303
  array( 'jquery' ),
304
- '2.7.4'
305
  );
306
 
307
  wp_localize_script(
@@ -541,6 +566,8 @@ class WpMenuCart {
541
  $icon = isset($this->options['cart_icon']) ? $this->options['cart_icon'] : '0';
542
  $menu_item_icon = '<i class="wpmenucart-icon-shopping-cart-'.$icon.'"></i>';
543
  $menu_item_a_content .= $menu_item_icon;
 
 
544
  }
545
 
546
  switch ($this->options['items_display']) {
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.7.5
7
  * Author: Jeremiah Prummer, Ewout Fernhout
8
  * Author URI: www.wpovernight.com/
9
  * License: GPL2
10
  * Text Domain: wp-menu-cart
11
  * WC requires at least: 2.0.0
12
+ * WC tested up to: 3.6.0
13
  */
14
 
15
  class WpMenuCart {
52
 
53
  if ( $this->good_to_go() ) {
54
  if (isset($this->options['shop_plugin'])) {
55
+ if ( false === $this->is_shop_active( $this->options['shop_plugin'] ) ) {
56
+ return;
57
+ }
58
  switch ($this->options['shop_plugin']) {
59
  case 'woocommerce':
60
  include_once( 'includes/wpmenucart-woocommerce.php' );
126
  * Return true if one ore more shops are activated.
127
  * @return boolean
128
  */
129
+ public function is_shop_active( $shop = '' ) {
130
+ if ( empty($shop) ) {
131
+ if ( count( $this->get_active_shops() ) > 0 ) {
132
+ return TRUE;
133
+ } else {
134
+ return FALSE;
135
+ }
136
  } else {
137
+ switch ( $shop ) {
138
+ case 'woocommerce':
139
+ return function_exists('WC');
140
+ break;
141
+ case 'easy-digital-downloads':
142
+ return function_exists('EDD');
143
+ break;
144
+ case 'jigoshop':
145
+ return class_exists('jigoshop_cart');
146
+ break;
147
+ case 'wp-e-commerce':
148
+ return function_exists('wpsc_cart_item_count');
149
+ break;
150
+ case 'eshop':
151
+ return !empty($GLOBALS['eshopoptions']);
152
+ break;
153
+ default:
154
+ return false;
155
+ break;
156
+ }
157
  }
 
158
  }
159
 
160
  /**
296
  'wpmenucart',
297
  plugins_url( '/javascript/wpmenucart.js' , __FILE__ ),
298
  array( 'jquery' ),
299
+ '2.7.5',
300
  true
301
  );
302
 
326
  'wpmenucart-edd-ajax',
327
  plugins_url( '/javascript/wpmenucart-edd-ajax.js', __FILE__ ),
328
  array( 'jquery' ),
329
+ '2.7.5'
330
  );
331
 
332
  wp_localize_script(
566
  $icon = isset($this->options['cart_icon']) ? $this->options['cart_icon'] : '0';
567
  $menu_item_icon = '<i class="wpmenucart-icon-shopping-cart-'.$icon.'"></i>';
568
  $menu_item_a_content .= $menu_item_icon;
569
+ } else {
570
+ $menu_item_icon = '';
571
  }
572
 
573
  switch ($this->options['items_display']) {