Noptin_New_Subscriber_Trigger::get_rule_description( $rule )


Source Source

File: includes/automation-rules/triggers/class-noptin-new-subscriber-trigger.php

    public function get_rule_description( $rule ) {

        $settings = $rule->trigger_settings;

        // Are we filtering by subscription method?
        if ( empty( $settings['subscribed_via'] ) || '-1' === $settings['subscribed_via'] ) {
            return __( 'When someone subscribes to the newsletter', 'newsletter-optin-box' );
        }

        $via     = $settings['subscribed_via'];

        if ( 'manual' == $via ) {
            return __( 'When someone is manually added to the newsletter', 'newsletter-optin-box' );
        }

        if ( 'import' == $via ) {
            return __( 'When a subscriber is imported', 'newsletter-optin-box' );
        }

        $methods = $this->get_subscription_methods();

        if ( isset( $methods[ $via ] ) ) {
            $via = $methods[ $via ];
        }

        $via = noptin_clean( $via );

        return sprintf(
            __( 'When someone subscribes via %s', 'newsletter-optin-box' ),
           "<code>$via</code>"
        );
    }


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