If you installed our app before June 2023 our app leaves behind code on your theme.liquid page. It doesn’t affect your site in any way but it is best practice to remove any code you aren’t using.
Manually Remove Code
To topIf you installed our quick load code or had us install this code for you (installs before 12/21) then you will need to remove this manually. Scroll down the page for information on how to do this.
You can remove our app’s code manually from your theme.liquid file
- First, navigate to your Shopify admin.
- Click Online Store.
- Next, go to the Actions dropdown and select Edit Code.
- Open the theme.liquid file.
On the theme.liquid page search for any code containing the text “bcpo”
Here are a few examples of what our code looks like.
Below is the first two lines of code that our app needs to run. They will appear after your <head> tag near the top of the theme.liquid file
<link rel="stylesheet" href="https://obscure-escarpment-2240.herokuapp.com/stylesheets/bcpo-front.css">
<script>var bcpo_product={{ product | json }}; {% if product.metafields.bcpo.bcpo_data %}var bcpo_data={{ product.metafields.bcpo.bcpo_data }};{% endif %} {% if shop.metafields.bcpo.bcpo_settings %}var bcpo_settings={{ shop.metafields.bcpo.bcpo_settings }};{% endif %}var inventory_quantity = [];{% for v in product.variants %}inventory_quantity.push({{v.inventory_quantity}});{% endfor %}if(bcpo_product) { for (var i = 0; i < bcpo_product.variants.length; i += 1) { bcpo_product.variants[i].inventory_quantity = inventory_quantity[i]; }}window.bcpo = window.bcpo || {}; bcpo.cart = {{cart | json}}; bcpo.ogFormData = FormData;</script>
Below is the quickload code that must be removed. If you installed our app after 12/21 you don’t have to worry about this. After that date, we no longer added this code to themes.
<script src="https://obscure-escarpment-2240.herokuapp.com/js/best_custom_product_options.js?shop={{shop.permanent_domain}}"></script>
On installs after 12/21 we added code after the {{ content_for_header }} code which you can see below.
<script id="vopo-head">(function () { if (((document.documentElement.innerHTML.includes('asyncLoad') && !document.documentElement.innerHTML.includes('\/obscure' + '-escarpment-2240')) || (window.bcpo && bcpo.disabled)) && !window.location.href.match(/[&?]yesbcpo/)) return; var script = document.createElement('script'); script.src = "https://obscure-escarpment-2240.herokuapp.com/js/best_custom_product_options.js?shop={{shop.permanent_domain}}"; var vopoHead = document.getElementById('vopo-head'); vopoHead.parentNode.insertBefore(script, vopoHead); })();</script>
If you need any help removing our code, please contact us.