Skip to content

Commit

Permalink
Remove payment methods as links in payment settings for WC 3.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
roykho committed May 4, 2018
1 parent ebdbdc4 commit fbd0601
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ If you get stuck, you can ask for help in the Plugin Forum.
* Fix - WC 2.6 compatibility issue during a refund.
* Fix - Payment Request JS error when default country setting is not supported.
* Fix - Failed payments were sending two failed emails to admin instead of one.
* Tweak - Remove payment methods links from WC Payment Settings page for WC 3.4+.

= 4.1.2 - 2018-04-23 =
* Fix - When payment method is invalid while trying to force save card, unexpected error can occur.
Expand Down
5 changes: 4 additions & 1 deletion woocommerce-gateway-stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ public function init() {

add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateways' ) );
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
add_filter( 'woocommerce_get_sections_checkout', array( $this, 'filter_gateway_order_admin' ) );

if ( version_compare( WC_VERSION, '3.4', '<' ) ) {
add_filter( 'woocommerce_get_sections_checkout', array( $this, 'filter_gateway_order_admin' ) );
}
}

/**
Expand Down

0 comments on commit fbd0601

Please sign in to comment.