Skip to content

Instantly share code, notes, and snippets.

View clintN's full-sized avatar

Clint Neilsen Digital Growth Brisbane clintN

View GitHub Profile
@clintN
clintN / Modal pop-up
Created January 30, 2019 03:36
Add this code to the <head> in order to have Bootstrap model open https://getbootstrap.com/docs/4.0/components/modal/
<script type="text/javascript">
$(document).ready(function(){
$("#myModal").modal('show');
});
</script>
@clintN
clintN / Shopify footer
Created May 8, 2018 01:05
Shopify: - footer remove "Shopify" & Theme
<div id="rr-tabs">
<ul class="nav nav-pills nav-justified" role="tablist">
<li role="presentation" class="active">
<a role="tab" data-toggle="tab" href="#tab-one" aria-expanded="true" aria-controls="tab-one">
<h4>one</h4>
</a>
</li>
<li role="presentation">
<a role="tab" data-toggle="tab" href="#tab-two" aria-expanded="false" aria-controls="tab-two">
<h4>two</h4>
@clintN
clintN / Woocommerce PHP JScript
Last active November 5, 2017 05:31
Hides shipping if Local Pickup selected in flatsome
add_action( 'woocommerce_after_checkout_form', 'bbloomer_disable_shipping_local_pickup' );
function bbloomer_disable_shipping_local_pickup( $available_gateways ) {
global $woocommerce;
// Part 1: Hide shipping based on the static choice @ Cart
$chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
$chosen_shipping_no_ajax = $chosen_methods[0];
if ( 0 === strpos( $chosen_shipping_no_ajax, 'local_pickup' ) ) {
@clintN
clintN / WooCommerce PHP
Created November 5, 2017 03:26
if Local Pick-up condition
/**
* Do something if local pickup
*/
add_action( 'woocommerce_after_checkout_form', 'bbloomer_disable_shipping_local_pickup' );
function bbloomer_disable_shipping_local_pickup( $available_gateways ) {
global $woocommerce;
$chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
$chosen_shipping_no_ajax = $chosen_methods[0];
@clintN
clintN / WooCommerce JQuery datepicker
Last active March 25, 2025 12:55
Adds a datepicker widget to WooCommerce checkout
// Register main datepicker jQuery plugin script
add_action( 'wp_enqueue_scripts', 'enabling_date_picker' );
function enabling_date_picker() {
// Only on front-end and checkout page
if( is_admin() || ! is_checkout() ) return;
// Load the datepicker jQuery-ui plugin script
wp_enqueue_script( 'jquery-ui-datepicker' );
}
<img src="..."class="img-responsive margin-image pull-right">
<img src="..."class="img-responsive margin-image pull-right">
<img src="..."class="img-responsive margin-image pull-right">
<img src="..."class="img-responsive margin-image pull-right">