Cardtesting hacker issu | WordPress.org

Hi!

When we used the plugin “WooCommerce Stripe Gateway” from WooCommerce we activated this code snippet:

// remove a paymentgateway for a specific country --> Hacker attacks --> remove the creditcard option for a coountiry, city...
function bbloomer_payment_gateway_disable_country( $available_gateways ) {
    if ( is_admin() ) return $available_gateways;
//    if ( isset( $available_gateways['stripe'] ) && WC()->customer->get_billing_country() == 'AT' ) {
	if ( isset( $available_gateways['stripe'] ) && WC()->customer->get_billing_city() == 'Portland' ) {
		unset( $available_gateways['stripe'] );
    } 
    return $available_gateways;
}
add_filter( 'woocommerce_available_payment_gateways', 'bbloomer_payment_gateway_disable_country' );

to remove CreditCard payment option on the last checkout page, if we see that there are card testing activities ,where all attempts use the same address – in this example city=”Portland” to lock this hackers out.

This code does not work with your plugin any more. Can you tell me what is the key in $available_gateways[‘???’] to remove the credit card fields from your plugin?

thanks

:: Paul

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer