Changeset 3011891
- Timestamp:
- 12/19/2023 11:50:12 AM (2 years ago)
- Location:
- woosms-sms-module-for-woocommerce/trunk
- Files:
-
- 13 edited
-
readme.txt (modified) (1 diff)
-
src/Eshop/LanguageWordpress.php (modified) (3 diffs)
-
vendor/bulkgate/plugin/composer.json (modified) (1 diff)
-
vendor/bulkgate/plugin/src/Eshop/Language.php (modified) (1 diff)
-
vendor/bulkgate/plugin/src/IO/ConnectionFactory.php (modified) (1 diff)
-
vendor/bulkgate/plugin/src/IO/ConnectionStream.php (modified) (3 diffs)
-
vendor/bulkgate/plugin/src/IO/Helpers.php (modified) (1 diff)
-
vendor/bulkgate/plugin/src/Settings/Settings.php (modified) (4 diffs)
-
vendor/composer/autoload_classmap.php (modified) (1 diff)
-
vendor/composer/autoload_static.php (modified) (1 diff)
-
vendor/composer/installed.json (modified) (3 diffs)
-
vendor/composer/installed.php (modified) (3 diffs)
-
woosms-sms-module-for-woocommerce.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woosms-sms-module-for-woocommerce/trunk/readme.txt
r3003216 r3011891 160 160 161 161 == Changelog == 162 **3.0.5** 163 * cURL implementation 164 * BulkGate/plugins 1.0.1 165 162 166 = 3.0.4 = 163 167 * Order Payment Hook fix transaction_id type hint -
woosms-sms-module-for-woocommerce/trunk/src/Eshop/LanguageWordpress.php
r2995624 r3011891 17 17 $output = []; 18 18 19 if ( is_plugin_active('sitepress-multilingual-cms-master/sitepress.php') || is_plugin_active('sitepress-multilingual-cms/sitepress.php'))19 if ($this->hasMultiLanguageSupport()) 20 20 { 21 21 $languages = apply_filters('wpml_active_languages', null, 'orderby=id&order=desc'); … … 37 37 public function get(?int $id = null): string 38 38 { 39 if ( 40 (is_plugin_active('sitepress-multilingual-cms-master/sitepress.php') || is_plugin_active('sitepress-multilingual-cms/sitepress.php')) && 41 defined('ICL_LANGUAGE_CODE') 42 ) 39 if ($this->hasMultiLanguageSupport() && defined('ICL_LANGUAGE_CODE')) 43 40 { 44 41 return $id === null ? ICL_LANGUAGE_CODE : ((string) get_post_meta($id, 'wpml_language', true) ?: ICL_LANGUAGE_CODE); … … 49 46 } 50 47 } 48 49 50 public function hasMultiLanguageSupport(): bool 51 { 52 return is_plugin_active('sitepress-multilingual-cms-master/sitepress.php') || is_plugin_active('sitepress-multilingual-cms/sitepress.php'); 53 } 51 54 } -
woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/composer.json
r2995624 r3011891 18 18 "ext-mbstring": "*", 19 19 "ext-zlib": "*", 20 "ext-intl": "*" 20 "ext-intl": "*", 21 "ext-curl": "*" 21 22 }, 22 23 "require-dev": { -
woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/Eshop/Language.php
r2995624 r3011891 17 17 18 18 public function get(?int $id = null): string; 19 20 21 public function hasMultiLanguageSupport(): bool; 19 22 } -
woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/IO/ConnectionFactory.php
r2995624 r3011891 49 49 }; 50 50 51 return new ConnectionStream($token_factory);51 return extension_loaded('curl') ? new ConnectionCurl($token_factory) : new ConnectionStream($token_factory); 52 52 } 53 53 } -
woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/IO/ConnectionStream.php
r2995624 r3011891 41 41 "Content-type: $request->content_type", 42 42 "Authorization: Bearer $this->jwt_token", 43 //"Cookie: XDEBUG_SESSION=10355" //debugging purpose only44 43 ], 45 44 'content' => $request->serialize(), … … 50 49 $connection = fopen($request->url, 'r', false, $context); 51 50 52 if ($connection)51 try 53 52 { 54 try53 if ($connection) 55 54 { 56 55 $response = (string) stream_get_contents($connection); … … 63 62 } 64 63 } 65 finally 66 { 67 fclose($connection); 68 } 64 return new Response('{"error":"Server Unavailable. Try contact your hosting provider."}', 'application/json'); 69 65 } 70 71 return new Response('{"error":"Server Unavailable. Try contact your hosting provider."}', 'application/json'); 66 finally 67 { 68 $connection !== false && fclose($connection); 69 } 72 70 } 73 71 } -
woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/IO/Helpers.php
r2995624 r3011891 24 24 return null; 25 25 } 26 27 28 public static function getContentTypeWithoutCoding(string $content_type): string 29 { 30 if (preg_match('~^([^;]+)~', $content_type, $m)) 31 { 32 [, $content_type] = $m; 33 34 return $content_type; 35 } 36 return 'application/json'; 37 } 26 38 } -
woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/Settings/Settings.php
r2995624 r3011891 9 9 10 10 use BulkGate\Plugin\{Settings\Repository\Entity\Setting, Strict, Structure\Collection}; 11 use function array_key_exists, array_merge ;11 use function array_key_exists, array_merge, preg_match; 12 12 13 13 class Settings … … 20 20 private array $settings = []; 21 21 22 /** 23 * @var array<string, mixed> 24 */ 25 private array $default_settings = []; 26 22 27 private Repository\Settings $repository; 23 28 … … 26 31 $this->repository = $repository; 27 32 } 33 34 35 /** 36 * @param array<array-key, mixed> $settings 37 */ 38 public function setDefaultSettings(array $settings): void 39 { 40 $this->default_settings = []; 41 42 foreach ($settings as $key => $value) if (is_string($key) && preg_match('~^[\w_-]+?:?[\w_-]+?$~U', $key)) 43 { 44 $this->default_settings[$key] = $value; 45 } 46 } 47 28 48 29 49 … … 46 66 return ($this->settings[$scope][$key]->value); 47 67 } 48 return null;68 return $this->default_settings[$settings_key] ?? null; 49 69 } 50 70 return $this->settings[$scope]->toArray(); -
woosms-sms-module-for-woocommerce/trunk/vendor/composer/autoload_classmap.php
r2995624 r3011891 46 46 'BulkGate\\Plugin\\Helpers' => $vendorDir . '/bulkgate/plugin/src/Helpers.php', 47 47 'BulkGate\\Plugin\\IO\\Connection' => $vendorDir . '/bulkgate/plugin/src/IO/Connection.php', 48 'BulkGate\\Plugin\\IO\\ConnectionCurl' => $vendorDir . '/bulkgate/plugin/src/IO/ConnectionCurl.php', 48 49 'BulkGate\\Plugin\\IO\\ConnectionFactory' => $vendorDir . '/bulkgate/plugin/src/IO/ConnectionFactory.php', 49 50 'BulkGate\\Plugin\\IO\\ConnectionStream' => $vendorDir . '/bulkgate/plugin/src/IO/ConnectionStream.php', -
woosms-sms-module-for-woocommerce/trunk/vendor/composer/autoload_static.php
r2995624 r3011891 47 47 'BulkGate\\Plugin\\Helpers' => __DIR__ . '/..' . '/bulkgate/plugin/src/Helpers.php', 48 48 'BulkGate\\Plugin\\IO\\Connection' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/Connection.php', 49 'BulkGate\\Plugin\\IO\\ConnectionCurl' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/ConnectionCurl.php', 49 50 'BulkGate\\Plugin\\IO\\ConnectionFactory' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/ConnectionFactory.php', 50 51 'BulkGate\\Plugin\\IO\\ConnectionStream' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/ConnectionStream.php', -
woosms-sms-module-for-woocommerce/trunk/vendor/composer/installed.json
r2999526 r3011891 3 3 { 4 4 "name": "bulkgate/plugin", 5 "version": "1.0. 0",6 "version_normalized": "1.0. 0.0",5 "version": "1.0.1", 6 "version_normalized": "1.0.1.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/BulkGate/plugin.git", 10 "reference": " c051c684f9fb1f1c312ec5fb3aaa35f3483e8c28"10 "reference": "f1fbe7b48261462bfc87456c71d74c5824169377" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/BulkGate/plugin/zipball/ c051c684f9fb1f1c312ec5fb3aaa35f3483e8c28",15 "reference": " c051c684f9fb1f1c312ec5fb3aaa35f3483e8c28",14 "url": "https://api.github.com/repos/BulkGate/plugin/zipball/f1fbe7b48261462bfc87456c71d74c5824169377", 15 "reference": "f1fbe7b48261462bfc87456c71d74c5824169377", 16 16 "shasum": "" 17 17 }, 18 18 "require": { 19 "ext-curl": "*", 19 20 "ext-intl": "*", 20 21 "ext-json": "*", … … 30 31 "tracy/tracy": "^2.9" 31 32 }, 32 "time": "2023-1 1-21T11:11:11+00:00",33 "time": "2023-12-06T12:19:36+00:00", 33 34 "type": "library", 34 35 "installation-source": "dist", … … 48 49 "support": { 49 50 "issues": "https://github.com/BulkGate/plugin/issues", 50 "source": "https://github.com/BulkGate/plugin/tree/1.0. 0"51 "source": "https://github.com/BulkGate/plugin/tree/1.0.1" 51 52 }, 52 53 "install-path": "../bulkgate/plugin" -
woosms-sms-module-for-woocommerce/trunk/vendor/composer/installed.php
r2999526 r3011891 2 2 'root' => array( 3 3 'name' => 'bulkgate/woosms', 4 'pretty_version' => '3.0. 3',5 'version' => '3.0. 3.0',6 'reference' => ' 0371d4f0ca9106920cf5d811833d6326370fb582',4 'pretty_version' => '3.0.5', 5 'version' => '3.0.5.0', 6 'reference' => 'e56aa39534ba13e21955856b0dab1d02d613dd59', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'bulkgate/plugin' => array( 14 'pretty_version' => '1.0. 0',15 'version' => '1.0. 0.0',16 'reference' => ' c051c684f9fb1f1c312ec5fb3aaa35f3483e8c28',14 'pretty_version' => '1.0.1', 15 'version' => '1.0.1.0', 16 'reference' => 'f1fbe7b48261462bfc87456c71d74c5824169377', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../bulkgate/plugin', … … 21 21 ), 22 22 'bulkgate/woosms' => array( 23 'pretty_version' => '3.0. 3',24 'version' => '3.0. 3.0',25 'reference' => ' 0371d4f0ca9106920cf5d811833d6326370fb582',23 'pretty_version' => '3.0.5', 24 'version' => '3.0.5.0', 25 'reference' => 'e56aa39534ba13e21955856b0dab1d02d613dd59', 26 26 'type' => 'project', 27 27 'install_path' => __DIR__ . '/../../', -
woosms-sms-module-for-woocommerce/trunk/woosms-sms-module-for-woocommerce.php
r3003216 r3011891 5 5 * Plugin URI: https://www.bulkgate.com/en/integrations/sms-plugin-for-woocommerce/ 6 6 * Description: Notify your customers about order status via SMS notifications. 7 * Version: 3.0. 47 * Version: 3.0.5 8 8 * Author: BulkGate 9 9 * Author URI: https://www.bulkgate.com/
Note: See TracChangeset
for help on using the changeset viewer.