File tree Expand file tree Collapse file tree
assets/js/modules/membership/frontend
modules/membership/includes/Templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 {
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 ) {
Original file line number Diff line number Diff line change 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 (
You can’t perform that action at this time.
0 commit comments