Skip to content

Commit

Permalink
Remove simplify commerce gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jan 10, 2019
1 parent 5117a65 commit 9d381d4
Show file tree
Hide file tree
Showing 42 changed files with 14 additions and 5,317 deletions.
1 change: 0 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ exclude_paths:
- "includes/api/legacy/"
- "includes/libraries/"
- "includes/updates/"
- "includes/gateways/simplify-commerce/"
- "includes/shipping/legacy-*"
- "includes/wc-deprecated-functions.php"
- "assets/js/accounting/"
Expand Down
1 change: 0 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ filter:
- sample-data/
- i18n/
- includes/api/legacy/
- includes/gateways/simplify-commerce/includes/
- includes/legacy/
- includes/libraries/
- includes/shipping/legacy-*
Expand Down
17 changes: 8 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,14 @@ module.exports = function( grunt ) {
},
dist: {
src: [
'**/*.php', // Include all files
'!apigen/**', // Exclude apigen/
'!includes/api/legacy/**', // Exclude legacy REST API
'!includes/gateways/simplify-commerce/includes/Simplify/**', // Exclude simplify commerce SDK
'!includes/libraries/**', // Exclude libraries/
'!node_modules/**', // Exclude node_modules/
'!tests/cli/**', // Exclude tests/cli/
'!tmp/**', // Exclude tmp/
'!vendor/**' // Exclude vendor/
'**/*.php', // Include all php files.
'!apigen/**',
'!includes/api/legacy/**',
'!includes/libraries/**',
'!node_modules/**',
'!tests/cli/**',
'!tmp/**',
'!vendor/**'
]
}
},
Expand Down
17 changes: 3 additions & 14 deletions assets/css/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -583,17 +583,6 @@
color: inherit;
}

.simplify-commerce-banner {
overflow: hidden;

img {
float: right;
padding: 15px 0;
margin-left: 1em;
width: 200px;
}
}

/**
* Help Tip
*/
Expand Down Expand Up @@ -3686,15 +3675,15 @@
padding: 0 15px 10px 0;
}
}

.wc-shipping-zone-settings {

td.forminp {
input, textarea {
width: 448px;
padding: 6px 11px;
}

.select2-search input {
padding: 6px;
}
Expand Down
21 changes: 2 additions & 19 deletions includes/admin/class-wc-admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class WC_Admin_Notices {
'template_files' => 'template_file_check_notice',
'legacy_shipping' => 'legacy_shipping_notice',
'no_shipping_methods' => 'no_shipping_methods_notice',
'simplify_commerce' => 'simplify_commerce_notice',
'regenerating_thumbnails' => 'regenerating_thumbnails_notice',
'no_secure_connection' => 'secure_connection_notice',
'wootenberg' => 'wootenberg_feature_plugin_notice',
Expand Down Expand Up @@ -81,17 +80,9 @@ public static function remove_all_notices() {
* Reset notices for themes when switched or a new version of WC is installed.
*/
public static function reset_admin_notices() {
$simplify_options = get_option( 'woocommerce_simplify_commerce_settings', array() );
$location = wc_get_base_location();

if ( ! class_exists( 'WC_Gateway_Simplify_Commerce_Loader' ) && ! empty( $simplify_options['enabled'] ) && 'yes' === $simplify_options['enabled'] && in_array( $location['country'], apply_filters( 'woocommerce_gateway_simplify_commerce_supported_countries', array( 'US', 'IE' ) ), true ) ) {
self::add_notice( 'simplify_commerce' );
}

if ( ! self::is_ssl() ) {
self::add_notice( 'no_secure_connection' );
}

self::add_wootenberg_feature_plugin_notice();
self::add_notice( 'template_files' );
}
Expand Down Expand Up @@ -329,18 +320,10 @@ public static function no_shipping_methods_notice() {
}

/**
* Simplify Commerce is being removed from core.
* Simplify Commerce is no longer in core.
*/
public static function simplify_commerce_notice() {
$location = wc_get_base_location();

if ( class_exists( 'WC_Gateway_Simplify_Commerce_Loader' ) || ! in_array( $location['country'], apply_filters( 'woocommerce_gateway_simplify_commerce_supported_countries', array( 'US', 'IE' ) ), true ) ) {
self::remove_notice( 'simplify_commerce' );
return;
}
if ( empty( $_GET['action'] ) ) { // WPCS: input var ok, CSRF ok.
include dirname( __FILE__ ) . '/views/html-notice-simplify-commerce.php';
}
wc_deprecated_function( 'WC_Admin_Notices::simplify_commerce_notice', '3.6.0' );
}

/**
Expand Down
24 changes: 0 additions & 24 deletions includes/admin/views/html-notice-simplify-commerce.php

This file was deleted.

15 changes: 0 additions & 15 deletions includes/class-wc-payment-gateways.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,6 @@ public function init() {
'WC_Gateway_Paypal',
);

/**
* Simplify Commerce is @deprecated in 2.6.0. Only load when enabled.
*/
if ( ! class_exists( 'WC_Gateway_Simplify_Commerce_Loader' ) && in_array( WC()->countries->get_base_country(), apply_filters( 'woocommerce_gateway_simplify_commerce_supported_countries', array( 'US', 'IE' ) ), true ) ) {
$simplify_options = get_option( 'woocommerce_simplify_commerce_settings', array() );

if ( ! empty( $simplify_options['enabled'] ) && 'yes' === $simplify_options['enabled'] ) {
if ( function_exists( 'wcs_create_renewal_order' ) ) {
$load_gateways[] = 'WC_Addons_Gateway_Simplify_Commerce';
} else {
$load_gateways[] = 'WC_Gateway_Simplify_Commerce';
}
}
}

// Filter.
$load_gateways = apply_filters( 'woocommerce_payment_gateways', $load_gateways );

Expand Down
Binary file not shown.
Binary file not shown.
118 changes: 0 additions & 118 deletions includes/gateways/simplify-commerce/assets/js/simplify-commerce.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9d381d4

Please sign in to comment.