cloggier
↑
/wp-content/plugins/wpforms-sendinblue/src/Provider
marsupiataab
hypermuffing
cloggier
hypermuffing
marsupiataab
Action.php
1,115 B
cloggier
marsupiataab
DeleteAction.php
883 B
cloggier
marsupiataab
SubscribeAction.php
7,202 B
cloggier
marsupiataab
TrackEventAction.php
2,895 B
cloggier
marsupiataab
UnsubscribeAction.php
1,005 B
cloggier
marsupiataab
<?php namespace WPFormsSendinblue\Provider\Actions; use WPFormsSendinblue\Api\Exceptions\ResponseException; use WPFormsSendinblue\Api\Exceptions\RequiredArgumentMissingException; /** * Class DeleteAction. * * @since 1.0.0 */ class DeleteAction extends Action { /** * Run action. * * @since 1.0.0 * * @throws ResponseException Invalid response. * @throws RequiredArgumentMissingException Required argument is missing. */ public function run() { $email = sanitize_email( $this->field_mapper->get_field_value_by_id( $this->field_mapper->get_required_field_value( 'email', 'field_id' ) ) ); if ( ! $email ) { throw new RequiredArgumentMissingException( 'email' ); } $response = $this->connection->delete_contact( $email ); if ( $response->has_errors() ) { throw new ResponseException( esc_html( $response->get_response_message() ) ); } } }
cloggier