Skip to content

Commit

Permalink
Release 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrososa committed Mar 27, 2024
1 parent 55c1db5 commit e767bc7
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ This repository contains the wallee Subscriptions addon that enables WooCommerce

## License

Please see the [license file](https://github.com/wallee-payment/woocommerce-subscription/blob/1.1.3/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/woocommerce-subscription/blob/1.1.4/LICENSE) for more information.

3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ Bug fix, if space_view_id is not set, it does not send it to the service portal.
= 1.1.3 - December 6, 2023 =
- [BugFix] Allow changing payment method for active subscriptions with latest woo-subscriptions

= 1.1.4 - March 19, 2024 =
- [BugFix] Improved dependency detection: The plugin can now identify the base plugin even if the exact name varies slightly.

5 changes: 3 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" value="wallee, WooCommerce, Wordpress Plugin, WooCommerce Extension, WooCommerce Subscriptions, Subscriptions, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the wallee Subscription plugin that enables processing subscriptions with wallee."> <link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/woocommerce-subscription/master/docs/en/documentation.html" />
<meta name="keywords" value="wallee, WooCommerce, Wordpress Plugin, WooCommerce Extension, WooCommerce Subscriptions, Subscriptions, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the wallee Subscription plugin that enables processing subscriptions with wallee.">
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/woocommerce-subscription/master/docs/en/documentation.html" />
<title>Documentation</title>
<link href="assets/monokai-sublime.css" rel="stylesheet" />
<link href="assets/base.css" rel="stylesheet" />
Expand All @@ -22,7 +23,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/woocommerce-subscription/releases/tag/1.1.3/">
<a href="https://github.com/wallee-payment/woocommerce-subscription/releases/tag/1.1.4/">
Source
</a>
</li>
Expand Down
4 changes: 3 additions & 1 deletion includes/admin/class-wc-wallee-subscription-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ private function init_hooks() {
* @return void
*/
public function handle_modules_active() {
// Gets the plugin's base full name.
$plugin_base_name = WC_Wallee_Subscription_Migration::get_base_plugin_name();
// Subscription plugin or base plugin not activated.
if ( ! is_plugin_active( 'woocommerce-subscriptions/woocommerce-subscriptions.php' ) || ! is_plugin_active( 'woo-wallee/woocommerce-wallee.php' ) ) {
if ( ! is_plugin_active( 'woocommerce-subscriptions/woocommerce-subscriptions.php' ) || ! is_plugin_active( $plugin_base_name ) ) {
// Deactivate plugin.
deactivate_plugins( WC_WALLEE_SUBSCRIPTION_PLUGIN_BASENAME );
add_action(
Expand Down
31 changes: 29 additions & 2 deletions includes/class-wc-wallee-subscription-migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ private static function check_requirements() {

$errors = array();

if ( ! is_plugin_active( 'woo-wallee/woocommerce-wallee.php' ) ) {
// Get the full name of the base plugin, which is a dependency.
$plugin_base_name = self::get_base_plugin_name();

if ( ! is_plugin_active( $plugin_base_name ) ) {
/* translators: %s is replaced with "string" */
$errors[] = sprintf( __( 'wallee %s+ has to be active.', 'woo-wallee-subscription' ), WC_WALLEE_SUBSCRIPTION_REQUIRED_WALLEE_VERSION );
} else {
$base_module_data = get_plugin_data( WP_PLUGIN_DIR . '/woo-wallee/woocommerce-wallee.php', false, false );
$base_module_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_base_name, false, false );

if ( version_compare( $base_module_data['Version'], WC_WALLEE_SUBSCRIPTION_REQUIRED_WALLEE_VERSION, '<' ) ) {
/* translators: %s is replaced with "string" */
Expand Down Expand Up @@ -213,6 +216,30 @@ public static function check_version() {
}
}
}

/**
* Returns the full name of the base plugin, as installed in the system.
* This is needed because the full name can be different if installed from a zip file.
*
* @return string
*/
public static function get_base_plugin_name() {
static $base_name;

if (!empty($base_name)) {
return $base_name;
}

$plugins = array_keys(get_plugins());
foreach ($plugins as $plugin) {
if (substr_count($plugin, 'woocommerce-wallee.php')) {
$base_name = $plugin;
break;
}
}

return $base_name;
}
}

WC_Wallee_Subscription_Migration::init();
6 changes: 3 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: customwebgmbh
Tags: woocommerce wallee, woocommerce, wallee, payment, e-commerce, webshop, psp, subscription, recurring payment, processing
Requires at least: 4.7
Tested up to: 6.0.1
Stable tag: 1.1.3
Stable tag: 1.1.4
License: Apache 2
License URI: http://www.apache.org/licenses/LICENSE-2.0

Expand Down Expand Up @@ -49,5 +49,5 @@ Therefore, it is necessary that you install the this plugin as well.

== Changelog ==

= 1.1.3 - December 6, 2023 =
- [BugFix] Allow changing payment method for active subscriptions with latest woo-subscriptions
= 1.1.4 - March 19, 2024 =
- [BugFix] Improved dependency detection: The plugin can now identify the base plugin even if the exact name varies slightly.
8 changes: 4 additions & 4 deletions woocommerce-wallee-subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Plugin Name: wallee Subscription
* Plugin URI: https://wordpress.org/plugins/woo-wallee-subscription
* Description: Addon to process WooCommerce Subscriptions with wallee
* Version: 1.1.3
* Version: 1.1.4
* License: Apache2
* License URI: http://www.apache.org/licenses/LICENSE-2.0
* Author: wallee AG
* Author URI: https://www.wallee.com
* Requires at least: 4.7
* Tested up to: 6.1
* Tested up to: 6.4.2
* WC requires at least: 3.0.0
* WC tested up to: 7.0.1
* WC tested up to: 8.7.0
*
* Text Domain: woo-wallee-subscription
* Domain Path: /languages/
Expand All @@ -36,7 +36,7 @@ final class WooCommerce_Wallee_Subscription {
*
* @var string
*/
private $version = '1.1.3';
private $version = '1.1.4';

/**
* The single instance of the class.
Expand Down

0 comments on commit e767bc7

Please sign in to comment.