Skip to content

Instantly share code, notes, and snippets.

Pippin Williamson pippinsplugins

Block or report user

Report or block pippinsplugins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pippinsplugins
pippinsplugins / Warn when saving any EDD payment
Last active Apr 25, 2019 — forked from mintplugins/Warn when saving any EDD payment
Just a quick sample to demonstrate how you could approach asking "Are you sure" when saving a payment
View Warn when saving any EDD payment
function custom_prefix_warn_about_old_refunds_js() {
if ( ! isset( $_GET['prevent_accidental_refunds_js'] ) ) {
return false;
}
header('Content-Type: application/javascript');
?>
View gist:91b57ab9b838dbe01ab8aa34146a136d
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Allows plugins to use their own update API.
*
* @author Easy Digital Downloads
* @version 1.6.13
View how.php
<?php
add_filter( 'mailchimp_sync_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber, $user ) {
$affiliate = affiliate_wp()->affiliates->get_by( 'user_id', $user->ID );
if( ! empty( $affiliate ) ) {
$subscriber->merge_fields['MERGE6'] = $affiliate->affiliate_id;
}
return $subscriber;
}, 10, 2 );
View fes-wp-44.patch
diff --git a/classes/class-setup.php b/classes/class-setup.php
index 149674b..9dd5d27 100644
--- a/classes/class-setup.php
+++ b/classes/class-setup.php
@@ -318,7 +318,10 @@ class FES_Setup {
'title'
),
'can_export' => true,
- 'show_ui' => false,
+ 'show_ui' => true,
@pippinsplugins
pippinsplugins / edd-commission-update.php
Created Jul 21, 2015
Bulk set EDD Commissions to "unpaid" for all commissions after a specific date
View edd-commission-update.php
<?php
$commissions = get_posts( array(
'post_type' => 'edd_commission',
'posts_per_page' => -1,
'fields' => 'ids',
'date_query' => array(
'after' => array(
'year' => 2015,
'month' => 03,
'day' => 15
@pippinsplugins
pippinsplugins / gist:542ff08a4d1b8aa49140
Last active Aug 29, 2015
Restrict Content Pro base gateway class
View gist:542ff08a4d1b8aa49140
<?php
/**
* Payment Gateway Base Class
*
* @package Restrict Content Pro
* @subpackage Classes/Roles
* @copyright Copyright (c) 2012, Pippin Williamson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 2.1
*/
@pippinsplugins
pippinsplugins / gist:ececad5d57e3946c5af3
Last active Apr 22, 2019
Adds billing address fields to Restrict Content Pro
View gist:ececad5d57e3946c5af3
<?php
/**
* Plugin Name: Restrict Content Pro - Collect Billing Address
* Description: Collect customers billing address during registration through Restrict Content Pro
* Author: Pippin Williamson
* Version: 1.0
*/
class RCP_Billing_Address {
@pippinsplugins
pippinsplugins / edd-slack-slash-command.php
Last active Oct 14, 2018 — forked from jameslaws/edd-slack-slash-command.php
A Slash command to retrieve earnings in Restrict Content Pro for the specified time period. Based on http://wpninjas.com/using-slack-slash-commands-to-get-edd-sales-info/
View edd-slack-slash-command.php
<?php
function pw_rcp_earnings_slash_command() {
# Check to make sure this is a Slash Command Request
if ( ! isset( $_REQUEST['slack_slash'] ) && 'your_custom_string' != $_REQUEST['slack_slash'] )
return false;
# Check to see if a token has been passed as well
if ( ! isset( $_REQUEST['token'] ) )
@pippinsplugins
pippinsplugins / gist:55a3d6cbf9e9f2d51789
Created Dec 8, 2014
My answer to why I don't actively fight piracy.
View gist:55a3d6cbf9e9f2d51789

While I'm often a member of a rather small group of people that think this way, I actually believe very strongly that spending time and effort figuring out how to make it harder for dishonest people to take things from you is generally a waste of time.

security is all about steadily making it harder for dishonest people to try stuff.

Piracy happens in just about every industry, but the impact that piracy has on your business largely has to do with how you choose to fight it. If you take an active approach and invest multitudes of time, effort, and money into combatting those that have no appreciation for the value of your product, you will actually undermine the intrinsic value of the product. How? Simply by investing time, money and effort in the wrong place. I prefer to take the time, effort and money that I could use to fight piracy and invest it directly into real customers and the people that have an appreciation for what has been built. Is some money lost due to piracy? Maybe. Is a whole lot more g

@pippinsplugins
pippinsplugins / gist:5629997157daa96ad9a7
Created Oct 10, 2014
Adds a handling fee to EDD purchases that go through PayPal Standard
View gist:5629997157daa96ad9a7
<?php
/**
* Plugin Name: Easy Digital Downloads - PayPal Handling Fee
* Description: Adds a handling fee to EDD purchases that go through PayPal
* Author: Pippin Williamson
* Author URI: http://pippinsplugins.com
* Contributors: mordauk
* Version: 1.0
*/
You can’t perform that action at this time.