Plugin Directory

Changeset 3011891


Ignore:
Timestamp:
12/19/2023 11:50:12 AM (2 years ago)
Author:
woosms
Message:

version 3.0.5

Location:
woosms-sms-module-for-woocommerce/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • woosms-sms-module-for-woocommerce/trunk/readme.txt

    r3003216 r3011891  
    160160
    161161== Changelog ==
     162**3.0.5**
     163* cURL implementation
     164* BulkGate/plugins 1.0.1
     165
    162166= 3.0.4 =
    163167* Order Payment Hook fix transaction_id type hint
  • woosms-sms-module-for-woocommerce/trunk/src/Eshop/LanguageWordpress.php

    r2995624 r3011891  
    1717        $output = [];
    1818
    19         if (is_plugin_active('sitepress-multilingual-cms-master/sitepress.php') || is_plugin_active('sitepress-multilingual-cms/sitepress.php'))
     19        if ($this->hasMultiLanguageSupport())
    2020        {
    2121            $languages = apply_filters('wpml_active_languages', null, 'orderby=id&order=desc');
     
    3737    public function get(?int $id = null): string
    3838    {
    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'))
    4340        {
    4441            return $id === null ? ICL_LANGUAGE_CODE : ((string) get_post_meta($id, 'wpml_language', true) ?: ICL_LANGUAGE_CODE);
     
    4946        }
    5047    }
     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    }
    5154}
  • woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/composer.json

    r2995624 r3011891  
    1818        "ext-mbstring": "*",
    1919        "ext-zlib": "*",
    20         "ext-intl": "*"
     20        "ext-intl": "*",
     21        "ext-curl": "*"
    2122    },
    2223    "require-dev": {
  • woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/Eshop/Language.php

    r2995624 r3011891  
    1717
    1818    public function get(?int $id = null): string;
     19
     20
     21    public function hasMultiLanguageSupport(): bool;
    1922}
  • woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/IO/ConnectionFactory.php

    r2995624 r3011891  
    4949        };
    5050
    51         return new ConnectionStream($token_factory);
     51        return extension_loaded('curl') ? new ConnectionCurl($token_factory) : new ConnectionStream($token_factory);
    5252    }
    5353}
  • woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/IO/ConnectionStream.php

    r2995624 r3011891  
    4141                "Content-type: $request->content_type",
    4242                "Authorization: Bearer $this->jwt_token",
    43                 //"Cookie: XDEBUG_SESSION=10355" //debugging purpose only
    4443            ],
    4544            'content' => $request->serialize(),
     
    5049        $connection = fopen($request->url, 'r', false, $context);
    5150
    52         if ($connection)
     51        try
    5352        {
    54             try
     53            if ($connection)
    5554            {
    5655                $response = (string) stream_get_contents($connection);
     
    6362                }
    6463            }
    65             finally
    66             {
    67                 fclose($connection);
    68             }
     64            return new Response('{"error":"Server Unavailable. Try contact your hosting provider."}', 'application/json');
    6965        }
    70 
    71         return new Response('{"error":"Server Unavailable. Try contact your hosting provider."}', 'application/json');
     66        finally
     67        {
     68            $connection !== false && fclose($connection);
     69        }
    7270    }
    7371}
  • woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/IO/Helpers.php

    r2995624 r3011891  
    2424        return null;
    2525    }
     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    }
    2638}
  • woosms-sms-module-for-woocommerce/trunk/vendor/bulkgate/plugin/src/Settings/Settings.php

    r2995624 r3011891  
    99
    1010use BulkGate\Plugin\{Settings\Repository\Entity\Setting, Strict, Structure\Collection};
    11 use function array_key_exists, array_merge;
     11use function array_key_exists, array_merge, preg_match;
    1212
    1313class Settings
     
    2020    private array $settings = [];
    2121
     22    /**
     23     * @var array<string, mixed>
     24     */
     25    private array $default_settings = [];
     26
    2227    private Repository\Settings $repository;
    2328
     
    2631        $this->repository = $repository;
    2732    }
     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
    2848
    2949
     
    4666                return ($this->settings[$scope][$key]->value);
    4767            }
    48             return null;
     68            return $this->default_settings[$settings_key] ?? null;
    4969        }
    5070        return $this->settings[$scope]->toArray();
  • woosms-sms-module-for-woocommerce/trunk/vendor/composer/autoload_classmap.php

    r2995624 r3011891  
    4646    'BulkGate\\Plugin\\Helpers' => $vendorDir . '/bulkgate/plugin/src/Helpers.php',
    4747    'BulkGate\\Plugin\\IO\\Connection' => $vendorDir . '/bulkgate/plugin/src/IO/Connection.php',
     48    'BulkGate\\Plugin\\IO\\ConnectionCurl' => $vendorDir . '/bulkgate/plugin/src/IO/ConnectionCurl.php',
    4849    'BulkGate\\Plugin\\IO\\ConnectionFactory' => $vendorDir . '/bulkgate/plugin/src/IO/ConnectionFactory.php',
    4950    'BulkGate\\Plugin\\IO\\ConnectionStream' => $vendorDir . '/bulkgate/plugin/src/IO/ConnectionStream.php',
  • woosms-sms-module-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r2995624 r3011891  
    4747        'BulkGate\\Plugin\\Helpers' => __DIR__ . '/..' . '/bulkgate/plugin/src/Helpers.php',
    4848        'BulkGate\\Plugin\\IO\\Connection' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/Connection.php',
     49        'BulkGate\\Plugin\\IO\\ConnectionCurl' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/ConnectionCurl.php',
    4950        'BulkGate\\Plugin\\IO\\ConnectionFactory' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/ConnectionFactory.php',
    5051        'BulkGate\\Plugin\\IO\\ConnectionStream' => __DIR__ . '/..' . '/bulkgate/plugin/src/IO/ConnectionStream.php',
  • woosms-sms-module-for-woocommerce/trunk/vendor/composer/installed.json

    r2999526 r3011891  
    33        {
    44            "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",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/BulkGate/plugin.git",
    10                 "reference": "c051c684f9fb1f1c312ec5fb3aaa35f3483e8c28"
     10                "reference": "f1fbe7b48261462bfc87456c71d74c5824169377"
    1111            },
    1212            "dist": {
    1313                "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",
    1616                "shasum": ""
    1717            },
    1818            "require": {
     19                "ext-curl": "*",
    1920                "ext-intl": "*",
    2021                "ext-json": "*",
     
    3031                "tracy/tracy": "^2.9"
    3132            },
    32             "time": "2023-11-21T11:11:11+00:00",
     33            "time": "2023-12-06T12:19:36+00:00",
    3334            "type": "library",
    3435            "installation-source": "dist",
     
    4849            "support": {
    4950                "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"
    5152            },
    5253            "install-path": "../bulkgate/plugin"
  • woosms-sms-module-for-woocommerce/trunk/vendor/composer/installed.php

    r2999526 r3011891  
    22    'root' => array(
    33        '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',
    77        'type' => 'project',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        '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',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../bulkgate/plugin',
     
    2121        ),
    2222        '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',
    2626            'type' => 'project',
    2727            'install_path' => __DIR__ . '/../../',
  • woosms-sms-module-for-woocommerce/trunk/woosms-sms-module-for-woocommerce.php

    r3003216 r3011891  
    55 * Plugin URI: https://www.bulkgate.com/en/integrations/sms-plugin-for-woocommerce/
    66 * Description: Notify your customers about order status via SMS notifications.
    7  * Version: 3.0.4
     7 * Version: 3.0.5
    88 * Author: BulkGate
    99 * Author URI: https://www.bulkgate.com/
Note: See TracChangeset for help on using the changeset viewer.