| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 2 | 3 | |
| 3 | 4 | use Sellkit\Contact_Segmentation\Conditions; |
| 4 | 5 | |
| 5 | 6 | /** |
| @@ -12,8 +13,12 @@ | ||
| 12 | 13 | */ |
| 13 | 14 | function sellkit_condition_match( $condition_name, $operator_name, $condition_value ) { |
| 14 | 15 | $condition_value = apply_filters( "sellkit_cs_conditions_value_{$condition_name}", $condition_value ); |
| 15 | 16 | |
| 17 | + if ( ! class_exists( 'Conditions' ) ) { | |
| 18 | + require_once __DIR__ . '/conditions.php'; | |
| 19 | + new Conditions(); | |
| 20 | + } | |
| 16 | 21 | return Conditions::match( $condition_name, $operator_name, $condition_value ); |
| 17 | 22 | } |
| 18 | 23 | |
| 19 | 24 | /** |
| @@ -116,9 +121,9 @@ | ||
| 116 | 121 | * @since 1.5.0 |
| 117 | 122 | * @param string $column Column name. |
| 118 | 123 | * @return mixed|string|void |
| 119 | 124 | */ |
| 120 | -function get_funnel_contact_value_by_column( $column ) { | |
| 125 | +function sellkit_get_funnel_contact_value_by_column( $column ) { | |
| 121 | 126 | $results = []; |
| 122 | 127 | $contacts = sellkit()->db->get( 'funnel_contact', [ |
| 123 | 128 | 'user_id' => get_current_user_id() |
| 124 | 129 | ] ); |