Last active
June 4, 2020 10:16
-
-
Save rafsuntaskin/f305e4b4940e3eaf3033bab283ffbe8a to your computer and use it in GitHub Desktop.
FIx TribeCommerce payment redirection to Homepage ET 4.11.0+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'tribe_tickets_checkout_urls', 'rt_tc_add_slash_in_url', 20 ); | |
add_filter( 'tribe_tickets_cart_urls', 'rt_tc_add_slash_in_url', 20 ); | |
add_filter( 'tribe_tickets_tribe-commerce_cart_url', 'rt_tc_add_slash_in_url', 20 ); | |
function rt_tc_add_slash_in_url( $urls ) { | |
if ( is_array( $urls ) && isset( $urls['Tribe__Tickets__Commerce__PayPal__Main'] ) ) { | |
$urls['Tribe__Tickets__Commerce__PayPal__Main'] = $urls['Tribe__Tickets__Commerce__PayPal__Main']. '/'; | |
} else if ( ! empty( $urls ) ) { | |
$urls = $urls . '/'; | |
} | |
return $urls; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment