-
Notifications
You must be signed in to change notification settings - Fork 192
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
fix(shortcode): give_totals should output the correct donation total #3291 #3310
Conversation
…e-3291 Branch Update
fix(donation): prevent donation amount from updating multiple times impress-org#3304
…e-3291 Branch Update
includes/actions.php
Outdated
*/ | ||
function give_remove_wpml_posts_where_filter() { | ||
global $wpml_query_filter; | ||
remove_filter( 'posts_where', array( $wpml_query_filter, 'posts_where_filter' ), 10, 2 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raftaar1191 remove extra priority param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed @ravinderk
includes/actions.php
Outdated
*/ | ||
function give_add_wpml_posts_where_filter() { | ||
global $wpml_query_filter; | ||
add_filter( 'posts_where', array( $wpml_query_filter, 'posts_where_filter' ), 10, 2 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raftaar1191 remove add filter
remove_filter( 'wpml_pre_parse_query', 'give_wpml_pre_parse_query', 10 );
remove_filter( 'wpml_post_parse_query', 'give_wpml_post_parse_query', 10 );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added @ravinderk
includes/actions.php
Outdated
* | ||
* @return WP_Query | ||
*/ | ||
function give_wpml_post_parse_query( $q ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raftaar1191 use __
add fn prefix because they are internal fn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added @ravinderk
includes/shortcodes.php
Outdated
* | ||
* @param array $atts shortcode attribute. | ||
*/ | ||
do_action( 'give_totals_goal_shortcode_start', $atts ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raftaar1191 rename it to give_totals_goal_shortcode_before_render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed @ravinderk
includes/shortcodes.php
Outdated
* @param array $atts shortcode attribute. | ||
* @param HTML $give_totals_output shortcode output. | ||
*/ | ||
do_action( 'give_totals_goal_shortcode_end', $atts, $give_totals_output ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raftaar1191 rename it to give_totals_goal_shortcode_after_render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed @ravinderk
@raftaar1191 can you check if these issue is related to your pr or not
|
@ravinderk All the suggestions that are being suggested by you are being Done I try to regenerate the notices as well but I don't think this is related to to the current PR |
…e-3291 Branch Update
@raftaar1191 use |
@ravinderk PR updated as suggested by you but we need to add still add some filter because when we pass donation id in the Total Goal shortcode it is not working Please check the video to know about the issues and why I need to add that extra filter Video Link: https://screencast-o-matic.com/watch/cF1VIqbNow |
Description
PR to fix #3291
How Has This Been Tested?
Have tested by adding two donation form of the same type but the language is diff and runs on the same page with two diff language s
Screenshots (jpeg or gifs if applicable):
Video Link: https://screencast-o-matic.com/watch/cF1V1QbLWa
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: