Skip to content

Instantly share code, notes, and snippets.

View webaware's full-sized avatar

Ross McKay webaware

View GitHub Profile
@webaware
webaware / gf-stripe-ignore-cc.php
Last active May 17, 2021 10:50
make GF Stripe add-on ignore credit card fields so that they can operate normally for other add-ons
<?php
/*
Plugin Name: GF Stripe Ignore CC Fields
Plugin URI: https://gist.github.com/webaware/0488a4bed8d16627af4de52092a356a6
Description: make GF Stripe add-on ignore credit card fields so that they can operate normally for other add-ons
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / gf-country-usa.php
Last active September 30, 2023 02:38
change United States to USA in Gravity Forms addresses, with support for Gravity Forms Address Enhanced
<?php
/*
Plugin Name: GF Country USA
Plugin URI: https://gist.github.com/webaware/edba921af11f06bdfd5147bab806f591
Description: change United States to USA in Gravity Forms addresses
Version: 2
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / mininum_age_woo_checkout_hook.php
Created June 6, 2020 03:59
change position of the Minimim Age question on WooCommerce checkout, for the plugin Minimum Age for WooCommerce https://wordpress.org/plugins/minimum-age-woocommerce/
/**
* change position of Minimim Age question on WooCommerce checkout
* @param string $hook_name
* @return string
*/
add_filter('mininum_age_woo_checkout_hook', function($hook_name) {
return 'woocommerce_checkout_order_review';
});
@webaware
webaware / gf-country-as-code.php
Last active May 29, 2020 04:28
Save the country subfield of a Gravity Forms address as the country code.
<?php
/*
Plugin Name: GF Country as Code
Plugin URI: https://gist.github.com/webaware/c5b624416ad4a5641daab54ba9c91a0a
Description: save the country subfield of an address as the country code
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / Gruntfile.js
Created July 5, 2019 02:44
Our favicon / site tile cheat sheet for WordPress themes
// add task to Gruntfile.js
shell: {
// @link https://github.com/sindresorhus/grunt-shell
favicon: {
options: {
execOptions: {
cwd: "./images/favicons"
}
},
command: [
@webaware
webaware / edd-additional-api-info.php
Last active December 31, 2018 06:58
Supply some additional info in the EDD Software Licensing API update info packet, specifically: Requires WordPress Version, Compatible up to, Requires PHP Version
<?php
/*
Plugin Name: EDD Additional API Info
Plugin URI: https://gist.github.com/webaware/ccc2a77a8375da9ff02404b1fc033d05
Description: supply additional info in the EDD Software Licensing API update info packet
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / code-excerpt.php
Created December 31, 2018 06:37
code excerpt for restoring the FAQ section to responses in EDD Software Licensing API calls
<?php
//...
add_filter('edd_sl_license_readme_response', array($this, 'eddMaybeRestoreFAQ'), 10, 3);
/**
* maybe restore the FAQ section to the update info package
* @param array $response
@webaware
webaware / em-extra-fee.php
Created July 12, 2018 23:44
Add an extra fee for eWAY transactions in Events Manager
<?php
/*
Plugin Name: Events Manager eWAY Extra Fee
Plugin URI: https://gist.github.com/webaware/ea1261d9aae60f86bb7d8b7ea7fea589
Description: Add a fee to booking for eWAY transactions
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / gf-paypal-billing-page.php
Last active March 23, 2018 04:04
Get Gravity Forms to select a better landing page with PayPal Standard, and make your credit card customers happier. https://snippets.webaware.com.au/snippets/select-paypal-landing-page-for-easy-digital-downloads/
<?php
/*
Plugin Name: GF PayPal Standard billing Page
Plugin URI: https://gist.github.com/webaware/a3172f7f81ff56cd844d7adca92726a6
Description: Get Gravity Forms to select a better landing page with PayPal Standard, and make your credit card customers happier.
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / edd-paypal-billing-page.php
Last active February 19, 2018 08:40
Get Easy Digital Downloads to select a better landing page with PayPal Standard, and make your credit card customers happier. https://snippets.webaware.com.au/snippets/select-paypal-landing-page-for-easy-digital-downloads/
<?php
/*
Plugin Name: EDD PayPal Standard billing page
Plugin URI: https://gist.github.com/webaware/8751f3e4923ef5e24b322c89e04d385a
Description: Get Easy Digital Downloads to select a better landing page with PayPal Standard, and make your credit card customers happier.
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/