| 1 |
<?php |
| 2 |
|
| 3 |
namespace Sellkit\Funnel\Steps; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || die(); |
| 6 |
|
| 7 |
/** |
| 8 |
* Class Sellkit_Sales_Page. |
| 9 |
* |
| 10 |
* @since 1.1.0 |
| 11 |
*/ |
| 12 |
class Sales_Page extends Base_Step { |
| 13 |
|
| 14 |
/** |
| 15 |
* Sales_Page constructor. |
| 16 |
* |
| 17 |
* @since 1.1.0 |
| 18 |
*/ |
| 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(); |
| 42 |
} |
| 43 |
} |
| 44 |
|