Noptin_Custom_Field_Action::get_rule_description( $rule )


Source Source

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

    public function get_rule_description( $rule ) {

        $settings = $rule->action_settings;

        if ( empty( $settings['field_name'] ) ) {
            return __( 'update a custom field', 'newsletter-optin-box' );
        }

        $field_name  = esc_html( $settings['field_name'] );
        if ( empty( $settings['field_value'] ) ) {
            return sprintf(
                __( "delete the subscriber's field %s", 'newsletter-optin-box' ),
               "<code>$field_name</code>"
            );
        }

        $field_value = esc_html( $settings['field_value'] );

        return sprintf(
            __( "update the subscriber's field %s to %s", 'newsletter-optin-box' ),
           "<code>$field_name</code>",
           "<code>$field_value</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