Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

Commit c35fe79

Browse files
author
Justin Shreve
authored
Don't auto-enable the PayPal payment method (#39)
1 parent 5ce4ed1 commit c35fe79

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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' );

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes
33
Tags: woocommerce, rest-api, api
44
Requires at least: 4.6
55
Tested up to: 4.8
6-
Stable tag: 0.8.1
6+
Stable tag: 0.8.2
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -25,6 +25,9 @@ This section describes how to install the plugin and get it working.
2525

2626
== Changelog ==
2727

28+
= 0.8.2 =
29+
* Fix - Don't auto enable the PayPal payment method.
30+
2831
= 0.8.1 =
2932
* Fix - Fix auto plugin update logic
3033
* Fix - Don't auto enable the cheque payment method.

wc-api-dev.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WooCommerce API Dev
44
* Plugin URI: https://woocommerce.com/
55
* Description: A feature plugin providing a bleeding edge version of the WooCommerce REST API.
6-
* Version: 0.8.1
6+
* Version: 0.8.2
77
* Author: Automattic
88
* Author URI: https://woocommerce.com
99
* Requires at least: 4.4
@@ -33,7 +33,7 @@ class WC_API_Dev {
3333
/**
3434
* Current version of the API plugin.
3535
*/
36-
const CURRENT_VERSION = '0.8.1';
36+
const CURRENT_VERSION = '0.8.2';
3737

3838
/**
3939
* Minimum version needed to run this version of the API.
@@ -132,6 +132,7 @@ public function includes() {
132132
include_once( dirname( __FILE__ ) . '/hotfixes/wc-api-dev-jetpack-hotfixes.php' );
133133
include_once( dirname( __FILE__ ) . '/hotfixes/wc-api-dev-email-site-title.php' );
134134
include_once( dirname( __FILE__ ) . '/hotfixes/wc-api-dev-cheque-defaults.php' );
135+
include_once( dirname( __FILE__ ) . '/hotfixes/wc-api-dev-paypal-defaults.php' );
135136
}
136137
}
137138

0 commit comments

Comments
 (0)