Skip to content

Commit

Permalink
feat: Remove the campaign rendered event (#2301)
Browse files Browse the repository at this point in the history
  • Loading branch information
leogermani authored Feb 27, 2023
1 parent 1c23aba commit 23caa1d
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions includes/data-events/class-popups.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ final class Popups {
* @return void
*/
public static function init() {
Data_Events::register_listener(
'newspack_campaigns_after_campaign_render',
'campaign_interaction',
[ __CLASS__, 'campaign_rendered' ]
);

Data_Events::register_listener(
'newspack_reader_registration_form_processed',
'campaign_interaction',
Expand Down Expand Up @@ -82,22 +76,6 @@ public static function get_popup_metadata( $popup ) {
return $data;
}

/**
* A listener for the moment when a campaign is rendered.
*
* @param array $popup The popup representation.
* @return ?array
*/
public static function campaign_rendered( $popup ) {
$popup_data = self::get_popup_metadata( $popup );
return array_merge(
$popup_data,
[
'action' => 'rendered',
]
);
}

/**
* A listener for the registration block form submission
*
Expand Down

0 comments on commit 23caa1d

Please sign in to comment.