Noptin_Automation_Rules::delete_rule( int|Noptin_Automation_Rule $rule )

Deletes a rule.


Parameters Parameters

$rule

(int|Noptin_Automation_Rule) (Required) The rule to update


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/automation-rules/class-noptin-automation-rules.php

    public function delete_rule( $rule ) {
        global $wpdb;

        $rule = new Noptin_Automation_Rule( $rule );

        // Does the rule exist?
        if ( ! $rule->exists() ) {
            return false;
        }

        return $wpdb->delete( $this->get_table(), array( 'id' => $rule->id ), '%d' );

    }


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.3.0Introduced.

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