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 | |
// Example of adding an error to the edd_set_error | |
/** | |
* Checks whether a discount code is active. | |
* | |
* @since 1.0 | |
* @param int $code_id | |
* @return bool | |
*/ | |
function edd_is_discount_active( $code_id = null ) { |
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( 'edd_purchase_link_defaults', 'ck_edd_edd_purchase_link_defaults', 10, 1 ); | |
function ck_edd_edd_purchase_link_defaults( $args ) { | |
if ( edd_get_download_price( $args['download_id'] ) == '0.00' ) | |
$args['price'] = false; | |
return $args; | |
} |
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 ck_edd_hide_payment_icons() { | |
$cart_total = edd_get_cart_total(); | |
if ( $cart_total ) | |
return; | |
remove_action( 'edd_purchase_form_before_submit', 'edd_checkout_final_total', 999 ); | |
// If you want to remove the payment options as well, you can uncomment these lines |
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 global $post; ?> | |
<table id="edd_checkout_cart" <?php if ( edd_is_ajax_enabled() ) { echo 'class="ajaxed"'; } ?>> | |
<thead> | |
<tr class="edd_cart_header_row"> | |
<?php do_action( 'edd_checkout_table_header_first' ); ?> | |
<th class="edd_cart_item_name"><?php _e( 'Item Name', 'edd' ); ?></th> | |
<th class="edd_cart_item_price"><?php _e( 'Item Price', 'edd' ); ?></th> | |
<th class="edd_cart_actions"><?php _e( 'Actions', 'edd' ); ?></th> | |
<?php do_action( 'edd_checkout_table_header_last' ); ?> | |
</tr> |
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 | |
public function test_update_payment_amount() { | |
$pre_update_total_earnings = get_option( 'edd_earnings_total' ); | |
$pre_update_payment_amount = edd_sanitize_amount( edd_get_payment_amount( $this->_payment_id ) ); | |
$payment_download = array( | |
'id' => $this->_post->ID, | |
'price_id' => '1', | |
'amount' => '100', | |
'quantity' => '1' |
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 - Commenter has purchased | |
* Description: Adds a 'Purchased' tag after a commenter who's purchased a download | |
* Author: Chris Klosowski | |
* Version: 1.0 | |
*/ | |
/** | |
* NOTE: This is currently not very performant. If an email address has a lot |
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
#jetpack_summary_widget .hndle { | |
background: inherit !important; | |
color: inherit !important; | |
} |
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
#!/usr/bin/env bash | |
if [ $# -lt 2 ]; then | |
echo "usage: $0 <plugin/theme> <repo-slug>" | |
exit 1 | |
fi | |
TYPE=$1"s" | |
REPO=$2 | |
echo "Changing Directory to:" |
OlderNewer