• Resolved rebeccaolson

    (@rebeccaolson)


    My Woocommerce store recently started showing the following code on the front end of the website, in the product information section, under the quantity/add to cart:

    $sku = $product->get_sku();

    All of my google searching about this is only showing how to use this code – I can’t seem to find any reference to it appearing unexpectedly where the customer can see it. I do not have my store set up to show the product SKU on the front end. This just began happening in the last month – I’ve had multiple updates to the site over the last few weeks, so I’m unsure exactly what caused it or when it began. I imagine that there is either a plugin conflict or theme conflict, but I’m unsure where to look. Does anyone have any ideas for where I could start?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @rebeccaolson,

    I suspect that this is an issue with your theme being broken. Possibly a template override gone wrong where the developer missed an element or made a typo. It could also be an issue with a plugin.

    The best way to determine this is to:
    ?

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated.

    You can enable your theme then, to see if the theme is fine. If it is, then the issue is with a plugin that you have on the site.

    To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Thread Starter rebeccaolson

    (@rebeccaolson)

    Thank you so much for the clear breakdown of troubleshooting steps! My theme released an update today and I went ahead and updated first – and that resolved it (so the issue was clearly theme related).

    But thank you again for walking me through it – I really appreciate it. I’m going to save this thread, because this is a great starting point for future issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP code showing on front end of website’ is closed to new replies.