Skip to content

Instantly share code, notes, and snippets.

View conschneider's full-sized avatar
🐼
Relax. Nothing is under control.

Con Schneider conschneider

🐼
Relax. Nothing is under control.
View GitHub Profile
@conschneider
conschneider / edit-woocommerce-checkout-template.php
Created June 27, 2017 10:15 — forked from bekarice/edit-woocommerce-checkout-template.php
Add content and notices to the WooCommerce checkout - sample code
/**
* Each of these samples can be used - note that you should pick one rather than add them all.
*
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/
**/
/**
* Add a content block after all notices, such as the login and coupon notices.
*
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@conschneider
conschneider / docker-wordpress.sh
Last active June 15, 2017 15:43 — forked from tatemz/docker-wordpress.sh
A quick way to get a WordPress installation up and running with Docker. Mounts the WordPress root folder as well for exchange between host and Docker container.
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
version: "2"
services:
my-wpdb:
@conschneider
conschneider / Woocommerce Bookings Dropdown + handles Resources
Created February 20, 2017 15:55 — forked from LiamBailey/Woocommerce Bookings Dropdown + handles Resources
Changes date-picker fields for dropdown of available dates, and refreshes dropdown if resource dropdown is changed
<?php
/*
Plugin Name: Woocommerce Bookings Dropdown
Description: Swaps the date picker for a dropdown of dates
Version: 1.0.0
Author: Webby Scots
Author URI: http://webbyscots.com/
*/
add_action('wp_ajax_wswp_refresh_dates','wswp_refresh_dates');
add_action('wp_ajax_nopriv_wswp_refresh_dates','wswp_refresh_dates');
@conschneider
conschneider / woocommerce-simple-or-variable.php
Last active January 22, 2017 17:09 — forked from patrickgilmour/woocommerce-simple-or-variable.php
WooCommerce conditional to test if a Product is Simple or Variable.
<?php
/**
* Is a WooCommerce Product Simple or Variable
*
* see http://wordpress.org/support/topic/condition-to-check-if-product-is-simple-or-variable
*/
//get product right first to access methods of WC_Product()
$product = wc_get_product( get_the_ID() );
@conschneider
conschneider / wc-hide-coupons-cart-checkout.php
Created January 14, 2017 16:35 — 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;
@conschneider
conschneider / wp-query-ref.php
Created December 31, 2016 21:15 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(