Skip to content

Commit c8917d7

Browse files
committed
Resolve merge conflicts
2 parents fc4b60d + 384a380 commit c8917d7

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

assets/js/modules/membership/frontend/user-registration-membership-frontend.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,23 @@
702702
payment_type: "unpaid",
703703
info: response.data.pg_data.data,
704704
username: prepare_members_data.username,
705-
context: "hide_message"
705+
context: "hide_message",
706+
message: response.data.message || ""
706707
};
707708

708-
if (response.data.is_renewing) {
709+
var shouldRedirect =
710+
!!response.data.is_renewing ||
711+
!!response.data.is_upgrading ||
712+
!!response.data.is_purchasing_multiple;
713+
714+
var redirectUrl =
715+
$("#urm-redirect-url").val() ||
716+
response.data.redirect_url ||
717+
window.location.href;
718+
719+
if (shouldRedirect) {
709720
ur_membership_ajax_utils.show_default_response(
710-
window.location.href,
721+
redirectUrl,
711722
bank_data
712723
);
713724
} else {
@@ -729,7 +740,9 @@
729740

730741
var url_params = $.param(thank_you_data).toString();
731742
window.setTimeout(function () {
732-
window.location.replace(url + "?" + url_params);
743+
var hasQuery = url.indexOf("?") !== -1;
744+
var concatenator = hasQuery ? "&" : "?";
745+
window.location.replace(url + concatenator + url_params);
733746
}, timeout);
734747
},
735748
validate_coupon: function ($this) {

modules/membership/includes/Templates/thank-you-page.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$bank_data = ( isset( $_GET['info'] ) && ! empty( $_GET['info'] ) ) ? wp_kses_post( $_GET['info'] ) : '';
4+
$bank_data = 'Free' === $bank_data ? false : true;
45
$transaction_id = ( isset( $_GET['transaction_id'] ) && ! empty( $_GET['transaction_id'] ) ) ? wp_kses_post( $_GET['transaction_id'] ) : '';
56
$username = ( isset( $_GET['username'] ) && ! empty( $_GET['username'] ) ) ? wp_kses_post( $_GET['username'] ) : '';
67
$main_content = ! empty( $attributes['header'] ) ? wp_kses_post( $attributes['header'] ) : sprintf(

0 commit comments

Comments
 (0)