Persian Woocommerce - Version 2.4.2

Version Description

*

Download this release

Release Info

Developer hannanstd
Plugin Icon 128x128 Persian Woocommerce
Version 2.4.2
Comparing to
See all releases

Code changes from version 2.4.1 to 2.4.2

Files changed (36) hide show
  1. include/{style_admin → assests}/css/admin-ps.css +0 -0
  2. include/{style_admin → assests}/css/admin-woo.css +0 -0
  3. include/{style_admin → assests}/css/dashboard.css +0 -0
  4. include/{style_admin → assests}/css/menu.css +0 -0
  5. include/{style_admin → assests}/css/reports-print.css +0 -0
  6. include/{style_admin → assests}/fonts/WooCommerce.eot +0 -0
  7. include/{style_admin → assests}/fonts/WooCommerce.svg +0 -0
  8. include/{style_admin → assests}/fonts/WooCommerce.ttf +0 -0
  9. include/{style_admin → assests}/fonts/WooCommerce.woff +0 -0
  10. include/{style_admin → assests}/fonts/star.eot +0 -0
  11. include/{style_admin → assests}/fonts/star.svg +0 -0
  12. include/{style_admin → assests}/fonts/star.ttf +0 -0
  13. include/{style_admin → assests}/fonts/star.woff +0 -0
  14. include/{images → assests/images}/about.png +0 -0
  15. include/{style_admin → assests}/images/chosen-sprite.png +0 -0
  16. include/{style_admin → assests}/images/chosen-sprite@2x.png +0 -0
  17. include/{images → assests/images}/feed.png +0 -0
  18. include/{style_admin → assests}/images/icons/loader.svg +0 -0
  19. include/{images → assests/images}/iran_cities.png +0 -0
  20. include/{images → assests/images}/logo.png +0 -0
  21. include/{style_admin → assests}/images/select2-spinner.gif +0 -0
  22. include/{style_admin → assests}/images/select2.png +0 -0
  23. include/{style_admin → assests}/images/select2x2.png +0 -0
  24. include/{style_admin → assests}/images/storefront-bg.jpg +0 -0
  25. include/function-currency.php +4 -4
  26. include/function-rtl.php +7 -5
  27. include/function-widget.php +1 -1
  28. include/persian-woocommerce-about.php +2 -2
  29. include/persian-woocommerce-text.php +11 -13
  30. include/persian-woocommerce.php +20 -27
  31. {include/languages → languages}/admin-fa_IR.mo +0 -0
  32. {include/languages → languages}/admin-fa_IR.po +0 -0
  33. {include/languages → languages}/fa_IR.mo +0 -0
  34. {include/languages → languages}/fa_IR.po +0 -0
  35. readme.txt +5 -1
  36. woocommerce-persian.php +7 -4
include/{style_admin → assests}/css/admin-ps.css RENAMED
File without changes
include/{style_admin → assests}/css/admin-woo.css RENAMED
File without changes
include/{style_admin → assests}/css/dashboard.css RENAMED
File without changes
include/{style_admin → assests}/css/menu.css RENAMED
File without changes
include/{style_admin → assests}/css/reports-print.css RENAMED
File without changes
include/{style_admin → assests}/fonts/WooCommerce.eot RENAMED
File without changes
include/{style_admin → assests}/fonts/WooCommerce.svg RENAMED
File without changes
include/{style_admin → assests}/fonts/WooCommerce.ttf RENAMED
File without changes
include/{style_admin → assests}/fonts/WooCommerce.woff RENAMED
File without changes
include/{style_admin → assests}/fonts/star.eot RENAMED
File without changes
include/{style_admin → assests}/fonts/star.svg RENAMED
File without changes
include/{style_admin → assests}/fonts/star.ttf RENAMED
File without changes
include/{style_admin → assests}/fonts/star.woff RENAMED
File without changes
include/{images → assests/images}/about.png RENAMED
File without changes
include/{style_admin → assests}/images/chosen-sprite.png RENAMED
File without changes
include/{style_admin → assests}/images/chosen-sprite@2x.png RENAMED
File without changes
include/{images → assests/images}/feed.png RENAMED
File without changes
include/{style_admin → assests}/images/icons/loader.svg RENAMED
File without changes
include/{images → assests/images}/iran_cities.png RENAMED
File without changes
include/{images → assests/images}/logo.png RENAMED
File without changes
include/{style_admin → assests}/images/select2-spinner.gif RENAMED
File without changes
include/{style_admin → assests}/images/select2.png RENAMED
File without changes
include/{style_admin → assests}/images/select2x2.png RENAMED
File without changes
include/{style_admin → assests}/images/storefront-bg.jpg RENAMED
File without changes
include/function-currency.php CHANGED
@@ -2,11 +2,11 @@
2
  class Persian_Wooommerce_Currencies extends Persian_Wooommerce_Plugin {
3
 
4
  public function __construct() {
5
- add_filter( 'woocommerce_currencies', array( $this, 'add_my_currency') );
6
- add_filter('woocommerce_currency_symbol', array( $this, 'add_my_currency_symbol'), 10, 2);
7
  }
8
 
9
- public function add_my_currency( $currencies ) {
10
 
11
  $currencies['IRR'] = __( 'ریال', 'woocommerce' );
12
  $currencies['IRHR'] = __( 'هزار ریال', 'woocommerce' );
@@ -17,7 +17,7 @@ class Persian_Wooommerce_Currencies extends Persian_Wooommerce_Plugin {
17
 
18
  }
19
 
20
- function add_my_currency_symbol( $currency_symbol, $currency ) {
21
 
22
  switch( $currency ) {
23
 
2
  class Persian_Wooommerce_Currencies extends Persian_Wooommerce_Plugin {
3
 
4
  public function __construct() {
5
+ add_filter('woocommerce_currencies', array( $this, 'add_iran_currencies') );
6
+ add_filter('woocommerce_currency_symbol', array( $this, 'add_iran_currencies_symbol'), 10, 2);
7
  }
8
 
9
+ public function add_iran_currencies( $currencies ) {
10
 
11
  $currencies['IRR'] = __( 'ریال', 'woocommerce' );
12
  $currencies['IRHR'] = __( 'هزار ریال', 'woocommerce' );
17
 
18
  }
19
 
20
+ function add_iran_currencies_symbol( $currency_symbol, $currency ) {
21
 
22
  switch( $currency ) {
23
 
include/function-rtl.php CHANGED
@@ -12,11 +12,13 @@
12
  $version = 2;
13
  if ( defined('WC_VERSION') )
14
  $version = WC_VERSION;
 
 
15
 
16
  // menu.css
17
  wp_dequeue_style( 'woocommerce_admin_menu_styles' );
18
  wp_dequeue_style( 'woocommerce_admin_menu_styles_rtl' );
19
- wp_enqueue_style( 'woocommerce_admin_menu_styles_rtl', plugins_url('/style_admin/css/menu.css',__FILE__), array(), $version );
20
 
21
  $screen = get_current_screen();
22
 
@@ -26,22 +28,22 @@
26
  if ( in_array( $screen->id, wc_get_screen_ids() ) ) {
27
  wp_dequeue_style( 'woocommerce_admin_styles' );
28
  wp_dequeue_style( 'woocommerce_admin_styles_rtl' );
29
- wp_enqueue_style( 'woocommerce_admin_styles_rtl', plugins_url('/style_admin/css/admin-woo.css',__FILE__), array(), $version );
30
- wp_enqueue_style( 'persian_woo_rtl_admin_styles', plugins_url('/style_admin/css/admin-ps.css',__FILE__), array(), $version );
31
  }
32
  }
33
  // dashboard.css
34
  if ( in_array( $screen->id, array( 'dashboard' ) ) ) {
35
  wp_dequeue_style( 'woocommerce_admin_dashboard_styles' );
36
  wp_dequeue_style( 'woocommerce_admin_dashboard_styles_rtl' );
37
- wp_enqueue_style( 'woocommerce_admin_dashboard_styles_rtl', plugins_url('/style_admin/css/dashboard.css',__FILE__), array(), $version );
38
  }
39
 
40
  // reports-print.css
41
  if ( in_array( $screen->id, array( 'woocommerce_page_wc-reports' ) ) ) {
42
  wp_dequeue_style( 'woocommerce_admin_dashboard_styles' );
43
  wp_dequeue_style( 'woocommerce_admin_print_reports_styles_rtl' );
44
- wp_enqueue_style( 'woocommerce_admin_print_reports_styles_rtl', plugins_url('/style_admin/css/reports-print.css',__FILE__), array(), $version, 'print' );
45
  }
46
 
47
  }
12
  $version = 2;
13
  if ( defined('WC_VERSION') )
14
  $version = WC_VERSION;
15
+ else if ( defined('PERSIAN_WOOCOMMERCE_VERSION') )
16
+ $version = PERSIAN_WOOCOMMERCE_VERSION;
17
 
18
  // menu.css
19
  wp_dequeue_style( 'woocommerce_admin_menu_styles' );
20
  wp_dequeue_style( 'woocommerce_admin_menu_styles_rtl' );
21
+ wp_enqueue_style( 'woocommerce_admin_menu_styles_rtl', plugins_url('/assests/css/menu.css',__FILE__), array(), $version );
22
 
23
  $screen = get_current_screen();
24
 
28
  if ( in_array( $screen->id, wc_get_screen_ids() ) ) {
29
  wp_dequeue_style( 'woocommerce_admin_styles' );
30
  wp_dequeue_style( 'woocommerce_admin_styles_rtl' );
31
+ wp_enqueue_style( 'woocommerce_admin_styles_rtl', plugins_url('/assests/css/admin-woo.css',__FILE__), array(), $version );
32
+ wp_enqueue_style( 'persian_woo_rtl_admin_styles', plugins_url('/assests/css/admin-ps.css',__FILE__), array(), $version );
33
  }
34
  }
35
  // dashboard.css
36
  if ( in_array( $screen->id, array( 'dashboard' ) ) ) {
37
  wp_dequeue_style( 'woocommerce_admin_dashboard_styles' );
38
  wp_dequeue_style( 'woocommerce_admin_dashboard_styles_rtl' );
39
+ wp_enqueue_style( 'woocommerce_admin_dashboard_styles_rtl', plugins_url('/assests/css/dashboard.css',__FILE__), array(), $version );
40
  }
41
 
42
  // reports-print.css
43
  if ( in_array( $screen->id, array( 'woocommerce_page_wc-reports' ) ) ) {
44
  wp_dequeue_style( 'woocommerce_admin_dashboard_styles' );
45
  wp_dequeue_style( 'woocommerce_admin_print_reports_styles_rtl' );
46
+ wp_enqueue_style( 'woocommerce_admin_print_reports_styles_rtl', plugins_url('/assests/css/reports-print.css',__FILE__), array(), $version, 'print' );
47
  }
48
 
49
  }
include/function-widget.php CHANGED
@@ -20,7 +20,7 @@ class Persian_Wooommerce_Widget extends Persian_Wooommerce_Plugin {
20
  ));
21
  ?>
22
  <div style="border-top: 1px solid #e7e7e7; padding-top: 12px !important; font-size: 12px;">
23
- <?php echo '<img src="' . plugins_url( 'images/feed.png' , __FILE__ ) . '" width="16" height="16" > '; ?>
24
  <a href="http://woocommerce.ir" target="_new" title="خانه">وب سایت پشتیبان ووکامرس پارسی</a>
25
 
26
 
20
  ));
