Skip to content

Instantly share code, notes, and snippets.

View timmyc's full-sized avatar

Timmy Crawford timmyc

View GitHub Profile
<?php
/**
* Plugin Name: WooCommerce Remove Admin Version Option
* Plugin URI: https://woocommerce.com
* Description: Adds a tool to the WooCommerce > Status > Tools page to remove the woocommerce_admin_version option
* Author: WooCommerce
* Domain Path: /languages
* Version: 0.1
*/
<?php
/**
* Plugin Name: WooCommerce Calypso Bridge Helper
* Plugin URI: https://woocommerce.com
* Description: Utility to assist testing wc-calypso-bridge locally
* Author: WooCommerce
* Version: 0.1
*/
function woocommerce_ecommplan_helper_handler() {
@timmyc
timmyc / woocommerce-remove-db-update-notice.php
Created April 10, 2020 21:08
Set WooCommerce DB Update Notice as Actioned
<?php
/**
* Plugin Name: Remove WooCommerce DB Notice
* Plugin URI: https://woocommerce.com
* Description: Clears out any pending WooCommerce DB Update notices
* Author: WooCommerce
* Domain Path: /languages
* Version: 0.1
*/
<?php
/**
* Plugin Name: Woo Tracks Filter Examples
* Plugin URI: https://woocommerce.com
* Description: Examples of how to filter track properties
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Domain Path: /languages
* Version: 0.1.0
*/
@timmyc
timmyc / gist:ba87390aba75b89181193bc55ed0ef9d
Created January 28, 2020 18:51
tweaks to induce the retryAuth code path
diff --git a/client/jetpack-connect/authorize.js b/client/jetpack-connect/authorize.js
index 0cbcb1bf79..ec193679bc 100644
--- a/client/jetpack-connect/authorize.js
+++ b/client/jetpack-connect/authorize.js
@@ -726,7 +726,7 @@ const connectComponent = connect(
const isMobileAppFlow = !! mobileAppRedirect;
return {
- authAttempts: getAuthAttempts( state, urlToSlug( authQuery.site ) ),
+ authAttempts: 1,
@timmyc
timmyc / disable-jetpack-woocommerce-analytics.php
Created July 24, 2019 23:52
remove WooCommerce Analytics from Jetpack
<?php
/**
* @package Disable_Jetpack_WooCommerce_Analytics
* @version 1.0.0
*/
/*
Plugin Name: Disable Jetpack WooCommerce Analytics
Plugin URI: https://github.com/Automattic/jetpack
Description: This plugin disables the Jetpack WooCommerce Analytics module
Version: 1.0.0
Index: printful-shipping.php
===================================================================
--- printful-shipping.php (revision 2054638)
+++ printful-shipping.php (working copy)
@@ -63,7 +63,6 @@
require_once 'includes/class-printful-admin-support.php';
require_once 'includes/class-printful-size-chart-tab.php';
require_once 'includes/class-printful-size-chart-tab.php';
- require_once 'includes/class-printful-rest-api-controller.php';
diff --git a/includes/api/class-wc-rest-reports-revenue-stats-controller.php b/includes/api/class-wc-rest-reports-revenue-stats-controller.php
index 7dbbe00..8c289e3 100644
--- a/includes/api/class-wc-rest-reports-revenue-stats-controller.php
+++ b/includes/api/class-wc-rest-reports-revenue-stats-controller.php
@@ -62,22 +62,26 @@ class WC_REST_Reports_Revenue_Stats_Controller extends WC_REST_Reports_Controlle
$reports_revenue = new WC_Reports_Revenue_Query( $query_args );
$report_data = $reports_revenue->get_data();
+ $totals = $report_data ? $report_data->totals : array();
+ $intervals = $report_data ? $report_data->intervals : array();
@timmyc
timmyc / gist:e4ed93c9e8087c42b406
Created December 18, 2014 17:44
jsxhint pre-commit hook
#!/bin/sh
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx*$")
if [ "$files" = "" ]; then
exit 0
fi
pass=true
echo "\nValidating .jsx and .js:\n"

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert