Disable Stripe Customer creation in WP Admin > Users

By default, Ultimate Member Stripe extension creates a Stripe customer when you create/add new user via WP Admin > Users. You can disable this function with the following code snippet:

add_action( 'user_register', 'um_121923_stripe_custom_remove_auto_customer_creation', 9 );
function um_121923_custom_remove_auto_customer_creation() {
    if ( class_exists( 'UM' )  && class_exists( 'UM_Stripe_Plugin' ) ) {
        remove_action( 'user_register', array( UM()->Stripe_API()->common()->user(), 'create_stripe_customer' ), 10 );
    }
}