21
  ?>
22
  <div style="border-top: 1px solid #e7e7e7; padding-top: 12px !important; font-size: 12px;">
23
+ <?php echo '<img src="' . plugins_url( 'assests/images/feed.png' , __FILE__ ) . '" width="16" height="16" > '; ?>
24
  <a href="http://woocommerce.ir" target="_new" title="خانه">وب سایت پشتیبان ووکامرس پارسی</a>
25
 
26
 
include/persian-woocommerce-about.php CHANGED
@@ -9,7 +9,7 @@
9
  <div class="about-text">همین الان فروشگاه خود با قدرت ووکامرس را ایجاد کنید و از امکانات فراوان آن لذت ببرید!
10
  </div>
11
 
12
- <div class="wp-badge" style="background-color:#fff !important;background-image:url('<?php echo plugins_url('/images/about.png',__FILE__); ?>') !important;background-size: 160px 120px !important;"></div>
13
 
14
 
15
  <h2 class="nav-tab-wrapper">
@@ -68,7 +68,7 @@
68
  <p>برای فعالسازی شهر های ایران مطابق تصویر زیر ، از تنظیمات همگانی ووکامرس گزینه شهرهای ایران را فعال نمایید .
69
  <a href="<?php echo admin_url( 'admin.php?page=wc-settings#woocommerce_iran_cities' ); ?>">برای فعالسازی شهر های ایران کلیک کنید<a/>
