• We have followed the diagnosis of a repeating system crash which is caused by an incompatibility betwee Woocommerce and our Enfold Child theme. we cannot use the recommended plugin as this removes both the shop page AND the Cart which is used in the purchase process.

    The blogs recommend “editing the theme functions.php file” but do not give a recommended php code to be inserted into the functions file.

    What is the code that we must insert into our functions.php file to disable the shop from being called in woocommerce (or to just return with nothing instead of called teh shop function in Woocommerce?

    Please help with suggestions or example code

    Alex

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Stef

    (@serafinnyc)

    Hello @adowdalls I’m having a hard time following you. You want to completely disable the shop page in Woo? What recommended plugin?

    The Shop page is essential for landing, there is no way really to by pass it. I’m not sure what app you were trying to use that disabled it and the cart.

    What is your ultimate goal here?

    Thread Starter adowdalls

    (@adowdalls)

    Hi Stef,

    The shop page in woo causes a system crash due to incompatibility with a common theme such as ENFOLD Child. This is documenten in multiple posts including in the woocommerce support forum. I even get the error when I try to edit the shop page.

    There are two solutions proposed:

    1 use the “Disable Cart for Woocommerce” which disables both the cart and the shop page

    2 add PHP code to the theme “functions.php” to trap the call to the shop page and avoid woo opening its shop page.

    My request is therefore – what PHP code should be added to functions.php to avoid the system crash when woo opens its own shop page

    Can you follow this?

    Alex

    Stef

    (@serafinnyc)

    Hello @adowdalls, all of this then becomes outside the scope of this forum. We do not support customization of Woo per guidelines. If you’re using a child theme especially one that’s been customized in any way it will fall under these rules.

    Without seeing anything I can’t assist you from here. There should be no reason a theme is crashing the Shop or Cart page unless custom code has been implemented.

    Hello @adowdalls,

    Just to add on to of what community member @serafinnyc has just said,

    Helping out with custom coding of this nature is outside the scope of support that our support staff can help out with here, although I would recommend the following:

    1. Running the exact question you’re asking, along with the code provided, through an AI platform like ChatGPT for recommendations.
    2. Checking whether there are existing plugins in the WordPress plugin repository that might be doing that already.
    3. Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/

    Hope it helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP code to disable shop page in Woocommerce’ is closed to new replies.