| @@ -8,9 +8,9 @@ | ||
| 8 | 8 | * Class Sellkit_Sales_Page. |
| 9 | 9 | * |
| 10 | 10 | * @since 1.1.0 |
| 11 | 11 | */ |
| 12 | -class Sales_Page { | |
| 12 | +class Sales_Page extends Base_Step { | |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * Sales_Page constructor. |
| 16 | 16 | * |
| @@ -15,7 +15,29 @@ | ||
| 15 | 15 | * Sales_Page constructor. |
| 16 | 16 | * |
| 17 | 17 | * @since 1.1.0 |
| 18 | 18 | */ |
| 19 | - public function __construct() { | |
| 19 | + public function __construct() { // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found | |
| 20 | + parent::__construct(); | |
| 21 | + } | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * Sales page actions. | |
| 25 | + * | |
| 26 | + * @since 1.5.0 | |
| 27 | + */ | |
| 28 | + public function do_actions() { | |
| 29 | + if ( empty( $this->sellkit_funnel->funnel_id ) ) { | |
| 30 | + return; | |
| 31 | + } | |
| 32 | + | |
| 33 | + if ( 'sales-page' !== $this->sellkit_funnel->current_step_data['type']['key'] ) { | |
| 34 | + return; | |
| 35 | + } | |
| 36 | + | |
| 37 | + if ( ! is_user_logged_in() ) { | |
| 38 | + return; | |
| 39 | + } | |
| 40 | + | |
| 41 | + $this->contacts->add_new_log(); | |
| 20 | 42 | } |
| 21 | 43 | } |