Skip to content

Instantly share code, notes, and snippets.

View BurlesonBrad's full-sized avatar
🎯
Focusing

Brad Griffin BurlesonBrad

🎯
Focusing
View GitHub Profile
@BurlesonBrad
BurlesonBrad / postcode_shipping.php
Created September 23, 2015 02:06 — forked from KZeni/postcode_shipping.php
Updated Postcode Shipping plugin for WordPress that supports Shipping Multiple Addresses in one cart.
<?php
/**
* Plugin Name: Postcode Shipping
* Description: This plugin allows you to set a flat shipping rate per country or state or postcode per Quantity/Order on WooCommerce.
* Version: 2.1.2
<?php
// Add Variation Settings
add_action( 'woocommerce_product_after_variable_attributes', 'variation_settings_fields', 10, 3 );
// Save Variation Settings
add_action( 'woocommerce_save_product_variation', 'save_variation_settings_fields', 10, 2 );
/**
* Create new fields for variations
@BurlesonBrad
BurlesonBrad / dropzonejs-wp-rest-api.js
Created January 29, 2016 03:21 — forked from soderlind/dropzonejs-wp-rest-api.js
DropzoneJS & WordPress REST API
/*
Uploading images is a two step process (from https://github.com/WP-API/WP-API/issues/1768#issuecomment-160540932):
POST the data to /wp/v2/media - this can either be as the request body, or in multipart format. This will upload the file, and give you a 201 Created response with a Location header. This header points to the post object for the attachment that has just been created.
PUT the post data to the endpoint returned in the Location header (which will look something like /wp/v2/media/{id}).
I do step 2 (PUT), if POST is a success, in myDropzone.on("success", function(file, response){}
*/
// dropzoneWordpressRestApiForm is the configuration for the element that has an id attribute
@BurlesonBrad
BurlesonBrad / functions.php
Created March 10, 2016 21:34 — forked from TimBHowe/functions.php
Reduce or remove WooCommerce 2.5 minimum password strength requirement for creating a user account. Warning: Use at your own risk.
<?php
/**
*Reduce the strength requirement on the woocommerce password.
*
* Strength Settings
* 3 = Strong (default)
* 2 = Medium
* 1 = Weak
* 0 = Very Weak / Anything
*/
@BurlesonBrad
BurlesonBrad / woocommerce-overrides.php
Created March 10, 2016 21:34 — forked from TimBHowe/woocommerce-variation-grid-add-cart.php
Include this in your theme to allow WooCommerce variable products to be displayed in a grid format with each variation having there own quantity and add to cart button, rather then the drop-down options. This should be include in your themes function file.
<?php
/******************************************************************************
* Variation Grid
*
* The following function allow for the theme to display product variations in a grid format.
* This code could be moved to a plugin but is in the theme function file as it used the
* themes grid system.
*
* @reference: http://www.eggplantstudios.ca/woocommerce-product-variation-add-cart-grid/
* ******************************************************************************/
<?php
/*
Author: Hans2103
credit: Jim Westergren, Jeedo Aquino & Flynsarmy
File: index-with-redis.php
Updated: 2013-05-27
This is a redis caching system for Wordpress based on Redis connection using PHPRedis.
https://github.com/nicolasff/phpredis
@BurlesonBrad
BurlesonBrad / index-with-redis.php
Created April 30, 2016 02:52 — forked from JimWestergren/index-with-redis.php
Redis as a Frontend Cache for WordPress
<?php
/*
Author: Jim Westergren & Jeedo Aquino
File: index-with-redis.php
Updated: 2012-10-25
This is a redis caching system for wordpress.
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/
<?php
/**
* Plugin Name: Woocommerce Vendors Bookings Management
* Description: Allows vendors to manage their bookings in the frontend
* Version: 1.0.0
* Author: Liam Bailey
* Author URI: http://webbyscots.com/
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
@BurlesonBrad
BurlesonBrad / wc-hide-coupons-cart-checkout.php
Created July 22, 2016 17:59 — forked from maxrice/wc-hide-coupons-cart-checkout.php
WooCommerce - hide the coupon form on the cart or checkout page, but leave coupons enabled for use with plugins like Smart Coupons and URL Coupons
<?php
// hide coupon field on cart page
function hide_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
@BurlesonBrad
BurlesonBrad / index.html
Created October 14, 2016 03:35 — forked from jazzido/index.html
Glowing text effect with CSS3
<html>
<head>
<style type="text/css">
.glow {
-webkit-animation-duration: 1s;
-webkit-animation-name: glow;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: infinite;
animation-duration: 1s;
animation-name: glow;