Change Currency Format By Locale

/** * By default, Charitable allows you to specify a single currency format * for the whole site. However, if you are running a multi-lingual * fundraising website, you may want to use a different format for each * language.…Continue reading

Add Currency

/** * Add a new currency. * * @param string[] $currencies The list of registered currencies. * @return string[] */ function ed_charitable_add_currency( $currencies ) { /** * We’re adding the Armenian Dram currency (AMD). * * Note that the three-letter…Continue reading

Add Hours Currency

/** * Add a custom currency called “Hours”. * * @param string[] $currencies * @return string[] $currencies */ function en_add_hours_currency( $currencies ) { $currencies[ ‘HOURS’ ] = __( ‘Hours’, ‘your-namespace’ ); return $currencies; } add_filter( ‘charitable_currencies’, ‘en_add_hours_currency’ );Continue reading

Add Campaign Creator Export Fields

/** * Add additional campaign fields related to the campaign creator. * * @param array $columns The list of columns. * @return array */ function ed_charitable_add_creator_campaign_fields() { $creator_fields = array( ‘organization’ => __( ‘Campaign Creator Organization’, ‘your-namespace’ ), ‘address’ =>…Continue reading

Format Date

/** * Change the date format of the “Date of Donation” column in the Donations export. * * @param mixed $value The value to set. * @param string $key The key to set. * @param array $data The set of…Continue reading

Remove Donation Columns

/** * This example shows how to remove columns from the Donations export. * * Since this relies on the Donation Fields API, it requires Charitable 1.5+. * * For a way of doing this on older versions of Charitable,…Continue reading

Add Campaign Creator Name Donation Export

/** * In this example, the campaign creator’s name is added to the Donations * export, so it’s easy to see who created the campaign that received the * donation when exporting the donations. */ add_action( ‘init’, function() { $field…Continue reading

Add Extra Column

/** * This example shows how to remove columns from the Donations export. * * Since this relies on the Donation Fields API, it requires Charitable 1.5+. * * For a way of doing this on older versions of Charitable,…Continue reading

Add Individual Category Tag Columns

/** * By default, Charitable shows a “Campaign Categories” column in the * donations export, which lists the names of the categories that the * campaign is in. * * In some cases, it may be more helpful to show…Continue reading

Remove Stats Summary Block

/** * Remove the campaign summary block (funds raised, number of donors, etc). */ function en_remove_campaign_summary_block() { remove_action( ‘charitable_campaign_content_before’, ‘charitable_template_campaign_summary’, 6 ); // If you still want to show a Donate button, uncomment the line below. // add_action( ‘charitable_campaign_content_before’, ‘charitable_template_donate_button’,…Continue reading