Changeset 3366500
- Timestamp:
- 09/23/2025 12:38:40 PM (6 months ago)
- Location:
- wc-software-license-manager
- Files:
-
- 17 added
- 9 edited
-
tags/2.1 (added)
-
tags/2.1/.gitignore (added)
-
tags/2.1/README.txt (added)
-
tags/2.1/includes (added)
-
tags/2.1/includes/emails.php (added)
-
tags/2.1/includes/helper.php (added)
-
tags/2.1/includes/meta-boxes.php (added)
-
tags/2.1/includes/purchase.php (added)
-
tags/2.1/includes/settings.php (added)
-
tags/2.1/languages (added)
-
tags/2.1/languages/wc-slm-es_ES.mo (added)
-
tags/2.1/languages/wc-slm-es_ES.po (added)
-
tags/2.1/languages/wc-slm-fa_IR.mo (added)
-
tags/2.1/languages/wc-slm-fa_IR.po (added)
-
tags/2.1/languages/wc-slm.pot (added)
-
tags/2.1/license.txt (added)
-
tags/2.1/wc-software-license-manager.php (added)
-
trunk/.gitignore (modified) (1 diff)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/emails.php (modified) (1 diff)
-
trunk/includes/helper.php (modified) (1 diff)
-
trunk/includes/meta-boxes.php (modified) (4 diffs)
-
trunk/includes/purchase.php (modified) (8 diffs)
-
trunk/languages/wc-slm-fa_IR.mo (modified) (previous)
-
trunk/languages/wc-slm-fa_IR.po (modified) (11 diffs)
-
trunk/wc-software-license-manager.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wc-software-license-manager/trunk/.gitignore
r2509622 r3366500 2 2 .idea 3 3 .git 4 .* -
wc-software-license-manager/trunk/README.txt
r2509631 r3366500 1 === WooCommerce Software License Manager===2 Contributors: goback2 ,ahortin1 === Software License Manager for Woocommerce === 2 Contributors: goback2 3 3 Tags: wc, wc license, wc software license, software license, software license manager, woocommerce, wc licensing 4 4 Requires at least: 3.5.1 5 Tested up to: 5.76 Stable tag: 2. 0.25 Tested up to: 6.8.2 6 Stable tag: 2.1 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 217 217 218 218 == Changelog == 219 = 2.1 = 220 - Some improvment 221 - HPOS compatibility 222 219 223 220 224 = 2.0.1 = -
wc-software-license-manager/trunk/includes/emails.php
r2509622 r3366500 22 22 23 23 // Check if licenses were generated 24 $licenses = get_post_meta($order->get_id(), '_wc_slm_payment_licenses', true);24 $licenses = wc_slm_get_post_meta($order->get_id(), '_wc_slm_payment_licenses', true); 25 25 26 26 if ($licenses && count($licenses) != 0) { -
wc-software-license-manager/trunk/includes/helper.php
r2509622 r3366500 40 40 wc_slm_log($msg); 41 41 } 42 43 function wc_slm_get_post_meta($order_id, $meta_key, $single) 44 { 45 46 if (wc_slm_is_hpos_enabled() && wc_slm_get_post_type($order_id) == 'shop_order') { 47 $order = wc_get_order($order_id); 48 return $order->get_meta($meta_key, $single); 49 } else { 50 return get_post_meta($order_id, $meta_key, $single); 51 } 52 53 54 } 55 56 function wc_slm_update_post_meta($order_id, $meta_key, $meta_value) 57 { 58 59 if (wc_slm_is_hpos_enabled() && wc_slm_get_post_type($order_id) == 'shop_order') { 60 $order = wc_get_order($order_id); 61 $order->update_meta_data($meta_key, $meta_value); 62 return $order->save(); 63 } else { 64 return update_post_meta($order_id, $meta_key, $meta_value); 65 } 66 } 67 68 function wc_slm_get_post_type($order_id) 69 { 70 71 if (wc_slm_is_hpos_enabled()) { 72 return Automattic\WooCommerce\Utilities\OrderUtil::get_order_type($order_id); 73 } else { 74 return get_post_type($order_id); 75 } 76 } 77 78 function wc_slm_is_hpos_enabled() 79 { 80 if (class_exists('Automattic\WooCommerce\Utilities\OrderUtil') && Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled()) { 81 // HPOS usage is enabled. 82 return true; 83 } 84 // Traditional CPT-based orders are in use. 85 return false; 86 } 87 -
wc-software-license-manager/trunk/includes/meta-boxes.php
r2509622 r3366500 15 15 $post_id = $post->ID; 16 16 $wc_slm_licensing_enabled = get_post_meta($post_id, '_wc_slm_licensing_enabled', true) ? true : false; 17 $wc_slm_sites_allowed = esc_attr(get_post_meta($post_id, '_wc_slm_sites_allowed', true)); 18 $_wc_slm_licensing_renewal_period = esc_attr(get_post_meta($post_id, '_wc_slm_licensing_renewal_period', true)); 17 18 $wc_slm_sites_allowed = esc_attr(wc_slm_get_post_meta($post_id, '_wc_slm_sites_allowed', true)); 19 $_wc_slm_licensing_renewal_period = esc_attr(wc_slm_get_post_meta($post_id, '_wc_slm_licensing_renewal_period', true)); 19 20 $wc_slm_display = $wc_slm_licensing_enabled ? '' : ' style="display:none;"'; 20 21 … … 75 76 $_wc_slm_licensing_renewal_period = $_POST['_wc_slm_licensing_renewal_period']; 76 77 77 update_post_meta(78 wc_slm_update_post_meta( 78 79 $post_id, 79 80 '_wc_slm_licensing_enabled', … … 82 83 83 84 if (isset($woocommerce_wc_slm_sites_allowed)) { 84 update_post_meta(85 wc_slm_update_post_meta( 85 86 $post_id, 86 87 '_wc_slm_sites_allowed', … … 89 90 } 90 91 91 update_post_meta(92 wc_slm_update_post_meta( 92 93 $post_id, 93 94 '_wc_slm_licensing_renewal_period', -
wc-software-license-manager/trunk/includes/purchase.php
r2509622 r3366500 178 178 179 179 // Get License data 180 $json = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', utf8_encode(wp_remote_retrieve_body($response)));180 $json = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', mb_convert_encoding(wp_remote_retrieve_body($response), "UTF-8")); 181 181 $license_data = json_decode($json); 182 182 … … 228 228 if (count($licenses) != 0) { 229 229 wc_slm_log_msg(__('License Key assigned to Order ', 'wc-slm') . $order_id); 230 update_post_meta($order_id, '_wc_slm_payment_licenses', $licenses);230 wc_slm_update_post_meta($order_id, '_wc_slm_payment_licenses', $licenses); 231 231 } else { 232 232 wc_slm_log_msg(__('License Key does not exist so cannot assign to order', 'wc-slm')); … … 243 243 { 244 244 245 $wc_slm_sites_allowed = absint( get_post_meta($product_id, '_wc_slm_sites_allowed', true));245 $wc_slm_sites_allowed = absint(wc_slm_get_post_meta($product_id, '_wc_slm_sites_allowed', true)); 246 246 247 247 if (empty($wc_slm_sites_allowed)) { … … 261 261 { 262 262 263 $wc_slm_sites_allowed = absint( get_post_meta($product_id, '_wc_slm_licensing_renewal_period', true));263 $wc_slm_sites_allowed = absint(wc_slm_get_post_meta($product_id, '_wc_slm_licensing_renewal_period', true)); 264 264 265 265 if (empty($wc_slm_sites_allowed)) { … … 278 278 function wc_slm_is_licensing_enabled($download_id) 279 279 { 280 $licensing_enabled = absint( get_post_meta($download_id, '_wc_slm_licensing_enabled', true));280 $licensing_enabled = absint(wc_slm_get_post_meta($download_id, '_wc_slm_licensing_enabled', true)); 281 281 282 282 // Set defaults … … 310 310 function wc_get_payment_transaction_id($order_id) 311 311 { 312 return get_post_meta($order_id, '_transaction_id', true);312 return wc_slm_get_post_meta($order_id, '_transaction_id', true); 313 313 } 314 314 … … 321 321 { 322 322 $output = ''; 323 $licenses = get_post_meta($order->get_id(), '_wc_slm_payment_licenses', true);323 $licenses = wc_slm_get_post_meta($order->get_id(), '_wc_slm_payment_licenses', true); 324 324 325 325 if ($licenses && count($licenses) != 0) { … … 397 397 if (is_array($response)) { 398 398 $json = $response['body']; 399 $json = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', utf8_encode($json));399 $json = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', mb_convert_encoding($json, "UTF-8")); 400 400 $license_data = json_decode($json); 401 401 } -
wc-software-license-manager/trunk/languages/wc-slm-fa_IR.po
r2509622 r3366500 2 2 msgstr "" 3 3 "Project-Id-Version: WC Software License Manager\n" 4 "POT-Creation-Date: 202 1-04-05 22:35+0430\n"5 "PO-Revision-Date: 202 1-04-05 22:47+0430\n"4 "POT-Creation-Date: 2025-09-23 15:24+0330\n" 5 "PO-Revision-Date: 2025-09-23 15:25+0330\n" 6 6 "Last-Translator: wp-master.ir <wp@wp-master.ir>\n" 7 7 "Language-Team: wp-master.ir <wp@wp-master.ir>\n" … … 18 18 "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;" 19 19 "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n" 20 "X-Generator: Poedit 2.3\n"20 "X-Generator: Poedit 3.4.2\n" 21 21 "X-Loco-Target-Locale: es_ES\n" 22 22 "X-Poedit-SearchPath-0: ..\n" 23 23 24 #: ../includes/emails.php:2 024 #: ../includes/emails.php:21 ../old/includes/emails.php:21 25 25 msgid "Order Completed. Adding License Key details for Order ID " 26 26 msgstr "سفارش تکمیل شد. افزودن جزئیات لایسنسها برای سفارش " 27 27 28 #: ../includes/emails.php:2 628 #: ../includes/emails.php:27 ../old/includes/emails.php:27 29 29 msgid "License Key(s) found. Generating output for email content" 30 30 msgstr "دارای لایسنس (های). تولید خروجی برای محتوای ایمیل" 31 31 32 #: ../includes/emails.php:27 ../includes/purchase.php:315 32 #: ../includes/emails.php:28 ../includes/purchase.php:328 33 #: ../old/includes/emails.php:28 ../old/includes/purchase.php:328 33 34 msgid "Your Licenses" 34 35 msgstr "لایسنس(های) شما" 35 36 36 #: ../includes/emails.php:29 ../includes/purchase.php:317 37 #: ../includes/emails.php:30 ../includes/purchase.php:330 38 #: ../old/includes/emails.php:30 ../old/includes/purchase.php:330 37 39 msgid "Item" 38 40 msgstr "محصول" 39 41 40 #: ../includes/emails.php:30 ../includes/purchase.php:318 42 #: ../includes/emails.php:31 ../includes/purchase.php:331 43 #: ../old/includes/emails.php:31 ../old/includes/purchase.php:331 41 44 msgid "License" 42 45 msgstr "لایسنس" 43 46 44 #: ../includes/emails.php:3 147 #: ../includes/emails.php:32 ../old/includes/emails.php:32 45 48 msgid "Expire Date" 46 49 msgstr "تاریخ انقضا" 47 50 48 #: ../includes/emails.php:51 51 #: ../includes/emails.php:51 ../old/includes/emails.php:51 49 52 msgid "Adding License Key details to Order email" 50 53 msgstr "اضافه کردن جزئیات کلید لایسنس به ایمیل سفارش" 51 54 52 #: ../includes/meta-boxes.php: 3955 #: ../includes/meta-boxes.php:42 ../old/includes/meta-boxes.php:41 53 56 msgid "Enable Software Licensing" 54 57 msgstr "فعال سازی لایسنس گذاری برای این محصول" 55 58 56 #: ../includes/meta-boxes.php:4 559 #: ../includes/meta-boxes.php:48 ../old/includes/meta-boxes.php:47 57 60 msgid "Renewal period (Yearly)" 58 61 msgstr "دوره تمدید (سالانه)" 59 62 60 #: ../includes/meta-boxes.php: 4863 #: ../includes/meta-boxes.php:53 ../old/includes/meta-boxes.php:52 61 64 msgid "" 62 65 "Enter the number of years for the Renewal Period. Enter 0 (zero) or leave " … … 66 69 "را وارد کنید یا خالی بگذارید." 67 70 68 #: ../includes/meta-boxes.php:5 171 #: ../includes/meta-boxes.php:56 ../old/includes/meta-boxes.php:55 69 72 msgid "Number of Sites Allowed" 70 73 msgstr "تعداد سایتهای اجازه داده شده" 71 74 72 #: ../includes/meta-boxes.php: 5375 #: ../includes/meta-boxes.php:60 ../old/includes/meta-boxes.php:59 73 76 msgid "" 74 77 "Enter the number of sites that can be activated for a single License Key. " … … 78 81 "باید بیشتر از 0 (صفر) باشد" 79 82 80 #: ../includes/purchase.php:2 083 #: ../includes/purchase.php:21 ../old/includes/purchase.php:21 81 84 msgid "Start of Software License Key creation" 82 85 msgstr "شروع ساخت کلید لایسنس" 83 86 84 #: ../includes/purchase.php:2 287 #: ../includes/purchase.php:23 ../old/includes/purchase.php:23 85 88 msgid "API URL and API Secret Supplied. Attempting to create License key" 86 89 msgstr "URL API و API Secret عرضه شده است. تلاش برای ایجاد کلید مجوز" 87 90 88 #: ../includes/purchase.php: 6891 #: ../includes/purchase.php:71 ../old/includes/purchase.php:71 89 92 msgid "Checking if licensing is enabled" 90 93 msgstr "بررسی برای فعال بودن لایسنس" 91 94 92 #: ../includes/purchase.php:7 195 #: ../includes/purchase.php:74 ../old/includes/purchase.php:74 93 96 msgid "Checking if product is Downloadable" 94 97 msgstr "بررسی برای دانلودی بودن محصول" 95 98 96 #: ../includes/purchase.php:7 499 #: ../includes/purchase.php:77 ../old/includes/purchase.php:77 97 100 msgid "Product is Downloadable" 98 101 msgstr "محصول دانلودیست" 99 102 100 #: ../includes/purchase.php:82 ../includes/purchase.php:85 103 #: ../includes/purchase.php:85 ../includes/purchase.php:88 104 #: ../old/includes/purchase.php:85 ../old/includes/purchase.php:88 101 105 msgid "License Renewal Period for Product ID " 102 106 msgstr "دوره تمدید برای شناسه محصول " 103 107 104 #: ../includes/purchase.php:8 2108 #: ../includes/purchase.php:85 ../old/includes/purchase.php:85 105 109 msgid " is set to Lifetime" 106 110 msgstr " بر روی مادام العمر تنظیم شده است" 107 111 108 #: ../includes/purchase.php:8 5112 #: ../includes/purchase.php:88 ../old/includes/purchase.php:88 109 113 msgid " is set to " 110 114 msgstr " تنظیم شده است " 111 115 112 #: ../includes/purchase.php:8 5116 #: ../includes/purchase.php:88 ../old/includes/purchase.php:88 113 117 msgid " year" 114 118 msgid_plural " years" … … 116 120 msgstr[1] " سال" 117 121 118 #: ../includes/purchase.php:9 1122 #: ../includes/purchase.php:94 ../old/includes/purchase.php:94 119 123 msgid "Product ID " 120 124 msgstr "شناسه محصول " 121 125 122 #: ../includes/purchase.php:9 1126 #: ../includes/purchase.php:94 ../old/includes/purchase.php:94 123 127 msgid " can be assigned to " 124 128 msgstr " می تواند اختصاص داده شود به " 125 129 126 #: ../includes/purchase.php:9 1130 #: ../includes/purchase.php:94 ../old/includes/purchase.php:94 127 131 msgid " sites" 128 132 msgstr " سایت(ها)" 129 133 130 #: ../includes/purchase.php:9 3134 #: ../includes/purchase.php:96 ../old/includes/purchase.php:96 131 135 msgid "License could not be created: Invalid sites allowed number." 132 136 msgstr "" … … 134 138 "است." 135 139 136 #: ../includes/purchase.php:1 07140 #: ../includes/purchase.php:110 ../old/includes/purchase.php:110 137 141 msgid "Building query to send to the Software License Manager" 138 142 msgstr "ساخت کوئری برای ارسال به Software License Manager" 139 143 140 #: ../includes/purchase.php:1 29144 #: ../includes/purchase.php:132 ../old/includes/purchase.php:132 141 145 msgid "Attempting to create License Key for " 142 146 msgstr "تلاش برای ساخت لایسنس برای " 143 147 144 #: ../includes/purchase.php:14 0148 #: ../includes/purchase.php:143 ../old/includes/purchase.php:143 145 149 msgid "SUCCESS! License Key created for " 146 150 msgstr "موفق! لایسنس ساخته شد برای " 147 151 148 #: ../includes/purchase.php:15 1152 #: ../includes/purchase.php:154 ../old/includes/purchase.php:154 149 153 msgid "Licensing is not enabled for Product ID " 150 154 msgstr "لایسنس برای شناسه محصول فعال نشده است " 151 155 152 #: ../includes/purchase.php:17 1156 #: ../includes/purchase.php:175 ../old/includes/purchase.php:175 153 157 msgid "Error! Unable to Create License Key." 154 158 msgstr "خطا! نمی توان لایسنس ساخت." 155 159 156 #: ../includes/purchase.php:18 0160 #: ../includes/purchase.php:184 ../old/includes/purchase.php:184 157 161 msgid "Error! License created but can't retrieve Key" 158 162 msgstr "خطا! لایسنس ساخته شد اما قابل بازیابی نیست" 159 163 160 #: ../includes/purchase.php: 197164 #: ../includes/purchase.php:202 ../old/includes/purchase.php:202 161 165 msgid "License Key(s) generated" 162 166 msgstr "لایسنس(ها) ایجاد شدند" 163 167 164 #: ../includes/purchase.php:20 2168 #: ../includes/purchase.php:207 ../old/includes/purchase.php:207 165 169 msgid "Payment Note created for Order " 166 170 msgstr "یادداشت پرداخت ساخته شد برای سفارش " 167 171 168 #: ../includes/purchase.php:2 05172 #: ../includes/purchase.php:210 ../old/includes/purchase.php:210 169 173 msgid "" 170 174 "Error! License Key(s) could not be created or was not enabled on Product ID " … … 172 176 "خطا! کلید (های) لایسنس را نمی توان برای شناسه محصول ایجاد کرد یا فعال نکرد " 173 177 174 #: ../includes/purchase.php:2 06178 #: ../includes/purchase.php:211 ../old/includes/purchase.php:211 175 179 msgid "License Key(s) could not be created or was not enabled on product." 176 180 msgstr "کلید (های) لایسنس در محصول ایجاد نمی شود یا فعال نیست." 177 181 178 #: ../includes/purchase.php:21 1182 #: ../includes/purchase.php:216 ../old/includes/purchase.php:216 179 183 msgid "Payment Note saved for Order " 180 184 msgstr "یادداشت پرداخت ذخیره شد برای سفارش " 181 185 182 #: ../includes/purchase.php:22 3186 #: ../includes/purchase.php:229 ../old/includes/purchase.php:229 183 187 msgid "License Key assigned to Order " 184 188 msgstr "کلید لایسنس به سفارش اختصاص داده شده است " 185 189 186 #: ../includes/purchase.php:2 26190 #: ../includes/purchase.php:232 ../old/includes/purchase.php:232 187 191 msgid "License Key does not exist so cannot assign to order" 188 192 msgstr "لایسنس وجود ندارد، بنابراین نمی توان به سفارش اختصاص داد" 189 193 190 #: ../includes/purchase.php:274 ../includes/purchase.php:277 194 #: ../includes/purchase.php:284 ../includes/purchase.php:287 195 #: ../old/includes/purchase.php:284 ../old/includes/purchase.php:287 191 196 msgid "Licensing for Product ID " 192 197 msgstr "دادن لایسنس برای شناسه محصول " 193 198 194 #: ../includes/purchase.php:2 74199 #: ../includes/purchase.php:284 ../old/includes/purchase.php:284 195 200 msgid " is ENABLED" 196 201 msgstr " فعال شده است" 197 202 198 #: ../includes/purchase.php:2 77203 #: ../includes/purchase.php:287 ../old/includes/purchase.php:287 199 204 msgid " is DISABLED" 200 205 msgstr " غیرفعال شده است" 201 206 202 #: ../includes/purchase.php:3 14207 #: ../includes/purchase.php:327 ../old/includes/purchase.php:327 203 208 msgid "Customer ID " 204 209 msgstr "شناسه مشتری " 205 210 206 #: ../includes/purchase.php:3 14211 #: ../includes/purchase.php:327 ../old/includes/purchase.php:327 207 212 msgid " is viewing License Keys for Order ID " 208 213 msgstr " در حال مشاهده لایسنسها برای شناسه سفارش " 209 214 210 #: ../includes/purchase.php:3 38215 #: ../includes/purchase.php:351 ../old/includes/purchase.php:351 211 216 msgid "No Item assigned" 212 217 msgstr "موردی اختصاص داده نشده است" 213 218 214 #: ../includes/purchase.php:3 39219 #: ../includes/purchase.php:352 ../old/includes/purchase.php:352 215 220 msgid "No License Key assigned" 216 221 msgstr "کلید لایسنسی اختصاص داده نشده است" 217 222 218 #: ../includes/purchase.php:3 66223 #: ../includes/purchase.php:381 ../old/includes/purchase.php:381 219 224 msgid "Verifying License Key and Retrieving Registered Domains" 220 225 msgstr "تأیید و بررسی لایسنس و بازیابی دامنه های ثبت شده" 221 226 222 #: ../includes/purchase.php:3 78227 #: ../includes/purchase.php:393 ../old/includes/purchase.php:393 223 228 msgid "Error! Invalid response when verifying License Key" 224 229 msgstr "خطا! هنگام تأیید لایسنس ، پاسخ نامعتبر است" 225 230 226 #: ../includes/purchase.php: 389231 #: ../includes/purchase.php:404 ../old/includes/purchase.php:404 227 232 msgid "License Key verified. Retrieving registered domains" 228 233 msgstr "لایسنس تأیید شد. بازیابی دامنه های ثبت شده" 229 234 230 #: ../includes/purchase.php:4 02235 #: ../includes/purchase.php:415 ../old/includes/purchase.php:415 231 236 msgid "Error! Unable to verify License Key" 232 237 msgstr "خطا! تأیید لایسنس امکان پذیر نیست" 233 238 234 #: ../includes/settings.php:1 8239 #: ../includes/settings.php:19 ../old/includes/settings.php:19 235 240 msgid "License Manager" 236 241 msgstr "مدیریت لایسنس" 237 242 238 #: ../includes/settings.php:3 4243 #: ../includes/settings.php:37 ../old/includes/settings.php:37 239 244 msgid "Software License Manager Settings" 240 245 msgstr "تنظیمات پلاگین SLM" 241 246 242 #: ../includes/settings.php:4 2247 #: ../includes/settings.php:45 ../old/includes/settings.php:45 243 248 msgid "API URL" 244 249 msgstr "لینک API" 245 250 246 #: ../includes/settings.php:4 3251 #: ../includes/settings.php:46 ../old/includes/settings.php:46 247 252 msgid "" 248 253 "The URL for the site that has the Software License Manager plugin installed." 249 254 msgstr "آدرس سایتی که افزونه Software License Manager نصب شده است." 250 255 251 #: ../includes/settings.php:5 0256 #: ../includes/settings.php:53 ../old/includes/settings.php:53 252 257 msgid "Secret Key for Creation" 253 258 msgstr "کدرمز برای ساخت" 254 259 255 #: ../includes/settings.php:5 1260 #: ../includes/settings.php:54 ../old/includes/settings.php:54 256 261 msgid "" 257 262 "This secret key will be used to authenticate any license creation request. " … … 263 268 "افزونه Software License Manager تنظیم کرده اید." 264 269 265 #: ../includes/settings.php: 59270 #: ../includes/settings.php:62 ../old/includes/settings.php:62 266 271 msgid "Secret Key for Verfication" 267 272 msgstr "کدرمز برای تایید" 268 273 269 #: ../includes/settings.php:6 0274 #: ../includes/settings.php:63 ../old/includes/settings.php:63 270 275 msgid "" 271 276 "This secret key will be used to authenticate any license verfication " … … 278 283 "تنظیمات افزونه Software License Manager تنظیم کرده اید." 279 284 280 #: ../includes/settings.php: 68285 #: ../includes/settings.php:71 ../old/includes/settings.php:71 281 286 msgid "Enable Debug Logging" 282 287 msgstr "فعال سازی حالت دیباگ" 283 288 284 #: ../includes/settings.php:7 1289 #: ../includes/settings.php:74 ../old/includes/settings.php:74 285 290 msgid "" 286 291 "If checked, debug messages will be written to slm_log.txt in the root of " … … 290 295 "نوشته می شوند" 291 296 297 #: ../wc-software-license-manager.php:156 298 msgid "Software License Manager for Woocommerce" 299 msgstr "لایسنس منیجر برای ووکامرس بر مبنای SLM" 300 301 #: ../wc-software-license-manager.php:157 302 msgid "Seamless integration between Woocommerce and Software License Manager" 303 msgstr "یکپارچه سازی ووکارس با پلاگین مدیریت لایسنس(Software License Manager)" 304 292 305 #~ msgid "Enable licensing for this download." 293 306 #~ msgstr "فعال سازی لایسنس برای این محصول" … … 301 314 #~ msgid "Secret Key" 302 315 #~ msgstr "کد رمز پلاگین SLM" 303 304 #~ msgid ""305 #~ "Seamless integration between Woocommerce and Software License "306 #~ "Manager(adopted from EDD Software License Manager -thanks to flowdee "307 #~ "<coder@flowdee.de>)"308 #~ msgstr ""309 #~ "یکپارچه سازی ووکارس با پلاگین مدیریت لایسنس(برگرفته از پلاگین EDD "310 #~ "Software License Manager - سپاس از نویسنده آن flowdee <coder@flowdee.de> )"311 316 312 317 #~ msgid "EDD Software License Manager Settings" -
wc-software-license-manager/trunk/wc-software-license-manager.php
r2509622 r3366500 1 1 <?php 2 2 /** 3 * Plugin Name: WC Software License Manager3 * Plugin Name: Software License Manager for Woocommerce 4 4 * Plugin URI: https://github.com/shamloo/wc-software-license-manager 5 5 * Description: Seamless integration between Woocommerce and Software License Manager 6 * Version: 2. 0.27 * Author: Omid Shaml u8 * Author URI: http ://wp-master.ir6 * Version: 2.1 7 * Author: Omid Shamloo 8 * Author URI: https://wp-master.ir 9 9 * Text Domain: wc-slm 10 10 * Domain Path: /languages 11 11 * WC requires at least 2.5.0 12 * WC tested up to: 3.2.0 12 * WC tested up to: 10.2.1 13 * Requires Plugins: woocommerce 13 14 * 14 15 * 15 * Copyright 2015-2017 Omid Shamloo - http ://wp-master.ir16 * Copyright 2015-2017 Omid Shamloo - https://wp-master.ir 16 17 * Copyright 2017-2018 Anthony Hortin - https://maddisondesigns.com 18 * Copyright 2018-2025 Omid Shamloo - https://wp-master.ir 17 19 */ 18 20 19 21 // TODO: 20 22 // https://wordpress.org/support/topic/modifying-for-variable-products 21 // Add option to recreate manual li nense in order edit page23 // Add option to recreate manual license in order edit page 22 24 // Add license columns in order table lists 23 25 … … 26 28 exit; 27 29 } 30 31 32 /** 33 * activate action 34 * like redirect to admin settings and ... 35 */ 36 register_activation_hook(__FILE__, ['WC_SLM', 'activation_hook']); 37 add_action('plugins_loaded', ['WC_SLM', 'plugins_loaded']); 38 39 40 // WC Hpos 41 add_action('before_woocommerce_init', function () { 42 if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) { 43 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true); 44 } 45 }); 46 28 47 29 48 if (!class_exists('WC_SLM')) { … … 135 154 // Load the default language files 136 155 load_plugin_textdomain('wc-slm', false, 'wc-software-license-manager/languages'); 156 __('Software License Manager for Woocommerce', 'wc-slm'); 157 __('Seamless integration between Woocommerce and Software License Manager', 'wc-slm'); 137 158 } 138 159 … … 159 180 { 160 181 // nothing 182 } 183 184 public static function activation_hook() 185 { 186 add_option('wpm_wcslm_redirect_after_activation_option', true); 187 } 188 189 public static function plugins_loaded() 190 { 191 192 if (get_option('wpm_wcslm_redirect_after_activation_option', false)) { 193 delete_option('wpm_wcslm_redirect_after_activation_option'); 194 exit(wp_redirect(admin_url('admin.php?page=wc-settings&tab=products§ion=wc_slm'))); 195 } 196 161 197 } 162 198 }
Note: See TracChangeset
for help on using the changeset viewer.