Noptin_WooCommerce_Product_Purchase_Trigger::get_settings()


Source Source

File: includes/automation-rules/triggers/class-noptin-woocommerce-product-purchase-trigger.php

    public function get_settings() {

        $products = $this->bridge->get_products();

        return array(

            'product_id' => array(
                'el'          => 'select',
                'options'     => wp_list_pluck( $products, 'name', 'id' ),
                'label'       => __( 'Product', 'newsletter-optin-box' ),
                'placeholder' => __( 'Select a WooCommerce product', 'newsletter-optin-box' ),
            ),

            'action' => array(
                'el'          => 'select',
                'options'     => array(
                    'buy'     => __( 'The product is bought', 'newsletter-optin-box' ),
                    'refund'  => __( 'The product is refunded', 'newsletter-optin-box' ),
                ),
                'label'       => __( 'State', 'newsletter-optin-box' ),
                'placeholder' => __( 'Select the product state', 'newsletter-optin-box' ),
                'default'     => 'buy'
            ),

            'first_time'    => array(
                'type'        => 'checkbox_alt',
                'el'          => 'input',
                'label'       => __( 'New buyer', 'newsletter-optin-box' ),
                'description' => __( 'Only fire the first time someone buys this product?', 'newsletter-optin-box' ),
            ),

        );
    }

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