70
  </p>
71
- <img title="شهرهای ایران" alt="شهرهای ایران" src="<?php echo plugins_url('/images/iran_cities.png',__FILE__); ?>">
72
  </div>
73
  </div>
74
  </div>
9
  <div class="about-text">همین الان فروشگاه خود با قدرت ووکامرس را ایجاد کنید و از امکانات فراوان آن لذت ببرید!
10
  </div>
11
 
12
+ <div class="wp-badge" style="background-color:#fff !important;background-image:url('<?php echo plugins_url('/assests/images/about.png',__FILE__); ?>') !important;background-size: 160px 120px !important;"></div>
13
 
14
 
15
  <h2 class="nav-tab-wrapper">
68
  <p>برای فعالسازی شهر های ایران مطابق تصویر زیر ، از تنظیمات همگانی ووکامرس گزینه شهرهای ایران را فعال نمایید .
69
  <a href="<?php echo admin_url( 'admin.php?page=wc-settings#woocommerce_iran_cities' ); ?>">برای فعالسازی شهر های ایران کلیک کنید<a/>
70
  </p>
71
+ <img title="شهرهای ایران" alt="شهرهای ایران" src="<?php echo plugins_url('/assests/images/iran_cities.png',__FILE__); ?>">
72
  </div>
73
  </div>
74
  </div>
include/persian-woocommerce-text.php CHANGED
@@ -46,6 +46,12 @@
46
  <?php
47
  }
48
 
 
 
 
 
 
 
49
  function woocommerce_text_meta_box(){
50
  ?>
51
  <form action="" method="post" id="persian_woocommerce_text">
@@ -140,6 +146,7 @@
140
  }
141
 
142
  $persian_woocommerce_text_list = new persian_woocommerce_text_list();
 
143
  ?>
144
  <div class="wrap">
145
 
@@ -153,19 +160,10 @@
153
  <div id="post-body" class="metabox-holder columns-2">
154
 
155
  <div id="postbox-container-1" class="postbox-container">
156
- <div id="side-sortables" class="meta-box-sortables">
157
- <div id="filter" class="postbox ">
158
- <div class="handlediv" title="برای جانشینی کلیک کنید">
159
- <br>
160
- </div>
161
- <h3 class="hndle">
162
- <span>افزودن ترجمه جدید</span>
163
- </h3>
164
- <div class="inside">
165
- <?php echo woocommerce_text_meta_box(); ?>
166
- </div>
167
- </div>
168
- </div>
169
  </div><!-- #postbox-container-1 -->
170
 
171
  <div id="postbox-container-2" class="postbox-container">
46
  <?php
47
  }
48
 
