This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: Custom EDD Checkout Fields | |
*/ | |
// output our custom field HTML | |
function pippin_edd_custom_checkout_fields() { | |
?> | |
<p id="edd-phone-wrap"> | |
<label class="edd-label" for="edd-phone"><?php _e('Telephone Number', 'pippin_edd'); ?><span class="edd-required-indicator">*</span></label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function to display only upcoming events for Sugar Events Calendar on the main Events archive. | |
function sc_filter_events( $query ) { | |
if( is_post_type_archive('sc_event') && (!is_admin()) ) { | |
$meta = array( | |
array( | |
'key' => 'sc_event_date_time', | |
'value' => time(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function modify_edd_product_supports($supports) { | |
$supports[] = 'comments'; | |
return $supports; | |
} | |
add_filter('edd_download_supports', 'modify_edd_product_supports'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Plugin Name: Custom Functions */ | |
function pw_format_currency( $formatted, $currency, $price ) { | |
if( ! is_admin() && $price == 0.00 ) { | |
return 'Free'; | |
} | |
return $formatted; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use minified libraries if SCRIPT_DEBUG is turned off | |
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; | |
wp_enqueue_script( 'my-script-handle', plugin_dir_url( __FILE__ ) . 'assets/my-file' . $suffix . '.js', array( 'jquery' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: EDD Double Pagination | |
*/ | |
function pw_edd_duplicate_pagination() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register the payment icon | |
*/ | |
function pw_edd_payment_icon($icons) { | |
$icons['url/to/your/image/icon.png'] = 'Name of the Payment Method'; | |
return $icons; | |
} | |
add_filter('edd_accepted_payment_icons', 'pw_edd_payment_icon'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: Easy Digital Downloads - Daily Cron for Abandoned Payments | |
* Description: Checks for abandoned payments daily, instead of just weekly | |
* Author: Pippin Williamson | |
*/ | |
/** | |
* Grab all pending payments older than one day |