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 drw_edd_create_file_row($post_id, $key, $args) { ?> | |
<div class="edd-form-group edd-your_meta_key"> | |
<label for="edd_download_files-<?php echo esc_attr( $key ); ?>-your_meta_key" class="edd-form-group__label edd-repeatable-row-setting-label"><?php esc_html_e( 'Your Meta Title', 'easy-digital-downloads' ); ?></label> | |
<div class="edd-form-group__control"> | |
<?php | |
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_action( 'edd_complete_purchase', 'draw_update_ck_with_customer_tag' ); | |
function draw_update_ck_with_customer_tag( $payment_id ) { | |
$ck_customer_tag_id = 1234; | |
$edd_payment = new EDD_Payment($payment_id); | |
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 | |
/*** | |
Update Convertkit email with a Convertkit tag based on EDD download ID | |
Conditionally set Convertkit tag ID based on EDD download ID | |
***/ | |
add_action( 'edd_complete_purchase', 'drw_update_ck_after_edd_purchase' ); |
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 | |
/*** | |
Remove new user notification emails in EDD | |
***/ | |
remove_action( 'edd_insert_user', 'edd_new_user_notification', 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 | |
function drw_edd_global_labels($labels) { | |
$labels = array( | |
'singular' => __('Product','edd'), | |
'plural' => __('Products','edd') | |
); | |
return $labels; |
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 drw_purchase_confirmation_text( $payment, $edd_receipt_args ) { | |
$payment = new EDD_Payment($payment->ID); | |
$downloads = $payment->downloads; | |
$gateway = $payment->gateway; //stripe //check | |
$gateway_text = ( 'stripe' == $gateway ) ? __('Credit Card', 'drw') : __('Check', 'drw'); | |
printf('<div class="message">%s %s</div>', __('You have paid by'), $gateway_text); |
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 | |
/*** | |
Make API call if Recurring Payments subscription status has changed | |
**/ | |
add_action( 'edd_recurring_update_subscription', 'drw_subscription_update_callback', 10, 1); | |
function drw_subscription_update_callback( $subscription_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 | |
/*** | |
Actions after purchase status is changed - useful for check payments | |
***/ | |
function drw_edd_after_check_purchase( $payment_id, $new_status, $old_status ) { | |
//bail if the order isn't approved | |
if ( !in_array($new_status, array('publish', 'complete')) ) { |
NewerOlder