Skip to content

Commit d239ac0

Browse files
committed
[skyverge/wc-plugins#534] Remove tokenized payment method bug
There's a bug which affects only
1 parent 1233794 commit d239ac0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

woocommerce/changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** SkyVerge WooCommerce Plugin Framework Changelog ***
22

3-
2014.nn.nn - version 3.0.3-1
3+
2014.nn.nn - version 3.0.3-2
4+
* Fix - Bug when removing a tokenized credit card from the My Account page
45
* Tweak - Accept a notice-class parameter when rendering admin notice to avoid always using the "error" notice
56

67
2014.11.20 - version 3.0.3

woocommerce/class-sv-wc-plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@
8484
* Use the standard WordPress/WooCommerce `is_*` methods when adding the notice
8585
* to control which pages it does (or does not) display on.
8686
*
87-
* @version 3.0.3-1
87+
* @version 3.0.3-2
8888
*/
8989
abstract class SV_WC_Plugin {
9090

9191
/** Plugin Framework Version */
92-
const VERSION = '3.0.3-1';
92+
const VERSION = '3.0.3-2';
9393

9494
/** @var string plugin id */
9595
private $id;

woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,13 +2029,13 @@ public function remove_payment_token( $user_id, $token, $environment_id = null )
20292029
}
20302030

20312031
// unknown token?
2032-
if ( ! $this->has_payment_token( $user_id, $token, $environment_id ) ) {
2032+
if ( ! $this->has_payment_token( $user_id, $token, null, $environment_id ) ) {
20332033
return false;
20342034
}
20352035

20362036
// get the payment token object as needed
20372037
if ( ! is_object( $token ) ) {
2038-
$token = $this->get_payment_token( $user_id, $token, $environment_id );
2038+
$token = $this->get_payment_token( $user_id, $token, null, $environment_id );
20392039
}
20402040

20412041
// for direct gateways that allow it, attempt to delete the token from the endpoint
@@ -2100,7 +2100,7 @@ public function set_default_payment_token( $user_id, $token, $environment_id = n
21002100

21012101
// get the payment token object as needed
21022102
if ( ! is_object( $token ) ) {
2103-
$token = $this->get_payment_token( $user_id, $token, $environment_id );
2103+
$token = $this->get_payment_token( $user_id, $token, null, $environment_id );
21042104
}
21052105

21062106
// get existing tokens

0 commit comments

Comments
 (0)