The code doesn’t get installed to unactivated themes. Once a theme is activated, the code gets automatically installed when the app is opened. 

You can also manually insert this code between the <head> and </head> tags in the theme.liquid file\ns.

  • Under the theme you want to edit click on Actions > Edit Code
  • In the theme.liquid file, add this code just after <head> (the opening head tag).

<link rel="stylesheet" href="">
  <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 bcpo_cdn = "{{'bcpo_cdn'|asset_url}}";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]; }}</script>

Click here for more information on editing your theme code