Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitrox committed Jan 22, 2024
1 parent 45965dc commit b61de0d
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/Ads/AccountService.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ public function setup_account(): array {
$this->check_billing_status( $account );
break;

case 'link_merchant':
$this->link_merchant_account();
break;

case 'conversion_action':
$this->create_conversion_action();
break;
Expand Down Expand Up @@ -249,25 +245,6 @@ private function check_billing_status( array $account ) {
}
}

/**
* Get the callback function for linking a merchant account.
*
* @throws Exception When the merchant or ads account hasn't been set yet.
*/
private function link_merchant_account() {
if ( ! $this->options->get_merchant_id() ) {
throw new Exception( 'A Merchant Center account must be connected' );
}

if ( ! $this->options->get_ads_id() ) {
throw new Exception( 'An Ads account must be connected' );
}

// Create link for Merchant and accept it in Ads.
$this->container->get( Merchant::class )->link_ads_id( $this->options->get_ads_id() );
$this->container->get( Ads::class )->accept_merchant_link( $this->options->get_merchant_id() );
}

/**
* Create the generic GLA conversion action and store the details as an option.
*
Expand Down

0 comments on commit b61de0d

Please sign in to comment.