Created
October 10, 2017 03:04
-
-
Save maxrice/25e89aaccc214e3a218072674259c6e1 to your computer and use it in GitHub Desktop.
Jilt for WooCommerce - Recovery link redirect to cart
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( 'woocommerce_get_checkout_url', function( $checkout_url ) { | |
global $wp; | |
if ( isset( $wp->query_vars ) && ! empty( $wp->query_vars['wc-api'] ) && 'jilt' === $wp->query_vars['wc-api'] && ! empty( $_GET['token'] ) ) { | |
$checkout_url = wc_get_cart_url(); | |
} | |
return $checkout_url; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment