Skip to content

Instantly share code, notes, and snippets.

View garretthyder's full-sized avatar
🗞️
Working away

Garrett Hyder garretthyder

🗞️
Working away
View GitHub Profile
@garretthyder
garretthyder / functions.php
Last active September 18, 2015 22:22 — forked from daithi-coombes/functions.php
To enable 'price from' and 'price to' search for wordpress [WP Property Plugin](https://usabilitydynamics.com/products/wp-property/forum/topic/price-range-search/)
/**
* Rename these to the form input names you are going to use.
* When you create a new attribute in Properties->Settings->Developer
* the form input name will appear greyed out under the attribute name
*/
define('SPRP_SEARCH_FROM_KEY', 'price_from_per_month');
define('SPRP_SEARCH_TO_KEY', 'price_to_per_month');
function parse_search(){
@garretthyder
garretthyder / woocommerce_emails_attach_downloadables.php
Created August 13, 2015 11:45
Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments
<?php
// Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments
function woocommerce_emails_attach_downloadables($attachments, $status, $order) {
if ( ! is_object( $order ) || ! isset( $status ) ) {
return $attachments;
}
if ( empty( $order ) ) {
return $attachments;