• On every WordPress site I have seen, if you add “order” as query argument to the homepage url, you will be redirected to the last posts page. This for me it’s a serious bug.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m not sure what you mean, could you share an example? On many pages it’s possible to change the order of posts by adding the order parameter, but no redirection occurs. Is that what you’re referring to? Why is this a bug?

    • This reply was modified 6 years, 3 months ago by Jacob Peattie.
    Thread Starter Jose

    (@giuse)

    Every WordPress site does that, also yours if you have a WordPress site. Add ?order to your homepage url.
    This is a serious problem if you sell downloadable products with WooCommerce, because the download link has “order” as query argument and the customer will be redirected to the home page that shows the last posts instead to download the product automatically. The problem occurs if you have a static page as front page.

    Every time a digital product gets sold trough WooCommerce the client doesn’t get his order and you have to manually send the product to him.

    E.g. your site: https://www.magicdust.com.au/?order=something

    • This reply was modified 6 years, 3 months ago by Jose.
    Thread Starter Jose

    (@giuse)

    for people who have a shop with downloadable products who probably have my same problem, until WooCommerce or WordPress don’t find a clean solution, I suggest to add this dirty solution in functions.php:

    if( !isset( $_GET[‘redirected’] ) && isset( $_GET[‘order’] ) && strpos( $_GET[‘order’],’wc_order’ ) === 0 ){
    $_GET[‘redirected’] = true;
    wp_redirect( add_query_arg( $_GET,get_permalink( get_option( ‘woocommerce_checkout_page_id’ ) ) ) );
    exit;
    }

    in my case I solved the problem, dirty but effective

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirection to last posts page if “order” is a query argument’ is closed to new replies.