Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n7studios committed Nov 27, 2024
1 parent 144a00e commit f41dad5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions includes/class-convertkit-mm-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function add_member( $member_data ) {

// Fetch data from member array.
$user_email = $member_data['email'];
$first_name = rawurlencode( $member_data['first_name'] );
$first_name = $member_data['first_name'];
$tag_id = $this->settings->get_membership_level_mapping( $member_data['membership_level'] );
$custom_fields = $this->get_custom_fields_data( $member_data );

Expand All @@ -106,7 +106,7 @@ public function update_member( $member_data ) {
// Define new member data.
$user_email = $member_data['email'];
$last_email = ( array_key_exists( 'last_email', $member_data ) ? $member_data['last_email'] : $member_data['email'] );
$first_name = rawurlencode( $member_data['first_name'] );
$first_name = $member_data['first_name'];
$custom_fields = $this->get_custom_fields_data( $member_data );

// Update the subscriber with their new information.
Expand Down Expand Up @@ -138,7 +138,7 @@ public function status_change_member( $member_data ) {

// Fetch data from member array.
$user_email = $member_data['email'];
$first_name = rawurlencode( $member_data['first_name'] );
$first_name = $member_data['first_name'];
$tag_id = $this->settings->get_membership_level_cancellation_mapping( $member_data['membership_level'] );
$custom_fields = $this->get_custom_fields_data( $member_data );

Expand Down Expand Up @@ -176,7 +176,7 @@ public function delete_member( $member_data ) {

// Fetch data from member array.
$user_email = $member_data['email'];
$first_name = rawurlencode( $member_data['first_name'] );
$first_name = $member_data['first_name'];
$tag_id = $this->settings->get_membership_level_cancellation_mapping( $member_data['membership_level'] );
$custom_fields = $this->get_custom_fields_data( $member_data );

Expand Down Expand Up @@ -210,7 +210,7 @@ public function purchase_product( $purchase_data ) {

// Fetch data from purchase array.
$user_email = $purchase_data['email'];
$first_name = rawurlencode( $purchase_data['first_name'] );
$first_name = $purchase_data['first_name'];
$tag_id = $this->settings->get_product_mapping( $purchase_data['product_id'] );
$custom_fields = $this->get_custom_fields_data( $purchase_data );

Expand All @@ -237,7 +237,7 @@ public function add_bundle( $purchase_data ) {

// Fetch data from purchase array.
$user_email = $purchase_data['email'];
$first_name = rawurlencode( $purchase_data['first_name'] );
$first_name = $purchase_data['first_name'];
$tag_id = $this->settings->get_bundle_mapping( $purchase_data['bundle_id'] );
$custom_fields = $this->get_custom_fields_data( $purchase_data );

Expand Down Expand Up @@ -277,7 +277,7 @@ public function status_change_bundle( $member_data ) {

// Fetch data from member array.
$user_email = $member_data['email'];
$first_name = rawurlencode( $member_data['first_name'] );
$first_name = $member_data['first_name'];
$custom_fields = $this->get_custom_fields_data( $member_data );

// If no tag assigned to this Bundle, bail.
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/member-update/MemberSubscribeCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testMemberNameAndEmailUpdatedWhenChangedInMemberMouse(Acceptance
// Check that the subscriber has the custom field data.
$I->apiCustomFieldDataIsValid(
$I,
$subscriber,
$subscriberAfterNewEmailAddress,
[
'last_name' => $newLastName,
]
Expand Down

0 comments on commit f41dad5

Please sign in to comment.