This repository was archived by the owner on Oct 4, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Prevents the paypal payment method from being auto enabled if settings haven't been configured.
4
+ *
5
+ * @since 0.8.2
6
+ */
7
+
8
+ if ( ! defined ( 'ABSPATH ' ) ) {
9
+ exit ;
10
+ }
11
+
12
+ function wc_api_dev_paypal_defaults ( $ settings ) {
13
+ $ settings ['enabled ' ]['default ' ] = 'no ' ;
14
+ return $ settings ;
15
+ }
16
+ add_filter ( 'woocommerce_settings_api_form_fields_paypal ' , 'wc_api_dev_paypal_defaults ' );
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Contributors: automattic, woothemes
3
3
Tags: woocommerce, rest-api, api
4
4
Requires at least: 4.6
5
5
Tested up to: 4.8
6
- Stable tag: 0.8.1
6
+ Stable tag: 0.8.2
7
7
License: GPLv2 or later
8
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
9
@@ -25,6 +25,9 @@ This section describes how to install the plugin and get it working.
25
25
26
26
== Changelog ==
27
27
28
+ = 0.8.2 =
29
+ * Fix - Don't auto enable the PayPal payment method.
30
+
28
31
= 0.8.1 =
29
32
* Fix - Fix auto plugin update logic
30
33
* Fix - Don't auto enable the cheque payment method.
Original file line number Diff line number Diff line change 3
3
* Plugin Name: WooCommerce API Dev
4
4
* Plugin URI: https://woocommerce.com/
5
5
* Description: A feature plugin providing a bleeding edge version of the WooCommerce REST API.
6
- * Version: 0.8.1
6
+ * Version: 0.8.2
7
7
* Author: Automattic
8
8
* Author URI: https://woocommerce.com
9
9
* Requires at least: 4.4
@@ -33,7 +33,7 @@ class WC_API_Dev {
33
33
/**
34
34
* Current version of the API plugin.
35
35
*/
36
- const CURRENT_VERSION = '0.8.1 ' ;
36
+ const CURRENT_VERSION = '0.8.2 ' ;
37
37
38
38
/**
39
39
* Minimum version needed to run this version of the API.
@@ -132,6 +132,7 @@ public function includes() {
132
132
include_once ( dirname ( __FILE__ ) . '/hotfixes/wc-api-dev-jetpack-hotfixes.php ' );
133
133
include_once ( dirname ( __FILE__ ) . '/hotfixes/wc-api-dev-email-site-title.php ' );
134
134
include_once ( dirname ( __FILE__ ) . '/hotfixes/wc-api-dev-cheque-defaults.php ' );
135
+ include_once ( dirname ( __FILE__ ) . '/hotfixes/wc-api-dev-paypal-defaults.php ' );
135
136
}
136
137
}
137
138
You can’t perform that action at this time.
0 commit comments