Adding a script & php to functions.php

First you should include this code in your footer.php – or similar. Second: if ( is_product() ) { //you are already in php function add_klaviyo_script() { echo ‘<?php // dont need to echo php $ItemId = $product->id; // and variables The solution(footer.php): <footer> …things </footer> <?php if ( is_product() ) { $ImageUrl = wp_get_attachment_image_src( get_post_thumbnail_id( … Read more

which plugin is this? [closed]

This website is using Woocommerce which is an open-source e-commerce plugin for WordPress. I found it using Builtwith. Cannot say exactly which Product Addon plugin it could be using though. However, If you want a free WordPress Plugin then you can find it here : Product Addons for Woocommerce By Acowebs PPOM for WooCommerce By … Read more

WooCommerce order note color [closed]

WooCommerce 2.5 is on its way. That introduces a filter for $note_classes which was missing in previous version. Once that ships, you can use following code which adds css classes to order note containers. Then you can use those classes to apply colors. You need to put this in your functions.php file. function woo_process_order_note_classes($note_classes, $note){ … Read more

DatePicker in Woocommerce (My Account) Registration [closed]

Don’t include jquery from any other source, it will create conflict. Bcoz jQuery is pre bundled in wordpress by default. For your question, add an id or class to the input element then add the datepicker based on the class. For example <input type=”text” class=”da_test” value=”” > <script type=”text/javascript”> $(window).load(function() { $(‘.da_test’).glDatePicker(); }); </script> This … Read more

How does WP knows which template to use for a page

The native logic of template choice is contained in file aptly named template-loader.php. It processes the current context and calls respective get_*_template() functions, until a match is found. This process results in what is called Template Hierarchy. However as it was pointed out this only covers native core logic. Plugins can wildly customize this process … Read more

WooCommerce shipping tax

This isn’t really a wordpress issue, but I’m going to answer it since I think the nature of the issue is not understanding that the code behind what is seen as an error in the outcome, is doing precisely what would make sense if the values entered were needed to create a total rather than … Read more