49
+ add_action( 'add_meta_boxes', 'woocommerce_text_add_meta_box' );
50
+
51
+ function woocommerce_text_add_meta_box(){
52
+ add_meta_box('add_form','افزودن حلقه ترجمه','woocommerce_text_meta_box','persian_woocommerce_text','side','high');
53
+ }
54
+
55
  function woocommerce_text_meta_box(){
56
  ?>
57
  <form action="" method="post" id="persian_woocommerce_text">
146
  }
147
 
148
  $persian_woocommerce_text_list = new persian_woocommerce_text_list();
149
+ do_action( 'add_meta_boxes', 'persian_woocommerce_text');
150
  ?>
151
  <div class="wrap">
152
 
160
  <div id="post-body" class="metabox-holder columns-2">
161
 
162
  <div id="postbox-container-1" class="postbox-container">
163
+
164
+ <?php do_meta_boxes( 'persian_woocommerce_text', 'side', null ); ?>
165
+ <!-- #side-sortables -->
166
+
 
 
 
 
 
 
 
 
 
167
  </div><!-- #postbox-container-1 -->
168
 
169
  <div id="postbox-container-2" class="postbox-container">
include/persian-woocommerce.php CHANGED
@@ -29,9 +29,6 @@
29
  add_action( 'admin_init', array( $this, 'redirect_to_woo_persian_about_page') );
30
  add_action( 'admin_menu', array( $this,'persian_woocommerce_create_menu') );
31
 
32
- register_activation_hook(__FILE__, array( $this, 'persian_woo_install') );
33
- register_deactivation_hook( __FILE__, array( $this, 'uninstall_woo_iran_cities') );
34
-
35
  // Filters
36
  add_filter( 'woocommerce_states', array( $this, 'iran_states') );
37
  add_filter( 'woocommerce_general_settings', array( $this, 'add_iran_cities_enable_settings') );
@@ -74,7 +71,7 @@
74
 
