- Handle Custom Stripe Webhook Events
- suredonation_export_secret_option_keys Filter Hook
- suredonation_import_batch_complete Action Hook
- suredonation_import_complete Action Hook
- suredonation_import_donation_inserted Action Hook
- suredonation_import_donor_inserted Action Hook
- suredonation_import_session_created Action Hook
- suredonation_import_givewp_batch_complete Action Hook
- suredonation_import_givewp_session_created Action Hook
- suredonation_privacy_data_exported Action Hook
- Validate Field Filter Hook
- Validatable Blocks Filter Hook
- Update donation data, Filter Hook
- OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
- suredonation_show_setup_gateway_notice Filter Hook
- suredonation_show_review_notice_gateway Filter Hook
- suredonation_show_review_notice_donation Filter Hook
- suredonation_registered_payment_methods Filter Hook
- suredonation_register_additional_blocks Filter Hook
- suredonation_receipt_html Filter Hook
- suredonation_phone_geo_enabled Filter Hook
- suredonation_phone_geo_api_hourly_cap Filter Hook
- suredonation_paypal_webhook_handle_event Filter Hook
- suredonation_paypal_sdk_args Filter Hook
- suredonation_output_campaign_meta_tags Filter Hook
- suredonation_new_donor_user_data Filter Hook
- suredonation_integration_payload Filter Hook
- suredonation_import_phase_mappers Filter Hook
- suredonation_import_givewp_phases Filter Hook
- suredonation_import_givewp_phase_mappers Filter Hook
- suredonation_import_donation_row Filter Hook
- suredonation_import_campaigns_limit Filter Hook
- suredonation_field_block_config Filter Hook
- suredonation_export_one_time_only Filter Hook
- suredonation_export_campaigns_limit Filter Hook
- suredonation_email_smart_tags Filter Hook
- suredonation_email_smart_tag_groups Filter Hook
- suredonation_email_field_char_limits Filter Hook
- suredonation_disable_default_styles Filter Hook
- suredonation_default_validation_messages Filter Hook
- suredonation_default_email_notifications Filter Hook
- suredonation_create_donation_data Filter Hook
- suredonation_config_abilities Filter Hook
- suredonation_available_payment_methods Filter Hook
- suredonation_allowed_form_html Filter Hook
- suredonation_allowed_form_blocks Filter Hook
- Validatable Blocks Filter Hook
- Update donation data, Filter Hook
- OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
- suredonation_show_setup_gateway_notice Filter Hook
- suredonation_show_review_notice_gateway Filter Hook
- suredonation_show_review_notice_donation Filter Hook
- suredonation_registered_payment_methods Filter Hook
- suredonation_register_additional_blocks Filter Hook
- suredonation_receipt_html Filter Hook
- suredonation_phone_geo_enabled Filter Hook
- suredonation_phone_geo_api_hourly_cap Filter Hook
- suredonation_paypal_webhook_handle_event Filter Hook
- suredonation_paypal_sdk_args Filter Hook
- suredonation_output_campaign_meta_tags Filter Hook
- suredonation_new_donor_user_data Filter Hook
- suredonation_integration_payload Filter Hook
- suredonation_import_phase_mappers Filter Hook
- suredonation_import_givewp_phases Filter Hook
- suredonation_import_givewp_phase_mappers Filter Hook
- suredonation_import_donation_row Filter Hook
- suredonation_import_campaigns_limit Filter Hook
- suredonation_field_block_config Filter Hook
- suredonation_export_secret_option_keys Filter Hook
- suredonation_export_one_time_only Filter Hook
- suredonation_export_campaigns_limit Filter Hook
- suredonation_email_smart_tags Filter Hook
- suredonation_email_smart_tag_groups Filter Hook
- suredonation_email_field_char_limits Filter Hook
- suredonation_disable_default_styles Filter Hook
- suredonation_default_validation_messages Filter Hook
- suredonation_default_email_notifications Filter Hook
- suredonation_create_donation_data Filter Hook
- suredonation_config_abilities Filter Hook
- suredonation_available_payment_methods Filter Hook
- suredonation_allowed_form_html Filter Hook
- suredonation_allowed_form_blocks Filter Hook
- suredonation_import_batch_complete Action Hook
- suredonation_import_complete Action Hook
- suredonation_import_donation_inserted Action Hook
- suredonation_import_donor_inserted Action Hook
- suredonation_import_session_created Action Hook
- suredonation_import_givewp_batch_complete Action Hook
- suredonation_import_givewp_session_created Action Hook
- suredonation_privacy_data_exported Action Hook
- suredonation_enqueue_form_frontend_scripts Action Hook
- suredonation_after_form_duplicated Action Hook
- suredonation_email_sent Action Hook
- suredonation_donor_user_created Action Hook
- suredonation_donation_refunded Action Hook
- suredonation_donation_status_changed Action Hook
- suredonation_donation_completed Action Hook
- suredonation_new_donation Action Hook
- suredonation_donation_created Action Hook
suredonation_export_one_time_only Filter Hook
Overview
The suredonation_export_one_time_only filter controls whether the SureDonation donation export includes only one-time donations or also includes recurring donations and renewal records.
By default, the filter returns true, which keeps the export limited to one-time donations.
Use this filter when you need to include subscription-related donation records in the CSV export.
When to Use This Filter
Use this filter when you need to:
- Export recurring donations.
- Include subscription renewal records.
- Export all donation records instead of only one-time donations.
- Customize the type of donation rows included in the export.
Filter Signature
apply_filters( 'suredonation_export_one_time_only', true );Parameters
| Parameter | Type | Description |
| $one_time_only | bool | Determines whether the export is restricted to one-time donations. |
Default Value
true
When the value is true, SureDonation restricts the export to donations that are not associated with a subscription.
Return Value
Return a boolean value:
- true to export only one-time donations.
- false to include recurring donations and renewal records.
return false;
This allows subscription-related rows to be included in the export.
Basic Usage
add_filter( 'suredonation_export_one_time_only', 'your_custom_function', 10, 1);
function your_custom_function( $one_time_only ) {
// Modify the export behavior.
return $one_time_only;
}Example: Export Recurring Donations
To include recurring donations and renewal records in the CSV export:
add_filter( 'suredonation_export_one_time_only', 'mysite_export_everything', 10, 1 );
function mysite_export_everything( $one_time_only ) {
// Include recurring donations and renewals.
return false;
}With this configuration, the export is no longer restricted to one-time donations.
Default Export Behavior
By default: $one_time_only = true;
SureDonation adds conditions to the export query so that donations with subscription relationships are excluded.
Conceptually, the export includes records where:
subscription_id = ”
AND
parent_subscription_id = 0
This prevents recurring donations and their renewal records from appearing in the default Free export.
Including Subscription Records
When the filter returns: false
SureDonation removes the one-time-only restriction.
The export can then include:
- One-time donations
- Subscription donations
- Recurring donations
- Renewal records
Other export filters continue to apply, including:
- Donation status
- Campaign
- Payment mode
- Payment gateway
- created_at date range
Export Columns
This filter changes which rows are exported, not the CSV column structure.
The CSV columns remain fixed.
When recurring donations are included, subscription-related values appear in their corresponding existing columns.
Interaction With SureDonation Pro
SureDonation Pro already changes this behavior by returning false when it is active.
Therefore, a custom callback is generally only needed on a Free-only installation where you intentionally want recurring donation records included in the export.
Related Hooks
- Suredonation_export_campaigns_limit: Controls the maximum number of campaigns included in an export.
- suredonation_export_secret_option_keys: Protects sensitive settings from being included in exports.
- Suredonation_import_donation_row: Filters donation data before it is inserted during CSV import.
We don't respond to the article feedback, we use it to improve our support content.