Skip to content

Instantly share code, notes, and snippets.

View markduwe's full-sized avatar

Mark markduwe

View GitHub Profile
@markduwe
markduwe / featured_by_category.php
Created April 13, 2018 06:32
Gets a list of Woocommerce categories that have featured products and outputs them
@markduwe
markduwe / README.md
Last active November 5, 2017 11:19
Woocommerce SMS notification

Find out your carrier and if they have an email to SMS service. It'll be something like [email protected].

Replace "your_sms_email" with that email address and insert the code block into your theme functions file.

It hooks into the new order function, so sends an SMS when a new order is created.

Useful as the WooComm app doesn't yet have push notifications and emails can sometimes take a while to come through.

<?php
global $wp_query;
$modifications = array();
if( !empty( $_GET['catname'] ) && $_GET['thumbail'] == 'only_thumbnailed' ) {
$modifications['meta_query'][] = array(
'key' => '_thumbnail_id',
'value' => '',
'compare' => '!='
);
}
### Begin System Info ###
## Please include this information when posting support requests ##
Multisite: No
SITE_URL: http://stateofnationalism.test.gridhosted.co.uk
HOME_URL: http://stateofnationalism.test.gridhosted.co.uk
homeassistant:
name: Home
latitude: *YOURLAT*
longitude: *YOURLNG*
elevation: 55
unit_system: metric
time_zone: Europe/London
http:
api_password: *YOURPASSWORD*