From ff9767f478c5639688799b7d1ee596101c235028 Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Sat, 26 Oct 2019 09:07:23 -0700 Subject: [PATCH] Pledge: Correct action to prevent invalid early return. This bug was introduced in 5ffca9420fbce401d36ec4c1d9e0d2def6bd1b86, and prevented pledges from being updated when submitting via wp-admin. See https://github.com/WordPress/five-for-the-future/pull/46#discussion_r339273741 --- plugins/wporg-5ftf/includes/pledge-meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wporg-5ftf/includes/pledge-meta.php b/plugins/wporg-5ftf/includes/pledge-meta.php index 70ecc94..85a105d 100755 --- a/plugins/wporg-5ftf/includes/pledge-meta.php +++ b/plugins/wporg-5ftf/includes/pledge-meta.php @@ -192,7 +192,7 @@ function save_pledge( $pledge_id, $pledge ) { * This is only intended to run when the front end form and wp-admin forms are submitted, not when posts are * programmatically updated. */ - if ( 'Submit Pledge' !== $post_action && 'editpost' !== $get_action ) { + if ( 'Submit Pledge' !== $post_action && 'editpost' !== $post_action ) { return; }