File manager - Edit - /home/theblueo/tv/fb4e3b/optin.tar
Back
templates/optin-template-simple.php 0000666 00000001431 15214240661 0013510 0 ustar 00 <?php /** * Checkout template * * @package CartFlows */ $optin_layout = 'one-column'; $fields_skins = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-fields-skins' ); ?> <div id="wcf-optin-form" class="wcf-optin-form wcf-optin-form-one-column wcf-field-<?php echo $fields_skins; ?>"> <!-- CHECKOUT SHORTCODE --> <?php do_action( 'cartflows_optin_before_main_section', $optin_layout ); ?> <?php $checkout_html = do_shortcode( '[woocommerce_checkout]' ); if ( empty( $checkout_html ) || trim( $checkout_html ) == '<div class="woocommerce"></div>' ) { echo esc_html__( 'Your cart is currently empty.', 'cartflows' ); } else { echo $checkout_html; } ?> <?php do_action( 'cartflows_optin_after_main_section', $optin_layout ); ?> <!-- END CHECKOUT SHORTCODE --> </div> classes/class-cartflows-optin-meta.php 0000666 00000045044 15214240661 0014110 0 ustar 00 <?php /** * Checkout post meta * * @package CartFlows */ /** * Meta Boxes setup */ class Cartflows_Optin_Meta extends Cartflows_Meta { /** * Instance * * @var $instance */ private static $instance; /** * Meta Option * * @var $meta_option */ private static $meta_option = null; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { /* Init Metabox */ add_action( 'load-post.php', array( $this, 'init_metabox' ) ); add_action( 'load-post-new.php', array( $this, 'init_metabox' ) ); } /** * Init Metabox */ public function init_metabox() { add_action( 'add_meta_boxes', array( $this, 'setup_meta_box' ) ); add_action( 'save_post', array( $this, 'save_meta_box' ) ); } /** * Setup Metabox */ public function setup_meta_box() { if ( _is_wcf_optin_type() ) { add_meta_box( 'wcf-optin-settings', // Id. __( 'Optin Settings', 'cartflows' ), // Title. array( $this, 'markup_meta_box' ), // Callback. wcf()->utils->get_step_post_type(), // Post_type. 'normal', // Context. 'high' // Priority. ); } } /** * Metabox Markup * * @param object $post Post object. * @return void */ public function markup_meta_box( $post ) { wp_nonce_field( 'save-nonce-optin-step-meta', 'nonce-optin-step-meta' ); $stored = get_post_meta( $post->ID ); $optin_meta = self::get_meta_option( $post->ID ); // Set stored and override defaults. foreach ( $stored as $key => $value ) { if ( array_key_exists( $key, $optin_meta ) ) { self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? maybe_unserialize( $stored[ $key ][0] ) : ''; } else { self::$meta_option[ $key ]['default'] = ( isset( $stored[ $key ][0] ) ) ? $stored[ $key ][0] : ''; } } // Get defaults. $meta = self::get_meta_option( $post->ID ); $optin_meta = array(); foreach ( $meta as $key => $value ) { $optin_meta[ $key ] = $meta[ $key ]['default']; } do_action( 'wcf_optin_settings_markup_before' ); $this->tabs_markup( $optin_meta, $post->ID ); do_action( 'wcf_optin_settings_markup_after' ); } /** * Page Header Tabs * * @param array $options options. * @param int $post_id post ID. */ public function tabs_markup( $options, $post_id ) { $active_tab = get_post_meta( $post_id, 'wcf-active-tab', true ); if ( empty( $active_tab ) ) { $active_tab = 'wcf-optin-shortcodes'; } $tab_array = array( array( 'title' => __( 'Shortcodes', 'cartflows' ), 'id' => 'wcf-optin-shortcodes', 'class' => 'wcf-optin-shortcodes' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab', 'icon' => 'dashicons-editor-code', ), array( 'title' => __( 'Select Product', 'cartflows' ), 'id' => 'wcf-optin-general', 'class' => 'wcf-optin-general' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab', 'icon' => 'dashicons-info', ), array( 'title' => __( 'Design', 'cartflows' ), 'id' => 'wcf-optin-style', 'class' => 'wcf-optin-style' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab', 'icon' => 'dashicons-admin-customizer', ), array( 'title' => __( 'Form Fields', 'cartflows' ), 'id' => 'wcf-optin-custom-fields', 'class' => 'wcf-optin-custom-fields' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab', 'icon' => 'dashicons-welcome-widgets-menus', ), array( 'title' => __( 'Settings', 'cartflows' ), 'id' => 'wcf-optin-custom-settings', 'class' => 'wcf-optin-custom-settings' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab', 'icon' => 'dashicons-admin-generic', ), array( 'title' => __( 'Custom Script', 'cartflows' ), 'id' => 'wcf-optin-custom-script-header', 'class' => 'wcf-optin-custom-script-header' === $active_tab ? 'wcf-tab wp-ui-text-highlight active' : 'wcf-tab', 'icon' => 'dashicons-format-aside', ), ); $tabs = $tab_array; ?> <div class="wcf-optin-table wcf-metabox-wrap widefat"> <div class="wcf-table-container"> <div class="wcf-column-left"> <div class="wcf-tab-wrapper"> <?php foreach ( $tabs as $key => $tab ) { ?> <div class="<?php echo esc_attr( $tab['class'] ); ?>" data-tab="<?php echo esc_attr( $tab['id'] ); ?>"> <span class="dashicons <?php echo esc_attr( $tab['icon'] ); ?>"></span> <span class="wcf-tab-title"><?php echo esc_html( $tab['title'] ); ?></span> </div> <?php } ?> <input type="hidden" id="wcf-active-tab" name="wcf-active-tab" value="<?php echo esc_attr( $active_tab ); ?>" /> </div> </div> <div class="wcf-column-right"> <?php $this->tab_shortcodes( $options, $post_id ); ?> <?php $this->tab_general( $options, $post_id ); ?> <?php $this->tab_style( $options, $post_id ); ?> <?php $this->tab_custom_fields( $options, $post_id ); ?> <?php $this->tab_custom_settings( $options, $post_id ); ?> <?php $this->tab_custom_script( $options, $post_id ); ?> <?php $this->right_column_footer( $options, $post_id ); ?> </div> </div> </div> <?php } /** * Shortcodes tab * * @param array $options options. * @param int $post_id post ID. */ public function tab_shortcodes( $options, $post_id ) { ?> <div class="wcf-optin-shortcodes wcf-tab-content widefat"> <?php echo wcf()->meta->get_shortcode_field( array( 'label' => 'Optin Page', 'name' => 'wcf-optin-shortcode', 'content' => '[cartflows_optin]', 'help' => esc_html__( 'Add this shortcode to your optin page', 'cartflows' ), ) ); ?> </div> <?php } /** * General tab * * @param array $options options. * @param int $post_id post ID. */ public function tab_general( $options, $post_id ) { ?> <div class="wcf-optin-general wcf-tab-content widefat"> <?php echo wcf()->meta->get_product_selection_field( array( 'name' => 'wcf-optin-product', 'value' => $options['wcf-optin-product'], 'label' => __( 'Select Free Product', 'cartflows' ), 'help' => __( 'Select Free and Virtual product only.', 'cartflows' ), 'multiple' => false, 'allow_clear' => true, ) ); ?> </div> <?php } /** * Tab custom fields * * @param array $options options. * @param int $post_id post ID. */ public function tab_custom_fields( $options, $post_id ) { ?> <div class="wcf-optin-custom-fields wcf-tab-content widefat"> <?php /* Custom Checkout Fields Section */ if ( ! _is_cartflows_pro() ) { echo wcf()->meta->get_description_field( array( 'name' => 'wcf-upgrade-to-pro', /* translators: %s: link */ 'content' => '<i>' . sprintf( esc_html__( 'Upgrade to %1$sCartFlows Pro%2$s for Custom Fields feature.', 'cartflows' ), '<a href="https://cartflows.com/" target="_blank">', '</a>' ) . '</i>', ) ); } ?> <?php do_action( 'cartflows_optin_custom_fields_tab_content', $options, $post_id ); ?> </div> <?php } /** * Tab custom settings * * @param array $options options. * @param int $post_id post ID. */ public function tab_custom_settings( $options, $post_id ) { ?> <div class="wcf-optin-custom-settings wcf-tab-content widefat"> <div class="wcf-custom-settings-fields"> <?php echo wcf()->meta->get_checkbox_field( array( 'label' => __( 'Pass Fields as URL Parameters', 'cartflows' ), 'name' => 'wcf-optin-pass-fields', 'value' => $options['wcf-optin-pass-fields'], 'after' => __( 'Enable', 'cartflows' ), 'help' => __( 'You can pass specific fields from the form to next step as URL query parameters.', 'cartflows' ), 'toggle' => array( 'fields' => array( 'yes' => array( 'wcf-optin-pass-specific-fields' ), ), ), ) ); echo wcf()->meta->get_text_field( array( 'label' => __( 'Enter form field', 'cartflows' ), 'name' => 'wcf-optin-pass-specific-fields', 'value' => $options['wcf-optin-pass-specific-fields'], 'help' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ), 'attr' => array( 'placeholder' => __( 'Fields to pass, separated by commas', 'cartflows' ), ), ) ); echo wcf()->meta->get_description_field( array( 'name' => 'wcf-optin-pass-fields-doc', 'content' => __( 'Enter comma seprated field name. E.g. first_name, last_name', 'cartflows' ), /* translators: %s: link */ 'content' => sprintf( esc_html__( 'You can pass field value as a URL parameter to the next step. %1$sClick here%2$s for more information.', 'cartflows' ), '<a href="https://cartflows.com/docs/pass-variable-as-query-parameters-to-url/" target="_blank">', '</a>' ), ) ); ?> </div> </div> <?php } /** * Tab style * * @param array $options options. * @param int $post_id post ID. */ public function tab_style( $options, $post_id ) { ?> <div class="wcf-optin-style wcf-tab-content widefat"> <?php echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Primary Color', 'cartflows' ), 'name' => 'wcf-primary-color', 'value' => $options['wcf-primary-color'], ) ); echo wcf()->meta->get_font_family_field( array( 'for' => 'wcf-base', 'label' => esc_html__( 'Font Family', 'cartflows' ), 'name' => 'wcf-base-font-family', 'value' => $options['wcf-base-font-family'], ) ); ?> <div class="wcf-cs-fields"> <div class="wcf-cs-fields-options"> <?php echo wcf()->meta->get_section( array( 'label' => __( 'Input Fields', 'cartflows' ), ) ); $fields_skin_pro_option = array(); if ( ! _is_cartflows_pro() ) { $fields_skin_pro_option = array( 'floating-labels' => __( 'Floating Labels (Available in CartFlows Pro)', 'cartflows' ), ); } echo wcf()->meta->get_select_field( array( 'label' => __( 'Style', 'cartflows' ), 'name' => 'wcf-input-fields-skins', 'value' => $options['wcf-input-fields-skins'], 'options' => array( 'default' => esc_html__( 'Default', 'cartflows' ), 'floating-labels' => esc_html__( 'Floating Labels', 'cartflows' ), ), 'pro-options' => $fields_skin_pro_option, ) ); echo wcf()->meta->get_font_family_field( array( 'for' => 'wcf-input', 'label' => esc_html__( 'Font Family', 'cartflows' ), 'name' => 'wcf-input-font-family', 'value' => $options['wcf-input-font-family'], ) ); echo wcf()->meta->get_font_weight_field( array( 'for' => 'wcf-input', 'label' => esc_html__( 'Font Weight', 'cartflows' ), 'name' => 'wcf-input-font-weight', 'value' => $options['wcf-input-font-weight'], ) ); echo wcf()->meta->get_select_field( array( 'label' => __( 'Size', 'cartflows' ), 'name' => 'wcf-input-field-size', 'value' => $options['wcf-input-field-size'], 'options' => array( '33px' => esc_html__( 'Extra Small', 'cartflows' ), '38px' => esc_html__( 'Small', 'cartflows' ), '44px' => esc_html__( 'Medium', 'cartflows' ), '58px' => esc_html__( 'Large', 'cartflows' ), '68px' => esc_html__( 'Extra Large', 'cartflows' ), 'custom' => esc_html__( 'Custom', 'cartflows' ), ), ) ); echo wcf()->meta->get_number_field( array( 'label' => __( 'Top Bottom Spacing', 'cartflows' ), 'name' => 'wcf-field-tb-padding', 'value' => $options['wcf-field-tb-padding'], ) ); echo wcf()->meta->get_number_field( array( 'label' => __( 'Left Right Spacing', 'cartflows' ), 'name' => 'wcf-field-lr-padding', 'value' => $options['wcf-field-lr-padding'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Label Color', 'cartflows' ), 'name' => 'wcf-field-label-color', 'value' => $options['wcf-field-label-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Text / Placeholder Color', 'cartflows' ), 'name' => 'wcf-field-color', 'value' => $options['wcf-field-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Background Color', 'cartflows' ), 'name' => 'wcf-field-bg-color', 'value' => $options['wcf-field-bg-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Border Color', 'cartflows' ), 'name' => 'wcf-field-border-color', 'value' => $options['wcf-field-border-color'], ) ); ?> </div> <div class="wcf-cs-button-options"> <?php echo wcf()->meta->get_section( array( 'label' => __( 'Submit Button', 'cartflows' ), ) ); echo wcf()->meta->get_text_field( array( 'label' => __( 'Button Text', 'cartflows' ), 'name' => 'wcf-submit-button-text', 'value' => $options['wcf-submit-button-text'], 'attr' => array( 'placeholder' => __( 'Submit', 'cartflows' ), ), ) ); echo wcf()->meta->get_number_field( array( 'label' => __( 'Font Size', 'cartflows' ), 'name' => 'wcf-submit-font-size', 'value' => $options['wcf-submit-font-size'], ) ); echo wcf()->meta->get_font_family_field( array( 'for' => 'wcf-button', 'label' => esc_html__( 'Font Family', 'cartflows' ), 'name' => 'wcf-button-font-family', 'value' => $options['wcf-button-font-family'], ) ); echo wcf()->meta->get_font_weight_field( array( 'for' => 'wcf-button', 'label' => esc_html__( 'Font Weight', 'cartflows' ), 'name' => 'wcf-button-font-weight', 'value' => $options['wcf-button-font-weight'], ) ); echo wcf()->meta->get_select_field( array( 'label' => __( 'Size', 'cartflows' ), 'name' => 'wcf-submit-button-size', 'value' => $options['wcf-submit-button-size'], 'options' => array( '33px' => esc_html__( 'Extra Small', 'cartflows' ), '38px' => esc_html__( 'Small', 'cartflows' ), '44px' => esc_html__( 'Medium', 'cartflows' ), '58px' => esc_html__( 'Large', 'cartflows' ), '68px' => esc_html__( 'Extra Large', 'cartflows' ), 'custom' => esc_html__( 'Custom', 'cartflows' ), ), ) ); echo wcf()->meta->get_number_field( array( 'label' => __( 'Top Bottom Spacing', 'cartflows' ), 'name' => 'wcf-submit-tb-padding', 'value' => $options['wcf-submit-tb-padding'], ) ); echo wcf()->meta->get_number_field( array( 'label' => __( 'Left Right Spacing', 'cartflows' ), 'name' => 'wcf-submit-lr-padding', 'value' => $options['wcf-submit-lr-padding'], ) ); echo wcf()->meta->get_select_field( array( 'label' => __( 'Position', 'cartflows' ), 'name' => 'wcf-submit-button-position', 'value' => $options['wcf-submit-button-position'], 'options' => array( 'left' => esc_html__( 'Left', 'cartflows' ), 'center' => esc_html__( 'Center', 'cartflows' ), 'right' => esc_html__( 'Right', 'cartflows' ), ), ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Text Color', 'cartflows' ), 'name' => 'wcf-submit-color', 'value' => $options['wcf-submit-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Text Hover Color', 'cartflows' ), 'name' => 'wcf-submit-hover-color', 'value' => $options['wcf-submit-hover-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Background Color', 'cartflows' ), 'name' => 'wcf-submit-bg-color', 'value' => $options['wcf-submit-bg-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Background Hover Color', 'cartflows' ), 'name' => 'wcf-submit-bg-hover-color', 'value' => $options['wcf-submit-bg-hover-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Border Color', 'cartflows' ), 'name' => 'wcf-submit-border-color', 'value' => $options['wcf-submit-border-color'], ) ); echo wcf()->meta->get_color_picker_field( array( 'label' => __( 'Border Hover Color', 'cartflows' ), 'name' => 'wcf-submit-border-hover-color', 'value' => $options['wcf-submit-border-hover-color'], ) ); ?> </div> </div> <?php echo wcf()->meta->get_hidden_field( array( 'name' => 'wcf-field-google-font-url', 'value' => $options['wcf-field-google-font-url'], ) ); ?> </div> <?php } /** * Get metabox options * * @param int $post_id post ID. */ public static function get_meta_option( $post_id ) { if ( null === self::$meta_option ) { /** * Set metabox options * * @see http://php.net/manual/en/filter.filters.sanitize.php */ self::$meta_option = wcf()->options->get_optin_fields( $post_id ); } return self::$meta_option; } /** * Metabox Save * * @param number $post_id Post ID. * @return void */ public function save_meta_box( $post_id ) { // Checks save status. $is_autosave = wp_is_post_autosave( $post_id ); $is_revision = wp_is_post_revision( $post_id ); $is_valid_nonce = ( isset( $_POST['nonce-optin-step-meta'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce-optin-step-meta'] ) ), 'save-nonce-optin-step-meta' ) ) ? true : false; // Exits script depending on save status. if ( $is_autosave || $is_revision || ! $is_valid_nonce ) { return; } wcf()->options->save_optin_fields( $post_id ); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Optin_Meta::get_instance(); classes/class-cartflows-optin-markup.php 0000666 00000045305 15214240661 0014461 0 ustar 00 <?php /** * Checkout markup. * * @package CartFlows */ /** * Checkout Markup * * @since 1.0.0 */ class Cartflows_Optin_Markup { /** * Member Variable * * @var object instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { /* Set is checkout flag */ add_filter( 'woocommerce_is_checkout', array( $this, 'woo_checkout_flag' ), 9999 ); add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_optin_fields' ), 10, 2 ); /* Optin Shortcode */ add_shortcode( 'cartflows_optin', array( $this, 'optin_shortcode_markup' ) ); /* Preconfigured cart data */ add_action( 'wp', array( $this, 'preconfigured_cart_data' ), 1 ); /* Optin shortcode data */ add_action( 'wp', array( $this, 'shortcode_load_data' ), 1000 ); /* Ajax Endpoint */ add_filter( 'woocommerce_ajax_get_endpoint', array( $this, 'get_ajax_endpoint' ), 10, 2 ); add_filter( 'woocommerce_login_redirect', array( $this, 'after_login_redirect' ), 10, 2 ); /* Optin Fields */ add_filter( 'woocommerce_default_address_fields', array( $this, 'set_optin_default_fields' ), 1000 ); /** * It may required later * add_filter( 'woocommerce_checkout_fields', array( $this, 'set_optin_fields' ) ); */ add_filter( 'woocommerce_billing_fields', array( $this, 'billing_optin_fields' ), 1000, 2 ); add_filter( 'woocommerce_checkout_required_field_notice', array( $this, 'change_field_label_in_required_notice' ), 100, 2 ); $this->elementor_editor_compatibility(); } /** * Elementor editor compatibility. */ public function elementor_editor_compatibility() { if ( ! empty( $_REQUEST['action'] ) && 'elementor' === $_REQUEST['action'] && is_admin() ) { //phpcs:ignore if ( isset( $_GET['post'] ) && ! empty( $_GET['post'] ) ) { //phpcs:ignore if ( _wcf_check_is_optin_by_id( intval( $_GET['post'] ) ) ) { //phpcs:ignore /* Submit Button */ add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 ); } } } } /** * Change order button text . * * @param string $woo_button_text place order. * @return string */ public function place_order_button_text( $woo_button_text ) { $optin_id = get_the_ID(); $wcf_order_button_text = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-text' ); if ( ! empty( $wcf_order_button_text ) ) { $woo_button_text = $wcf_order_button_text; } return $woo_button_text; } /** * Display all WooCommerce notices. * * @since 1.1.5 */ public function display_woo_notices() { if ( null != WC()->session && function_exists( 'woocommerce_output_all_notices' ) ) { woocommerce_output_all_notices(); } } /** * Check for checkout flag * * @param bool $is_checkout is checkout. * * @return bool */ public function woo_checkout_flag( $is_checkout ) { if ( ! is_admin() ) { if ( _is_wcf_optin_type() ) { $is_checkout = true; } } return $is_checkout; } /** * Render checkout shortcode markup. * * @param array $atts attributes. * @return string */ public function optin_shortcode_markup( $atts ) { if ( ! function_exists( 'wc_print_notices' ) ) { $notice_out = '<p class="woocommerce-notice">' . __( 'WooCommerce functions do not exist. If you are in an IFrame, please reload it.', 'cartflows' ) . '</p>'; $notice_out .= '<button onClick="location.reload()">' . __( 'Click Here to Reload', 'cartflows' ) . '</button>'; return $notice_out; } $atts = shortcode_atts( array( 'id' => 0, ), $atts ); $optin_id = intval( $atts['id'] ); if ( empty( $optin_id ) ) { if ( ! _is_wcf_optin_type() ) { return '<h4>' . __( 'Please place shortcode on Optin step-type only.', 'cartflows' ) . '</h4>'; } global $post; $optin_id = intval( $post->ID ); } $output = ''; ob_start(); do_action( 'cartflows_optin_form_before', $optin_id ); $optin_layout = 'default'; $template_default = CARTFLOWS_OPTIN_DIR . 'templates/optin-template-simple.php'; include $template_default; $output .= ob_get_clean(); return $output; } /** * Configure Cart Data. * * @since 1.0.0 * * @return void */ public function preconfigured_cart_data() { if ( is_admin() ) { return; } global $post; if ( _is_wcf_optin_type() ) { if ( wp_doing_ajax() ) { return; } else { $optin_id = $post->ID; do_action( 'cartflows_optin_before_configure_cart', $optin_id ); $products = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-product' ); if ( ! is_array( $products ) ) { return; } /* Empty the current cart */ WC()->cart->empty_cart(); if ( is_array( $products ) && count( $products ) < 1 ) { wc_add_notice( __( 'No product is selected. Please select a Simple, Virtual and Free product from the meta settings.', 'cartflows' ), 'error' ); return; } /* Set customer session if not set */ if ( ! is_user_logged_in() && WC()->cart->is_empty() ) { WC()->session->set_customer_session_cookie( true ); } $product_id = reset( $products ); $_product = wc_get_product( $product_id ); if ( ! empty( $_product ) ) { if ( $_product->is_type( 'simple' ) && $_product->is_virtual() ) { if ( $_product->get_price() > 0 ) { wc_add_notice( __( 'Please update the selected product\'s price to zero (0).', 'cartflows' ), 'error' ); } else { $quantity = 1; WC()->cart->add_to_cart( $product_id, $quantity ); } } else { wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' ); } } else { wc_add_notice( __( 'Please select a Simple, Virtual and Free product.', 'cartflows' ), 'error' ); } do_action( 'cartflows_optin_after_configure_cart', $optin_id ); } } } /** * Load shortcode data. * * @return void */ public function shortcode_load_data() { if ( _is_wcf_optin_type() ) { add_action( 'wp_enqueue_scripts', array( $this, 'shortcode_scripts' ), 21 ); add_action( 'wp_enqueue_scripts', array( $this, 'compatibility_scripts' ), 101 ); /* Show notices if cart has errors */ add_action( 'woocommerce_cart_has_errors', 'woocommerce_output_all_notices' ); // Outputting the hidden field in checkout page. add_action( 'woocommerce_after_order_notes', array( $this, 'checkout_shortcode_post_id' ), 99 ); add_action( 'woocommerce_login_form_end', array( $this, 'checkout_shortcode_post_id' ), 99 ); /* Remove unnecessary option */ add_filter( 'woocommerce_enable_order_notes_field', '__return_false' ); add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' ); remove_all_actions( 'woocommerce_before_checkout_form' ); remove_all_actions( 'woocommerce_checkout_billing' ); remove_all_actions( 'woocommerce_checkout_shipping' ); remove_all_actions( 'woocommerce_checkout_before_order_review' ); remove_all_actions( 'woocommerce_checkout_order_review' ); remove_all_actions( 'woocommerce_checkout_after_order_review' ); add_filter( 'woocommerce_cart_needs_payment', '__return_false' ); add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_payment_gateways' ) ); /* Paypal Expresss remove */ if ( function_exists( 'wc_gateway_ppec' ) ) { remove_action( 'wp_enqueue_scripts', array( wc_gateway_ppec()->cart, 'enqueue_scripts' ) ); } // Hook in actions once. add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 ); add_action( 'woocommerce_checkout_billing', array( WC()->checkout, 'checkout_form_billing' ) ); add_action( 'woocommerce_checkout_shipping', array( WC()->checkout, 'checkout_form_shipping' ) ); add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); /* Submit Button */ add_filter( 'woocommerce_order_button_text', array( $this, 'place_order_button_text' ), 10, 1 ); add_filter( 'woocommerce_get_terms_and_conditions_checkbox_text', '__return_false' ); global $post; $optin_id = $post->ID; do_action( 'cartflows_optin_before_shortcode', $optin_id ); } } /** * Disable payment gateways. * * @param array $available_gateways gateways. * @return array */ public function disable_payment_gateways( $available_gateways ) { if ( ! is_admin() ) { $available_gateways = array(); } return $available_gateways; } /** * Render checkout ID hidden field. * * @param array $checkout checkout session data. * @return void */ public function checkout_shortcode_post_id( $checkout ) { if ( ! _is_wcf_optin_type() ) { return; } global $post; $optin_id = $post->ID; $flow_id = get_post_meta( $optin_id, 'wcf-flow-id', true ); echo '<input type="hidden" class="input-hidden _wcf_flow_id" name="_wcf_flow_id" value="' . intval( $flow_id ) . '">'; echo '<input type="hidden" class="input-hidden _wcf_optin_id" name="_wcf_optin_id" value="' . intval( $optin_id ) . '">'; } /** * Load shortcode scripts. * * @return void */ public function shortcode_scripts() { wp_enqueue_style( 'wcf-optin-template', wcf()->utils->get_css_url( 'optin-template' ), '', CARTFLOWS_VER ); wp_enqueue_script( 'wcf-optin-template', wcf()->utils->get_js_url( 'optin-template' ), array( 'jquery' ), CARTFLOWS_VER, true ); do_action( 'cartflows_optin_scripts' ); $style = $this->generate_style(); wp_add_inline_style( 'wcf-optin-template', $style ); } /** * Load compatibility scripts. * * @return void */ public function compatibility_scripts() { global $post; $optin_id = $post->ID; // Add DIVI Compatibility css if DIVI theme is enabled. if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() || Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id ) ) { wp_enqueue_style( 'wcf-optin-template-divi', wcf()->utils->get_css_url( 'optin-template-divi' ), '', CARTFLOWS_VER ); } } /** * Generate styles. * * @return string */ public function generate_style() { global $post; $optin_id = $post->ID; /* Load all fonts */ CartFlows_Font_Families::render_fonts( $optin_id ); $r = ''; $g = ''; $b = ''; $output = ''; /* Global */ $primary_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-primary-color' ); $base_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-base-font-family' ); /* Input Fields */ $input_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-family' ); $input_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-font-weight' ); $field_input_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-input-field-size' ); $field_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-tb-padding' ); $field_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-lr-padding' ); $field_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-color' ); $field_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-bg-color' ); $field_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-border-color' ); $field_label_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-field-label-color' ); if ( 'custom' == $field_input_size ) { $field_input_size = '38px'; } /* Submit Button */ $submit_button_width = '100%'; $optin_button_position = ''; $button_font_size = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-font-size' ); $button_font_family = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-family' ); $button_font_weight = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-button-font-weight' ); $submit_button_height = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-size' ); $submit_tb_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-tb-padding' ); $submit_lr_padding = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-lr-padding' ); $submit_button_position = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-button-position' ); $submit_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-color' ); $submit_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-hover-color' ); $submit_bg_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-color', $primary_color ); $submit_bg_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-bg-hover-color', $primary_color ); $submit_border_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-color', $primary_color ); $submit_border_hover_color = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-submit-border-hover-color', $primary_color ); if ( 'custom' == $submit_button_height ) { $submit_button_height = '38px'; $submit_button_width = 'auto'; switch ( $submit_button_position ) { case 'left': $optin_button_position = '0 auto 0 0'; break; case 'center': $optin_button_position = '0 auto'; break; case 'right': $optin_button_position = '0 0 0 auto'; break; default: $optin_button_position = '0 auto'; break; } } if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() || Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $optin_id ) ) { include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-divi-css.php'; } else { include CARTFLOWS_OPTIN_DIR . 'includes/optin-dynamic-css.php'; } return $output; } /** * Get ajax end points. * * @param string $endpoint_url end point URL. * @param string $request end point request. * @return string */ public function get_ajax_endpoint( $endpoint_url, $request ) { global $post; if ( ! empty( $post ) && ! empty( $_SERVER['REQUEST_URI'] ) ) { if ( _is_wcf_optin_type() ) { if ( mb_strpos( $endpoint_url, 'checkout', 0, 'utf-8' ) === false ) { if ( '' === $request ) { $query_args = array( 'wc-ajax' => '%%endpoint%%', ); } else { $query_args = array( 'wc-ajax' => $request, ); } $uri = explode( '?', $_SERVER['REQUEST_URI'], 2 ); //phpcs:ignore $uri = $uri[0]; $endpoint_url = esc_url( add_query_arg( $query_args, $uri ) ); } } } return $endpoint_url; } /** * Save checkout fields. * * @param int $order_id order id. * @param array $posted posted data. * @return void */ public function save_optin_fields( $order_id, $posted ) { if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore $optin_id = wc_clean( wp_unslash( $_POST['_wcf_optin_id'] ) ); //phpcs:ignore update_post_meta( $order_id, '_wcf_optin_id', $optin_id ); if ( isset( $_POST['_wcf_flow_id'] ) ) { //phpcs:ignore $flow_id = wc_clean( wp_unslash( $_POST['_wcf_flow_id'] ) ); //phpcs:ignore update_post_meta( $order_id, '_wcf_flow_id', $flow_id ); } } } /** * Redirect users to our checkout if hidden param * * @param string $redirect redirect url. * @param object $user user. * @return string */ public function after_login_redirect( $redirect, $user ) { if ( isset( $_POST['_wcf_optin_id'] ) ) { //phpcs:ignore $optin_id = intval( $_POST['_wcf_optin_id'] ); //phpcs:ignore $redirect = get_permalink( $optin_id ); } return $redirect; } /** * Add custom class to the fields to change the UI to three column. * * @param array $fields fields. */ public function set_optin_default_fields( $fields ) { if ( _is_wcf_optin_type() ) { global $post; $optin_id = $post->ID; } else { if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) { $optin_id = wcf()->utils->get_optin_id_from_post_data(); } else { return $fields; } } $first_name = $fields['first_name']; $last_name = $fields['last_name']; /* Make fields required */ $first_name['required'] = true; $last_name['required'] = true; $fields = array( 'first_name' => $first_name, 'last_name' => $last_name, ); return apply_filters( 'cartflows_optin_default_fields', $fields, $optin_id ); } /** * Add custom class to the fields to change the UI to three column. * * @param array $fields fields. */ public function set_optin_fields( $fields ) { if ( _is_wcf_optin_type() ) { global $post; $optin_id = $post->ID; } else { if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) { $optin_id = wcf()->utils->get_optin_id_from_post_data(); } else { return $fields; } } $billing_first_name = $fields['billing']['billing_first_name']; $billing_last_name = $fields['billing']['billing_last_name']; $billing_email = $fields['billing']['billing_email']; $fields['billing'] = array( 'billing_first_name' => $billing_first_name, 'billing_last_name' => $billing_last_name, 'billing_email' => $billing_email, ); return apply_filters( 'cartflows_optin_fields', $fields, $optin_id ); } /** * Billing field customization. * * @param array $fields fields data. * @param string $country country name. * @return array */ public function billing_optin_fields( $fields, $country ) { if ( _is_wcf_optin_type() ) { global $post; $optin_id = $post->ID; } else { if ( _is_wcf_doing_optin_ajax() && wcf()->utils->get_optin_id_from_post_data() ) { $optin_id = wcf()->utils->get_optin_id_from_post_data(); } else { return $fields; } } if ( is_wc_endpoint_url( 'edit-address' ) ) { return $fields; } $billing_first_name = $fields['billing_first_name']; $billing_last_name = $fields['billing_last_name']; $billing_email = $fields['billing_email']; /* Make fields required */ $billing_first_name['required'] = true; $billing_last_name['required'] = true; $fields = array( 'billing_first_name' => $billing_first_name, 'billing_last_name' => $billing_last_name, 'billing_email' => $billing_email, ); return apply_filters( 'cartflows_billing_optin_fields', $fields, $country, $optin_id ); } /** * Replace billing label. * * @param string $notice Notice. * @param string $field_label Field name. * @return string */ public function change_field_label_in_required_notice( $notice, $field_label ) { if ( _is_wcf_doing_optin_ajax() ) { $notice = str_replace( 'Billing ', '', $notice ); } return $notice; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Optin_Markup::get_instance(); class-cartflows-optin.php 0000666 00000001577 15214240661 0011532 0 ustar 00 <?php /** * Checkout * * @package Woo Funnel Cart */ define( 'CARTFLOWS_OPTIN_DIR', CARTFLOWS_DIR . 'modules/optin/' ); define( 'CARTFLOWS_OPTIN_URL', CARTFLOWS_URL . 'modules/optin/' ); /** * Initial Setup * * @since 1.0.0 */ class Cartflows_Optin { /** * Member Variable * * @var object instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor function that initializes required actions and hooks */ public function __construct() { require_once CARTFLOWS_OPTIN_DIR . 'classes/class-cartflows-optin-markup.php'; require_once CARTFLOWS_OPTIN_DIR . 'classes/class-cartflows-optin-meta.php'; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Optin::get_instance(); includes/optin-dynamic-divi-css.php 0000666 00000012527 15214240661 0013371 0 ustar 00 <?php /** * Dynamic checkout css * * @package CartFlows */ $output .= " .et_pb_module #wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before, .et_pb_module #wcf-optin-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:checked:before{ color: {$primary_color}; } .et_pb_module #wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{ background-color: {$primary_color}; } .et_pb_module #wcf-optin-form .woocommerce #payment input[type=checkbox]:focus, .et_pb_module #wcf-optin-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:focus, .et_pb_module #wcf-optin-form .woocommerce #payment input[type=radio]:checked:focus, .et_pb_module #wcf-optin-form .woocommerce #payment input[type=radio]:not(:checked):focus{ border-color: {$primary_color}; box-shadow: 0 0 2px rgba( " . $r . ',' . $g . ',' . $b . ", .8); } .et_pb_module #wcf-optin-form .woocommerce-checkout label{ color: {$field_label_color}; } .et_pb_module #wcf-optin-form .woocommerce form .form-row input.input-text, .et_pb_module #wcf-optin-form .woocommerce form .form-row textarea, .et_pb_module #wcf-optin-form .woocommerce form .form-row select, .et_pb_module #wcf-optin-form .woocommerce #order_review .input-text, .et_pb_module #wcf-optin-form #order_review .wcf-custom-coupon-field input[type='text'], .et_pb_module #wcf-optin-form .woocommerce form .form-row input.input-text, .et_pb_module #wcf-optin-form .woocommerce form .form-row textarea, .et_pb_module #wcf-optin-form .select2-container--default .select2-selection--single { color: {$field_color} !important; background-color: {$field_bg_color}!important; border-color: {$field_border_color}!important; padding-top: {$field_tb_padding}px; padding-bottom: {$field_tb_padding}px; padding-left: {$field_lr_padding}px; padding-right: {$field_lr_padding}px; min-height: {$field_input_size}!important; font-family: {$input_font_family}; font-weight: {$input_font_weight}; } .et_pb_module #wcf-optin-form .woocommerce .col2-set .col-1, .et_pb_module #wcf-optin-form .woocommerce .col2-set .col-2, .et_pb_module #wcf-optin-form .woocommerce-checkout .shop_table, .et_pb_module #wcf-optin-form .woocommerce-checkout #order_review_heading, .et_pb_module #wcf-optin-form .woocommerce-checkout #payment, .et_pb_module #wcf-optin-form .woocommerce form.checkout_coupon { font-family: {$input_font_family}; font-weight: {$input_font_weight}; } .et_pb_module #wcf-optin-form .woocommerce table.shop_table th{ color: {$field_label_color}; } .et_pb_module #wcf-optin-form .woocommerce a{ color: {$primary_color}; } .et_pb_module #wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered { color: {$field_color}; } .et_pb_module #wcf-optin-form ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: {$field_color}; } .et_pb_module #wcf-optin-form ::-moz-placeholder { /* Firefox 19+ */ color: {$field_color}; } .et_pb_module #wcf-optin-form :-ms-input-placeholder { /* IE 10+ */ color: {$field_color}; } .et_pb_module #wcf-optin-form :-moz-placeholder { /* Firefox 18- */ color: {$field_color}; } .et_pb_module #wcf-optin-form .woocommerce form p.form-row label { color: {$field_label_color}; font-family: {$input_font_family}; font-weight: {$input_font_weight}; } .et_pb_module #wcf-optin-form .woocommerce #order_review button, .et_pb_module #wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button, .et_pb_module #wcf-optin-form .woocommerce #order_review button.wcf-btn-small { color: {$submit_color} !important; background-color: {$submit_bg_color}!important; padding-top: {$submit_tb_padding}px; padding-bottom: {$submit_tb_padding}px; padding-left: {$submit_lr_padding}px; padding-right: {$submit_lr_padding}px; border-color: {$submit_border_color}!important; min-height: {$submit_button_height}; font-size: {$button_font_size}px; font-family: {$button_font_family}; font-weight: {$button_font_weight}; width: {$submit_button_width}; } .et_pb_module #wcf-optin-form .woocommerce-checkout form.woocommerce-form-login .button, .et_pb_module #wcf-optin-form .woocommerce-checkout form.checkout_coupon .button{ background: {$submit_bg_color}; border: 1px {$submit_border_color} solid; color: {$submit_color}; min-height: {$submit_button_height}; font-family: {$button_font_family}; font-weight: {$button_font_weight}; } .et_pb_module #wcf-optin-form .woocommerce-checkout form.login .button:hover, .et_pb_module #wcf-optin-form .woocommerce-checkout form.checkout_coupon .button:hover, .et_pb_module #wcf-optin-form .woocommerce #payment #place_order:hover, .et_pb_module #wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{ color: {$submit_hover_color} !important; background-color: {$submit_bg_hover_color} !important; border-color: {$submit_border_hover_color} !important; } .et_pb_module #wcf-optin-form .woocommerce-info::before, .et_pb_module #wcf-optin-form .woocommerce-message::before{ color: {$primary_color}; } .et_pb_module #wcf-optin-form { font-family: {$base_font_family}; } img.emoji, img.wp-smiley {} "; if ( 'custom' == $submit_button_height ) { $output .= " .et_pb_module #wcf-optin-form .woocommerce #order_review #payment button{ margin: {$optin_button_position}; } "; } includes/optin-dynamic-css.php 0000666 00000010617 15214240661 0012436 0 ustar 00 <?php /** * Dynamic checkout css * * @package CartFlows */ $output .= " .wcf-optin-form .woocommerce #payment input[type=checkbox]:checked:before, .wcf-optin-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:checked:before{ color: {$primary_color}; } .wcf-optin-form .woocommerce #payment input[type=radio]:checked:before{ background-color: {$primary_color}; } .wcf-optin-form .woocommerce #payment input[type=checkbox]:focus, .wcf-optin-form .woocommerce .woocommerce-shipping-fields [type='checkbox']:focus, .wcf-optin-form .woocommerce #payment input[type=radio]:checked:focus, .wcf-optin-form .woocommerce #payment input[type=radio]:not(:checked):focus{ border-color: {$primary_color}; box-shadow: 0 0 2px rgba( " . $r . ',' . $g . ',' . $b . ", .8); } .wcf-optin-form .woocommerce-checkout label{ color: {$field_label_color}; } .wcf-optin-form #order_review .wcf-custom-coupon-field input[type='text'], .wcf-optin-form .woocommerce form .form-row input.input-text, .wcf-optin-form .woocommerce form .form-row textarea, .wcf-optin-form .select2-container--default .select2-selection--single { color: {$field_color}; background: {$field_bg_color}; border-color: {$field_border_color}; padding-top: {$field_tb_padding}px; padding-bottom: {$field_tb_padding}px; padding-left: {$field_lr_padding}px; padding-right: {$field_lr_padding}px; min-height: {$field_input_size}; font-family: {$input_font_family}; font-weight: {$input_font_weight}; } .wcf-optin-form .woocommerce .col2-set .col-1, .wcf-optin-form .woocommerce .col2-set .col-2, .wcf-optin-form .woocommerce-checkout .shop_table, .wcf-optin-form .woocommerce-checkout #order_review_heading, .wcf-optin-form .woocommerce-checkout #payment, .wcf-optin-form .woocommerce form.checkout_coupon { font-family: {$input_font_family}; font-weight: {$input_font_weight}; } .woocommerce table.shop_table th{ color: {$field_label_color}; } .wcf-optin-form .woocommerce a{ color: {$primary_color}; } .wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered { color: {$field_color}; } .wcf-optin-form ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: {$field_color}; } .wcf-optin-form ::-moz-placeholder { /* Firefox 19+ */ color: {$field_color}; } .wcf-optin-form :-ms-input-placeholder { /* IE 10+ */ color: {$field_color}; } .wcf-optin-form :-moz-placeholder { /* Firefox 18- */ color: {$field_color}; } .wcf-optin-form .woocommerce form p.form-row label { color: {$field_label_color}; font-family: {$input_font_family}; font-weight: {$input_font_weight}; } .wcf-optin-form .woocommerce #order_review button, .wcf-optin-form .woocommerce form.woocommerce-form-login .form-row button, .wcf-optin-form .woocommerce #order_review button.wcf-btn-small { color: {$submit_color}; background: {$submit_bg_color}; padding-top: {$submit_tb_padding}px; padding-bottom: {$submit_tb_padding}px; padding-left: {$submit_lr_padding}px; padding-right: {$submit_lr_padding}px; border-color: {$submit_border_color}; min-height: {$submit_button_height}; font-size: {$button_font_size}px; font-family: {$button_font_family}; font-weight: {$button_font_weight}; width: {$submit_button_width}; } .wcf-optin-form .woocommerce-checkout form.woocommerce-form-login .button, .wcf-optin-form .woocommerce-checkout form.checkout_coupon .button{ background: {$submit_bg_color}; border: 1px {$submit_border_color} solid; color: {$submit_color}; min-height: {$submit_button_height}; font-family: {$button_font_family}; font-weight: {$button_font_weight}; } .wcf-optin-form .woocommerce-checkout form.login .button:hover, .wcf-optin-form .woocommerce-checkout form.checkout_coupon .button:hover, .wcf-optin-form .woocommerce #payment #place_order:hover, .wcf-optin-form .woocommerce #order_review button.wcf-btn-small:hover{ color: {$submit_hover_color}; background-color: {$submit_bg_hover_color}; border-color: {$submit_border_hover_color}; } .wcf-optin-form .woocommerce-info::before, .wcf-optin-form .woocommerce-message::before{ color: {$primary_color}; } .wcf-optin-form{ font-family: {$base_font_family}; } img.emoji, img.wp-smiley {}"; if ( 'custom' == $submit_button_height ) { $output .= " .wcf-optin-form .woocommerce #order_review #payment button{ margin: {$optin_button_position}; } "; }
| ver. 1.4 |
Github
|
.
| PHP 7.0.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings