From f8968f1600379049c6a18b7a5efd56edab4e7cb1 Mon Sep 17 00:00:00 2001 From: BeycanDeveloper Date: Thu, 28 Nov 2024 14:31:34 +0300 Subject: [PATCH] fixed text domain warning --- cryptopay-gateway-for-memberdash.php | 10 ++++++---- readme.txt | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cryptopay-gateway-for-memberdash.php b/cryptopay-gateway-for-memberdash.php index 2f5b2bc..601c3ad 100644 --- a/cryptopay-gateway-for-memberdash.php +++ b/cryptopay-gateway-for-memberdash.php @@ -11,7 +11,7 @@ /** * Plugin Name: CryptoPay Gateway for MemberDash - * Version: 1.0.1 + * Version: 1.0.2 * Plugin URI: https://beycanpress.com/cryptopay/ * Description: Adds Cryptocurrency payment gateway (CryptoPay) for MemberDash. * Author: BeycanPress LLC @@ -31,7 +31,7 @@ use BeycanPress\CryptoPay\Integrator\Helpers; define('MD_CRYPTOPAY_FILE', __FILE__); -define('MD_CRYPTOPAY_VERSION', '1.0.1'); +define('MD_CRYPTOPAY_VERSION', '1.0.2'); define('MD_CRYPTOPAY_URL', plugin_dir_url(__FILE__)); define('MD_CRYPTOPAY_DIR', plugin_dir_path(__FILE__)); @@ -46,12 +46,14 @@ function memberdash_cryptopay_addModels(): void memberdash_cryptopay_addModels(); +add_action('init', function (): void { + load_plugin_textdomain('cryptopay-gateway-for-memberdash', false, basename(__DIR__) . '/languages'); +}); + add_action('plugins_loaded', function (): void { memberdash_cryptopay_addModels(); - load_plugin_textdomain('cryptopay-gateway-for-memberdash', false, basename(__DIR__) . '/languages'); - if (!defined('MEMBERDASH_VERSION')) { Helpers::requirePluginMessage('MemberDash', 'https://www.learndash.com/memberdash-plugin/', false); } elseif (Helpers::bothExists()) { diff --git a/readme.txt b/readme.txt index ebef4af..29dbb7a 100644 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Tags: Bitcoin, Ethereum, Cryptocurrency, Payments, MemberDash Requires at least: 5.0 Tested up to: 6.7.1 Requires PHP: 8.1 -Stable Tag: 1.0.1 -Version: 1.0.1 +Stable Tag: 1.0.2 +Version: 1.0.2 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -61,5 +61,8 @@ You can easily translate with Loco translate. == Changelog == += 1.0.2 = +* Fixed: Text domain warning. + = 1.0.0 = * Plugin released.