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
| add_filter( 'edds_create_payment_intent_args', function( $args, $purchase_data ) { | |
| $args['metadata']['custom-field'] = 'My awesome custom data'; | |
| return $args; | |
| }, 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
| function _edd_payments_table_columns( $columns ) { | |
| $columns['download_name'] = __('Download Name'); | |
| return $columns; | |
| } | |
| add_filter( 'edd_payments_table_columns', '_edd_payments_table_columns' ); | |
| function _edd_payments_table_column( $value, $payment_ID, $column_name ) { | |
| if( $column_name == 'download_name' ) { |
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 | |
| /** | |
| * Add more columns to the order table | |
| * | |
| * - Products | |
| * - Country | |
| */ | |
| /** | |
| * Add table columns | |
| * |
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
| add_action( 'wp_loaded', 'prefix_disable_aa_purchase_renewal_behaviors' ); | |
| /** | |
| * Disable the All Access purchase button behaviors so that a single customer can purchase multiple passes. | |
| * | |
| * @return void | |
| */ | |
| function prefix_disable_aa_purchase_renewal_behaviors() { | |
| if ( ! function_exists( 'edd_all_access' ) ) { | |
| return; | |
| } |
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
| add_filter( 'edd.mailchimp.customer', 'prefix_update_customer_language' ); | |
| /** | |
| * Updates the language of a customer. | |
| * | |
| * @param array $customer The customer object to update. | |
| * @return array | |
| */ | |
| function prefix_update_customer_language( $customer ) { | |
| $customer['language'] = strtolower( get_user_locale() ); |