From 9be866b7a1d59da37d0aa3d57ff9a94620a99b33 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 9 Aug 2012 11:50:15 +0100 Subject: [PATCH] remove attachment rewrite --- woocommerce.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/woocommerce.php b/woocommerce.php index 77434970dca..c124d439240 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -784,10 +784,7 @@ class Woocommerce { ) ); - // Sort out attachment urls - $attachment_base = get_option('woocommerce_prepend_shop_page_to_products') == 'yes' ? trailingslashit( $base_slug ) : trailingslashit( _x( 'product', 'slug', 'woocommerce' ) ); - - add_rewrite_rule( '^' . $attachment_base . '([^/]*)/([^/]*)/([^/]*)/?', 'index.php?attachment=$matches[3]', 'top' ); + // Sort out attachment urls (removed, breaks pagination) no alternatives add_rewrite_rule( '^' . $attachment_base . '([^/]*)/([^/]*)/([^/]*)/?', 'index.php?attachment=$matches[3]', 'top' ); register_post_type( "product_variation", array(