• Resolved hwuser

    (@hwuser)


    Hi, I just need to remove Woocommerce from the home page.
    So, I activate the woocommerce plugin everywhere except the home page.

    But there is a bug: when I go to the shop page or other category pages, it redirects me to the home page.

    Could you correct the error?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author enomoto celtislab

    (@enomoto-celtislab)

    A woocommerce site is much more complex than a typical blog site structure.

    If the woocommerce plugin is disabled
    A request to the shop page or other category pages is a core WordPress feature that redirects to the home page as its URL cannot be parsed

    plugin load filter provides an add-on that can filter URLs for such requests, so please consider it!

    https://celtislab.net/en/wp-plugin-load-filter-addon/

    Thread Starter hwuser

    (@hwuser)

    Thank you, in principle it would not be of interest to me. Regards

    Jack

    (@jack1132132)

    @hwuser In case that doesnt work you can also try changing the endpoint like so (assuming your checkout page has slug /checkout/):

    
    function wc_change_ajax_url_($params, $handle){
    	
    	$params = '/checkout'.$params;
    
    	return $params;
    }
    add_filter( 'woocommerce_ajax_get_endpoint', 'wc_change_ajax_url_', 10 , 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce error disabled on home page’ is closed to new replies.