This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign instagram_grid_width_large = 'large--one-sixth' %} | |
{% assign instagram_grid_width_medium = 'medium--one-third' %} | |
{% assign instagram_grid_width_small = 'small--one-half' %} | |
{% case section.settings.instagram_grid_setting_large %} | |
{% when 2 %} | |
{% assign instagram_grid_width_large = 'large--one-half' %} | |
{% when 3 %} | |
{% assign instagram_grid_width_large = 'large--one-third' %} | |
{% when 4 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Handsome checkout pages - remove products from cart if no purchase made | |
add_filter('wp', 'remove_hcc_cart_item'); | |
function remove_hcc_cart_item() { | |
if (is_admin() || defined('DOING_AJAX')) { | |
return; | |
} | |
global $post; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wc_1cu_after_item_add', 'update_order_meta_after_add', 10,1); | |
function update_order_meta_after_add($order){ | |
if(!empty($_GET['offer_notes']) ){ | |
//assume the last order item added. | |
$items = $order->get_items(); | |
end($items); | |
$item_id = key($items); | |
wc_add_order_item_meta( $item_id, 'upsell_order_notes', sanitize_text_field($_GET['offer_notes'])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="header__wrapper"> | |
{% if section.settings.header_enable_account or section.settings.header_enable_search or section.settings.header_message != '' %} | |
<div class="info-bar showMobile"> | |
<div class="wrapper text-center"> | |
{% if shop.customer_accounts_enabled and section.settings.header_enable_account %} | |
<div class="header-account-link"> | |
<a href="/account"><img src="{{ 'account.svg' | asset_url }}"></a> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
var btn = $('.hcc-t5-step-1 .btn-step2'); | |
if( btn.length == 0 ) btn = $('.btn-step1'); | |
btn.before('<style>.btn-step1-wrapper{display:none;} .hcc-t6-step-1 .btn-step1-wrapper{margin-top: 20px; margin-bottom: 27px; display:block;} .hcc-step-1 .btn-step1,.hcc-step-2 .btn-step1, .hcc-step-2 .btn-step1-wrapper, .hcc-t5-step-2 .btn-step1-wrapper, .hcc-t5-step-3 .btn-step1-wrapper,.hcc-t5-step-1 .btn-step2, .hcc-t6-step-1 .btn-step1{display:none !important;}</style>'); | |
btn.after('<button class="btn btn-success btn-lg wizard-button btn-block btn-step1-wrapper">'+btn.html()+'</button>'); | |
$('.btn-step1-wrapper').on("click", function(event){ | |
var inputs = $('.validate-required:visible').find('input'); | |
var ready = true; | |
var messages = []; | |
inputs.each(function(i, item){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields', 9999 ); | |
function custom_override_checkout_fields( $fields ) { | |
$address_2 = array( | |
'placeholder' => __('Appartment, suite, unit etc.(optional)', 'woocommerce'), | |
'label' => __('Appartment, suite, unit etc.', 'woocommerce'), | |
'class' => array('form-row-wide', 'address-field'), | |
'required' => false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wc_1cu_after_item_add', 'custom_after_item_add'); | |
function custom_after_item_add($order){ | |
if( !empty( $_GET['1cu_n'] ) && !empty( $order ) ) | |
{ | |
//get funnel for the $order | |
$funnel = gb_ocu_get_funnel_for_order_items( $order ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Remove specific variants. | |
Only works for products that have one option. | |
It won't work with products that have two or three options, like Size and Color. | |
{% endcomment %} | |
{% if product.options.size == 1 %} | |
<script> | |
var $addToCartForm = $('form[action="/cart/add"]'); | |
if (window.MutationObserver && $addToCartForm.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% unless product.has_only_default_variant %} | |
{% for option in product.options_with_values %} | |
{% assign downcased_option = option.name | downcase %} | |
{% if downcased_option contains 'color' or downcased_option contains 'colour' %} | |
{% if option.values.size > 1 %} | |
{% assign is_color = true %} | |
More {{ option.name }}s | |
{% endif %} | |
{% endif %} | |
{% endfor %} |
OlderNewer