Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing ID when getting currency through give_get_currency(). #2214

Merged
merged 7 commits into from
Oct 17, 2017

Conversation

emgk
Copy link
Contributor

@emgk emgk commented Oct 16, 2017

Description

This PR will resolve #2197.
Passing form_id or payment_id while getting the Give currency.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@DevinWalker
Copy link
Member

@emgk please resolve the failing unit tests.

* *
* @return int $decimals
*/
function give_currency_decimal_filter() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevinWalker This function is deprecated. I also removed filter because give_get_price_decimals will handle this internally.

* @return mixed
*/
function give_get_price_decimals( $donation_id = null ) {
$setting = give_get_currency_formatting_settings( $donation_id );
function give_get_price_decimals( $donation_or_form_id = null, $currency = '' ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevinWalker I updated give_get_price_decimals function.

* @return string The currency code
*/
function give_get_currency( $id = null ) {
function give_get_currency( $donation_or_form_id = null, $args = array() ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevinWalker I updated give_get_currency

@ravinderk
Copy link
Collaborator

@DevinWalker Merging this PR to core let me know if you have any suggestion or issue

@ravinderk ravinderk merged commit 3c7fd6e into impress-org:release/1.8.15 Oct 17, 2017
raftaar1191 added a commit to raftaar1191/Give that referenced this pull request Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants