[wp-trac] [WordPress Trac] #45666: adding "order" as query arg to the homepage url you are redirected to the last posts page

WordPress Trac noreply at wordpress.org
Tue Dec 18 11:38:25 UTC 2018


#45666: adding "order" as query arg to the homepage url you are redirected to the
last posts page
--------------------------+------------------------------
 Reporter:  giuse         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by 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 use 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;
 }

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45666#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list