Skip to content

Commit

Permalink
Release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sauliususoniswallee committed Nov 8, 2022
1 parent dc86872 commit b0533d4
Show file tree
Hide file tree
Showing 18 changed files with 1,593 additions and 1,051 deletions.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ language: generic
before_deploy:
- if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs;
git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git wpcs;
cd phpcs;
./bin/phpcs --config-set installed_paths ../wpcs;
cd ../;
mkdir build;
mkdir build/src;
rsync -r --exclude 'build' --exclude '.git' --exclude '.travis.yml' --exclude 'README.md' . build/src;
rsync -r --exclude 'build' --exclude 'wpcs' --exclude 'phpcs' --exclude '.git' --exclude '.travis.yml' --exclude 'README.md' . build/src;
perl -plne 'print "$ENV{'FEATURES'}" if(/== Installation ==/); print "$ENV{'FAQ_ENTRIES'}" if(/== Changelog ==/);' build/src/readme.txt > build/src/readme_mod.txt;
rm build/src/readme.txt;
mv build/src/readme_mod.txt build/src/readme.txt;
mkdir build/$WORDPRESS_ORG_SLUG;
rsync -r build/src/ build/$WORDPRESS_ORG_SLUG/;
rm -rf build/src/docs
cd build;
zip -r $TRAVIS_BUILD_DIR/$WORDPRESS_ORG_SLUG.zip $WORDPRESS_ORG_SLUG;
../phpcs/bin/phpcbf -n --standard=WordPress src/ || true;
../phpcs/bin/phpcs -n --standard=WordPress src/ || true;
cd ..;
fi

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[![Build Status](https://travis-ci.org/wallee-payment/woocommerce-subscription.svg?branch=master)](https://travis-ci.org/wallee-payment/woocommerce-subscription)

# wallee Woocommerce Subscriptions
This repository contains the wallee WooCommerce Subscriptions addon that enables WooCommerce Subscriptions to be processed with [wallee](https://www.wallee.com).
# wallee Subscriptions
This repository contains the wallee Subscriptions addon that enables WooCommerce Subscriptions to be processed with [wallee](https://www.wallee.com).

##### To use this extension, a [wallee](https://app-wallee.com/user/signup) account is required.

## Requirements

* [Wordpress](https://wordpress.org/) 4.4 or later.
* [Woocommerce](https://woocommerce.com/) 3.0 or later
* [wallee Woocommerce Plugin](../../../woocommerce/) 1.2 or later
* [wallee Plugin](../../../woocommerce/) 1.2 or later
* [Woocommerce Subscriptions Plugin](https://woocommerce.com/products/woocommerce-subscriptions/) 2.2 or later
* [PHP](http://php.net/) 5.6 or later

## License

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

16 changes: 16 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,19 @@ Bug fix, if space_view_id is not set, it does not send it to the service portal.

* Tested plugin against wordpress version 5.7.2 and woocommerce 5.3.0

## Features:
- Support of Wordpress 6.1
- Support of Woocommerce 7.0.1

## Bugfixes:
- Tested up to latest WP and WC versions.
- Security fixes for sanitation, escaping and validation.
- PHPCS and trademark fixes.
- Removed unnecessary documentation files, as they are available online.
- Removed calls to remote files for deprecated features.

## Tested against:
- PHP 7.4.32
- Wordpress: 6.1
- Woocommerce: 6.7.0

4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<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 WooCommerce 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 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/woocommerce-subscription/releases/tag/1.0.14/">
<a href="https://github.com/wallee-payment/woocommerce-subscription/releases/tag/1.1.1/">
Source
</a>
</li>
Expand Down
42 changes: 29 additions & 13 deletions includes/admin/class-wc-wallee-subscription-admin-notices.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
<?php
if (!defined('ABSPATH')) {
exit();
}
/**
* wallee WooCommerce
*
* This WooCommerce plugin enables to process payments with wallee (https://www.wallee.com).
* WC_Wallee_Subscription_Admin_Notices Class
*
* Wallee
* This plugin will add support for process WooCommerce Subscriptions with wallee
*
* @author customweb GmbH (http://www.customweb.com/)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0)
* @category Class
* @package Wallee
* @author wallee AG (http://www.wallee.com/)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0)
*/

if ( ! defined( 'ABSPATH' ) ) {
exit();
}

/**
* WC Wallee Subscription Admin Notices class
*/
class WC_Wallee_Subscription_Admin_Notices {

public static function migration_failed_notices(){
require_once WC_WALLEE_SUBSCRIPTION_ABSPATH.'views/admin-notices/migration-failed.php';
/**
* Migration failed notices.
*
* @return void
*/
public static function migration_failed_notices() {
require_once WC_WALLEE_SUBSCRIPTION_ABSPATH . 'views/admin-notices/migration-failed.php';
}

public static function plugin_deactivated(){
require_once WC_WALLEE_SUBSCRIPTION_ABSPATH.'views/admin-notices/plugin-deactivated.php';

/**
* Plugin deactivated.
*
* @return void
*/
public static function plugin_deactivated() {
require_once WC_WALLEE_SUBSCRIPTION_ABSPATH . 'views/admin-notices/plugin-deactivated.php';
}
}
}
85 changes: 53 additions & 32 deletions includes/admin/class-wc-wallee-subscription-admin.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<?php
if (!defined('ABSPATH')) {
exit();
}
/**
* wallee WooCommerce
*
* This WooCommerce plugin enables to process payments with wallee (https://www.wallee.com).
* WC_Wallee_Subscription_Admin Class
*
* Wallee
* This plugin will add support for process WooCommerce Subscriptions with wallee
*
* @author customweb GmbH (http://www.customweb.com/)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0)
* @category Class
* @package Wallee
* @author wallee AG (http://www.wallee.com/)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0)
*/

if ( ! defined( 'ABSPATH' ) ) {
exit();
}

/**
* WC_Wallee_Subscription_Admin class
*/
class WC_Wallee_Subscription_Admin {

/**
* The single instance of the class.
*
Expand All @@ -23,14 +29,14 @@ class WC_Wallee_Subscription_Admin {
protected static $_instance = null;

/**
* Main WooCommerce Wallee Plugin Admin Instance.
* Main Wallee Plugin Admin Instance.
*
* Ensures only one instance of WC_Wallee_Subscription_Admin is loaded or can be loaded.
*
* @return WC_Wallee_Subscription_Admin - Main instance.
*/
public static function instance(){
if (self::$_instance === null) {
public static function instance() {
if ( null === self::$_instance ) {
self::$_instance = new self();
}
return self::$_instance;
Expand All @@ -39,40 +45,55 @@ public static function instance(){
/**
* WC Wallee Admin Constructor.
*/
protected function __construct(){
protected function __construct() {
$this->includes();
$this->init_hooks();
}

/**
* Include required core files used in admin and on the frontend.
*/
private function includes(){
require_once (WC_WALLEE_SUBSCRIPTION_ABSPATH . 'includes/admin/class-wc-wallee-subscription-admin-notices.php');
private function includes() {
require_once( WC_WALLEE_SUBSCRIPTION_ABSPATH . 'includes/admin/class-wc-wallee-subscription-admin-notices.php' );
}

private function init_hooks(){
add_action('admin_init', array(
$this,
'handle_modules_active'
));
/**
* Init hooks.
*
* @return void
*/
private function init_hooks() {
add_action(
'admin_init',
array(
$this,
'handle_modules_active',
)
);

}

public function handle_modules_active(){
// Subscription plugin or base plugin not activated
if (!is_plugin_active('woocommerce-subscriptions/woocommerce-subscriptions.php') || !is_plugin_active('woo-wallee/woocommerce-wallee.php'))
{
// Deactivate myself
deactivate_plugins(WC_WALLEE_SUBSCRIPTION_PLUGIN_BASENAME);
add_action('admin_notices', array(
'WC_Wallee_Subscription_Admin_Notices',
'plugin_deactivated'
));

/**
* Handle modules active.
*
* @return void
*/
public function handle_modules_active() {
// Subscription plugin or base plugin not activated.
if ( ! is_plugin_active( 'woocommerce-subscriptions/woocommerce-subscriptions.php' ) || ! is_plugin_active( 'woo-wallee/woocommerce-wallee.php' ) ) {
// Deactivate plugin.
deactivate_plugins( WC_WALLEE_SUBSCRIPTION_PLUGIN_BASENAME );
add_action(
'admin_notices',
array(
'WC_Wallee_Subscription_Admin_Notices',
'plugin_deactivated',
)
);
}

}

}

WC_Wallee_Subscription_Admin::instance();
Loading

0 comments on commit b0533d4

Please sign in to comment.