Skip to content

Commit

Permalink
fixed text domain warning
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBeycan committed Nov 28, 2024
1 parent 11fe403 commit 910bdba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
12 changes: 7 additions & 5 deletions cryptopay-gateway-for-ninjaforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* Plugin Name: CryptoPay Gateway for Ninja Forms
* Version: 1.0.0
* Version: 1.0.1
* Plugin URI: https://beycanpress.com/cryptopay/
* Description: Adds Cryptocurrency payment gateway (CryptoPay) for Ninja Forms.
* Author: BeycanPress LLC
Expand All @@ -21,15 +21,15 @@
* Text Domain: ninjaforms-cryptopay
* Tags: Bitcoin, Ethereum, Crypto, Payment, Ninja Forms
* Requires at least: 5.0
* Tested up to: 6.6
* Tested up to: 6.7.1
* Requires PHP: 8.1
*/

// Autoload
require_once __DIR__ . '/vendor/autoload.php';

define('NINJA_FORMS_CRYPTOPAY_FILE', __FILE__);
define('NINJA_FORMS_CRYPTOPAY_VERSION', '1.0.0');
define('NINJA_FORMS_CRYPTOPAY_VERSION', '1.0.1');
define('NINJA_FORMS_CRYPTOPAY_KEY', basename(__DIR__));
define('NINJA_FORMS_CRYPTOPAY_URL', plugin_dir_url(__FILE__));
define('NINJA_FORMS_CRYPTOPAY_DIR', plugin_dir_path(__FILE__));
Expand All @@ -48,13 +48,15 @@ function nfCryptoPayRegisterModels(): void

nfCryptoPayRegisterModels();

load_plugin_textdomain('ninjaforms-cryptopay', false, basename(__DIR__) . '/languages');
add_action('init', function (): void {
load_plugin_textdomain('ninjaforms-cryptopay', false, basename(__DIR__) . '/languages');
});

add_action('plugins_loaded', function (): void {
nfCryptoPayRegisterModels();

if (!class_exists('Ninja_Forms')) {
Helpers::requirePluginMessage('Ninja Forms', 'https://wordpress.org/plugins/ninja-forms/');
Helpers::requirePluginMessage('Ninja Forms', admin_url('plugin-install.php?s=Ninja%2520Forms&tab=search&type=term'));
} elseif (Helpers::bothExists()) {
new BeycanPress\CryptoPay\NinjaForms\Loader();
} else {
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Contributors: BeycanPress
Tags: Bitcoin, Ethereum, Crypto, Payment, Ninja Forms
Requires at least: 5.0
Tested up to: 6.6
Tested up to: 6.7.1
Requires PHP: 8.1
Stable Tag: 1.0.0
Version: 1.0.0
Stable Tag: 1.0.1
Version: 1.0.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -69,5 +69,8 @@ You can easily translate with Loco translate.

== Changelog ==

= 1.0.1 =
* Fixed: Text domain warning.

= 1.0.0 =
* Plugin released.

0 comments on commit 910bdba

Please sign in to comment.