Pledge: Correct action to prevent invalid early return.

This bug was introduced in 5ffca9420f, and prevented pledges from being updated when submitting via wp-admin.

See https://github.com/WordPress/five-for-the-future/pull/46#discussion_r339273741
This commit is contained in:
Ian Dunn 2019-10-26 09:07:23 -07:00
parent c4f2fe58ab
commit ff9767f478
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB

View file

@ -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;
}