Sam
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: woocommerce redirect category with single product to product page?Sorry I wouldn’t really know where to start regarding debugging. It works for me with WP 1.5.1 and the latest WooCommerce. Make sure the code is your theme’s functions.php file.
Forum: Plugins
In reply to: [CampTix Event Ticketing] Multiple events?I’d love to see multiple events added too. It wouldn’t add much clutter to this fantastically simple plugin. Great work!
Forum: Plugins
In reply to: [WP Event Ticketing] [Plugin: WP Event Ticketing] Coupon CodeSame problem, can’t do free tickets with a coupon. It would be great to see this bug fixed.
I’d really like to see this as an option too. It’s too easy to sell tickets without collecting the required information.
Forum: Plugins
In reply to: woocommerce redirect category with single product to product page?This is my solution. Hope it helps. (Add to your functions.php file)
/* Redirect if there is only one product in the category */ add_action( 'woocommerce_before_shop_loop', 'custom_woocommerce_redirect_if_single_product_in_category', 10 ); function custom_woocommerce_redirect_if_single_product_in_category ($wp_query) { global $wp_query; if (is_product_category()) { if ($wp_query->post_count==1) { $product = new WC_Product($wp_query->post->ID); if ($product->is_visible()) wp_safe_redirect( get_permalink($product->id), 302 ); exit; } } }
Viewing 5 replies - 1 through 5 (of 5 total)