Pledges: Move parse_contributors function

This commit is contained in:
Kelly Dwan 2019-11-21 16:30:50 -05:00
parent d9382a975a
commit bbe3d1be84
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
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,