75
  public function persian_woo_plugin_loaded() {
76
 
77
- $rel_path = dirname( plugin_basename( $this->file ) ) . '/include/languages/';
78
  $dir = dirname( plugin_dir_path( __FILE__ ));
79
 
80
  if ( $this->language == null ) {
@@ -94,12 +91,12 @@
94
  if ( $this->is_persian || strtolower($curLang) == 'fa' ) {
95
 
96
  if ( is_admin() )
97
- load_textdomain( 'woocommerce', false, $dir . '/include/languages/admin-fa_IR.mo' );
98
 
99
- load_textdomain( 'woocommerce', false, $dir . '/include/languages/fa_IR.mo' );
100
  }
101
 
102
- $this->plugin_version = WOO_PERSIAN_VERSION;
103
 
104
  global $wpdb;
105
 
@@ -127,7 +124,8 @@
127
  ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";
128
  require_once (ABSPATH . 'wp-admin/includes/upgrade.php');
129
  dbDelta($sql_cities);
130
- $iran_city_file = plugin_dir_path( __FILE__ ). '/include/iran-cities/data/iran_cities.csv';
 
131
  $lines = file($iran_city_file);
132
  foreach( (array) $lines as $line_num => $line) {
133
  $row = explode(",",$line);
@@ -148,28 +146,18 @@
148
  public function redirect_to_woo_persian_about_page() {
149
  if ( get_option( 'redirect_to_woo_persian_about_page' ) != 'yes') {
150
  update_option( 'redirect_to_woo_persian_about_page', 'yes' );
151
- ob_start();
152
- ob_end_flush();
153
- ob_end_clean();
154
  if (!headers_sent()) {
155
- wp_redirect( admin_url( 'admin.php?page=persian-woocommerce' ) );
156
- }
157
- else {
158
- $redirect_page = admin_url( 'admin.php?page=persian-woocommerce' );
159
- echo "<script type='text/javascript'>window.onload = function () { top.location.href = '" . $redirect_page . "'; };</script>";
160
  }
161
  }
162
  }
163
 
164
  public function persian_woocommerce_create_menu() {
165
- add_menu_page( 'ووکامرس فارسی', 'ووکامرس فارسی', 'manage_woocommerce' ,'persian-woocommerce', array($this,'persian_woocommerce_text') , plugins_url( 'images/logo.png' , __FILE__ ) , '55.6' );
166
- add_submenu_page('persian-woocommerce', 'حلقه های ترجمه', 'حلقه های ترجمه', 'manage_woocommerce', 'persian-woocommerce', array($this,'persian_woocommerce_text'));
167
- add_submenu_page('persian-woocommerce', 'ابزار ها', 'ابزار ها', 'manage_woocommerce', 'persian-woocommerce-tools', array($this,'persian_woocommerce_tools'));
168
- add_submenu_page('persian-woocommerce', 'درباره ما', 'درباره ما', 'manage_woocommerce', 'persian-woocommerce-about', array($this,'persian_woocommerce_about'));
169
- }
170
-
171
- public function persian_woocommerce_tools(){
172
- echo "<p>توجه : بزودی در این قسمت ابزار های کاربردی و کامل کننده ووکامرس قرار داده می شود! مطمئن باشید شگفت زده می شوید ...</p>";
173
  }
174
 
175
  public function persian_woocommerce_text() {
@@ -177,15 +165,20 @@
177
  include_once('persian-woocommerce-text.php');
178
  }
179
 
 
 
 
 
180
  public function persian_woocommerce_about() {
181
  include_once('persian-woocommerce-about.php');
182
  }
183
 
184
  // register hook functions
185
- public function persian_woo_install() {
186
  global $wpdb;
 
187
  update_option( 'redirect_to_woo_persian_about_page', 'no' );
188
- $woocommerce_ir_sql = "CREATE TABLE IF NOT EXISTS $wpdb->table_lang (
189
  `id` int(11) NOT NULL AUTO_INCREMENT,
190
  `text1` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
191
  `text2` text CHARACTER SET utf8 COLLATE utf8_persian_ci,
@@ -195,7 +188,7 @@
195
  dbDelta($woocommerce_ir_sql);
196
  }
197
 
198
- public function uninstall_woo_iran_cities() {
199
  global $wpdb;
200
  update_option( 'is_cities_installed', 'no' );
201
  update_option( 'redirect_to_woo_persian_about_page', 'no' );
29
  add_action( 'admin_init', array( $this, 'redirect_to_woo_persian_about_page') );
30
  add_action( 'admin_menu', array( $this,'persian_woocommerce_create_menu') );
31
 
 
 
 
32
  // Filters
33
  add_filter( 'woocommerce_states', array( $this, 'iran_states') );
34
  add_filter( 'woocommerce_general_settings', array( $this, 'add_iran_cities_enable_settings') );
71
 
72
  public function persian_woo_plugin_loaded() {
73
 
74
+ $rel_path = dirname( plugin_basename( $this->file ) ) . '/languages/';
75
  $dir = dirname( plugin_dir_path( __FILE__ ));
76
 
77
  if ( $this->language == null ) {
91
  if ( $this->is_persian || strtolower($curLang) == 'fa' ) {
92
 
93
  if ( is_admin() )
94
+ load_textdomain( 'woocommerce', $dir . '/languages/admin-fa_IR.mo' );
95
 
96
+ load_textdomain( 'woocommerce', $dir . '/languages/fa_IR.mo' );
97
  }
98
 
99
+ $this->plugin_version = defined( 'PERSIAN_WOOCOMMERCE_VERSION') ? PERSIAN_WOOCOMMERCE_VERSION : '2';
100
 
101
  global $wpdb;
102
 
124
  ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;";
125
  require_once (ABSPATH . 'wp-admin/includes/upgrade.php');
126
  dbDelta($sql_cities);
127
+
128
+ $iran_city_file = plugin_dir_path( __FILE__ ). '/iran-cities/data/iran_cities.csv';
129
  $lines = file($iran_city_file);
130
  foreach( (array) $lines as $line_num => $line) {
131
  $row = explode(",",$line);
146
  public function redirect_to_woo_persian_about_page() {
147
  if ( get_option( 'redirect_to_woo_persian_about_page' ) != 'yes') {
148
  update_option( 'redirect_to_woo_persian_about_page', 'yes' );
149
+ $redirect_page = admin_url( 'admin.php?page=persian-woocommerce-about' );
 
 
150
  if (!headers_sent()) {
151
+ wp_redirect($redirect_page);
 
 
 
 
152
  }
153
  }
154
  }
155
 
156
  public function persian_woocommerce_create_menu() {
157
+ add_menu_page( 'ووکامرس فارسی', 'ووکامرس فارسی', 'manage_options' ,'persian-woocommerce', array($this,'persian_woocommerce_text') , plugins_url( 'assests/images/logo.png' , __FILE__ ) , '55.6' );
158
+ add_submenu_page('persian-woocommerce', 'حلقه های ترجمه', 'حلقه های ترجمه', 'manage_options', 'persian-woocommerce', array($this,'persian_woocommerce_text'));
159
+ add_submenu_page('persian-woocommerce', 'ابزار ها', 'ابزار ها', 'manage_options', 'persian-woocommerce-tools', array($this,'persian_woocommerce_tools'));
160
+ add_submenu_page('persian-woocommerce', 'درباره ما', 'درباره ما', 'manage_options', 'persian-woocommerce-about', array($this,'persian_woocommerce_about'));
 
 
 
 
161
  }
162
 
163
  public function persian_woocommerce_text() {
165
  include_once('persian-woocommerce-text.php');
166
  }
167
 
168
+ public function persian_woocommerce_tools(){
169
+ echo "<p>توجه : بزودی در این قسمت ابزار های کاربردی و کامل کننده ووکامرس قرار داده می شود! مطمئن باشید شگفت زده می شوید ...</p>";
170
+ }
171
+
172
  public function persian_woocommerce_about() {
173
  include_once('persian-woocommerce-about.php');
174
  }
175
 
176
  // register hook functions
177
+ static function persian_woo_install() {
178
  global $wpdb;
179
+ update_option( 'is_cities_installed', 'no' );
180
  update_option( 'redirect_to_woo_persian_about_page', 'no' );
181
+ $woocommerce_ir_sql = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}woocommerce_ir (
182
  `id` int(11) NOT NULL AUTO_INCREMENT,
183
  `text1` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
184
  `text2` text CHARACTER SET utf8 COLLATE utf8_persian_ci,
188
  dbDelta($woocommerce_ir_sql);
189
  }
190
 
191
+ static function uninstall_woo_iran_cities() {
192
  global $wpdb;
193
  update_option( 'is_cities_installed', 'no' );
194
  update_option( 'redirect_to_woo_persian_about_page', 'no' );
{include/languages → languages}/admin-fa_IR.mo RENAMED
File without changes
{include/languages → languages}/admin-fa_IR.po RENAMED
File without changes
{include/languages → languages}/fa_IR.mo RENAMED
File without changes
{include/languages → languages}/fa_IR.po RENAMED
File without changes
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === Persian Woocommerce ===
2
  author: Persian Woocommerce
3
- Contributors: Persianscript, hannanstd, MahdiY
4
  author URI: http://www.woocommerce.ir/
5
  Donate link: http://woocommerce.ir/donate.html
6
  plugin URI: http://www.woocommerce.ir/download.html
@@ -50,6 +50,8 @@ You can read complete documentations on the [woocommerce.ir](http://www.woocomme
50
 
51
 
52
  == Changelog ==
 
 
53
  = 2.4.1 =
54
  * رفع باگ
55
  = 2.4.0 =
@@ -78,6 +80,8 @@ You can read complete documentations on the [woocommerce.ir](http://www.woocomme
78
  * نسخه اولیه
79
 
80
  == Upgrade Notice ==
 
 
81
  = 2.4.1 =
82
  * رفع باگ
83
  = 2.4.0 =
1
  === Persian Woocommerce ===
2
  author: Persian Woocommerce
3
+ Contributors: Persianscript, hannanstd, mahdiy
4
  author URI: http://www.woocommerce.ir/
5
  Donate link: http://woocommerce.ir/donate.html
6
  plugin URI: http://www.woocommerce.ir/download.html
50
 
51
 
52
  == Changelog ==
53
+ = 2.4.2 =
54
+ * بروز رسانی فایل زبان و رفع باگ
55
  = 2.4.1 =
56
  * رفع باگ
57
  = 2.4.0 =
80
  * نسخه اولیه
81
 
82
  == Upgrade Notice ==
83
+ = 2.4.2 =
84
+ * بروز رسانی فایل زبان و رفع باگ
85
  = 2.4.1 =
86
  * رفع باگ
87
  = 2.4.0 =
woocommerce-persian.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
  /*
3
- Contributors: Persianscript, hannanstd, MahdiY
4
  Plugin Name: ووکامرس پارسی
5
  Plugin URI: http://woocommerce.ir
6
  Description: بسته فارسی ساز ووکامرس پارسی به راحتی سیستم فروشگاه ساز ووکامرس را فارسی می کند. با فعال سازی افزونه ، واحد پولی ریال و تومان ایران و همچنین لیست استان های ایران به افزونه افزوده می شوند. پشتیبانی در <a href="http://www.woocommerce.ir/" target="_blank">ووکامرس پارسی</a>.
7
- Version: 2.4.1
8
  Requires at least: 4.0
9
  Author: ووکامرس فارسی
10
  Author URI: http://www.woocommerce.ir
11
  */
12
 
13
- if ( !defined( 'WOO_PERSIAN_VERSION' ) )
14
- define( 'WOO_PERSIAN_VERSION' , '2.4.1' );
15
 
16
  require_once ( dirname(__FILE__) .'/include/persian-woocommerce.php');
17
  require_once ( dirname(__FILE__) .'/include/function-currency.php');
@@ -23,4 +23,7 @@ Author URI: http://www.woocommerce.ir
23
 
24
  global $woocommerce_persian;
25
  $woocommerce_persian = new Persian_Wooommerce_Plugin( __FILE__ );
 
 
 
26
  ?>
1
  <?php
2
  /*
3
+ Contributors: Persianscript, hannanstd, mahdiy
4
  Plugin Name: ووکامرس پارسی
5
  Plugin URI: http://woocommerce.ir
6
  Description: بسته فارسی ساز ووکامرس پارسی به راحتی سیستم فروشگاه ساز ووکامرس را فارسی می کند. با فعال سازی افزونه ، واحد پولی ریال و تومان ایران و همچنین لیست استان های ایران به افزونه افزوده می شوند. پشتیبانی در <a href="http://www.woocommerce.ir/" target="_blank">ووکامرس پارسی</a>.
7
+ Version: 2.4.2
8
  Requires at least: 4.0
9
  Author: ووکامرس فارسی
10
  Author URI: http://www.woocommerce.ir
11
  */
12
 
13
+ if ( !defined( 'PERSIAN_WOOCOMMERCE_VERSION' ) )
14
+ define( 'PERSIAN_WOOCOMMERCE_VERSION' , '2.4.2' );
15
 
16
  require_once ( dirname(__FILE__) .'/include/persian-woocommerce.php');
17
  require_once ( dirname(__FILE__) .'/include/function-currency.php');
23
 
24
  global $woocommerce_persian;
25
  $woocommerce_persian = new Persian_Wooommerce_Plugin( __FILE__ );
26
+
27
+ register_activation_hook( __FILE__ , array( 'Persian_Wooommerce_Plugin', 'persian_woo_install') );
28
+ register_deactivation_hook( __FILE__ , array( 'Persian_Wooommerce_Plugin', 'uninstall_woo_iran_cities') );
29
  ?>