TheCodeCompany / wp-chargify

0 stars 1 forks source link

WP_Error handling when creating a subscription #139

Open AlecArnold opened 3 years ago

AlecArnold commented 3 years ago

Errors that are thrown while creating a user need to be passed back as the response.

https://github.com/TheCodeCompany/wp-chargify/blob/ffc81003b98c1a8b8c2119a357b7e8ba94692e35/plugins/wp-chargify/includes/chargify/subscription/namespace.php#L12

AlecArnold commented 3 years ago

It'd be great if this function also returned a WP_Error when required.

https://github.com/TheCodeCompany/wp-chargify/blob/ec9ee9a97ec406d10cd92d92fccd60d86e2c9792/plugins/wp-chargify/includes/chargify/endpoints/subscriptions.php#L6