The Give Export feature allows you to export Give Core and add-on settings. But some add-ons like payment gateways have sensitive information which you may not want to expose in an export. This can be done using a filter called give_settings_export_excludes.

For example, if you want to exclude your Stripe Plaid credentials from exporting, you can add the following custom snippet to your website.

Exclude Stripe Plaid credentials from Settings Export

function give_exclude_exporting() {

    // Stripe Plaid Details
    $excludes['plaid_client_id']  = 'Plaid Client ID';
    $excludes['plaid_public_key'] = 'Plaid Public Key';
    $excludes['plaid_secret_key'] = 'Plaid Secret Key';

    return $excludes;

};

add_filter( 'give_settings_export_excludes', 'give_exclude_exporting' );
If you need assistance in adding a custom snippet to your website, refer to our detailed tutorial.

Once that function is in place, you will see the following checkboxes in your Export Give Settings:

Exclude Checkboxes appear on the Give Settings Export when the filter is in place.

Now when you click the “Export JSON” button, it exports all the Give settings but excludes the Stripe Plaid settings that you’ve checked.

There are many more options as well. You can extend the function to exclude Paypal Pro settings, the Mailchimp API, your Give add-ons license keys and more. The below snippet is a good starting example.

Examples of Exclude Options from Give Add-ons

function give_exlude_exporting() {
	// Stripe Plaid Details
	$excludes['plaid_client_id']  = 'Plaid Client ID';
	$excludes['plaid_public_key'] = 'Plaid Public Key';
	$excludes['plaid_secret_key'] = 'Plaid Secret Key';

	// Paypal Pro
	$excludes['paypal_email']              = 'PayPal email';
	$excludes['payflow_paypal_vendor']     = 'PayPal Vendor ID';
	$excludes['payflow_paypal_user']       = 'PayPal User';
	$excludes['payflow_paypal_password']   = 'PayPal Password';
	$excludes['live_paypal_api_client_id'] = 'Live REST API Client ID';

	// Paypal Standard
	$excludes['live_paypal_standard_api_username']  = 'Live Paypal Standard API Username';
	$excludes['live_paypal_standard_api_password']  = 'Live Paypal Standard API Password';
	$excludes['live_paypal_standard_api_signature'] = 'Live Paypal Standard API Signature';
	$excludes['test_paypal_standard_api_username']  = 'Test Paypal Standard API Username';
	$excludes['test_paypal_standard_api_password']  = 'Test Paypal Standard API Password';
	$excludes['test_paypal_standard_api_signature'] = 'Test Paypal Standard API Signature';

	// Braintree
	$excludes['braintree_merchantId']                = 'Braintree Merchant ID';
	$excludes['braintree_merchantAccountId']         = 'Braintree Merchant Account ID';
	$excludes['braintree_publicKey']                 = 'Braintree Public key';
	$excludes['braintree_privateKey']                = 'Braintree Private key';
	$excludes['sandbox_braintree_merchantId']        = 'Sandbox Braintree Merchant ID';
	$excludes['sandbox_braintree_merchantAccountId'] = 'Sandbox Braintree Merchant Account ID';
	$excludes['sandbox_braintree_publicKey']         = 'sandbox Braintree Public key';
	$excludes['sandbox_braintree_privateKey']        = 'sandbox Braintree Private key';

	// Recaptcha
	$excludes['recaptcha_key']    = 'Recaptcha Key';
	$excludes['recaptcha_secret'] = 'Recaptcha Secret Key';

	// Mailchimp
	$excludes['give_mailchimp_api'] = 'Mailchimp API Key';

	// Give Add-ons license key
	$excludes['give_fee_recovery_license_key']         = 'Fee Recovery addon License Key';
	$excludes['give_tributes_license_key']             = 'Tributes addon License Key';
	$excludes['give_zapier_license_key']       		   = 'Zapier addon License Key';
	$excludes['give_form_field_manager_license_key']   = 'Form Field Manager addon License Key';
	$excludes['give_manual_donations_license_key']     = 'Manual Donations addon License Key';
	$excludes['give_pdf_receipts_license_key']         = 'PDF Receipts addon License Key';
	$excludes['give_paypal_pro_gateway_license_key']   = 'Paypal pro Gateway addon License Key';
	$excludes['give_recurring_donations_license_key']  = 'Recurring Donations addon License Key';
	$excludes['give_authorizenet_gateway_license_key'] = 'Authorize.net Gateway addon License Key';
	$excludes['give_stripe_gateway_license_key']       = 'Stripe Gateway addon License Key';
	$excludes['give_gocardless_gateway_license_key']   = 'GoCardless Gateway addon License Key';
	$excludes['give_mailchimp_license_key']            = 'Mailchimp addon License Key';
	$excludes['give_currency_switcher_license_key']    = 'Currency Switcher addon License Key';

	return $excludes;
};

add_filter( 'give_settings_export_excludes', 'give_exlude_exporting' );