← All changes
|
modules/home/transformations/base/transformations-abstract.php
+1
-12
4.1.2
→
3.32.0-dev3
View file →
| @@ -13,13 +13,8 @@ | ||
| 13 | 13 | use Elementor\Core\Isolation\Wordpress_Adapter_Interface; |
| 14 | 14 | |
| 15 | 15 | abstract class Transformations_Abstract { |
| 16 | 16 | |
| 17 | - protected const USER_TIER_FREE = 'free'; | |
| 18 | - protected const USER_TIER_PRO = 'pro'; | |
| 19 | - protected const USER_TIER_AGENCY = 'agency'; | |
| 20 | - protected const USER_TIER_ONE = 'one'; | |
| 21 | - | |
| 22 | 17 | protected Wordpress_Adapter_Interface $wordpress_adapter; |
| 23 | 18 | protected Plugin_Status_Adapter_Interface $plugin_status_adapter; |
| 24 | 19 | protected Elementor_Adapter_Interface $elementor_adapter; |
| 25 | 20 | |
| @@ -38,15 +33,9 @@ | ||
| 38 | 33 | |
| 39 | 34 | protected function get_tier() { |
| 40 | 35 | $tier = $this->elementor_adapter->get_tier(); |
| 41 | 36 | |
| 42 | - $filtered_tier = apply_filters( 'elementor/admin/homescreen_promotion_tier', $tier ) ?? $tier; | |
| 43 | - | |
| 44 | - return $this->normalize_tier( $filtered_tier ); | |
| 45 | - } | |
| 46 | - | |
| 47 | - private function normalize_tier( string $tier ): string { | |
| 48 | - return self::USER_TIER_AGENCY === $tier ? self::USER_TIER_ONE : $tier; | |
| 37 | + return apply_filters( 'elementor/admin/homescreen_promotion_tier', $tier ) ?? $tier; | |
| 49 | 38 | } |
| 50 | 39 | |
| 51 | 40 | abstract public function transform( array $home_screen_data ): array; |
| 52 | 41 | } |