Pledges: Move parse_contributors function

This commit is contained in:
Kelly Dwan 2019-11-21 16:30:50 -05:00
parent a99b3b478e
commit b898dc23f3
3 changed files with 58 additions and 58 deletions

View file

@ -5,7 +5,7 @@
namespace WordPressDotOrg\FiveForTheFuture\Endpoints;
use WordPressDotOrg\FiveForTheFuture\{ Auth, Contributor, Email, PledgeForm };
use WordPressDotOrg\FiveForTheFuture\{ Auth, Contributor, Email };
use const WordPressDotOrg\FiveForTheFuture\PledgeMeta\META_PREFIX;
add_action( 'wp_ajax_manage-contributors', __NAMESPACE__ . '\manage_contributors_handler' );
@ -54,7 +54,7 @@ function manage_contributors_handler() {
case 'add-contributor':
$pledge = get_post( $pledge_id );
$new_contributors = PledgeForm\parse_contributors( $_POST['contributors'] );
$new_contributors = Contributor\parse_contributors( $_POST['contributors'] );
if ( is_wp_error( $new_contributors ) ) {
wp_die( wp_json_encode( [
'success' => false,