Forked from maxrice/jilt-for-wc-recovery-link-redirect-to-cart.php
Created
December 23, 2017 03:43
-
-
Save lukecav/dbe5f9985cc04afdb634692b63c4ca3e 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