- Documentation
- Add-Ons
-
Extending Gravity Forms
- Add-On Framework
- Add-Ons
- API
- Constants
- Field Framework
- Functions
-
Hooks
- Actions
- Deprecated
-
Filters
- Address Fields
- Akismet
- Confirmations
- Credit Card Fields
- Date Fields
- Email Fields
- Entries
- File Upload Fields
- Form Object
- Form Settings
- Import/Export
- Merge Tag Filters
- Multiselect Fields
- Name Fields
- Notifications
- Password Fields
- Payments
- Post Creation
- Product Fields
- reCAPTCHA
- Rich Text Editor
- Save and Continue
- Styles/Scripts
- System Status
- Validation
- Web API
- gform_visibility_options
- gform_validation_error_form_editor
- gform_upload_root_htaccess_rules
- gform_updates_list
- gform_trim_input_value
- gform_tooltips
- gform_toolbar_menu
- gform_target_page
- gform_tabindex
- gform_submit_button
- gform_submission_values_pre_save
- gform_shortcode_ACTION
- gform_settings_menu
- gform_secure_file_download_url
- gform_save_field_value
- gform_save_and_continue_resume_url
- gform_replace_merge_tags
- gform_recaptcha_callback
- gform_progressbar_start_at_zero
- gform_progress_steps
- gform_progress_bar
- gform_product_info_name_include_field_label
- gform_previous_button
- gform_predefined_choices
- gform_pre_form_settings_save
- gform_post_category_choices
- gform_phone_formats
- gform_other_choice_value
- gform_order_summary
- gform_order_label
- gform_notification_enable_cc
- gform_next_button
- gform_multifile_upload_field
- gform_merge_tag_data
- gform_menu_position
- gform_is_value_match
- gform_is_ssl
- gform_is_duplicate
- gform_input_masks
- gform_input_mask_script
- gform_include_thousands_sep_pre_format_number
- gform_honeypot_labels_pre_render
- gform_get_input_value
- gform_get_form_filter
- gform_get_entries_args_entry_list
- gform_form_tag
- gform_form_not_found_message
- gform_form_args
- gform_form_actions
- gform_filters_get_users
- gform_field_value_$parameter_name
- gform_field_type_title
- gform_field_input
- gform_field_groups_form_editor
- gform_field_content
- gform_field_container
- gform_field_choices
- gform_field_choice_selected_type_form_editor
- gform_field_choice_markup_pre_render
- gform_entry_list_bulk_actions
- gform_entry_detail_url
- gform_enable_field_label_visibility_settings
- gform_duplicate_message
- gform_dropdown_no_results_text
- gform_display_product_summary
- gform_display_add_form_button
- gform_disable_view_counter
- gform_disable_installation_status
- gform_disable_auto_update
- gform_dashboard_title
- gform_currency_pre_save_entry
- gform_counter_script
- gform_column_input_content
- gform_column_input
- gform_choices_setting_title
- gform_checkbox_choices
- gform_cdata_open
- gform_calculation_result
- gform_calculation_formula
- gform_akismet_fields
- gform_akismet_enabled
- gform_ajax_spinner_url
- gform_admin_messages
- gform_admin_error_messages
- gform_addon_navigation
- gform_add_field_buttons
- Javascript
- gform_recaptcha_callback
- gform_notification_enable_cc
- gform_multifile_upload_field
- gform_form_not_found_message
- gform_field_groups_form_editor
- gform_field_choice_selected_type_form_editor
- gform_entry_list_bulk_actions
- gform_entry_list_action
- gform_entry_detail_url
- gform_duplicate_field
- Snippets
- wp_rg_form_view
- Database Storage Structure Reference
- Knowledge Base
- User Guides
bookmark_bordergform_currency
Description
Use this filter to override the currency configured on the Forms > Settings page. It will affect all forms.
Usage
add_filter( 'gform_currency', 'your_function_name' );
Parameters
- $currency string
The currency code to be filtered.
Examples
This example forces the current currency to USD (US dollars)
add_filter( 'gform_currency', 'usd_currency' ); function usd_currency( $currency ) { return 'USD'; }
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
apply_filters( 'gform_currency', $currency )
This filter is located in GFCommon::get_currency() in common.php
Last modified: October 4, 2017