Noptin_Abstract_Action::get_rules()

Returns all active rules attached to this action.


Return Return

(array)


Top ↑

Source Source

File: includes/automation-rules/actions/class-noptin-abstract-action.php

    public function get_rules() {
        global $wpdb;

        if ( is_array( $this->rules ) ) {
            return $this->rules;
        }

        $table =  noptin()->automation_rules->get_table();
        $this->rules = $wpdb->get_results(
            $wpdb->prepare(
                "SELECT * FROM $table WHERE `action_id`=%s AND `status`='1'",
                $this->get_id()
            )
        );

        return $this->rules;
    }


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.8Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation