Skip to content

Commit c9b3f5c

Browse files
authored
fix: workaround issue and conflict with teams (#4342)
1 parent fcdd75c commit c9b3f5c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

includes/reader-activation/class-reader-activation.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,13 @@ public static function register_reader( $email, $display_name = '', $authenticat
22682268
// Unhook from WooCommerce as it's already been canonized above.
22692269
remove_filter( 'woocommerce_new_customer_data', [ __CLASS__, 'canonize_user_data' ], 10, 1 );
22702270
if ( function_exists( '\wc_create_new_customer' ) ) {
2271+
2272+
// Avoid an issue with Teams for Memberships plugin that messes up billing first and last name and display name.
2273+
// See SkyVerge\WooCommerce\Memberships\Teams\Frontend::save_team_member_name().
2274+
if ( function_exists( 'wc_memberships_for_teams' ) ) {
2275+
remove_action( 'woocommerce_created_customer', [ wc_memberships_for_teams()->get_frontend_instance(), 'save_team_member_name' ] );
2276+
}
2277+
22712278
/**
22722279
* Create WooCommerce Customer if possible.
22732280
* Email notification for WooCommerce is handled by the plugin.

0 commit comments

Comments
 (0)