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 free_custom_export_users() { | |
| if ( isset( $_GET['export_my_users'] ) && current_user_can( 'manage_options' ) ) { | |
| header('Content-Type: text/csv; charset=utf-8'); | |
| header('Content-Disposition: attachment; filename=users_export.csv'); | |
| $output = fopen('php://output', 'w'); | |
| // Define your column headers here (Add your custom field names) |
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 | |
| use Give\Framework\FieldsAPI\Text; | |
| add_action('givewp_donation_form_schema', function($form, $formId) { | |
| //Country field | |
| $country = Text::make('country') | |
| ->showInReceipt() | |
| ->receiptLabel(__('Country', 'give-tributes')) | |
| ->label(__('Cuntry', 'give-tributes')) |
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_filter('give_export_get_data_donors', function($exportData) { | |
| global $wpdb; | |
| /** | |
| * Map of output column names to their meta key prefixes | |
| */ | |
| $addressFields = [ | |
| 'address_line1' => '_give_donor_address_billing_line1', |
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_filter( 'give_api_donations_endpoint', function( $donations ) { | |
| // Check if donations array has the expected structure | |
| if ( ! isset( $donations['donations'] ) || ! is_array( $donations['donations'] ) ) { | |
| return $donations; | |
| } | |
| // Loop through each donation and add the fund title | |
| foreach ( $donations['donations'] as $key => &$donation ) { |
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 | |
| namespace GiveGoCardless\Actions; | |
| use Give\Donations\Models\Donation; | |
| use Give\Framework\PaymentGateways\Exceptions\PaymentGatewayException; | |
| use GiveGoCardless\DataTransferObjects\GoCardlessPayment; | |
| use GiveGoCardless\Helpers\GoCardlessResources; | |
| /** |
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_action('givewp_donation_form_schema', function($form) { | |
| /** @var \Give\Framework\FieldsAPI\Amount $field */ | |
| $field = $form->getNodeByName('amount'); | |
| if (!$field) { | |
| 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
| <?php | |
| /** | |
| * Give Renewal Recipient Admin Email | |
| * | |
| * @package Give_Recurring | |
| * @subpackage Includes/Admin/Emails | |
| * @copyright Copyright (c) 2018, GiveWP | |
| * @license https://opensource.org/licenses/gpl-license GNU Public License | |
| * @since 1.8.3 |
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_action( 'wp_footer', function(){ | |
| ?> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const wrapper = document.querySelector('.root-data-givewp-embed'); | |
| const iframe = wrapper?.querySelector('iframe'); | |
| if (!wrapper || !iframe) { | |
| 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
| <?php | |
| function donation_id_tag( $email_tags ) { | |
| $new_email_tag = array( | |
| 'tag' => 'donation_id', | |
| 'description' => esc_html__( 'This tag outputs the donation ID', 'give' ), | |
| 'function' => 'get_donation_id', | |
| 'context' => 'general', // Context can be general, donor, form or donation | |
| ); |
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 a custom 'monthly' interval to WordPress cron schedules. | |
| */ | |
| add_filter( 'cron_schedules', 'add_custom_monthly_cron_schedule' ); | |
| function add_custom_monthly_cron_schedule( $schedules ) { | |
| $schedules['monthly'] = array( | |
| 'interval' => MONTH_IN_SECONDS, // Approximately 30 days | |
| 'display' => __( 'Once Monthly', 'text-domain' ) | |
| ); | |
| return $schedules; |
NewerOlder