Skip to content

Commit

Permalink
1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBeycan committed Nov 28, 2024
1 parent 128ae4e commit d1e8aab
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
32 changes: 21 additions & 11 deletions classes/pro/MeprCryptoPayGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
// @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
// @phpcs:disable SlevomatCodingStandard.TypeHints.ParameterTypeHint

use BeycanPress\CryptoPay\Helpers;
use BeycanPress\CryptoPay\Payment;
use BeycanPress\CryptoPay\Settings;
use BeycanPress\CryptoPay\PluginHero\Hook;
use BeycanPress\CryptoPay\PluginHero\Helpers;
use BeycanPress\CryptoPay\Types\Order\OrderType;

// @phpcs:ignore
Expand Down Expand Up @@ -98,11 +98,15 @@ public function __construct()
{
$this->name = __('CryptoPay', 'memberpress-cryptopay');
$this->key = 'cryptopay';
$this->icon = MEMBERPRESS_CRYPTOPAY_URL . 'assets/images/icon.png';
$this->desc = __('Pay with cryptocurrencies via CryptoPay', 'memberpress-cryptopay');
$this->desc = __('Pay with cryptocurrencies.', 'memberpress-cryptopay');
$this->set_defaults();
$this->has_spc_form = true;

if (!Helpers::getProp('licenseIsWhiteLabel', false)) {
$this->icon = MEMBERPRESS_CRYPTOPAY_URL . 'assets/images/icon.png';
$this->desc = __('Pay with cryptocurrencies via CryptoPay.', 'memberpress-cryptopay');
}

$this->capabilities = [
'process-payments',
'cancel-subscriptions'
Expand Down Expand Up @@ -141,16 +145,20 @@ protected function set_defaults(): void
[
'id' => $this->generate_id(),
'gateway' => __CLASS__,
'icon' => MEMBERPRESS_CRYPTOPAY_URL . 'assets/images/icon.png',
'label' => __('CryptoPay', 'memberpress-cryptopay'),
'desc' => __('Pay with cryptocurrencies via CryptoPay', 'memberpress-cryptopay'),
'desc' => __('Pay with cryptocurrencies.', 'memberpress-cryptopay'),
'use_label' => true,
'use_icon' => true,
'use_desc' => true,
],
(array) $this->settings
);

if (!Helpers::getProp('licenseIsWhiteLabel', false)) {
$this->settings->icon = MEMBERPRESS_CRYPTOPAY_URL . 'assets/images/icon.png';
$this->settings->desc = __('Pay with cryptocurrencies via CryptoPay.', 'memberpress-cryptopay');
}

$this->id = $this->settings->id;
$this->label = $this->settings->label;
$this->use_label = $this->settings->use_label;
Expand All @@ -163,12 +171,14 @@ protected function set_defaults(): void
*/
public function enqueue_payment_form_scripts(): void
{
wp_enqueue_style(
'mepr-cryptopay-form',
MEMBERPRESS_CRYPTOPAY_URL . '/assets/css/main.css',
[],
MEMBERPRESS_CRYPTOPAY_VERSION
);
if (!Helpers::getProp('licenseIsWhiteLabel', false)) {
wp_enqueue_style(
'mepr-cryptopay-form',
MEMBERPRESS_CRYPTOPAY_URL . '/assets/css/main.css',
[],
MEMBERPRESS_CRYPTOPAY_VERSION
);
}
}

// Process payment
Expand Down
12 changes: 7 additions & 5 deletions cryptopay-gateway-for-memberpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* Plugin Name: CryptoPay Gateway for MemberPress
* Version: 1.0.5
* Version: 1.0.6
* Plugin URI: https://beycanpress.com/cryptopay/
* Description: Adds Cryptocurrency payment gateway (CryptoPay) for MemberPress.
* Author: BeycanPress LLC
Expand All @@ -21,7 +21,7 @@
* Text Domain: memberpress-cryptopay
* Tags: Bitcoin, Ethereum, Cryptocurrency, Payments, MemberPress
* Requires at least: 5.0
* Tested up to: 6.6
* Tested up to: 6.7.1
* Requires PHP: 8.1
*/

Expand All @@ -33,7 +33,7 @@
use BeycanPress\CryptoPayLite\PluginHero\Hook as LiteHook;

define('MEMBERPRESS_CRYPTOPAY_FILE', __FILE__);
define('MEMBERPRESS_CRYPTOPAY_VERSION', '1.0.4');
define('MEMBERPRESS_CRYPTOPAY_VERSION', '1.0.6');
define('MEMBERPRESS_CRYPTOPAY_URL', plugin_dir_url(__FILE__));
define('MEMBERPRESS_CRYPTOPAY_DIR', plugin_dir_path(__FILE__));

Expand Down Expand Up @@ -74,12 +74,14 @@ function memberpress_cryptopay_addModels(): void

memberpress_cryptopay_addModels();

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

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

memberpress_cryptopay_addModels();

load_plugin_textdomain('memberpress-cryptopay', false, basename(__DIR__) . '/languages');

if (!defined('MEPR_VERSION')) {
add_action('admin_notices', function (): void {
?>
Expand Down
10 changes: 7 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, Cryptocurrency, Payments, MemberPress
Requires at least: 5.0
Tested up to: 6.6
Tested up to: 6.7.1
Requires PHP: 8.1
Stable Tag: 1.0.5
Version: 1.0.5
Stable Tag: 1.0.6
Version: 1.0.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -64,6 +64,10 @@ You can easily translate with Loco translate.

== Changelog ==

= 1.0.6 =
* Updated: Compatibility for CryptoPay Premium White Label
* Fixed: Text domain warning

= 1.0.4 =
* Updated: Fixed welcome emails not works

Expand Down

0 comments on commit d1e8aab

Please sign in to comment.