This file contains hidden or 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 pw_count_discount_codes_created() { | |
$args = array( | |
'post_type' => 'edd_discount', | |
'meta_key' => '_edd_tracking_log_id', | |
'nopaging' => true, | |
'fields' => 'ids', | |
'update_post_term_cache' => false, | |
'update_post_meta_cache' => false | |
); |
This file contains hidden or 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 | |
/** | |
* Show Has Purchased Item Message | |
* | |
* Prints a notice when user has already purchased the item. | |
* | |
* @since 1.0 | |
* @global $user_ID | |
* @param int $download_id Download ID | |
* @return void |
This file contains hidden or 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: Force EDD Is Checkout | |
*/ | |
add_filter( 'edd_is_checkout', '__return_true' ); |
This file contains hidden or 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 pw_edd_Custom_countries( $countries ) { | |
$countries = array( | |
'US' => 'United States', | |
'CA' => 'Canada' | |
); | |
} | |
add_filter( 'edd_countries', 'pw_edd_Custom_countries' ); |
This file contains hidden or 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 pw_rcp_email_status( $new_status, $user_id ) { | |
if( 'active' != $new_status ) | |
return; | |
rcp_email_subscription_status( $user_id, 'active' ); | |
} | |
add_action( 'rcp_set_status', 'pw_rcp_email_status', 10, 2 ); |
This file contains hidden or 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
$('body').on( 'edd_discount_applied', function() { | |
alert( 'test' ); | |
}); |
This file contains hidden or 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 pw_sc_event_link( $link, $id, $size ) { | |
if ( $size == 'small' ) { | |
$link = '<a href="'. get_permalink( $id ) .'" title="' . esc_html( get_the_title( $id ) ) . '">•</a>'; | |
} else { | |
$link = '<a href="'. get_permalink( $id ) .'">'. esc_html( get_the_title( $id ) ) .'</a><br/>'; | |
} | |
return $link; | |
} | |
add_filter( 'sc_event_calendar_link', 'pw_sc_event_link' ); |
This file contains hidden or 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 Fields | |
*/ | |
function pw_edd_remove_fields() { | |
// Call remove action on each of the sections you want to remove | |
// You can locate the exact action name by looking at includes/checkout/template.php |
This file contains hidden or 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 Heartbeat API test plugin | |
* Description: Demonstrates how to use the Heartbeat API to update the payments count on the dashboard | |
*/ | |
// Load the heartbeat JS | |
function edd_heartbeat_enqueue( $hook_suffix ) { | |
// Make sure the JS part of the Heartbeat API is loaded. | |
wp_enqueue_script( 'heartbeat' ); |
This file contains hidden or 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: Get Gallery Image URLs | |
* Description: Sample plugin illustrating how to retrieve all image URLs of gallery images in a post | |
* Author: Pippin Williamson | |
* Version: 1.0 | |
*/ | |
function pw_show_gallery_image_urls( $content ) { |