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 my_child_theme_edd_download_supports( $supports ) { | |
// add page-attributes | |
$add_support = array( 'page-attributes' ); | |
// merge it back with the original array | |
return array_merge( $add_support, $supports ); | |
} | |
add_filter( 'edd_download_supports', 'my_child_theme_edd_download_supports' ); |
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 edd_search_by_id( $where ) { | |
if( is_admin() ) { | |
global $wpdb, $pagenow, $typenow; | |
if ( ! ( 'download' == $typenow && in_array( $pagenow, array( 'edit.php' ) ) ) ) | |
return $where; | |
if ( isset( $_GET['s'] ) && !empty( $_GET['s'] ) && intval( $_GET['s'] ) != 0 ) { |
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 my_child_theme_edd_add_currency( $currencies ) { | |
// change these values | |
$currencies['YNC'] = 'Your New Currency'; | |
return $currencies; | |
} | |
add_filter( 'edd_currencies', 'my_child_theme_edd_add_currency' ); |
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 | |
// set decimal places to 8 | |
function my_child_theme_edd_format_amount_decimals( $decimal_places ) { | |
return 8; | |
} | |
add_filter( 'edd_format_amount_decimals', 'my_child_theme_edd_format_amount_decimals' ); | |
// format final amount with (float) | |
function my_child_theme_edd_format_amount( $formatted, $amount, $decimals, $decimal_sep, $thousands_sep ) { |
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 edd_custom_edd_checkout_button_purchase() { | |
global $edd_options; | |
$color = isset( $edd_options[ 'checkout_color' ] ) ? $edd_options[ 'checkout_color' ] : 'gray'; | |
$color = ( $color == 'inherit' ) ? '' : $color; | |
$style = isset( $edd_options[ 'button_style' ] ) ? $edd_options[ 'button_style' ] : 'button'; |
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 | |
remove_action( 'edd_payments_page_bottom', 'edd_payment_history_mobile_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 | |
function my_child_theme_remove_edd_shortcode_column( $download_columns ) { | |
unset( $download_columns['shortcode'] ); | |
return $download_columns; | |
} | |
add_filter( 'edd_download_columns', 'my_child_theme_remove_edd_shortcode_column' ); |
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 edd_custom_success_page_share() { | |
global $edd_receipt_args, $edd_options; | |
$payment = get_post( $edd_receipt_args['id'] ); | |
$meta = edd_get_payment_meta( $payment->ID ); | |
$cart = edd_get_payment_meta_cart_details( $payment->ID, true ); | |
$first_download = array_values( $cart ); | |
$first_download = array_shift( $first_download ); |
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 my_child_theme_filter_taxonomy( $query ) { | |
if ( is_admin() || ! $query->is_main_query() ) | |
return; | |
if( $query->is_tax( 'download_category' ) ) { | |
$query->set( 'posts_per_page', 50 ); |
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 | |
/** | |
* This template is used to display the purchase summary with [edd_receipt] | |
*/ | |
global $edd_receipt_args, $edd_options; | |
$payment = get_post( $edd_receipt_args['id'] ); | |
$meta = edd_get_payment_meta( $payment->ID ); | |
$cart = edd_get_payment_meta_cart_details( $payment->ID, true ); | |
$user = edd_get_payment_meta_user_info( $payment->ID ); |