• Hello,

    it would be amazing if we could choose even not to redirect the user at all after the quick buy button has been pressed. Currently there are just 3 options:
    cart, checkout and custom url. It would be nice to have the 4th one “no redirect”.

    In your code i found that you search for “redirect_location” two times:
    wp-content/plugins/woocommerce-quick-buy/includes/class-add-to-cart-redirect.php

    
    $redirect = Helper::option( 'redirect_location' );
    			$url      = false;
    			switch ( $redirect ) {
    				case 'cart':
    ....
    

    and wp-content/plugins/woocommerce-quick-buy/includes/class-helper.php

    
    public static function redirect_url() {
    			$redirect = Helper::option( 'redirect_location' );
    			switch ( $redirect ) {
    				case 'cart':
    

    I temporary solved by rapidly changing both of the returns to include the $_SERVER[“HTTP_REFERER”] so that it doesn’t actually redirect anywhere.
    This solution isn’t very good, first of all i had to modify your core (please add some actions/filters around, it helps so much when developing on WP) and second one $_SERVER[“HTTP_REFERER”] isn’t very reliable.

    A better way would be to add the option directly in backend and behave avoiding the wp_redirects if “no redirect” option is selected.

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Varun Sridharan

    (@varunms)

    Hello there
    I am not sure why you need a no redirect option. in which case this plugin no longer used for its feature.

    anyways i have added this feature in V2.7.2

Viewing 1 replies (of 1 total)
  • The topic ‘Quickbuy button custom redirect’ is closed to new replies.