Orderadmin/assets/css/debugger-rtl.css000064400000000644147600244370013036 0ustar00.wcf-debug-page #wcf-menu-page { padding-top: 0; } .wcf-debug-page .wcf-menu-page-content { padding: 0; } /*.wcf-debug-page .wcf-top-links { margin: 0; }*/ .wcf-debug-page .wcf-debug-page-content { padding: 20px; } .wcf-log__section { background: #fff; box-shadow: none; margin-bottom: 20px; border: 0; padding: 30px 20px; border-radius: 2px; } .wcf-license-log__section .log-viewer { padding: 0 12px; } admin/assets/css/debugger.css000064400000000644147600244370012237 0ustar00.wcf-debug-page #wcf-menu-page { padding-top: 0; } .wcf-debug-page .wcf-menu-page-content { padding: 0; } /*.wcf-debug-page .wcf-top-links { margin: 0; }*/ .wcf-debug-page .wcf-debug-page-content { padding: 20px; } .wcf-log__section { background: #fff; box-shadow: none; margin-bottom: 20px; border: 0; padding: 30px 20px; border-radius: 2px; } .wcf-license-log__section .log-viewer { padding: 0 12px; } admin/assets/images/arrow.png000064400000003147147600244370012257 0ustar00‰PNG  IHDR õ”; pHYs%%IR$ðñiTXtXML:com.adobe.xmp ë&nIDAT(‘cœ9sæF"ã¨â‘¨˜(_$\’¾x¼IEND®B`‚admin/assets/js/notices.js000064400000004115147600244370011564 0ustar00( function ( $ ) { const migrate_to_new_order_bump = function () { $( 'a.migrate-to-new-ob' ).on( 'click', function ( e ) { e.preventDefault(); const content = $( this ).closest( '.wcf-notice-content' ), text = CartFlows_Pro_Common_Vars.ob_notice_text; const data = { action: 'cartflows_migrate_order_bump', security: CartFlows_Pro_Common_Vars.ob_migration_nonce, }; $.ajax( { type: 'POST', url: ajaxurl, data, success( response ) { if ( response.success ) { console.log( 'Action scheduled for order bump migration.' ); content.html( text ); } }, } ); } ); }; const migrate_pre_checkout_offer_styles = function () { $( 'a.migrate-to-new-styling-option' ).on( 'click', function ( e ) { e.preventDefault(); const content = $( this ).closest( '.wcf-notice-content' ), text = CartFlows_Pro_Common_Vars.pre_checkout_offer_migration_notice; const data = { action: 'cartflows_migrate_pre_checkout_offer_styles', security: CartFlows_Pro_Common_Vars.pre_checkout_offer_migration_nonce, }; $.ajax( { type: 'POST', url: ajaxurl, data, success( response ) { if ( response.success ) { console.log( 'Action scheduled for pre checkout offer styles migration.' ); content.html( text ); } }, } ); } ); }; const dismiss_flow_analytics_notice = function () { $( document ).on( 'click', '.flow-analytics-notice.wcf-dismissible-notice button.notice-dismiss', function ( e ) { e.preventDefault(); const data = { action: 'cartflows_dismiss_flow_analytics_notice', security: CartFlows_Pro_Common_Vars.flow_analytics_dismiss_notice_nonce, }; $.ajax( { type: 'POST', url: ajaxurl, data, success( response ) { if ( response.success ) { console.log( 'Funnel Analytics Notice Ignored.' ); } }, } ); } ); }; $( function () { migrate_to_new_order_bump(); migrate_pre_checkout_offer_styles(); dismiss_flow_analytics_notice(); } ); } )( jQuery ); admin/meta-assets/css/refund-offer-meta-box-rtl.css000064400000003545147600244370016275 0ustar00#wcf-offer-refund-metabox h2.hndle { border-bottom: none; } #wcf-offer-refund-metabox .inside { margin: 0; padding: 0; background: #fefefe; } #wcf-offer-refund-metabox .cartflows_offer_items { margin: 0; width: 100%; } #wcf-offer-refund-metabox .ref_note { padding: 10px 30px; color: #a00; } #wcf-offer-refund-metabox thead tr th { text-align: right; padding: 1em; font-weight: 400; color: #999; background: #f8f8f8; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #wcf-offer-refund-metabox #order_line_items tr td { padding: 1.5em 1em 1em; text-align: right; line-height: 1.5em; vertical-align: middle; border-bottom: 1px solid #f8f8f8; } #wcf-offer-refund-metabox #order_line_items tr:first-child td { border-top: 8px solid #f8f8f8; } #wcf-offer-refund-metabox table.cartflows_offer_items thead th:first-child, #wcf-offer-refund-metabox table.cartflows_offer_items td:first-child { padding-right: 2em !important; } #wcf-offer-refund-metabox table.cartflows_offer_items thead th:last-child, #wcf-offer-refund-metabox table.cartflows_offer_items tbody td:last-child { padding-left: 2em !important; text-align: center; } #wcf-offer-refund-metabox .cartflows_offer_items thead tr:first-child th, #wcf-offer-refund-metabox #order_line_items tr:first-child td { border-top: none; } #wcf-offer-refund-metabox tbody.order_line_items td.thumb { width: 38px; } #wcf-offer-refund-metabox tbody.order_line_items td.thumb .wc-order-item-thumbnail { width: 38px; height: 38px; border: 2px solid #e8e8e8; background: #f8f8f8; color: #ccc; position: relative; font-size: 21px; display: block; text-align: center; } #wcf-offer-refund-metabox tbody.order_line_items td.thumb .wc-order-item-thumbnail img { width: 100%; height: 100%; margin: 0; padding: 0; position: relative; } admin/meta-assets/css/refund-offer-meta-box.css000064400000003543147600244370015474 0ustar00#wcf-offer-refund-metabox h2.hndle { border-bottom: none; } #wcf-offer-refund-metabox .inside { margin: 0; padding: 0; background: #fefefe; } #wcf-offer-refund-metabox .cartflows_offer_items { margin: 0; width: 100%; } #wcf-offer-refund-metabox .ref_note { padding: 10px 30px; color: #a00; } #wcf-offer-refund-metabox thead tr th { text-align: left; padding: 1em; font-weight: 400; color: #999; background: #f8f8f8; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #wcf-offer-refund-metabox #order_line_items tr td { padding: 1.5em 1em 1em; text-align: left; line-height: 1.5em; vertical-align: middle; border-bottom: 1px solid #f8f8f8; } #wcf-offer-refund-metabox #order_line_items tr:first-child td { border-top: 8px solid #f8f8f8; } #wcf-offer-refund-metabox table.cartflows_offer_items thead th:first-child, #wcf-offer-refund-metabox table.cartflows_offer_items td:first-child { padding-left: 2em !important; } #wcf-offer-refund-metabox table.cartflows_offer_items thead th:last-child, #wcf-offer-refund-metabox table.cartflows_offer_items tbody td:last-child { padding-right: 2em !important; text-align: center; } #wcf-offer-refund-metabox .cartflows_offer_items thead tr:first-child th, #wcf-offer-refund-metabox #order_line_items tr:first-child td { border-top: none; } #wcf-offer-refund-metabox tbody.order_line_items td.thumb { width: 38px; } #wcf-offer-refund-metabox tbody.order_line_items td.thumb .wc-order-item-thumbnail { width: 38px; height: 38px; border: 2px solid #e8e8e8; background: #f8f8f8; color: #ccc; position: relative; font-size: 21px; display: block; text-align: center; } #wcf-offer-refund-metabox tbody.order_line_items td.thumb .wc-order-item-thumbnail img { width: 100%; height: 100%; margin: 0; padding: 0; position: relative; } admin/meta-assets/js/refund-offer-meta-box.js000064400000003747147600244370015152 0ustar00( function ( $ ) { const cartflows_offer_refund_init = function () { $( '.button.wcf-offer-refund' ).on( 'click', function ( e ) { e.preventDefault(); const refund_reason = prompt( 'Enter refund reason:', 'CartFlows Offer Refund' ); if ( '' === refund_reason ) { return alert( 'Please enter valid refund reason', false ); } else if ( null === refund_reason ) { return false; } const $this = $( this ), main_order_id = $this.attr( 'data-order-id' ), step_id = $this.attr( 'data-step-id' ), offer_product_id = $this.attr( 'data-item-id' ), offer_product_amt = $this.attr( 'data-item-amount' ), transaction_id = $this.attr( 'data-transaction-id' ), data_api_refund = true, nonce = $( 'input[name="wcf_admin_refund_offer_nonce"]' ).val(), offer_product_qty = {}; // Display the loading icon. $( '#wcf-offer-refund-metabox' ).block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6, }, } ); offer_product_qty[ offer_product_id ] = offer_product_qty; const refund_data = { action: 'wcf_admin_refund_offer', order_id: main_order_id, step_id, offer_amt: offer_product_amt, offer_id: offer_product_id, refund_reason, api_refund: data_api_refund, transaction_id, restock_refunded_items: true, cartflows_refund: true, security: nonce, }; // Send data for the refund process. jQuery.ajax( { type: 'POST', dataType: 'json', url: ajaxurl, data: refund_data, success( response ) { if ( true === response.success ) { console.log( response.msg ); alert( 'Your offer product is refunded successfully' ); $( '#wcf-offer-refund-metabox' ).unblock(); window.location.reload(); } else { console.log( response ); alert( response.msg ); $( '#wcf-offer-refund-metabox' ).unblock(); } }, } ); } ); }; $( function () { cartflows_offer_refund_init(); } ); } )( jQuery ); admin/views/html-refund-offer.php000064400000016767147600244370013056 0ustar00ID : 0; // Reason for ignoring the rule: We are including this file on admin action in add_meta_box function callback. if ( ! $order_id && isset( $_GET['id'] ) && ! empty( $_GET['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( wp_unslash( $_GET['id'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended } $order_obj = wc_get_order( $order_id ); $order_items = $order_obj->get_items( 'line_item' ); $shipping_fee = 0; $order_obj->calculate_totals(); foreach ( $order_items as $key => $value ) { $is_upsell = wc_get_order_item_meta( $key, '_cartflows_upsell', true ); $is_downsell = wc_get_order_item_meta( $key, '_cartflows_downsell', true ); $step_id = wc_get_order_item_meta( $key, '_cartflows_step_id', true ); $is_refunded = wc_get_order_item_meta( $key, '_cartflows_refunded', true ); if ( 'yes' == $is_upsell || 'yes' == $is_downsell ) { if ( 'yes' == $is_upsell ) { $offer_type = 'Upsell'; $transaction_id = wc_get_order_item_meta( $key, '_cartflows_offer_txn_id', true ); $shipping_fee = wc_get_order_item_meta( $key, '_cartflows_offer_shipping_fee', true ); } elseif ( 'yes' == $is_downsell ) { $offer_type = 'Downsell'; $transaction_id = wc_get_order_item_meta( $key, '_cartflows_offer_txn_id', true ); $shipping_fee = wc_get_order_item_meta( $key, '_cartflows_offer_shipping_fee', true ); } $products[ $key ] = array( 'order_id' => $value['order_id'], 'step_id' => $step_id, 'offer_type' => $offer_type, 'order_item_id' => $key, 'offer_product_id' => $value['product_id'], 'offer_product_name' => get_the_title( $value['product_id'] ), 'offer_product_total' => $value->get_total(), 'offer_product_qty' => $value->get_quantity(), 'offer_product_item_total' => 0, 'offer_product_item_tax' => 0, 'transaction_id' => $transaction_id, 'is_refunded' => 'yes' === $is_refunded ? true : false, 'shipping_fee' => $shipping_fee, ); if ( get_option( 'woocommerce_calc_taxes' ) ) { $products[ $key ]['offer_product_total'] = $products[ $key ]['offer_product_total'] + $value->get_total_tax(); $products[ $key ]['offer_product_item_total'] = $value->get_total(); $products[ $key ]['offer_product_item_tax'] = $products[ $key ]['offer_product_item_tax'] + $value->get_total_tax(); } if ( isset( $shipping_fee ) && ! empty( $shipping_fee ) && $shipping_fee > 0 ) { $products[ $key ]['offer_product_total'] = $products[ $key ]['offer_product_total'] + $shipping_fee; $products[ $key ]['offer_product_item_total'] = $value->get_total(); $products[ $key ]['offer_product_item_tax'] = $products[ $key ]['offer_product_item_tax'] + $shipping_fee; } } } // @codingStandardsIgnoreLine WordPress.Security.EscapeOutput.UnsafePrintingFunction ?>
0 ) { ?> $product_details ) { $offer_type = $product_details['offer_type']; $product_id = $product_details['offer_product_id']; $product_name = $product_details['offer_product_name']; $product_qty = $product_details['offer_product_qty']; $is_refunded = $product_details['is_refunded']; $product_amount = wc_price( $product_details['offer_product_total'] ); $product = wc_get_product( $product_id ); $thumbnail = $product->get_image( 'thumbnail', array( 'title' => '' ) ); ?>
Item Prices: %1$s
Tax & Other: %2$s
Total: %3$s
', 'cartflows-pro' ), wc_price( $product_details['offer_product_item_total'] ), wc_price( $product_details['offer_product_item_tax'] ), wc_price( $product_details['offer_product_total'] ) ) ) ); ?>
' . esc_html__( 'Refund', 'cartflows-pro' ) . ''; } else { $button_markup = ''; } echo wp_kses_post( $button_markup ); ?>
" . esc_html_e( 'Refunds are not available for any offer(s) against this order.', 'cartflows-pro' ) . '

'; } ?>
admin-core/ajax/ajax-base.php000064400000003125147600244370012061 0ustar00errors = AjaxErrors::get_instance(); } /** * Register ajax events. * * @param array $ajax_events Ajax events. */ public function init_ajax_events( $ajax_events ) { if ( ! empty( $ajax_events ) ) { foreach ( $ajax_events as $ajax_event ) { add_action( 'wp_ajax_' . $this->prefix . '_' . $ajax_event, array( $this, $ajax_event ) ); $this->localize_ajax_action_nonce( $ajax_event ); } } } /** * Localize nonce for ajax call. * * @param string $action Action name. * @return void */ public function localize_ajax_action_nonce( $action ) { if ( current_user_can( 'cartflows_manage_flows_steps' ) ) { add_filter( 'cartflows_admin_localized_vars', function( $localize ) use ( $action ) { $localize[ $action . '_nonce' ] = wp_create_nonce( $this->prefix . '_' . $action ); return $localize; } ); } } /** * Get ajax error message. * * @param string $type Message type. * @return string */ public function get_error_msg( $type ) { return $this->errors->get_error_msg( $type ); } } admin-core/ajax/ajax-errors.php000064400000002505147600244370012464 0ustar00 __( 'Sorry, you are not allowed to do this operation.', 'cartflows-pro' ), 'nonce' => __( 'Nonce validation failed', 'cartflows-pro' ), 'default' => __( 'Sorry, something went wrong.', 'cartflows-pro' ), ); } /** * Get error message. * * @param string $type Message type. * @return string */ public function get_error_msg( $type ) { if ( ! isset( self::$errors[ $type ] ) ) { $type = 'default'; } return self::$errors[ $type ]; } } AjaxErrors::get_instance(); admin-core/ajax/ajax-init.php000064400000002355147600244370012116 0ustar00initialize_hooks(); } /** * Init Hooks. * * @since 1.0.0 * @return void */ public function initialize_hooks() { $this->register_all_ajax_events(); } /** * Register API routes. */ public function register_all_ajax_events() { $controllers = array( 'CartflowsProAdmin\AdminCore\Ajax\FormFields', 'CartflowsProAdmin\AdminCore\Ajax\FlowAnalytics', 'CartflowsProAdmin\AdminCore\Ajax\MultipleOrderBump', ); foreach ( $controllers as $controller ) { $controller::get_instance()->register_ajax_events(); } } } AjaxInit::get_instance(); admin-core/ajax/flow-analytics.php000064400000010311147600244370013155 0ustar00init_ajax_events( $ajax_events ); } /** * Visits map. */ public function set_visit_data() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); /** * Check permission */ if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_set_visit_data', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } if ( ! wcf()->is_woo_active ) { return array( 'revenue' => array(), 'all_steps' => array(), 'currency' => '', ); } $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $start_date = isset( $_POST['date_from'] ) ? sanitize_text_field( wp_unslash( $_POST['date_from'] ) ) : ''; $end_date = isset( $_POST['date_to'] ) ? sanitize_text_field( wp_unslash( $_POST['date_to'] ) ) : ''; $analytics_data = $this->flow_analytics_data( $flow_id, $start_date, $end_date ); $response = array( 'revenue' => $analytics_data['earning'], 'all_steps' => $analytics_data['visits'], 'currency' => function_exists( 'get_woocommerce_currency_symbol' ) ? get_woocommerce_currency_symbol() : '', ); wp_send_json_success( $response ); } /** * Get analytics for specific flow. * * @param int $flow_id flow id. * @param string $start_date start date. * @param string $end_date end date. * @return array */ public function flow_analytics_data( $flow_id, $start_date, $end_date ) { $report = \Cartflows_Pro_Analytics_Reports::get_instance(); $earning = $report->get_earnings( $flow_id, $start_date, $end_date ); $visits = $report->fetch_visits( $flow_id, $start_date, $end_date ); return array( 'earning' => $earning, 'visits' => $report->visits_map( $flow_id, $visits, $earning ), ); } /** * Reset_flow_analytics */ public function reset_flow_analytics() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); /** * Check permission */ if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_reset_flow_analytics', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } global $wpdb; $visit_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_TABLE; $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $result = array( 'status' => false, 'text' => sprintf( __( 'Invalid Flow ID has been provided.', 'cartflows-pro' ) ), ); if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) ) { wp_send_json_error( $result ); } if ( 0 !== $flow_id ) { $get_steps = wcf()->flow->get_steps( $flow_id ); $step_ids = implode( ',', wp_list_pluck( $get_steps, 'id' ) ); // Prepare adds singlw quotes thats why can not use it. $wpdb->query( "DELETE FROM {$visit_db} WHERE step_id IN(" . $step_ids . ')' ); //phpcs:ignore WordPress.DB.PreparedSQL, WordPress.DB.DirectDatabaseQuery $reset_date = current_time( 'Y-m-d H:i:s' ); update_post_meta( $flow_id, 'wcf-analytics-reset-date', $reset_date ); wp_send_json_success( true ); } wp_send_json_error( false ); } } admin-core/ajax/form-fields.php000064400000020451147600244370012436 0ustar00init_ajax_events( $ajax_events ); } /** * Prepare custom field. * * @return void */ public function prepare_custom_field() { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_prepare_custom_field', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $add_to = isset( $_POST['add_to'] ) ? sanitize_text_field( wp_unslash( $_POST['add_to'] ) ) : ''; $type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : ''; $options = isset( $_POST['options'] ) ? sanitize_text_field( wp_unslash( $_POST['options'] ) ) : ''; $label = isset( $_POST['label'] ) ? sanitize_text_field( wp_unslash( $_POST['label'] ) ) : ''; // We need to replace the whhitespace with underscore,hence we are sanitizing input late. $name = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( str_replace( ' ', '_', $_POST['name'] ) ) ) : ''; //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $placeholder = isset( $_POST['placeholder'] ) ? sanitize_text_field( wp_unslash( $_POST['placeholder'] ) ) : ''; $width = isset( $_POST['width'] ) ? sanitize_text_field( wp_unslash( $_POST['width'] ) ) : ''; $default_value = isset( $_POST['default'] ) ? sanitize_text_field( wp_unslash( $_POST['default'] ) ) : ''; $optimized = isset( $_POST['optimized'] ) ? sanitize_text_field( wp_unslash( $_POST['optimized'] ) ) : 'no'; $show_in_email = isset( $_POST['show_in_email'] ) ? sanitize_text_field( wp_unslash( $_POST['show_in_email'] ) ) : 'yes'; $is_required = isset( $_POST['required'] ) ? sanitize_text_field( wp_unslash( $_POST['required'] ) ) : 'no'; $save_field_name = isset( $_POST['save_field_name'] ) ? sanitize_text_field( wp_unslash( $_POST['save_field_name'] ) ) : ''; $min_value = isset( $_POST['min'] ) ? intval( $_POST['min'] ) : ''; $max_value = isset( $_POST['max'] ) ? intval( $_POST['max'] ) : ''; $date_input = isset( $_POST['date_input'] ) ? sanitize_text_field( wp_unslash( $_POST['date_input'] ) ) : 'datetime-local'; $min_date = isset( $_POST['min_date'] ) ? sanitize_text_field( wp_unslash( $_POST['min_date'] ) ) : ''; $max_date = isset( $_POST['max_date'] ) ? sanitize_text_field( wp_unslash( $_POST['max_date'] ) ) : ''; if ( '' !== $name ) { $name = $add_to . '_' . sanitize_key( $name ); $field_data = array( 'type' => $type, 'label' => $label, 'placeholder' => $placeholder, 'class' => array( 'form-row-wide' ), 'label_class' => array(), 'show_in_email' => $show_in_email, 'required' => $is_required, 'custom' => true, 'default' => $default_value, 'options' => $options, 'date_input' => $date_input, 'optimized' => $optimized, 'width' => $width, 'name' => $name, 'key' => $name, 'enabled' => 'yes', ); // Specific to date input. if ( 'datetime' === $type ) { $field_data['type'] = $date_input; $field_data['custom_attributes'] = array( 'min' => $min_date, 'max' => $max_date, ); } if ( 'select' === $type || 'radio' === $type ) { $field_data['options'] = $options; } if ( 'number' === $type ) { $field_data['custom_attributes'] = array( 'min' => $min_value, 'max' => $max_value, ); } $new_field = $field_data; /* Add checkout field */ \Cartflows_Pro_Helper::add_checkout_field( $add_to, $name, $post_id, $field_data ); if ( 'wcf_field_order_' === $save_field_name ) { $field_data = AdminHelper::prepare_checkout_field_settings( $field_data, $post_id, $add_to ); } else { $field_data = AdminHelper::prepare_optin_field_settings( $field_data, $post_id, $add_to ); } $response_data = array( 'messsage' => __( 'Custom field prepared.', 'cartflows-pro' ), 'add_to' => $add_to, 'field_data' => $field_data, 'new_field' => $new_field, ); wp_send_json_success( $response_data ); } else { $response_data = array( 'messsage' => __( 'Name field is empty!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } } /** * Delete Field. * * @return void */ public function delete_custom_field() { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_delete_custom_field', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } if ( $_POST ) { $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : ''; $key = isset( $_POST['key'] ) ? sanitize_text_field( wp_unslash( $_POST['key'] ) ) : ''; $step = isset( $_POST['step'] ) ? sanitize_text_field( wp_unslash( $_POST['step'] ) ) : ''; $billing_fields = array(); $shipping_fields = array(); if ( '' !== $key ) { \Cartflows_Pro_Helper::delete_checkout_field( $type, $key, $post_id ); $billing_fields = $this->get_checkout_fields( 'billing', $post_id ); $shipping_fields = $this->get_checkout_fields( 'shipping', $post_id ); $checkout_meta = \Cartflows_Checkout_Meta_Data::get_instance(); $optin_meta = \Cartflows_Optin_Meta_Data::get_instance(); // Prepare the data with new fields. if ( 'checkout' === $step ) { $billing_fields = $checkout_meta->get_field_settings( $post_id, 'billing', $billing_fields ); $shipping_fields = $checkout_meta->get_field_settings( $post_id, 'shipping', $shipping_fields ); } else { $billing_fields = $optin_meta->get_field_settings( $post_id, 'billing', $billing_fields ); } $data = array( 'status' => true, 'billing_fields' => $billing_fields, 'shipping_fields' => $shipping_fields, ); wp_send_json( $data ); } } wp_send_json_success( $response_data ); } /** * Get_checkout_fields * * @param string $key key. * @param string $post_id post_id. */ public function get_checkout_fields( $key, $post_id ) { $saved_fields = get_post_meta( $post_id, 'wcf_fields_' . $key, true ); if ( ! $saved_fields ) { $saved_fields = array(); } $fields = array_filter( $saved_fields ); if ( empty( $fields ) ) { if ( 'billing' === $key || 'shipping' === $key ) { $fields = WC()->countries->get_address_fields( WC()->countries->get_base_country(), $key . '_' ); if ( CARTFLOWS_STEP_POST_TYPE === get_post_type( intval( $post_id ) ) ) { update_post_meta( $post_id, 'wcf_fields_' . $key, $fields ); } } } return $fields; } } admin-core/ajax/multiple-order-bump.php000064400000065276147600244370014152 0ustar00init_ajax_events( $ajax_events ); } /** * Save order bump settings. * * @return void */ public function save_order_bump_settings() { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_save_order_bump_settings', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $response_data = array( 'success' => false, 'messsage' => __( 'Order Bump data not saved.', 'cartflows-pro' ), ); $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : ''; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : ''; $ob_tab = isset( $_POST['ob_tab'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_tab'] ) ) : ''; if ( ! empty( $ob_id ) && ! empty( $step_id ) ) { $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); $new_data = isset( $_POST ) ? $_POST : array(); $default_data = \Cartflows_Pro_Checkout_Default_Meta::get_instance()->order_bump_default_meta(); $default_data_keys = array_keys( $default_data ); if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_data['id'] === $ob_id ) { foreach ( $new_data as $data_key => $data_value ) { if ( ! in_array( $data_key, $default_data_keys, true ) ) { continue; } $data_value = $this->sanitize_multiple_order_bump_values( $data_value, $default_data[ $data_key ]['sanitize'], $step_id, $order_bumps, $index, $new_data ); $order_bumps[ $index ][ $data_key ] = $data_value; } if ( ! empty( array_keys( $new_data ) ) && in_array( 'product', array_keys( $new_data ), true ) && $new_data['product'] !== $ob_data['product'] ) { // Checking if product tab. Can update later. $order_bumps[ $index ]['product_image'] = ''; $order_bumps[ $index ]['product_img_obj'] = ''; $order_bumps[ $index ]['desc_text'] = false; // Can't set it as empty. Case: If user want to put desc empty. } update_post_meta( $step_id, 'wcf-order-bumps', $order_bumps ); delete_post_meta( $step_id, 'wcf-pro-dynamic-css' ); break; } } $response_data = array( 'messsage' => __( 'Order bump settings saved successfully!', 'cartflows-pro' ), 'success' => true, ); if ( ! empty( array_keys( $new_data ) ) && in_array( 'product', array_keys( $new_data ), true ) && $new_data['product'] !== $ob_data['product'] ) { $current_ob = $this->get_ob_data( $step_id, $ob_id ); $response_data['current_ob'] = $current_ob; } } wp_send_json_error( $response_data ); } else { wp_send_json_error( $response_data ); } } /** * Sanitixe order bump values. * * @param string $data_value meta value. * @param string $filter filter type. * @param int $step_id checkout id. * @param array $order_bumps order bumps. * @param int $index order bump index. * @param int $new_data order bump data. */ public function sanitize_multiple_order_bump_values( $data_value, $filter, $step_id, $order_bumps, $index, $new_data ) { switch ( $filter ) { case 'FILTER_SANITIZE_ARRAY': $sanitized_data = array(); $data_value = (array) $data_value; foreach ( $data_value as $index => $value ) { $sanitized_data[ $index ] = sanitize_text_field( wp_unslash( $value ) ); } $meta_value = $sanitized_data; break; case 'FILTER_SANITIZE_STRING': $meta_value = sanitize_text_field( wp_unslash( $data_value ) ); break; case 'FILTER_VALIDATE_BOOLEAN': $meta_value = filter_var( $data_value, FILTER_VALIDATE_BOOLEAN ); break; case 'FILTER_SANITIZE_URL': $meta_value = filter_var( $data_value, FILTER_SANITIZE_URL ); break; case 'FILTER_SANITIZE_NUMBER_INT': $meta_value = filter_var( $data_value, FILTER_SANITIZE_NUMBER_INT ); break; case 'FILTER_SANITIZE_NUMBER_FLOAT': $meta_value = filter_var( $data_value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ); break; case 'FILTER_WP_KSES_POST': $meta_value = wp_kses_post( $data_value ); break; case 'FILTER_SANITIZE_COLOR': $meta_value = sanitize_hex_color( $data_value ); break; case 'FILTER_SANITIZE_RULES': $sanitized_data = array(); if ( is_array( $data_value ) && ! empty( $data_value ) ) { foreach ( $data_value as $group_index => $group_data ) { if ( is_array( $group_data ) && is_array( $group_data['rules'] ) ) { $rules = $this->sanitize_rules( $group_data['rules'] ); $sanitized_data[ $group_index ]['group_id'] = sanitize_text_field( $group_data['group_id'] ); $sanitized_data[ $group_index ]['rules'] = $rules; } } } $meta_value = $sanitized_data; break; case 'FILTER_CARTFLOWS_OB_IMAGE': $image_data = ''; if ( ! empty( $data_value ) && ! is_serialized( $data_value ) ) { $image_obj = json_decode( stripcslashes( wp_unslash( $data_value ) ), true ); $image_url = isset( $image_obj['sizes'] ) ? $image_obj['sizes'] : array(); $image_id = isset( $image_obj['id'] ) ? intval( $image_obj['id'] ) : 0; if ( 0 !== $image_id ) { $image_data = array( 'id' => $image_id, 'url' => array( 'thumbnail' => isset( $image_url['thumbnail']['url'] ) ? esc_url_raw( $image_url['thumbnail']['url'] ) : '', 'medium' => isset( $image_url['medium']['url'] ) ? esc_url_raw( $image_url['medium']['url'] ) : '', 'full' => isset( $image_url['full']['url'] ) ? esc_url_raw( $image_url['full']['url'] ) : '', ), ); } } $meta_value = $image_data; break; default: $meta_value = sanitize_text_field( wp_unslash( $data_value ) ); break; } return $meta_value; } /** * Sanitize rules. * * @param array $rules rules. */ public function sanitize_rules( $rules ) { $sanitized_rules = array(); foreach ( $rules as $index => $rule_data ) { if ( ! empty( $rule_data['value'] ) ) { $sanitized_rules[] = $this->sanitize_rule_data( $rule_data ); } } return $sanitized_rules; } /** * Sanitize rule data. * * @param array $rule_data rule data. */ public static function sanitize_rule_data( $rule_data ) { $sanitized_input = ''; if ( is_array( $rule_data ) ) { $sanitized_input = array(); foreach ( $rule_data as $key => $value ) { $sanitized_key = sanitize_text_field( $key ); $sanitized_input[ $sanitized_key ] = self::sanitize_rule_data( $value ); } } else { $sanitized_input = sanitize_text_field( $rule_data ); } return $sanitized_input; } /** * Get order bump. * * @return void */ public function get_current_order_bump() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_get_current_order_bump', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : ''; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : 0; $current_ob = array(); if ( ! empty( $ob_id ) && ! empty( $step_id ) ) { $current_ob = $this->get_ob_data( $step_id, $ob_id ); $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Data Retrieved', 'cartflows-pro' ), 'current_ob' => $current_ob, ); } else { $response_data = array( 'success' => false, 'messsage' => __( 'No data.', 'cartflows-pro' ), 'current_ob' => $current_ob, ); } wp_send_json_success( $response_data ); } /** * Get ob data. * * @param int $step_id step id. * @param int $ob_id ob id. */ public function get_ob_data( $step_id, $ob_id ) { $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); $admin_helper = \Cartflows_Pro_Admin_Helper::get_instance(); $default_meta = \Cartflows_Pro_Checkout_Default_Meta::get_instance()->order_bump_default_meta(); $ob_default_meta = array(); foreach ( $default_meta as $key => $value ) { $ob_default_meta[ $key ] = $value['default']; } if ( is_array( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_id === $ob_data['id'] ) { $ob_data = wp_parse_args( $ob_data, $ob_default_meta ); $product_id = 0; if ( ! empty( $ob_data['product'] ) ) { $product_id = intval( $ob_data['product'] ); $ob_data['product'] = $admin_helper::get_products_label( array( $product_id ) ); } $ob_data = $this->add_ob_product_data( $product_id, $ob_data ); if ( ! empty( $ob_data['discount_coupon'] ) ) { $ob_data['discount_coupon'] = $admin_helper::get_coupons_label( array( $ob_data['discount_coupon'] ) ); } if ( 'yes' === $ob_data['is_rule'] ) { $ob_data['rules'] = $this->filter_ob_rules( $ob_data['rules'] ); } break; } } } return $ob_data; } /** * Add product data. * * @param int $product_id product id. * @param array $ob_data order bump data. */ public function add_ob_product_data( $product_id, $ob_data ) { $product_obj = wc_get_product( $product_id ); if ( ! empty( $ob_data['product'] ) && $product_obj ) { // Update product image. if ( empty( $ob_data['product_image'] ) ) { $product_image = get_the_post_thumbnail_url( $product_id ); if ( empty( $product_image ) ) { $product_image = esc_url_raw( CARTFLOWS_PRO_URL . 'assets/images/image-placeholder.png' ); } $ob_data['product_image'] = $product_image; } // Update product description. if ( empty( $ob_data['desc_text'] ) ) { $product_desc = $product_obj->get_short_description(); $ob_data['desc_text'] = $product_desc . '
' . "\r\n{{product_price}}"; } // Calculate product custom price. $custom_price = wcf_pro()->utils->get_calculated_discount( $ob_data['discount_type'], $ob_data['discount_value'], $ob_data['product'][0]['original_price'] ); $product_price_data = \Cartflows_Pro_Order_Bump_Product::get_instance()->get_taxable_product_price( $product_obj, $ob_data['product'][0]['original_price'], $custom_price ); $display_price = ''; if ( 0 < $ob_data['discount_value'] && \Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $display_price = '' . wc_price( $product_price_data['product_price'] ) . ''; $display_price .= ' ' . wc_price( $product_price_data['custom_price'] ) . ''; } else { $display_price = '' . wc_price( $product_price_data['product_price'] ) . ''; } $ob_data['product'][0]['display_price'] = $display_price; } else { $ob_data['product_image'] = esc_url_raw( CARTFLOWS_PRO_URL . 'assets/images/image-placeholder.png' ); } return $ob_data; } /** * Filter ob rules. * * @param array $conditions conditions data. */ public function filter_ob_rules( $conditions ) { if ( is_array( $conditions ) ) { foreach ( $conditions as $group_index => $group_data ) { if ( is_array( $group_data ) & ! empty( $group_data['rules'] ) ) { $conditions[ $group_index ]['rules'] = $this->filter_rules_data( $group_data['rules'] ); } } } return $conditions; } /** * Filter rule options. * * @param array $rules rule. */ public function filter_rules_data( $rules ) { $admin_helper = \Cartflows_Pro_Admin_Helper::get_instance(); foreach ( $rules as $rule_index => $rule_data ) { if ( is_array( $rule_data['value'] ) && ! empty( $rule_data['value'][0] ) ) { switch ( $rule_data['condition'] ) { case 'cart_item': $rules[ $rule_index ]['value'] = $admin_helper::get_products_label( $rule_data['value'] ); break; case 'cart_shipping_method': $rules[ $rule_index ]['value'] = $admin_helper::get_labels( $rule_data['value'] ); break; case 'cart_item_category': $rules[ $rule_index ]['value'] = $admin_helper::get_products_cat_label( $rule_data['value'] ); break; case 'cart_item_tag': $rules[ $rule_index ]['value'] = $admin_helper::get_products_tag_label( $rule_data['value'] ); break; case 'cart_coupons': $rules[ $rule_index ]['value'] = $admin_helper::get_coupons_label( $rule_data['value'] ); break; case 'cart_payment_method': $rules[ $rule_index ]['value'] = $admin_helper::get_payment_methods_label( $rule_data['value'] ); break; case 'cart_shipping_country': case 'cart_billing_country': $rules[ $rule_index ]['value'] = $admin_helper::get_country_label( $rule_data['value'] ); break; default: break; } } } return $rules; } /** * Delete order bump. * * @return void */ public function update_order_bump_status() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_update_order_bump_status', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $response_data = array( 'success' => false, 'messsage' => __( 'Cant update order bump status!', 'cartflows-pro' ), ); $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : 0; $ob_status = isset( $_POST['ob_status'] ) && 'true' === $_POST['ob_status'] ? true : false; if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $response_data ); } if ( ! empty( $ob_id ) && ! empty( $step_id ) ) { $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_id === $ob_data['id'] ) { $order_bumps[ $index ]['status'] = $ob_status; } } update_post_meta( $step_id, 'wcf-order-bumps', $order_bumps ); AdminHelper::clear_current_step_css( $step_id ); $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Status Updated Succesfully', 'cartflows-pro' ), ); wp_send_json_success( $response_data ); } wp_send_json_error( $response_data ); } else { wp_send_json_error( $response_data ); } } /** * Delete order bump. * * @return void */ public function delete_order_bump() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_delete_order_bump', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $response_data = array( 'success' => false, 'messsage' => __( 'Cant delete order bump!', 'cartflows-pro' ), ); $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : 0; if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $response_data ); } if ( ! empty( $ob_id ) && ! empty( $step_id ) ) { $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); $new_ob_data = array(); if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_id === $ob_data['id'] ) { unset( $order_bumps[ $index ] ); $new_ob_data = array_values( $order_bumps ); update_post_meta( $step_id, 'wcf-order-bumps', $new_ob_data ); AdminHelper::clear_current_step_css( $step_id ); break; } } $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Deleted Succesfully', 'cartflows-pro' ), 'order_bumps' => $new_ob_data, ); wp_send_json_success( $response_data ); } wp_send_json_error( $response_data ); } else { wp_send_json_error( $response_data ); } } /** * Add Order Bump. * * @return void */ public function add_order_bump() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); if ( empty( $_POST ) ) { wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_add_order_bump', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : 0; $title = isset( $_POST['title'] ) ? sanitize_text_field( wp_unslash( $_POST['title'] ) ) : 'no title'; if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $response_data ); } if ( ! empty( $ob_id ) && ! empty( $step_id ) ) { $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); if ( ! is_array( $order_bumps ) ) { $order_bumps = array(); } $new_ob_data = AdminHelper::add_default_order_bump_data( $ob_id, $title, $order_bumps ); update_post_meta( $step_id, 'wcf-order-bumps', $new_ob_data ); $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Added Succesfully', 'cartflows-pro' ), 'order_bumps' => $new_ob_data, ); wp_send_json_success( $response_data ); } else { $response_data = array( 'messsage' => __( 'Cant add order bump!', 'cartflows-pro' ), 'success' => false, ); wp_send_json_error( $response_data ); } } /** * Clone Order Bump * * @return void */ public function clone_order_bump() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_clone_order_bump', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $response_data = array( 'messsage' => __( 'Can\'t clone the order bump! Order Bump ID or Page ID not found.', 'cartflows-pro' ), 'success' => false, ); $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : ''; if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $response_data ); } if ( ! empty( $ob_id ) && ! empty( $step_id ) ) { // Get all the order bumps for current step. $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_id === $ob_data['id'] ) { // Generate random ID for new order Bump. $new_ob_id = substr( md5( wp_rand() ), 2, 3 ); $data_to_clone = $ob_data; // Replace/Change the ID and Title to new. $data_to_clone['id'] = $new_ob_id; $data_to_clone['title'] = $data_to_clone['title'] . __( ' Clone', 'cartflows-pro' ); $data_to_clone['status'] = false; array_push( $order_bumps, $data_to_clone ); update_post_meta( $step_id, 'wcf-order-bumps', $order_bumps ); break; } } $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Cloned Succesfully', 'cartflows-pro' ), 'order_bumps' => $order_bumps, ); wp_send_json_success( $response_data ); } wp_send_json_error( $response_data ); } else { wp_send_json_error( $response_data ); } } /** * Update order bump title. */ public function update_order_bump_title() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); if ( empty( $_POST ) ) { wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_update_order_bump_title', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $ob_id = isset( $_POST['ob_id'] ) ? sanitize_text_field( wp_unslash( $_POST['ob_id'] ) ) : 0; $new_title = isset( $_POST['new_title'] ) ? sanitize_text_field( wp_unslash( $_POST['new_title'] ) ) : 'no title'; if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $response_data ); } $order_bumps = get_post_meta( $step_id, 'wcf-order-bumps', true ); if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_id === $ob_data['id'] ) { $order_bumps[ $index ]['title'] = $new_title; break; } } update_post_meta( $step_id, 'wcf-order-bumps', $order_bumps ); $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Title Updated Succesfully', 'cartflows-pro' ), 'order_bumps' => $order_bumps, ); wp_send_json_success( $response_data ); } $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump Title Not Updated.', 'cartflows-pro' ), 'order_bumps' => $order_bumps, ); wp_send_json_error( $response_data ); } /** * Reorder order bumps. */ public function reorder_order_bumps() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'permission' ) ); wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'messsage' => __( 'No post data found!', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification */ if ( ! check_ajax_referer( 'cartflows_pro_reorder_order_bumps', 'security', false ) ) { $response_data = array( 'messsage' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $sorted_obs = isset( $_POST['sorted_obs'] ) ? explode( ',', sanitize_text_field( wp_unslash( $_POST['sorted_obs'] ) ) ) : array(); $result = array( 'status' => false, 'text' => __( 'Order Bumps not sorted.', 'cartflows-pro' ), ); if ( ! $step_id || empty( $sorted_obs ) ) { wp_send_json( $result ); } if ( CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } $new_order_bumps = array(); foreach ( $sorted_obs as $index => $ob_id ) { $get_ob_data = $this->get_order_bump_data_by_id( $step_id, $ob_id ); if ( ! empty( $get_ob_data ) ) { array_push( $new_order_bumps, $get_ob_data ); } } update_post_meta( $step_id, 'wcf-order-bumps', $new_order_bumps ); $result = array( 'status' => true, /* translators: %s step id */ 'text' => sprintf( __( 'Order Bump sorted for step - %s', 'cartflows-pro' ), $step_id ), ); wp_send_json( $result ); } /** * Get order bump. * * @param int $checkout_id checkout id. * @param string $ob_id order bump id. */ public function get_order_bump_data_by_id( $checkout_id, $ob_id ) { $order_bumps = get_post_meta( $checkout_id, 'wcf-order-bumps', true ); $required_ob_data = array(); if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $ob_data ) { if ( $ob_id === $ob_data['id'] ) { $required_ob_data = $ob_data; break; } } } return $required_ob_data; } } admin-core/api/api-base.php000064400000001052147600244370011532 0ustar00namespace; } } admin-core/api/api-init.php000064400000002254147600244370011570 0ustar00initialize_hooks(); } /** * Init Hooks. * * @since 1.0.0 * @return void */ public function initialize_hooks() { // REST API extensions init. add_action( 'rest_api_init', array( $this, 'register_routes' ) ); } /** * Register API routes. */ public function register_routes() { $controllers = array( 'CartflowsProAdmin\AdminCore\Api\ObProductData', ); foreach ( $controllers as $controller ) { $controller::get_instance()->register_routes(); } } } ApiInit::get_instance(); admin-core/api/ob-product-data.php000064400000006634147600244370013051 0ustar00get_api_namespace(); register_rest_route( $namespace, $this->rest_base . '(?P[\d-]+)', array( 'args' => array( 'id' => array( 'description' => __( 'Step ID.', 'cartflows-pro' ), 'type' => 'integer', ), ), array( 'methods' => \WP_REST_Server::READABLE, 'callback' => array( $this, 'get_ob_item_data' ), 'permission_callback' => array( $this, 'get_item_permissions_check' ), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); } /** * Get ob item data. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function get_ob_item_data( $request ) { $product_id = $request->get_param( 'id' ); /* Prepare data */ $data = array( 'id' => $product_id, ); if ( ! wcf()->is_woo_active ) { return new \WP_Error( 'cartflows_rest_cannot_call', __( 'Sorry, WooCommerce need to be installed & activated to call API.', 'cartflows-pro' ) ); } $product = wc_get_product( $product_id ); if ( $product ) { $admin_helper = \Cartflows_Pro_Admin_Helper::get_instance(); $product_data = $admin_helper::get_products_label( array( $product_id ) ); $product_image = get_the_post_thumbnail_url( $product_id ); if ( empty( $product_image ) ) { $product_image = esc_url_raw( CARTFLOWS_PRO_URL . 'assets/images/image-placeholder.png' ); } $product_desc = $product->get_short_description() . '
' . "\r\n{{product_price}}"; $product_price_data = \Cartflows_Pro_Order_Bump_Product::get_instance()->get_taxable_product_price( $product, $product_data[0]['original_price'], 0 ); $product_data[0]['display_price'] = '' . wc_price( $product_price_data['product_price'] ) . ''; $data = array( 'product' => $product_data, 'desc_text' => $product_desc, 'product_image' => $product_image, ); } $response = new \WP_REST_Response( $data ); $response->set_status( 200 ); return $response; } /** * Check whether a given request has permission to read notes. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function get_item_permissions_check( $request ) { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return new \WP_Error( 'cartflows_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'cartflows-pro' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } } admin-core/assets/importer-data/cartflows-bricks-offer-module.json000064400000014510147600244370021400 0ustar00[{"id":"qnirzz","name":"section","parent":0,"children":["tltlzj"],"settings":{"_padding":{"top":"80","right":"40","bottom":"80","left":"40"},"_padding:tablet_portrait":{"top":"50","bottom":"50","left":"30","right":"30"},"_padding:mobile_landscape":{"top":"40","right":"24","bottom":"40","left":"24"}}},{"id":"guvtdd","name":"bricks-cf-upsell-layout","parent":"tltlzj","children":["imwyea"],"settings":[],"themeStyles":[]},{"id":"imwyea","name":"section","parent":"guvtdd","children":["sgkkzd","yolcii"],"settings":{"_padding":{"top":"20","bottom":"20","right":"20","left":"20"},"_margin":{"top":"0"},"_padding:tablet_portrait":{"top":"20","right":"20","left":"20","bottom":"20"},"_padding:mobile_portrait":{"left":"20","right":"20","top":"20","bottom":"20"}}},{"id":"sgkkzd","name":"container","parent":"imwyea","children":["hpeczk","eakldy","uqeogj"],"settings":[]},{"id":"hpeczk","name":"heading","parent":"sgkkzd","children":[],"settings":{"text":"WAIT! ","_typography":{"text-align":"center","font-weight":"700","font-size":"34"},"_margin":{"bottom":"10"},"_typography:mobile_portrait":{"line-height":"1.3","font-size":"28"},"_alignSelf":"center","tag":"h2","_margin:mobile_portrait":{"bottom":"15"}}},{"id":"uqeogj","name":"progress-bar","parent":"sgkkzd","children":[],"settings":{"bars":[{"percentage":80,"id":"uzvgzt","color":{"hex":"#ff6700"}}],"height":"10","barBackgroundColor":{"hex":"#ffe2cc"},"_alignSelf":"center","_border":{"radius":{"top":"5","right":"5","bottom":"5","left":"5"}},"_width":"70%","_width:mobile_portrait":"100%"},"themeStyles":[]},{"id":"yolcii","name":"container","parent":"imwyea","children":["cikfak","gvcxmy"],"settings":{"_direction":"row","_columnGap":"40px","_rowGap":"30px","_margin":{"top":"30px"},"_border":{"0":{"top":"1","right":"1","bottom":"1","left":"1"},"style":"solid","color":{"hex":"#dddddd"},"radius":{"top":"8","right":"8","left":"8","bottom":"8"}},"_padding":{"top":"30px","bottom":"30px","left":"30px","right":"30px"},"_alignItems":"center","_padding:mobile_portrait":{"left":20,"right":20,"top":"20","bottom":20},"_padding:mobile_landscape":{"top":"20","left":20,"right":20,"bottom":20},"_padding:tablet_portrait":{"left":20,"right":20,"top":0,"bottom":20},"_background":{"color":{"hex":"#ffffff"}}}},{"id":"cikfak","name":"block","parent":"yolcii","children":["wfdcxc"],"settings":{"_width":"50%","_width:mobile_portrait":"100%","_width:mobile_landscape":"100%"},"label":"Column"},{"id":"wfdcxc","name":"block","parent":"cikfak","children":["udolsw"],"settings":{"_margin:mobile_portrait":{"top":0}}},{"id":"udolsw","name":"bricks-cf-product-image","parent":"wfdcxc","children":[],"settings":{"_margin":{"top":"0"},"_border":{"radius":{"top":"8","right":"8","left":"8","bottom":"8"},"color":{"hex":"#9e9e9e","id":"3d0b55","name":"Color #3"}},"_width:mobile_landscape":"100%"}},{"id":"gvcxmy","name":"block","parent":"yolcii","children":["tyhufo"],"settings":{"_width":"50%","_width:mobile_portrait":"100%","_width:mobile_landscape":"100%","_direction":"column","_rowGap":"0.75em"},"label":"Column"},{"id":"tyhufo","name":"block","parent":"gvcxmy","children":["vzdanh","ppcuag","fjsdnm","poqrza","nbkowt","btgntq","zjnlzt"],"settings":{"_alignSelf":"flex-start"}},{"id":"vzdanh","name":"bricks-cf-product-title","parent":"tyhufo","children":[],"settings":{"_typography":{"font-size":"28px","color":{"hex":"#030303"},"font-weight":600,"text-align":"left"},"_width":"100%","_margin":{"bottom":"10"}}},{"id":"ppcuag","name":"bricks-cf-product-description","parent":"tyhufo","children":[],"settings":{"_typography":{"font-size":"16px","color":{"hex":"#030303"},"font-weight":400,"text-align":"left"},"short_description":true,"_width":"100%","offer_product_description_styling:tablet_portrait":{"font-size":"14"}},"label":"Product Description"},{"id":"fjsdnm","name":"text","parent":"tyhufo","children":[],"settings":{"text":"
Price<\/strong>: <\/div>","_typography":{"text-transform":"capitalize","font-weight":"500"},"_display":"inline-block","_alignSelf":"flex-start","_width":"44%","_margin":{"top":"23"}}},{"id":"poqrza","name":"bricks-cf-product-price","parent":"tyhufo","children":[],"settings":{"_typography":{"text-align":"left","text-transform":"capitalize","font-weight":"500"},"_alignSelf":"flex-start","_position":"static"},"label":"Product Price"},{"id":"nbkowt","name":"bricks-cf-product-quantity","parent":"tyhufo","children":[],"settings":{"_typography":{"font-family":"Inter","font-weight":600,"text-align":"left"},"_width":"100%","_alignSelf":"center","_margin":{"bottom":"25"},"alignment":"flex-start","quantity_width":"25","quantity_width:mobile_landscape":"15","quantity_width:mobile_portrait":"20"},"label":"Product Quantity"},{"id":"btgntq","name":"button","parent":"tyhufo","children":[],"settings":{"text":"Add to my order","link":{"type":"meta","useDynamicData":"{wcf_accept_offer}"},"_alignSelf":"flex-start","_background":{"color":{"hex":"#ff6700"}},"padding":{"top":"15px","bottom":"15px","left":"15px","right":"15px"},"_typography":{"color":{"hex":"#ffffff"},"font-size":"14px","font-weight":600,"text-align":"center","font-style":"normal","text-transform":"uppercase"},"_position":"static","_display":"inline","circle":true,"size":"md","_border":{"width":{"top":"1","left":"1","right":"1","bottom":"1"},"style":"solid","color":{"hex":"#ffdd56"},"radius":{"top":"24","right":"24","bottom":"24","left":"24"}},"_padding":{"top":"12","left":"24","right":"24","bottom":"12"},"_width":"100%"}},{"id":"zjnlzt","name":"text-link","parent":"tyhufo","children":[],"settings":{"text":"No Thanks, I'll Pass","link":{"type":"meta","useDynamicData":"{wcf_reject_offer}"},"_alignSelf":"flex-start","_width":"100%","align-items":"center","_display":"inline-block","padding":{"top":"15px","bottom":"15px","left":"15px","right":"15px"},"_typography":{"font-size":"12x","font-weight":400,"text-align":"center","color":{"hex":"#616161","id":"9f7192","name":"Color #4"}},"_margin":{"top":"15","left":"0"}}},{"id":"tltlzj","name":"container","parent":"qnirzz","children":["guvtdd"],"settings":{"_padding":{"bottom":"0","top":"0","left":"0","right":"0"}}},{"id":"eakldy","name":"heading","parent":"sgkkzd","children":[],"settings":{"text":"Don\u2019t Miss Out \u2013 Save on Our Top Product!","_typography":{"text-align":"center","font-weight":"700","font-size":"22"},"_margin":{"bottom":"30"},"_typography:mobile_portrait":{"line-height":"1.3","font-size":"18"},"_alignSelf":"center","tag":"h4"}}] admin-core/inc/admin-helper.php000064400000004345147600244370012426 0ustar00order_bump_default_meta(); foreach ( $default_meta as $key => $value ) { $new_ob[ $key ] = $value['default']; } // Update the dynamic values. $new_ob['id'] = $ob_id; $new_ob['title'] = $title; array_push( $order_bumps, $new_ob ); return $order_bumps; } /** * Regenerate CSS for speicfic step. * * @param int $step_id step id. */ public static function clear_current_step_css( $step_id ) { update_post_meta( $step_id, 'wcf-pro-dynamic-css-version', time() ); } /** * Prepare new custom meta fields * * @param array $new_field new field. * @param string $post_id post id. * @param string $type type. */ public static function prepare_checkout_field_settings( $new_field, $post_id, $type ) { $key = $new_field['key']; $checkout_meta = \Cartflows_Checkout_Meta_Data::get_instance(); $field_args = $checkout_meta->prepare_field_arguments( $key, $new_field, $post_id, $type ); $new_field = \Cartflows_Helper::get_instance()->prepare_custom_field_settings( $new_field, $key, $field_args, $type, 'checkout' ); return $new_field; } /** * Prepare new custom meta fields * * @param array $new_field new field. * @param string $post_id post id. * @param string $type post id. */ public static function prepare_optin_field_settings( $new_field, $post_id, $type ) { $key = $new_field['key']; $optin_meta = \Cartflows_Optin_Meta_Data::get_instance(); $field_args = $optin_meta->prepare_field_arguments( $key, $new_field, $post_id, $type ); $new_field = \Cartflows_Helper::get_instance()->prepare_custom_field_settings( $new_field, $key, $field_args, $type, 'optin' ); return $new_field; } } admin-core/inc/admin-hooks.php000064400000016602147600244370012271 0ustar00initialize_hooks(); } /** * Init Hooks. * * @since 1.0.0 * @return void */ public function initialize_hooks() { add_filter( 'cartflows_admin_localized_vars', array( $this, 'localize_required_vars' ), 10, 1 ); add_action( 'cartflows_admin_save_step_meta', array( $this, 'save_step_actions' ), 10, 1 ); add_filter( 'cartflows_admin_flows_step_data', array( $this, 'add_flow_steps_data' ), 10, 1 ); /* Start-Pro-Woo-Feature */ add_action( 'cartflows_admin_log', array( $this, 'show_pro_log' ), 10, 1 ); /* End-Pro-Woo-Feature */ add_filter( 'cartflows_admin_flows_page_data', array( $this, 'add_analytics_data_of_flow' ), 10, 1 ); add_filter( 'cartflows_admin_flow_data', array( $this, 'add_flow_analytics_data' ), 999, 2 ); add_action( 'admin_enqueue_scripts', array( $this, 'add_debugger_styles' ) ); } /** * Add license debug page CSS. * * @return void */ public function add_debugger_styles() { wp_enqueue_style( 'cartflows-license-debug', CARTFLOWS_PRO_URL . 'admin/assets/css/debugger.css', array(), CARTFLOWS_PRO_VER ); } /** * Add pro analytics data. * * @param array $flow_data flow data. * @param int $flow_id flow id. * * @return array */ public function add_flow_analytics_data( $flow_data, $flow_id ) { if ( ! wcf()->is_woo_active ) { return $flow_data; } $start_date = gmdate( 'Y-m-d', strtotime( '-7 days' ) ); $end_date = gmdate( 'Y-m-d' ); $analytics_data = FlowAnalytics::get_instance()->flow_analytics_data( $flow_id, $start_date, $end_date ); $analytics_data = array( 'revenue' => $analytics_data['earning'], 'all_steps' => $analytics_data['visits'], 'currency' => function_exists( 'get_woocommerce_currency_symbol' ) ? get_woocommerce_currency_symbol() : '', ); $flow_data['flow_analytics'] = $analytics_data; return $flow_data; } /** * Add flow analytics data. * * @param array $page_data flow data. * * @return array */ public function add_analytics_data_of_flow( $page_data ) { if ( wcf()->is_woo_active && ! empty( $page_data ) && isset( $page_data['items'] ) && ! empty( $page_data['items'] ) ) { $report = \Cartflows_Pro_Analytics_Reports::get_instance(); foreach ( $page_data['items'] as $index => $flow ) { $page_data['items'][ $index ]['revenue'] = str_replace( ' ', '', wc_price( $report->get_gross_sale_by_flow( $flow['ID'] ) ) ); } } return $page_data; } /* Start-Pro-Woo-Feature */ /** * Show pro log. * * @param string $log_name log name. */ public function show_pro_log( $log_name ) { if ( 'wcf-license' === $log_name ) { include_once CARTFLOWS_PRO_DIR . 'admin-core/inc/cartflows-license-log.php'; } } /* End-Pro-Woo-Feature */ /** * Add pro flows step data. * * @param array $steps flow steps. */ public function add_flow_steps_data( $steps ) { $is_checkout = 0; $step_length = count( $steps ); foreach ( $steps as $in => $step ) { if ( 'checkout' === $step['type'] ) { $is_checkout++; $is_rules = get_post_meta( $step['id'], 'wcf-checkout-rules-option', true ); if ( 'yes' === $is_rules ) { $steps[ $in ]['conditions'] = array(); $conditions = get_post_meta( $step['id'], 'wcf-checkout-rules', true ); if ( ! empty( $conditions ) ) { foreach ( $conditions as $group_data ) { if ( '' === $group_data['step_id'] ) { $wcf_step_obj = wcf_pro_get_step( $step['id'] ); $group_data['step_id'] = $wcf_step_obj->get_next_step_id(); } $steps[ $in ]['conditions'][] = $group_data; } } $default_step = get_post_meta( $step['id'], 'wcf-checkout-rules-default-step', true ); if ( '' === $default_step ) { $wcf_step_obj = wcf_pro_get_step( $step['id'] ); $default_step = $wcf_step_obj->get_next_step_id(); } $steps[ $in ]['default_step'] = $default_step; } } if ( in_array( $step['type'], array( 'upsell', 'downsell' ), true ) ) { $is_thankyou = 0; // Check if next remaining steps has thank you page. for ( $i = $in; $i < $step_length; $i++ ) { if ( 'thankyou' === $steps[ $i ]['type'] ) { $is_thankyou++; } } if ( $is_checkout > 0 && $is_thankyou > 0 ) { $wcf_step_obj = wcf_pro_get_step( $step['id'] ); $flow_steps = $wcf_step_obj->get_flow_steps(); $control_step = $wcf_step_obj->get_control_step(); if ( 'upsell' === $step['type'] ) { $next_yes_steps = wcf_pro()->flow->get_next_step_id_for_upsell_accepted( $wcf_step_obj, $flow_steps, $step['id'], $control_step ); $next_no_steps = wcf_pro()->flow->get_next_step_id_for_upsell_rejected( $wcf_step_obj, $flow_steps, $step['id'], $control_step ); } if ( 'downsell' === $step['type'] ) { $next_yes_steps = wcf_pro()->flow->get_next_step_id_for_downsell_accepted( $wcf_step_obj, $flow_steps, $step['id'], $control_step ); $next_no_steps = wcf_pro()->flow->get_next_step_id_for_downsell_rejected( $wcf_step_obj, $flow_steps, $step['id'], $control_step ); } if ( ! empty( $next_yes_steps ) && false !== get_post_status( $next_yes_steps ) ) { $yes_label = __( 'YES : ', 'cartflows-pro' ) . get_the_title( $next_yes_steps ); } else { $yes_label = __( 'YES : Step not Found', 'cartflows-pro' ); } if ( ! empty( $next_no_steps ) && false !== get_post_status( $next_no_steps ) ) { $no_label = __( 'No : ', 'cartflows-pro' ) . get_the_title( $next_no_steps ); } else { $no_label = __( 'No : Step not Found', 'cartflows-pro' ); } $steps[ $in ]['offer_yes_next_step'] = $yes_label; $steps[ $in ]['offer_no_next_step'] = $no_label; $steps[ $in ]['offer_yes_step_id'] = intval( $next_yes_steps ); $steps[ $in ]['offer_no_step_id'] = intval( $next_no_steps ); } } } return $steps; } /** * Save step pro action. * * @param int $step_id step id. */ public function save_step_actions( $step_id ) { delete_post_meta( $step_id, 'wcf-pro-dynamic-css' ); } /** * Get payment gateways. * * @param array $localize localized variables. */ public function localize_required_vars( $localize ) { $product_id = \CartFlows_Pro_Licence::get_instance()->product_id; $localize['cf_pro_type'] = CARTFLOWS_PRO_PLUGIN_TYPE; $localize['license_status'] = get_option( 'wc_am_client_' . $product_id . '_activated', '' ); $localize['license_activation_nonce'] = wp_create_nonce( 'cartflows_license_activation_nonce' ); $localize['license_deactivation_nonce'] = wp_create_nonce( 'cartflows_license_deactivation_nonce' ); $localize['is_order_bump_migrated'] = get_option( 'wcf_order_bump_migrated', false ); return $localize; } } AdminHooks::get_instance(); admin-core/inc/cartflows-license-log.php000064400000004401147600244370014255 0ustar00get_license_log(); } /** * Show the log page contents for file log handler. */ public function get_license_log() { if ( ! class_exists( 'CartFlows_Pro_Licence' ) ) { return; } // Get license class instance. $cartflows_license_instance = cartflows_pro_license_instance(); // Get license Key. $data = get_option( 'wc_am_client_' . $cartflows_license_instance->product_id . '_api_key', array() ); $license_key = isset( $data['api_key'] ) ? $data['api_key'] : ''; // Prepare license args. $args = array( 'request' => 'update', 'slug' => CARTFLOWS_PRO_SLUG, 'plugin_name' => $cartflows_license_instance->product_id, 'version' => $cartflows_license_instance->wc_am_software_version, 'product_id' => CARTFLOWS_PRO_PRODUCT_ID, 'api_key' => $license_key, 'instance' => $cartflows_license_instance->wc_am_instance_id, ); // Prepare Update Call URL. $target_url = esc_url_raw( add_query_arg( 'wc-api', 'wc-am-api', CARTFLOWS_SERVER_URL ) . '&' . http_build_query( $args ) ); // Ignoring the timeout rule because sometimes it takes time to connect and validate things. $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); // phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { return false; } // Response after update call. $response = json_decode( wp_remote_retrieve_body( $request ) ); include_once CARTFLOWS_PRO_DIR . 'admin-core/views/license-log.php'; } } CartFlows_Licence_Log::get_instance(); admin-core/inc/global-settings-pro.php000064400000023001147600244370013743 0ustar00product_id . '_activated', false, false ); add_filter( 'cartflows_admin_global_settings_data', array( $this, 'get_pro_global_settings' ), 10, 1 ); add_filter( 'cartflows_admin_global_data_options', array( $this, 'get_pro_global_options' ), 10, 1 ); add_action( 'cartflows_admin_save_global_settings', array( $this, 'save_pro_global_settings' ), 10, 2 ); } /** * Get_pro_global_options * * @param string $setting_tab tab slug. * @param string $action action name. */ public static function save_pro_global_settings( $setting_tab, $action ) { /** * Nonce verification */ if ( ! check_ajax_referer( $action, 'security', false ) ) { $response_data = array( 'messsage' => __( 'Nonce verification failed.', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } if ( isset( $_POST ) ) { switch ( $setting_tab ) { case 'offer': if ( isset( $_POST['_cartflows_offer_global_settings'] ) ) { // Loop through the input and sanitize each of the values. $new_settings = \Cartflows_Pro_Admin_Helper::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_offer_global_settings'] ) ); //phpcs:ignore /** * Handled backward compatibility of `update_admin_settings_option` function. * * Old: \Cartflows_Helper::update_admin_settings_option. * New: AdminHelper::update_admin_settings_option. * Note: Remove after two updates. */ if ( method_exists( 'AdminHelper', 'update_admin_settings_option' ) ) { AdminHelper::update_admin_settings_option( '_cartflows_offer_global_settings', $new_settings, false ); } else { \Cartflows_Helper::update_admin_settings_option( '_cartflows_offer_global_settings', $new_settings, false ); } } break; case 'permalink': if ( isset( $_POST['_cartflows_abtest_settings'] ) ) { // Loop through the input and sanitize each of the values. $new_settings = \Cartflows_Pro_Admin_Helper::sanitize_form_inputs( wp_unslash( $_POST['_cartflows_abtest_settings'] ) ); //phpcs:ignore /** * Handled backward compatibility of `update_admin_settings_option` function. * * Old: \Cartflows_Helper::update_admin_settings_option. * New: AdminHelper::update_admin_settings_option. * Note: Remove after two updates. */ if ( method_exists( 'AdminHelper', 'update_admin_settings_option' ) ) { AdminHelper::update_admin_settings_option( '_cartflows_abtest_settings', $new_settings, false ); } else { \Cartflows_Helper::update_admin_settings_option( '_cartflows_abtest_settings', $new_settings, false ); } } break; default: } } } /** * Get_pro_global_options * * @param string $options options. * @return array $options Modified localized array options. */ public static function get_pro_global_options( $options ) { $settings_default = apply_filters( 'cartflows_offer_global_settings', array( 'separate_offer_orders' => 'separate', ) ); $offer_settings = AdminHelper::get_admin_settings_option( '_cartflows_offer_global_settings', false, false ); $offer_settings = wp_parse_args( $offer_settings, $settings_default ); foreach ( $offer_settings as $key => $data ) { $options[ '_cartflows_offer_global_settings[' . $key . ']' ] = $data; } $settings_default = apply_filters( 'cartflows_abtest_settings', array( 'override_permalink' => 'disable', ) ); $abtest_settings = AdminHelper::get_admin_settings_option( '_cartflows_abtest_settings', false, false ); $abtest_settings = wp_parse_args( $abtest_settings, $settings_default ); foreach ( $abtest_settings as $key => $data ) { $options[ '_cartflows_abtest_settings[' . $key . ']' ] = $data; } // Get license info. $options['license_status'] = self::$license_status; if ( 'Activated' === self::$license_status ) { $license_data = AdminHelper::get_admin_settings_option( 'wc_am_client_' . \CartFlows_Pro_Licence::get_instance()->product_id . '_api_key', false, false ); $options['license_key'] = preg_replace( '/[A-Za-z0-9]/', '*', ! empty( $license_data['api_key'] ) ? $license_data['api_key'] : '' ); } else { $options['license_key'] = ''; } return $options; } /** * Page Header Tabs. * * @param string $settings settings. */ public static function get_pro_global_settings( $settings ) { $settings['general']['fields']['pre-checkout-offer'] = array( 'type' => 'checkbox', 'name' => '_cartflows_common[pre_checkout_offer]', 'label' => __( 'Enable Pre Checkout Offers', 'cartflows-pro' ), 'desc' => __( 'If enable, it will add the Pre Checkout Offer settings in checkout step settings.', 'cartflows-pro' ), 'backComp' => true, ); $settings['general']['fields']['pre-checkout-offer-seperator'] = array( 'type' => 'separator', ); $settings['general']['fields']['ref-paypal-trns'] = array( 'type' => 'checkbox', 'name' => '_cartflows_common[paypal_reference_transactions]', 'label' => __( 'Enable PayPal Reference Transactions.', 'cartflows-pro' ), /* translators: %1$1s: link html start, %2$12: link html end*/ 'desc' => sprintf( __( 'This option will work with %1$1s PayPal Standard%2$2s & %3$3s PayPal Checkout%4$4s Gateways only. To know more about PayPal reference transactions %5$5s click here. %6$6s', 'cartflows-pro' ), '', '', '', '', '', '' ), 'backComp' => true, ); $settings['offer'] = array( 'title' => '', 'fields' => array( 'order-optoin' => array( 'type' => 'radio', 'name' => '_cartflows_offer_global_settings[separate_offer_orders]', 'options' => array( array( 'value' => 'separate', 'label' => __( 'Create a new child order (Recommended)', 'cartflows-pro' ), 'desc' => __( 'This option create a new order for all accepted upsell/downsell offers. Main order will be parent order for them.', 'cartflows-pro' ), ), array( 'value' => 'merge', 'label' => __( 'Add to main order', 'cartflows-pro' ), 'desc' => __( 'This option will merge all accepted upsell/downsell offers into main order.', 'cartflows-pro' ), ), ), ), 'order-doc' => array( 'type' => 'doc', /* translators: %1$1s: link html start, %2$12: link html end*/ 'content' => sprintf( __( 'For more information about the offer settings please %1$1s Click here. %2$2s', 'cartflows-pro' ), '', '' ), ), ), ); // Get license Key. $field_class = 'Activated' === self::$license_status ? 'input-field cartflows-license-key disabled' : 'input-field cartflows-license-key'; $settings['license'] = array( 'title' => '', 'fields' => array( 'license-field' => array( 'type' => 'password', 'label' => __( 'Enter License Key', 'cartflows-pro' ), 'placeholder' => __( 'Enter your license key', 'cartflows-pro' ), 'name' => 'license_key', 'class' => $field_class, 'readonly' => 'Activated' === self::$license_status ? true : false, 'desc' => sprintf( /* translators: %1$1s: link html start, %2$12: link html end*/ __( 'If you don\'t have License key, you can get it from %1$shere%2$s', 'cartflows-pro' ), '', '' ), ), ), ); /* Start-Pro-Feature */ $settings['permalink']['fields']['ab-testing-heading-seperator'] = array( 'type' => 'separator', ); $settings['permalink']['fields']['ab-testing-heading'] = array( 'type' => 'heading', 'label' => __( 'A/B test Pemalink', 'cartflows-pro' ), 'backComp' => true, ); $settings['permalink']['fields']['override-permalink'] = array( 'type' => 'checkbox', 'name' => '_cartflows_abtest_settings[override_permalink]', 'label' => __( 'Override Permalink for A/B test', 'cartflows-pro' ), 'desc' => __( 'If enable, it will use same permalink for all variants.', 'cartflows-pro' ), 'backComp' => true, ); $settings['permalink']['fields']['override-permalink-seperator'] = array( 'type' => 'separator', ); /* End-Pro-Feature */ return $settings; } } admin-core/inc/store-checkout.php000064400000002753147600244370013021 0ustar00

'; wcf_print_r( $args ); echo ''; ?>


"; wcf_print_r( $response ); echo ''; ?>
assets/css/checkout-styles-divi-rtl.css000064400000055337147600244370014252 0ustar00.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .mt20 { margin-top: 0; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not( .checkbox ).woocommerce-form__label-for-checkbox { position: relative; margin: 0; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not( .checkbox ) { position: absolute; z-index: 999; margin-top: 19px; margin-right: 15px; transition: all 0.235s ease; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not( .checkbox ) { margin-top: 8px; font-size: 12px; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not( .checkbox ) { position: absolute; z-index: 999; margin-top: 19px; margin-right: 15px; transition: all 0.235s ease; overflow: hidden; white-space: nowrap; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row.wcf-anim-label label:not( .checkbox ) { margin-top: 8px; font-size: 12px; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="text"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="email"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="password"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="tel"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .select2-container--default .select2-selection--single { padding: 25px 12px 5px; } /** * ******************************* * Product Variation CSS Start * ******************************* */ .et_pb_module .wcf-product-option-wrap { padding: 3px; } .et_pb_module .wcf-product-option-wrap #your_products_heading { font-family: inherit; font-weight: 600; font-size: 20px; margin: 0 0 25px 0; padding: 3px; } .et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row { position: relative; } .et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 5px 0 0 0; } .et_pb_module .wcf-product-option-wrap input[type="number"]:focus { outline: none; } .et_pb_module .wcf-qty-options .wcf-item-selector { display: inline-block; margin-left: 8px; } .et_pb_module .wcf-qty-options .wcf-item-all-text { display: inline-block; vertical-align: middle; } .et_pb_module .wcf-qty-options .wcf-item-image { width: 55px; /* height: 45px; */ -js-display: inline-flex; display: inline-flex; margin-left: 10px; } .et_pb_module .wcf-qty-options .wcf-item-wrap { font-size: 1em; font-weight: 600; line-height: 1.5; } .et_pb_module .wcf-qty-options .wcf-display-attributes, .et_pb_module .wcf-qty-options .wcf-display-subscription-details { font-size: 0.75em; font-weight: 400; font-style: italic; opacity: 0.65; } .et_pb_module .wcf-display-attributes .wcf-att-inner { margin-left: 5px; } .et_pb_module .wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep { display: none; } .et_pb_module .wcf-qty-hidden.wcf-qty { visibility: hidden; pointer-events: none; opacity: 0; } .et_pb_module .wcf-qty-options .wcf-item-wrap { line-height: 1.8; } .et_pb_module .wcf-qty-options ins { background: none; } .et_pb_module .wcf-qty-options .wcf-price del .woocommerce-Price-amount { font-size: inherit; opacity: 0.45; color: inherit; margin-left: 4px; } .et_pb_module .wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt { vertical-align: middle; } .et_pb_module .wcf-embed-checkout-form-one-column .wcf-product-option-wrap { clear: right; margin: 15px 0; width: 100%; } .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap { margin: 15px 0; width: 55%; float: right; padding-left: 40px; } .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer, .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order { width: 100%; padding: 0; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options { border: none; border-bottom: 0; background-color: #f3f3f3; border-radius: 3px; border-collapse: collapse; font-family: inherit; font-weight: inherit; font-size: 1em; margin: 0 0 0 0 !important; padding: 15px; text-align: right; width: 100%; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header { border-bottom: 1px dashed #ccc; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label { font-weight: 600; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not( .wcf-highlight ):last-child { border: none; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price { padding: 0.3em 0; line-height: 1.4em; border: none; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { -js-display: flex; display: flex; justify-content: space-between; position: relative; padding: 10px 0; border-bottom: 1px solid #ccc; align-items: center; font-size: 0.95em; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price { display: inline-block; vertical-align: middle; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item { -js-display: flex; display: flex; align-items: center; width: 80%; flex: 4; margin-left: 10px; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext { font-size: 0.95em; line-height: 1.5; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap + .wcf-item-subtext { margin-top: 5px; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty { -js-display: flex; display: flex; width: 12%; text-align: center; align-items: center; justify-content: center; flex: 1; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 60px; width: 45px; padding: 2px 10px 2px 10px; margin: 0 auto; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price { -js-display: flex; display: flex; align-items: center; width: 8%; text-align: left; justify-content: flex-end; flex: 1; margin-right: 10px; font-size: 0.95em; font-weight: 600; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { background-color: #fff; border: 1px solid #ccc; font-weight: 500; padding: 18px 28px; margin: -1px -28px 0; font-size: 0.95em; border-radius: 4px; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); } .et_pb_module .wcf-yp-skin-classic .wcf-qty-table-titles + .wcf-highlight { margin-top: 15px; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight + .wcf-highlight { margin-top: 25px; } .et_pb_module .wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head { position: absolute; top: -10px; left: -10px; background: #f16334; color: #fff; border-radius: 3px; padding: 3px 9px; font-size: 0.75em; font-weight: 400; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap { font-size: 0.95em; font-weight: 600; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext { opacity: 0.75; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item-image { margin-left: 15px; } .et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { padding: 18px; margin-right: -20px; margin-left: -20px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options { -js-display: flex; display: flex; flex-wrap: wrap; margin: 0 -10px; font-size: 1em; width: calc( 100% + 20px ); } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { background-color: #f7f7f7; border: 1px solid #e8e8e8; padding: 20px 30px; margin: 0 10px 22px; border-radius: 0.35em; width: calc( 50% - 20px ); font-size: 1em; font-weight: 600; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight { background-color: #fff; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); overflow: hidden; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price { font-size: 1.08em; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 0 0 3px; } .et_pb_module .wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head { position: absolute; width: 12em; top: 1.8em; left: -3em; background: #f16334; color: #fff; padding: 0.22em 0; text-align: center; font-size: 0.8em; font-weight: 700; transform: rotate( -45deg ); -webkit-transform: rotate( -45deg ); } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item { -js-display: flex; display: flex; align-items: flex-start; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-top: 5px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-left: 15px; width: 80px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options { margin: 0 0 5px 15px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 1.07em; font-weight: 600; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap { margin-bottom: 5px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext { font-size: inherit; font-weight: 400; opacity: 0.75; margin-bottom: 15px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input { max-width: 50px; text-align: center; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { align-items: center; display: inline-block; margin-top: 0; margin-left: 15px; vertical-align: middle; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty { display: none !important; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 0.95em; } .et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row, .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row, .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row { width: 100%; } @media ( max-width: 768px ) { .et_pb_module .wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .et_pb_module .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .et_pb_module .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { width: 100%; padding: 15px 20px; } .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item { width: 100%; padding: 0; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { width: auto; vertical-align: middle; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext { font-size: 0.9em; } } /** * ***************************** * Product Variation CSS End * ***************************** */ /** * ***************************** * Bump Order CSS Start * ***************************** */ /* Style One Start */ .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap { display: block; float: none; margin: 1em auto 1em; overflow: hidden; width: 100%; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 { background: #f1f1f1; border-style: none; border-width: 2px; border-color: #f00; border-radius: 3px; display: inline-block; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap { border-style: none; border-width: 2px; border-color: #f00; padding: 20px 25px; margin: 0; font-size: 1.1em; display: block; background: #ddd; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label { margin: 0 !important; vertical-align: middle; font-size: 1em; line-height: 1.3em; letter-spacing: 0; font-family: inherit; font-weight: inherit; text-transform: none; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container { padding: 25px 0; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer { padding: 0 25px 10px; font-size: 1.2em; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc { padding: 0 25px; } /* Style One End */ /* Style Two Start */ .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 { border: 2px #f00 dashed; border-radius: 3px; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer { padding: 20px 25px; font-size: 1.1em; font-weight: 600; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc { padding: 0 25px 20px; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap { border-top: 2px #f00 dashed; padding: 15px 25px; margin: 0; font-size: 1.1em; display: block; } /* Style Two End */ /** * ***************************** * Bump Order CSS End * ***************************** */ /** * **************************** * Two Step CSS Start * **************************** */ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step { width: 100%; margin: 0 auto; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note { border: 1px dashed; border-color: #f16334; margin-bottom: 20px; padding: 10px 15px; padding-top: 10px; padding-left: 15px; padding-bottom: 10px; padding-right: 15px; border-radius: 3px; color: #fff; background-color: #f16334; position: relative; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before { content: ""; border: 10px solid; border-top-color: #f16334; position: absolute; width: 20px; height: 20px; bottom: -20px; right: auto; top: auto; border-right: 10px transparent solid; border-left: 10px transparent solid; border-bottom: 10px transparent solid; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav { border: inherit; border-right-style: solid; border-left-style: solid; border-width: 2px; border-top-style: solid; border-color: #ddd; border-top-right-radius: 3px; border-top-left-radius: 3px; display: block; width: 100%; margin: 0 auto; padding-bottom: 0; /*min-width: 800px;*/ } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps { background-color: #f4f4f4; -js-display: flex; display: flex; list-style: none; margin: 0; margin-right: 0; margin-bottom: 0; padding: 0; width: 100%; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce { border: inherit; border-top: none; border-right-style: solid; border-left-style: solid; border-bottom-style: solid; border-width: 2px; border-color: #ddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 10px 20px 20px; overflow: hidden; background-color: #fff; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a { align-items: center; -js-display: flex; display: flex; padding: 15px; width: 100%; /* overflow: hidden; */ } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number { display: inline-block; font-weight: 700; font-size: 25px; line-height: 1.5; /* float: left; */ margin-left: 10px; vertical-align: middle; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current { background-color: #fff; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one { /* border-top: 3px solid #F4F4F4; */ opacity: 1; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps { flex: 1; width: 100%; text-align: right; vertical-align: middle; position: relative; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a { color: #444; border: none; outline: none; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name { color: #f16334; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button { border: 1px solid; border-color: #f16334; background-color: #f16334; font-family: inherit; font-weight: inherit; letter-spacing: 0.5px; width: 100%; padding: 15px 25px; font-size: 16px; line-height: 1.5; border-radius: 3px; color: #fff; text-transform: none; text-align: center; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt { margin-left: 5px; vertical-align: middle; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text { vertical-align: middle; } /** * **************************** * Two Step CSS End * **************************** */ /** * ************************************* * Two Step Divi Compatibility css Start ( Migrated from lite ) * ************************************* */ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap { display: block; width: 100%; float: none; padding: 0; border-radius: 0; margin-top: 10px; margin-bottom: 20px; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper { margin: 0; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields > h3, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields > h3, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { display: none !important; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review { float: none; width: 100%; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a:not( .wcf-next-button ) { color: #fff; } /** * ************************************* * Two Step Divi Compatibility css End ( Migrated from lite ) * ************************************* */ /** * Modern Checkout Styles */ .et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty { max-width: 100px; } .et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { margin-left: 0; } @media ( max-width: 768px ) { .et_pb_module #wcf-embed-checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty { width: 40%; margin-left: 25px; } } assets/css/checkout-styles-divi.css000064400000055344147600244370013451 0ustar00.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .mt20 { margin-top: 0; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not( .checkbox ).woocommerce-form__label-for-checkbox { position: relative; margin: 0; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not( .checkbox ) { position: absolute; z-index: 999; margin-top: 19px; margin-left: 15px; transition: all 0.235s ease; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not( .checkbox ) { margin-top: 8px; font-size: 12px; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not( .checkbox ) { position: absolute; z-index: 999; margin-top: 19px; margin-left: 15px; transition: all 0.235s ease; overflow: hidden; white-space: nowrap; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label:not( .checkbox ), .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row.wcf-anim-label label:not( .checkbox ) { margin-top: 8px; font-size: 12px; } .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="text"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="email"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="password"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type="tel"], .et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .select2-container--default .select2-selection--single { padding: 25px 12px 5px; } /** * ******************************* * Product Variation CSS Start * ******************************* */ .et_pb_module .wcf-product-option-wrap { padding: 3px; } .et_pb_module .wcf-product-option-wrap #your_products_heading { font-family: inherit; font-weight: 600; font-size: 20px; margin: 0 0 25px 0; padding: 3px; } .et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row { position: relative; } .et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 5px 0 0 0; } .et_pb_module .wcf-product-option-wrap input[type="number"]:focus { outline: none; } .et_pb_module .wcf-qty-options .wcf-item-selector { display: inline-block; margin-right: 8px; } .et_pb_module .wcf-qty-options .wcf-item-all-text { display: inline-block; vertical-align: middle; } .et_pb_module .wcf-qty-options .wcf-item-image { width: 55px; /* height: 45px; */ -js-display: inline-flex; display: inline-flex; margin-right: 10px; } .et_pb_module .wcf-qty-options .wcf-item-wrap { font-size: 1em; font-weight: 600; line-height: 1.5; } .et_pb_module .wcf-qty-options .wcf-display-attributes, .et_pb_module .wcf-qty-options .wcf-display-subscription-details { font-size: 0.75em; font-weight: 400; font-style: italic; opacity: 0.65; } .et_pb_module .wcf-display-attributes .wcf-att-inner { margin-right: 5px; } .et_pb_module .wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep { display: none; } .et_pb_module .wcf-qty-hidden.wcf-qty { visibility: hidden; pointer-events: none; opacity: 0; } .et_pb_module .wcf-qty-options .wcf-item-wrap { line-height: 1.8; } .et_pb_module .wcf-qty-options ins { background: none; } .et_pb_module .wcf-qty-options .wcf-price del .woocommerce-Price-amount { font-size: inherit; opacity: 0.45; color: inherit; margin-right: 4px; } .et_pb_module .wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt { vertical-align: middle; } .et_pb_module .wcf-embed-checkout-form-one-column .wcf-product-option-wrap { clear: left; margin: 15px 0; width: 100%; } .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap { margin: 15px 0; width: 55%; float: left; padding-right: 40px; } .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer, .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order { width: 100%; padding: 0; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options { border: none; border-bottom: 0; background-color: #f3f3f3; border-radius: 3px; border-collapse: collapse; font-family: inherit; font-weight: inherit; font-size: 1em; margin: 0 0 0 0 !important; padding: 15px; text-align: left; width: 100%; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header { border-bottom: 1px dashed #ccc; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label { font-weight: 600; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not( .wcf-highlight ):last-child { border: none; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price { padding: 0.3em 0; line-height: 1.4em; border: none; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { -js-display: flex; display: flex; justify-content: space-between; position: relative; padding: 10px 0; border-bottom: 1px solid #ccc; align-items: center; font-size: 0.95em; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty, .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price { display: inline-block; vertical-align: middle; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item { -js-display: flex; display: flex; align-items: center; width: 80%; flex: 4; margin-right: 10px; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext { font-size: 0.95em; line-height: 1.5; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap + .wcf-item-subtext { margin-top: 5px; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty { -js-display: flex; display: flex; width: 12%; text-align: center; align-items: center; justify-content: center; flex: 1; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 60px; width: 45px; padding: 2px 10px 2px 10px; margin: 0 auto; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price { -js-display: flex; display: flex; align-items: center; width: 8%; text-align: right; justify-content: flex-end; flex: 1; margin-left: 10px; font-size: 0.95em; font-weight: 600; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { background-color: #fff; border: 1px solid #ccc; font-weight: 500; padding: 18px 28px; margin: -1px -28px 0; font-size: 0.95em; border-radius: 4px; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); } .et_pb_module .wcf-yp-skin-classic .wcf-qty-table-titles + .wcf-highlight { margin-top: 15px; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight + .wcf-highlight { margin-top: 25px; } .et_pb_module .wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head { position: absolute; top: -10px; right: -10px; background: #f16334; color: #fff; border-radius: 3px; padding: 3px 9px; font-size: 0.75em; font-weight: 400; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap { font-size: 0.95em; font-weight: 600; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext { opacity: 0.75; } .et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item-image { margin-right: 15px; } .et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { padding: 18px; margin-left: -20px; margin-right: -20px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options { -js-display: flex; display: flex; flex-wrap: wrap; margin: 0 -10px; font-size: 1em; width: calc( 100% + 20px ); } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { background-color: #f7f7f7; border: 1px solid #e8e8e8; padding: 20px 30px; margin: 0 10px 22px; border-radius: 0.35em; width: calc( 50% - 20px ); font-size: 1em; font-weight: 600; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight { background-color: #fff; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); overflow: hidden; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price { font-size: 1.08em; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 0 0 3px; } .et_pb_module .wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head { position: absolute; width: 12em; top: 1.8em; right: -3em; background: #f16334; color: #fff; padding: 0.22em 0; text-align: center; font-size: 0.8em; font-weight: 700; transform: rotate( 45deg ); -webkit-transform: rotate( 45deg ); } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item { -js-display: flex; display: flex; align-items: flex-start; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-top: 5px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-right: 15px; width: 80px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options { margin: 0 15px 5px 0; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 1.07em; font-weight: 600; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap { margin-bottom: 5px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext { font-size: inherit; font-weight: 400; opacity: 0.75; margin-bottom: 15px; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input { max-width: 50px; text-align: center; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { align-items: center; display: inline-block; margin-top: 0; margin-right: 15px; vertical-align: middle; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty { display: none !important; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 0.95em; } .et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row, .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row, .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row { width: 100%; } @media ( max-width: 768px ) { .et_pb_module .wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .et_pb_module .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .et_pb_module .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { width: 100%; padding: 15px 20px; } .et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap, .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item { width: 100%; padding: 0; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { width: auto; vertical-align: middle; } .et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext { font-size: 0.9em; } } /** * ***************************** * Product Variation CSS End * ***************************** */ /** * ***************************** * Bump Order CSS Start * ***************************** */ /* Style One Start */ .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap { display: block; float: none; margin: 1em auto 1em; overflow: hidden; width: 100%; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 { background: #f1f1f1; border-style: none; border-width: 2px; border-color: #f00; border-radius: 3px; display: inline-block; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap { border-style: none; border-width: 2px; border-color: #f00; padding: 20px 25px; margin: 0; font-size: 1.1em; display: block; background: #ddd; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label { margin: 0 !important; vertical-align: middle; font-size: 1em; line-height: 1.3em; letter-spacing: 0; font-family: inherit; font-weight: inherit; text-transform: none; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container { padding: 25px 0; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer { padding: 0 25px 10px; font-size: 1.2em; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc { padding: 0 25px; } /* Style One End */ /* Style Two Start */ .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 { border: 2px #f00 dashed; border-radius: 3px; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer { padding: 20px 25px; font-size: 1.1em; font-weight: 600; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc { padding: 0 25px 20px; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap { border-top: 2px #f00 dashed; padding: 15px 25px; margin: 0; font-size: 1.1em; display: block; } /* Style Two End */ /** * ***************************** * Bump Order CSS End * ***************************** */ /** * **************************** * Two Step CSS Start * **************************** */ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step { width: 100%; margin: 0 auto; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note { border: 1px dashed; border-color: #f16334; margin-bottom: 20px; padding: 10px 15px; padding-top: 10px; padding-right: 15px; padding-bottom: 10px; padding-left: 15px; border-radius: 3px; color: #fff; background-color: #f16334; position: relative; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before { content: ""; border: 10px solid; border-top-color: #f16334; position: absolute; width: 20px; height: 20px; bottom: -20px; left: auto; top: auto; border-left: 10px transparent solid; border-right: 10px transparent solid; border-bottom: 10px transparent solid; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav { border: inherit; border-left-style: solid; border-right-style: solid; border-width: 2px; border-top-style: solid; border-color: #ddd; border-top-left-radius: 3px; border-top-right-radius: 3px; display: block; width: 100%; margin: 0 auto; padding-bottom: 0; /*min-width: 800px;*/ } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps { background-color: #f4f4f4; -js-display: flex; display: flex; list-style: none; margin: 0; margin-left: 0; margin-bottom: 0; padding: 0; width: 100%; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce { border: inherit; border-top: none; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; border-width: 2px; border-color: #ddd; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; padding: 10px 20px 20px; overflow: hidden; background-color: #fff; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a { align-items: center; -js-display: flex; display: flex; padding: 15px; width: 100%; /* overflow: hidden; */ } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number { display: inline-block; font-weight: 700; font-size: 25px; line-height: 1.5; /* float: left; */ margin-right: 10px; vertical-align: middle; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current { background-color: #fff; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one { /* border-top: 3px solid #F4F4F4; */ opacity: 1; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps { flex: 1; width: 100%; text-align: left; vertical-align: middle; position: relative; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a { color: #444; border: none; outline: none; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name { color: #f16334; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button { border: 1px solid; border-color: #f16334; background-color: #f16334; font-family: inherit; font-weight: inherit; letter-spacing: 0.5px; width: 100%; padding: 15px 25px; font-size: 16px; line-height: 1.5; border-radius: 3px; color: #fff; text-transform: none; text-align: center; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt { margin-right: 5px; vertical-align: middle; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text { vertical-align: middle; } /** * **************************** * Two Step CSS End * **************************** */ /** * ************************************* * Two Step Divi Compatibility css Start ( Migrated from lite ) * ************************************* */ .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap { display: block; width: 100%; float: none; padding: 0; border-radius: 0; margin-top: 10px; margin-bottom: 20px; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper { margin: 0; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields > h3, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields > h3, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading, .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { display: none !important; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review { float: none; width: 100%; } .et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a:not( .wcf-next-button ) { color: #fff; } /** * ************************************* * Two Step Divi Compatibility css End ( Migrated from lite ) * ************************************* */ /** * Modern Checkout Styles */ .et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty { max-width: 100px; } .et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { margin-right: 0; } @media ( max-width: 768px ) { .et_pb_module #wcf-embed-checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty { width: 40%; margin-right: 25px; } } assets/css/checkout-styles-rtl.css000064400000274734147600244370013325 0ustar00/* * ***************************** * CSS vars for PRoduct options * ***************************** */ body .wcf-pre-checkout-offer-wrapper { --wcf-primary-color: #f16334; } :root { --wcf-yp-text-color: #404040; /* Used. */ --wcf-yp-bg-color: #f3f3f3; /* Used. */ --wcf-yp-border-color: #ccc; /* Used */ --wcf-yp-hl-text-color: var( --wcf-yp-text-color ); /* Used */ --wcf-yp-hl-bg-color: #fff; /* Used */ --wcf-yp-hl-border-color: var( --wcf-yp-border-color ); /* Used */ --wcf-yp-hl-flag-text-color: #fff; /* Used */ --wcf-yp-hl-flag-bg-color: var( --wcf-primary-color ); /* Used */ } .wcf-embed-checkout-form-modern-checkout { --wcf-yp-text-color: #555; --wcf-yp-bg-color: #fff; --wcf-yp-box-border-color: #d6d7db; --wcf-yp-hl-text-color: var( --wcf-yp-text-color ); } .wcf-embed-checkout-form-instant-checkout { --wcf-yp-hl-flag-bg-color: var( --wcf-primary-color ); /* Used */ } /** * ******************** * Basic ( Move this css to checkout template file ) * ******************** */ .wcf-embed-checkout-form #payment div.payment_box .woocommerce-SavedPaymentMethods { padding: 0; margin-top: 10px; } /* checkout */ /** * ************************ * Two Step Checkout Start * ************************ */ .wcf-embed-checkout-form-two-step { width: 100%; margin: 0 auto; } .wcf-embed-checkout-form-two-step .woocommerce { border-top: none; border-right-style: solid; border-left-style: solid; border-bottom-style: solid; border-width: 2px; border-color: #ddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 10px 25px 25px; overflow: hidden; background-color: #fff; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav { border-right-style: solid; border-left-style: solid; border-width: 2px; border-top-style: solid; border-color: #ddd; border-top-right-radius: 3px; border-top-left-radius: 3px; display: block; width: 100%; margin: 0 auto; padding-bottom: 0; /*min-width: 800px;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note { border: 1px dashed; border-color: #f16334; margin-bottom: 20px; padding: 10px 15px; border-radius: 3px; color: #fff; background-color: #f16334; position: relative; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before { content: ""; border: 10px solid; border-top-color: #f16334; position: absolute; width: 20px; height: 20px; bottom: -20px; right: auto; top: auto; border-right: 10px transparent solid; border-left: 10px transparent solid; border-bottom: 10px transparent solid; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns { display: inline-block; width: 100%; } .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button { border-color: var( --wcf-btn-bg-color ); background-color: var( --wcf-btn-bg-color ); font-family: inherit; font-weight: inherit; letter-spacing: 0.5px; width: 100%; padding: 15px 25px; font-size: 16px; line-height: 1.5; border-radius: 3px; color: var( --wcf-btn-text-color ); text-transform: none; text-align: center; display: block; /* Added to fix the two steps visibility with thrive builder*/ } .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover { background-color: var( --wcf-btn-bg-hover-color ); border-color: var( --wcf-btn-bg-hover-color ); color: var( --wcf-btn-hover-text-color ); } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text { display: inline-block; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-next-button-icon-wrap, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button-content { display: block; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text { font-size: 1.15em; font-weight: 700; display: inline-block; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text { font-size: 0.9em; font-weight: 400; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt { margin-left: 5px; display: inline-block; font-weight: 700; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note p { margin: 0; } .wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps { background-color: #f4f4f4; -js-display: flex; display: flex; list-style: none; margin-right: 0; margin-bottom: 0; padding: 0; width: 100%; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps { flex: 1; width: 100%; text-align: right; vertical-align: middle; position: relative; /*border-top-right-radius: 5px; border-top-left-radius: 5px;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a { align-items: center; -js-display: flex; display: flex; padding: 15px; width: 100%; /*overflow: hidden;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-heading { /*float: left;*/ display: inline-block; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number { display: inline-block; font-weight: 700; font-size: 25px; line-height: 1.5; /*float: left;*/ margin-left: 10px; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name { font-weight: 600; /*text-transform: uppercase;*/ font-size: 14px; line-height: 1.5; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name { font-size: 13px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one { /*border-top: 3px solid #F4F4F4;*/ opacity: 1; /*border-top: 2px solid; border-color: #d4d4d4;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-two { /*border-top: 2px solid; border-color: #d4d4d4;*/ opacity: 1; /*float: right;*/ /*border-bottom: 1px solid #d7d8d7;*/ } .wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-one.wcf-current::before { right: 0; top: 0; width: 100%; border-top-right-radius: 0; } .wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-two.wcf-current::before { left: 0; top: 0; width: 100%; border-top-left-radius: 0; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current::before { content: ""; background-color: #f16334; border-top-right-radius: 3px; width: calc( 100% + 2px ); height: 2px; position: absolute; right: -2px; top: -2px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current::before { content: ""; background-color: #f16334; border-top-left-radius: 3px; width: calc( 100% + 2px ); height: 2px; position: absolute; left: -2px; top: -2px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current { background-color: #fff; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name { color: var( --wcf-heading-color ); } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a { text-decoration: none; color: #444; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current a { text-decoration: none; color: #444; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active { color: #444; border: none; outline: none; } .wcf-embed-checkout-form-two-step .woocommerce-checkout { display: block; width: 100%; /*overflow: hidden;*/ } .wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set, .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap, .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap, .wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper { display: block; width: 100%; float: none; padding: 0; border-radius: 0; margin-top: 10px; margin-bottom: 20px; } .wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper { margin-top: 0; margin-bottom: 30px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .col-1 { margin-top: 10px; } .wcf-embed-checkout-form-two-step .woocommerce-additional-fields > h3, .wcf-embed-checkout-form-two-step .woocommerce-billing-fields > h3, .wcf-embed-checkout-form-two-step #order_review_heading, .wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { display: none; } .wcf-embed-checkout-form-two-step .woocommerce #ship-to-different-address { font-size: 15px; margin-bottom: 10px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { display: none; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap { display: none; margin-top: 10px; margin-bottom: 0; float: none; width: 100%; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment { display: block; } .wcf-embed-checkout-form-two-step table.shop_table #shipping_method { min-width: 130px; display: inline-block; } .wcf-embed-checkout-form-two-step #order_review { padding: 0; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row { padding: 0.5em 0 0; } .wcf-embed-checkout-form-two-step table.shop_table thead tr th:nth-child( 2 ), .wcf-embed-checkout-form-two-step table.shop_table tbody tr td:nth-child( 2 ), .wcf-embed-checkout-form-two-step table.shop_table tfoot tr td:nth-child( 2 ) { text-align: left; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap.mt20 { margin-top: 0 !important; } /* Product Variations Start */ .wcf-embed-checkout-form-two-step .woocommerce-checkout #your_products_heading { margin: 20px 0 0; padding: 3px 3px 20px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-item { width: 60%; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price, .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty { width: 20%; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 50px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options { padding: 15px; } .wcf-embed-checkout-form-two-step .wcf-bump-order-style-1.wcf-after-customer, .wcf-embed-checkout-form-two-step .wcf-bump-order-style-2.wcf-after-customer, .wcf-embed-checkout-form-two-step .wcf-bump-order-style-3.wcf-after-customer { margin: 0 auto 1em; } /* Two Step checkout Hide/Show CSS */ .wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-checkout-fields-wrapper, .wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-product-option-before-customer, .wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-order-wrap { display: block; } .wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-checkout-fields-wrapper, .wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-product-option-before-customer, .wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-order-wrap { display: none; } /* Two Step checkout Hide/Show CSS */ /* Product variations End */ /* Bump Order Compatibility Starts */ .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row label.checkbox { margin-bottom: 0; } /* Bump Order Compatibility Ends*/ .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment div.payment_box { font-size: 0.8em; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment ul.payment_methods { background-color: #f7f7f7; padding: 15px; } /* Thrive Builder Compatibility for two step */ #tve_editor ol, #tve_editor ul { margin: 0; } /* Thrive Builder Compatibility for two step */ /** * ************************ * Two Step Checkout End * ************************ */ /** * **************************************** * Mobile css for two step navigation Start * **************************************** */ @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav { width: 100%; min-width: 100%; margin: 0 auto; padding-bottom: 0; } .wcf-embed-checkout-form .woocommerce-checkout .col2-set { margin: 10px 0 0; } .wcf-embed-checkout-form-two-step .woocommerce .woocommerce-info, .wcf-embed-checkout-form-two-step .woocommerce .woocommerce-notices-wrapper .woocommerce-message, .wcf-embed-checkout-form-two-step .woocommerce .woocommerce-NoticeGroup .woocommerce-message { padding: 1em 1.5em 1em 1em; margin: 0; } .wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-1, .wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-1, .wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-2, .wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-2, .wcf-embed-checkout-form-two-step .woocommerce .wcf-order-wrap, .wcf-embed-checkout-form-two-step .woocommerce-page .wcf-order-wrap { padding: 0; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { margin: 0; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps > li::before { content: ""; position: relative; background: #f16334; display: block; width: 42%; height: 2px; top: 15px; right: 0; z-index: 1; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps > li::after { content: ""; position: relative; background: #f16334; display: block; width: 51%; height: 2px; top: -36px; right: 52%; z-index: 1; } .wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-33, .wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-50, .wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-100, .wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-33, .wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-50, .wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-100 { width: 100%; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps { padding: 7px 10px 7px 3px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a { padding: 10px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number { font-size: 20px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name { font-size: 12px; } .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button { padding: 15px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text { font-size: 1em; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row, .wcf-embed-checkout-form-two-step .woocommercet #payment .form-row { padding: 0.5em 0 0; } .wcf-embed-checkout-form-two-step .woocommerce #payment #place_order { margin-bottom: 0; } .wcf-embed-checkout-form .woocommerce form .wcf-column-33, .wcf-embed-checkout-form .woocommerce form .wcf-column-50, .wcf-embed-checkout-form .woocommerce form .wcf-column-100 { width: 100%; } } /** * *************************************** * Mobile css for two step navigation end * *************************************** */ /* Order Bump */ .wcf-embed-checkout-form .woocommerce form .wcf-all-bump-order-wrap:empty { margin: 0; } .wcf-bump-order-wrap { display: block; float: none; margin: 0 0 1.2em; overflow: hidden; word-break: break-word; white-space: normal; } .wcf-bump-order-wrap .wcf-bump-order-field-wrap .wcf-pointing-arrow { margin-left: 0; vertical-align: middle; transform: scaleX( 1 ); } .wcf-bump-order-wrap del { font-weight: 400; color: #7a7a7a; font-size: 16px; } .wcf-bump-order-wrap span.wcf-discount-price, .wcf-bump-order-wrap span.wcf-normal-price { font-weight: 600; color: #444; } /* Image width CSS */ .wcf-bump-order-wrap.wcf-ob-column-50 .wcf-bump-order-offer-content-left { max-width: 30%; } .wcf-bump-order-wrap.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 15%; } /* Before customer Start */ .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-offer-content-left { max-width: 25%; } /* Before customer End */ /* After customer Start*/ .wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 25%; } .wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-50 .wcf-bump-order-offer-content-left { max-width: 40%; } /* After customer End */ /* After order Start*/ .wcf-bump-order-wrap.wcf-after-order.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 30%; } /* After order End*/ /* After payment Start*/ .wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 30%; } .wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-50 .wcf-bump-order-offer-content-left { max-width: 40%; } /* After payment End*/ /* Image width CSS */ @keyframes wcf-blinker { 0% { visibility: hidden; } 40% { visibility: hidden; } } .wcf-blink { animation: wcf-blinker 0.8s linear infinite; animation-direction: alternate; } .wcf-bump-order-wrap .wcf-bump-order-desc p { margin: 0 0 0.6em; padding: 0; } .wcf-bump-order-wrap .wcf-bump-order-desc p:last-child { margin: 0; padding: 0; } .wcf-bump-order-wrap .wcf-bump-order-desc ul, .wcf-bump-order-wrap .wcf-bump-order-desc li { margin: 0; padding: 0; list-style-position: inside; } .wcf-bump-order-wrap .wcf-bump-order-desc ol { margin: 0; padding: 0; } .wcf-bump-order-wrap h1, .wcf-bump-order-wrap h2, .wcf-bump-order-wrap h3, .wcf-bump-order-wrap h4, .wcf-bump-order-wrap h5, .wcf-bump-order-wrap h6 { margin: 0; padding: 0; font-weight: 500; line-height: 1.3em; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce form #payment .wcf-bump-order-wrap .wcf-bump-order-field-wrap label, .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label { margin: 0 !important; vertical-align: middle; font-size: 1em; line-height: 1.3em; letter-spacing: 0; font-family: inherit; font-weight: inherit; text-transform: none; } /** * *************************** * Radio Buttons & checkbox * *************************** */ .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"] { border-radius: 50%; margin-left: 4px; line-height: 10px; } .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before { content: "\e600"; margin: 0; /* color: #f16334; */ } .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"]:checked::before { background-color: #f16334; border-radius: 50px; content: "\2022"; font-size: 24px; height: 6px; line-height: 16px; margin: 4px; text-indent: -9999px; width: 6px; } .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"], .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"], .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"], .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"], .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"] { border: 1px solid #b4b9be; background: #fff; color: #555; clear: none; cursor: pointer; display: inline-block; line-height: 0; height: 16px; margin: -4px 0 0 4px; outline: 0; padding: 0 !important; text-align: center; vertical-align: middle; width: 16px; min-width: 16px; -webkit-appearance: none; box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.1 ); transition: 0.05s border-color ease-in-out; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-selection-wrap { -js-display: flex; display: flex; padding: 5px 0; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-change-icon { border: 1px solid #dcdada; height: 30px; width: 26px; margin: 0; padding: 6px 6px; color: #555; text-align: center; font-weight: 500; cursor: pointer; font-size: 13px; margin-bottom: 0; -js-display: flex; display: flex; justify-content: center; align-items: center; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-decrement { border-radius: 0 3px 3px 0; border-left: 0; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-increment { border-radius: 3px 0 0 3px; border-right: 0; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater { width: 40px; min-width: 40px; min-height: 30px; padding: 2px 5px; color: #666; margin: 0; text-align: center; border: 1px solid #dcdada; border-right: 0; border-left: 0; border-radius: 0; -webkit-appearance: textfield; appearance: textfield; outline: none; line-height: 1; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:focus, .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:active, .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:hover { outline: none; } .wcf-order-bump-quantity-updater::-webkit-inner-spin-button, .wcf-order-bump-quantity-updater::-webkit-outer-spin-button { -webkit-appearance: none; } .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="radio"]:focus, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="radio"]:not( :checked ):focus { border-color: #f16334; /* box-shadow: 0 0 2px rgba( 241, 99, 52, 0.8 ); */ } .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"]:checked::before { display: inline-block; float: right; font: normal normal 400 15px/1 cartflows-icon; speak: none; vertical-align: middle; width: 6px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type="checkbox"]:not( :checked )::after, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:not( :checked )::after { opacity: 0; transform: scale( 0 ); } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type="checkbox"]:checked::after, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::after { opacity: 1; transform: scale( 1 ); } /* * *********************** * Bump Order Style Three Start * *********************** */ .wcf-bump-order-style-3 { border-width: 1px; border-style: dashed; border-color: #e5e7eb; background: #fff; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); border-radius: 4px; display: inline-block; padding: 20px; width: 100%; overflow: unset; position: relative; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap { -js-display: flex; display: flex; align-items: center; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { align-self: center; max-width: 60px; text-align: center; width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"] { height: 20px; width: 20px; margin: 0 0 0 15px; border-radius: 3px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"]:checked::before, .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"]:checked::before { font: normal normal 400 16px/1 cartflows-icon; width: 20px; top: 1px; position: relative; right: 0; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { max-width: 25%; margin-left: 10px; align-self: center; width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img { width: 100%; vertical-align: middle; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label { -js-display: flex; display: flex; font-size: 18px; color: #1a1e23; font-weight: 600; } /* .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap label input { margin: 0 20px; } */ .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { align-self: center; margin-right: 10px; max-width: 100%; width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-desc { /* font-size: 13px; */ margin-top: 10px; } .wcf-bump-order-style-3 .wcf-content-container { padding: 25px 0; } .wcf-embed-checkout-form .woocommerce #payment #place_order::before { display: inline-block; } /* Mobile CSS for Style 3 */ @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-3 .wcf-bump-order-info { display: block; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { max-width: 100%; margin: 0 0 10px 0; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { max-width: 65px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"] { margin: 0 0 0 10px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { flex: 5; } } /* Mobile CSS for Style 3 */ /* Style 3 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { display: block; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-action, .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-info, .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text, .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-label { display: block; text-align: center; width: 100%; max-width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text { margin: 15px 0 0; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-image { margin: 0 auto; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-label { display: block; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text { margin: 0 0 0 10px; text-align: left; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow { transform: rotate( -180deg ); } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image { /* margin-right: 0; */ margin-right: 7px; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action input[type="checkbox"] { margin: 0 0 0 5px; } /* ***** Right ***** */ /* Style 3 image layout CSS */ /* * *********************** * Bump Order Style Three End * *********************** */ /* * **************************** * Bump Order Style Four Start * **************************** */ .wcf-bump-order-style-4 { border-width: 1px; border-style: solid; border-color: #e5e7eb; background: #fff; border-radius: 4px; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); display: inline-block; padding: 20px; position: relative; width: 100%; overflow: unset; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap { -js-display: flex; display: flex; /* justify-content: space-between; */ align-items: center; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { text-align: center; -js-display: flex; display: flex; justify-content: center; width: auto; white-space: nowrap; margin-right: 15px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button { margin: 0; border-width: 1px; border-color: #ccc; border-style: none; color: #333; padding: 8px 20px; border-radius: 3px; text-decoration: none; text-transform: none; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button:hover { /*background-color: #f9f9f9;*/ cursor: pointer; } .wcf-bump-order-style-4.wcf-after-order .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button { padding: 8px 12px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button span { background-color: #333; padding: 0 5px; border-radius: 50px; color: #fff; margin: 0 0 0 8px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"] { display: none !important; /*height: 25px; width: 25px; margin: 0 15px 0 0; border-radius: 3px;*/ } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"]:checked::before { font: normal normal 400 20px/1 cartflows-icon; width: 20px; top: 2px; position: relative; right: 2px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { -webkit-box-flex: 0; -moz-box-flex: 0; max-width: 25%; width: 100%; margin-left: 15px; align-self: center; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img { /*height: 80px; width: 80px;*/ width: 100%; vertical-align: middle; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label { color: #1a1e23; font-size: 18px; margin-bottom: 5px; font-weight: 600; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap label input { /*margin: 0 20px;*/ } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { align-items: center; width: 100%; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-info { flex: 0 0 calc( 100% - 100px ); -webkit-flex: 0 0 -webkit-calc( 100% - 115px ); } /* .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-desc { font-size: 13px; } */ .wcf-bump-order-style-4 .wcf-bump-order-offer { font-size: 18px; color: #f06434; } .wcf-bump-order-style-4 .wcf-content-container { padding: 25px 0; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button .wcf-processing { opacity: 0.7; background: #fff; pointer-events: none; } /* Mobile CSS for Style 3 */ @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { margin: 15px 0 0 0; text-align: right; display: block; line-height: 2; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { flex: 0 0 80px; -webkit-flex: 0 0 80px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap, .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { display: block; } } /* Mobile CSS for Style 3 */ /* Style 4 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { display: block; text-align: center; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-image { margin: 0 auto; max-width: 30%; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-action { text-align: center; margin: 10px 0 0 0; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-text { margin: 15px 0; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap { text-align: left; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action { min-width: 80px; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text { margin: 0 15px; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image { margin: 0; } /* ***** Right ***** */ /* Style 4 image layout CSS */ /* * **************************** * Bump Order Style Four End * **************************** */ /* * **************************** * Bump Order Style Five Start * **************************** */ .wcf-bump-order-style-5 { background: #fff; border-width: 1px; border-style: solid; border-color: #e5e7eb; border-radius: 4px; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); display: inline-block; padding: 20px; position: relative; width: 100%; overflow: unset; } .wcf-bump-order-style-5 .wcf-bump-order-field-wrap { -js-display: flex; display: flex; align-items: center; } .wcf-bump-order-style-5 .wcf-bump-order-label, .wcf-bump-order-style-5 .wcf-bump-order-desc { margin: 0 0 15px 0; } /* Addded to normalize the font weight from parent classes. */ .wcf-bump-order-style-5 .wcf-bump-order-desc { font-weight: 400; } /* Addded to normalize the font weight from parent classes. */ .wcf-bump-order-style-5 .wcf-bump-order-action { -js-display: flex; display: flex; line-height: 1.2; padding: 5px 0; width: -moz-fit-content; width: fit-content; vertical-align: middle; } .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"] { height: 20px; width: 20px; margin: 0 0 0 10px !important; border-radius: 3px; } .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"]:checked::before { font: normal normal 400 16px/1 cartflows-icon; width: 20px; top: 1px; position: relative; right: 0; } .wcf-bump-order-style-5 .wcf-bump-order-label { font-weight: 600; color: #1a1e23; font-size: 18px; line-height: 1; } .wcf-bump-order-style-5 .wcf-bump-order-info { -js-display: flex; display: flex; align-items: center; } /* Style 5 position related CSS */ /* Position: top */ .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-top { display: block; text-align: center; width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-image { margin: 0 0 15px 0; display: inline-block; text-align: center; max-width: 30%; } .wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-action { -js-display: inline-flex; display: inline-flex; } /* Position: top */ /* Position: right */ .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image { margin: 0 15px 0 0; } .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-text { text-align: left; } .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-action { -js-display: inline-flex; display: inline-flex; } /* Position: right */ /* Style 5 position related CSS */ .wcf-bump-order-style-5 .wcf-bump-order-image { max-width: 30%; margin: 0 0 0 15px; width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-text { width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-image img { width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-cb-button { margin: 0; border: 1px solid #ccc; color: #333; padding: 8px 20px; border-radius: 3px; text-decoration: none; text-transform: none; } .wcf-bump-order-style-5 .wcf-processing { opacity: 0.7; background: #fff; pointer-events: none; } .wcf-bump-order-style-5 .wcf-bump-remove-from-cart:hover { color: #fff; background: #e43b2c; } .wcf-bump-order-style-5 .wcf-bump-order-cb-button:hover { /*background-color: #f9f9f9;*/ cursor: pointer; } .wcf-bump-order-style-5 .wcf-bump-order-action.wcf-ob-action-button { border: none; padding: 0; line-height: unset; } .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action.wcf-ob-action-button input[type="checkbox"] { display: none !important; } /* Mobile CSS for Style 5 */ @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-info { display: block; } .wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-image { max-width: 100%; margin: 0 0 15px 0; } .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image { margin: 15px 0 0; } } /* Mobile CSS for Style 5 */ /* * **************************** * Bump Order Style Five End * **************************** */ /* * *********************** * Bump Order Style Two Start * *********************** */ .wcf-bump-order-style-2 { background: #fff; border: 1px #e5e7eb dashed; border-radius: 4px; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); } .wcf-bump-order-style-2 .wcf-content-container { -js-display: flex; display: flex; } .wcf-bump-order-style-2 .wcf-bump-order-offer { padding: 20px 25px; font-size: 1.1em; color: #1a1e23; font-weight: 600; } .wcf-bump-order-style-2 .wcf-bump-order-offer-content-right { width: 100%; } .wcf-bump-order-style-2 .wcf-bump-order-desc { padding: 0 25px 20px; } .wcf-bump-order-style-2 .wcf-bump-order-field-wrap { background-color: #f7fafc; border-top: 1px #e5e7eb solid; padding: 15px 25px; margin: 0; font-size: 1.1em; display: block; } .wcf-bump-order-style-2 .wcf-bump-order-field-wrap, .wcf-bump-order-style-2 .wcf-bump-order-field-wrap * { cursor: pointer; } .wcf-bump-order-style-2 .wcf-bump-order-field-wrap .wcf-bump-order-label { margin-right: 1px; } /* When there is image */ .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left, .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { align-self: center; } .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left img { padding: 0 20px 15px 0; } .wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left { width: auto; } .wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 85%; } .wcf-show-coupon-field-toggle { padding-top: 1em; } @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-2 .wcf-content-container { display: block; } .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right, .wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 100%; } } /* Style 2 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container { display: block; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { text-align: center; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right { display: block; width: 100%; margin: 0 auto; text-align: center; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left { max-width: 40%; padding: 0 20px; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img { padding: 0 0 20px 0; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap { text-align: left; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left { align-self: center; text-align: left; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img { padding: 0 0 20px 20px; } /* ***** Right ***** */ /* Style 2 image layout CSS */ /* * *********************** * Bump Order Style Two End * *********************** */ /* * ************************* * Bump Order Style One Start * ************************* */ .wcf-bump-order-style-1 { background: #fff; border-style: solid; border-width: 1px; border-color: #e5e7eb; border-radius: 4px; display: inline-block; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); } .wcf-bump-order-style-1 .wcf-bump-order-offer { padding: 0 25px 10px; color: #1a1e23; font-size: 18px; font-weight: 600; } .wcf-bump-order-style-1 .wcf-content-container { padding: 25px 0; -js-display: flex; display: flex; } .wcf-bump-order-style-1 .wcf-bump-order-offer-content-right { width: 100%; } .wcf-bump-order-style-1 .wcf-bump-order-desc { padding: 0 25px; } .wcf-bump-order-style-1 .wcf-bump-order-field-wrap { border-bottom-style: solid; border-width: 1px; border-color: #e5e7eb; padding: 20px 25px; margin: 0; font-size: 1.1em; display: block; background: #f7fafc; } .wcf-bump-order-style-1 .wcf-bump-order-field-wrap label { cursor: pointer; } .wcf-embed-checkout-form .woocommerce #payment .wcf-bump-order-wrap input[type="checkbox"] { margin: 0 0 0 4px; } .wcf-bump-order-style-1 .wcf-bump-order-field-wrap .wcf-bump-order-label { margin-right: 1px; } /* When there is image */ .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left, .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { align-self: center; } .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left img { padding: 0 20px 0 0; } /* Style 1 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container { display: block; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { text-align: center; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left, .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right { display: block; width: 100%; margin: 0 auto; text-align: center; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left { max-width: 38%; padding: 0 20px; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img { padding: 0 0 20px 0; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap { text-align: left; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right { /* display: inline-block; width: 60%; */ align-self: center; text-align: left; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left { align-self: center; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow { transform: rotate( -180deg ); margin-top: -5px; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img { padding: 0 0 0 20px; } /* ***** Right ***** */ /* Style 1 image layout CSS */ /* * ************************* * Bump Order Style One End * ************************* */ /* * ****************************** * Bump Order style position CSS * ****************************** */ /* .wcf-embed-checkout-form-one-column .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 85%; } */ @media only screen and ( max-width: 520px ) { .wcf-embed-checkout-form-two-column .wcf-bump-order-style-1.wcf-after-customer, .wcf-embed-checkout-form-two-column .wcf-bump-order-style-2.wcf-after-customer, .wcf-embed-checkout-form-two-column .wcf-bump-order-style-3.wcf-after-customer, .wcf-embed-checkout-form-two-column .wcf-bump-order-style-4.wcf-after-customer { width: 100%; } .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right, .wcf-embed-checkout-form-one-column .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 100%; } } @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-1 .wcf-content-container, .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap { display: block; } .wcf-bump-order-wrap .wcf-bump-order-offer-content-left { width: 100%; } .wcf-bump-order-wrap .wcf-bump-order-offer-content-left img { width: 100%; padding: 25px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"] { height: 20px; width: 20px; margin: 0 0 15px 15px; border-radius: 3px; } } /* * ****************************** * Bump Order style position CSS * ****************************** */ /******************************************** * Product options variation CSS ********************************************/ /* Div & Rows*/ .wcf-product-option-wrap { padding: 3px; } .wcf-product-option-wrap h3 { font-family: inherit; font-weight: 600; font-size: 20px; margin: 0 0 25px 0; padding: 3px; } .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row { position: relative; } .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 5px 0 0 0; } .wcf-product-option-wrap input[type="number"]:focus { outline: none; } .wcf-qty-options .wcf-item-selector { display: inline-block; margin-left: 8px; } .wcf-qty-options .wcf-item-all-text { display: inline-block; vertical-align: middle; } .wcf-qty-options .wcf-item-image { width: 55px; /* height: 45px; */ -js-display: inline-flex; display: inline-flex; margin-left: 10px; } .wcf-qty-options .wcf-item-wrap { font-size: 1em; font-weight: 600; line-height: 1.5; } .wcf-qty-options .wcf-display-attributes, .wcf-qty-options .wcf-display-subscription-details { font-size: 0.75em; font-weight: 400; font-style: italic; opacity: 0.65; } .wcf-display-attributes .wcf-att-inner { margin-left: 5px; } .wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep { display: none; } /* Hide Quantity */ .wcf-qty-hidden.wcf-qty { visibility: hidden; pointer-events: none; opacity: 0; } /** ************************* * Highlight Option ************************* */ .wcf-qty-options .wcf-item-wrap { line-height: 1.8; } .wcf-qty-options ins { background: none; } .wcf-qty-options .wcf-price del .woocommerce-Price-amount { font-size: inherit; opacity: 0.45; color: inherit; } .wcf-qty-options .wcf-price ins .woocommerce-Price-amount { margin-right: 4px; } .wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt { vertical-align: middle; } /** * ************************ * Checkout layout specific css * ************************ */ .wcf-embed-checkout-form-one-column .wcf-product-option-wrap { clear: right; margin: 15px 0; width: 100%; } .wcf-embed-checkout-form-two-column .wcf-product-option-wrap { margin: 15px 0; width: 55%; float: right; padding-left: 40px; } .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer, .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order, .wcf-embed-checkout-form-two-column .wcf-order-wrap .wcf-product-option-wrap.wcf-product-option-before-order { width: 100%; padding: 0; } /************************************ * Product options Classic Style ************************************/ .wcf-yp-skin-classic .wcf-qty-options { border: none; /*border-bottom: 0;*/ background-color: var( --wcf-yp-bg-color ); border-radius: 4px; border-collapse: collapse; font-family: inherit; font-weight: inherit; font-size: 1em; margin: 0 0 0 0 !important; padding: 15px; text-align: right; width: 100%; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header { border-bottom: 1px dashed var( --wcf-yp-border-color ); } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label { font-weight: 600; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not( .wcf-highlight ):last-child, .wcf-embed-checkout-form .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not( .wcf-highlight ):last-child { border: none; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item, .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty, .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price { padding: 0; line-height: 1.4em; border: none; position: relative; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { color: var( --wcf-yp-text-color ); -js-display: flex; display: flex; justify-content: space-between; position: relative; padding: 10px 0; border-bottom: 1px solid var( --wcf-yp-border-color ); align-items: center; font-size: 0.95em; cursor: pointer; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item, .wcf-yp-skin-classic .wcf-qty-options .wcf-qty, .wcf-yp-skin-classic .wcf-qty-options .wcf-price { display: inline-block; vertical-align: middle; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item { -js-display: flex; display: flex; align-items: center; width: 70%; flex: 4; margin-left: 10px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext { font-size: 0.95em; line-height: 1.5; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap + .wcf-item-subtext { margin-top: 5px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty { -js-display: flex; display: flex; width: 20%; text-align: center; align-items: center; justify-content: center; flex: 1; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 40px; min-width: 40px; min-height: 30px; padding: 2px 5px; color: #666; margin: 0; text-align: center; border: 1px solid #dcdada; border-right: 0; border-left: 0; border-radius: 0; -webkit-appearance: textfield; appearance: textfield; line-height: 1; } .wcf-yp-skin-classic .wcf-qty-options .wcf-price { -js-display: flex; display: flex; align-items: center; width: 10%; text-align: left; justify-content: flex-end; flex: 1; margin-right: 10px; font-size: 0.95em; font-weight: 400; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { background-color: var( --wcf-yp-hl-bg-color ); border: 1px solid var( --wcf-yp-hl-border-color ); color: var( --wcf-yp-hl-text-color ); font-weight: 500; padding: 18px 28px; margin: -1px -28px 0; font-size: 0.95em; border-radius: 4px; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); } .wcf-yp-skin-classic .wcf-qty-table-titles + .wcf-highlight { margin-top: 15px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight + .wcf-highlight { margin-top: 25px; } .wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head { position: absolute; top: -10px; left: -10px; background: var( --wcf-yp-hl-flag-bg-color ); color: var( --wcf-yp-hl-flag-text-color ); border-radius: 3px; padding: 3px 9px; font-size: 0.75em; font-weight: 400; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap { font-size: 0.95em; font-weight: 600; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext { opacity: 0.75; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item-image { margin-left: 15px; } /* Layout and position specific classic css */ .wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { padding: 18px; margin-right: -20px; margin-left: -20px; } /*********************************************** * Product options classic Style skeleton loader ***********************************************/ /* Classic Style loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row.wcf-qty-table-titles::before, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before { content: ""; position: absolute; background: url( "../images/product-options-classic-loader.svg" ) 15px 15px, #fff; background-repeat: no-repeat; width: 100%; height: 100%; z-index: 1; right: 0; top: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before { background-color: #f9f9f9; } /* Classic Style loader */ /* Card Loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::after { content: ""; position: absolute; width: 100%; height: 100%; background-color: #f7f7f7; border-radius: 0.35em; top: 0; right: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::before { content: ""; position: absolute; background: url( "../images/product-options-card-loader.svg" ) center center; background-repeat: no-repeat; transform: scale( 0.92 ); width: 100%; height: 100%; z-index: 1; right: -5px; top: 0; } /* Card Loader */ /****************************** * Product options Cards Style ******************************/ .wcf-yp-skin-cards .wcf-qty-options { -js-display: flex; display: flex; flex-wrap: wrap; margin: 0 -10px; font-size: 1em; width: calc( 100% + 20px ); } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { background-color: #f7f7f7; border: 1px solid #b0b0b0; padding: 20px 30px; margin: 0 10px 22px; border-radius: 0.35em; width: calc( 50% - 20px ); font-size: 1em; font-weight: 600; cursor: pointer; position: relative; } .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight { background-color: #fff; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); overflow: hidden; } .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price { font-size: 1.08em; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 0 0 3px; } .wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head { position: absolute; width: 12em; top: 1.8em; left: -3em; background: #f16334; color: #fff; padding: 0.22em 0; text-align: center; font-size: 0.8em; font-weight: 700; transform: rotate( -45deg ); -webkit-transform: rotate( -45deg ); } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item { -js-display: flex; display: flex; align-items: flex-start; } .wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector, .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-top: 5px; position: relative; } .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-left: 15px; width: 80px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options { margin: 0 0 5px 0; width: 100%; position: relative; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 1.07em; font-weight: 600; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap { margin-bottom: 5px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext { font-size: inherit; font-weight: 400; opacity: 0.75; margin-bottom: 15px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input { max-width: 50px; text-align: center; min-height: 30px; padding: 2px; margin: 0; border: none; border-radius: 0; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input { border: 1px solid #dcdada; border-right: 0; border-left: 0; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty { max-width: 100px; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-wrap { -js-display: flex; display: flex; /* width: 100%; */ } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn { line-height: 1; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn.max-quantity-reached { color: #dcdada; cursor: not-allowed; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon { border: 1px solid #dcdada; height: 30px; width: 26px; margin: 0; padding: 6px 6px; color: #555; text-align: center; font-weight: 500; cursor: pointer; font-size: 13px; margin-bottom: 0; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon:hover { background-color: #f7f7f7; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-decrement { border-radius: 0 3px 3px 0; border-left: 0; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-increment { border-radius: 3px 0 0 3px; border-right: 0; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type="number"]::-webkit-inner-spin-button, .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { align-items: center; display: inline-block; margin-top: 0; margin-left: 10px; vertical-align: middle; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { margin-left: 0; } /* Hide Quantity */ .wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty { display: none !important; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 0.95em; } /* Layou specific cards width */ .wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row, .wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row, .wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row { width: 100%; } @media ( max-width: 768px ) { .wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { width: 100%; padding: 15px 20px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row:last-child { margin-bottom: 0; } .wcf-yp-skin-cards .wcf-qty-options .wcf-item { width: 100%; } .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty { width: 40%; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { width: auto; vertical-align: middle; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext { font-size: 0.9em; } } /** * ************************ * Quick View modal popup * Variation in popup * ************************ */ #wcf-quick-view-content { font-family: Montserrat, sans-serif; } #wcf-quick-view-content .summary-content .product_title { display: inline-block; font-size: 2rem; font-family: inherit; font-weight: 400; width: 100%; margin: 0 0 0.5em 0; padding: 0 0 0; border: none; border-bottom: none; line-height: 1.3; } #wcf-quick-view-content .summary-content .woocommerce-product-rating { margin: 0 0 0.5em 0; } #wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating, #wcf-quick-view-content .summary-content .woocommerce-product-rating .comment-form-rating .stars a, #wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating::before { color: #f16334; } #wcf-quick-view-content .summary-content .price, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price { margin: 0 0 0.5em; font-family: inherit; font-weight: 400; } #wcf-quick-view-content .summary-content .wc-stripe-payment-request-wrapper { padding: 0; } #wcf-quick-view-content .summary-content .price del, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price del { opacity: 1; margin-left: 10px; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-detail { margin: 0; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-avail { display: none; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .stock.in-stock { font-size: 0.9em; } #wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p { font-size: 0.9em; line-height: 1.85714285714286; margin-top: 0; margin-bottom: 20px; } #wcf-quick-view-content .summary-content div.product { padding: 0; display: inline-block; vertical-align: middle; } #wcf-quick-view-content .summary-content form.cart { margin-bottom: 0; } #wcf-quick-view-content .summary-content .variations { border-bottom: 1px #ddd solid; padding-bottom: 1em; } #wcf-quick-view-content .summary-content .variations label { font-size: 13px; font-weight: 400; } #wcf-quick-view-content .summary-content .single_variation_wrap .single_variation { margin-bottom: 1em; } #wcf-quick-view-content .summary-content .single_variation_wrap .single_variation .woocommerce-variation-description { display: none; } #wcf-quick-view-content .variations_form .variations td { padding: 5px 0; } #wcf-quick-view-content .summary-content .variations td.label { padding-left: 0.4em; vertical-align: middle; } #wcf-quick-view-content .summary-content .variations select { background-color: #fff; background-image: none; border: 1px solid; border-color: #d4d4d4; border-radius: 0; box-shadow: inset 0 -1em 0.7em 0 rgba( 0, 0, 0, 0.01 ); color: #555; display: inline-block; font-family: inherit; font-weight: inherit; font-size: 14px; height: auto; line-height: 1.42857143 !important; min-height: 34px; outline: none; padding: 7px 12px; width: auto; -webkit-appearance: none; } #wcf-quick-view-content .summary-content a { color: #f16334; text-decoration: none; } #wcf-quick-view-content .summary-content .reset_variations { text-decoration: none; font-size: 11px; color: #b5b5b5; /*text-transform: uppercase;*/ letter-spacing: 0.5px; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-add-to-cart button { border: 1px solid; border-color: #f16334; background: #f16334; border-radius: 3px; color: #fff; font-family: inherit; font-weight: inherit; font-size: 16px; letter-spacing: 0.5px; line-height: 1; margin-top: 15px; padding: 10px 30px; width: auto; } @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form-one-column .wcf-product-option-wrap { padding: 0 18px; } .wcf-embed-checkout-form-two-column .wcf-product-option-wrap { width: 100%; float: none; padding: 0 10px; } } /* Quick View Modal */ .wcf-clear::before, .wcf-clear::after { content: " "; display: table; } .wcf-clear::after { clear: both; } html.wcf-quick-view-is-open, html.wcf-quick-view-is-open body, html.wcf-pre-checkout-offer-open, html.wcf-pre-checkout-offer-open body { overflow: hidden; } .wcf-quick-view-bg { position: fixed; visibility: hidden; overflow: hidden; background: #0b0b0b; opacity: 0; transition: opacity 0.25s; z-index: 1042; } .wcf-quick-view-loader { z-index: 1000; border: none; margin: 0; padding: 0; width: 100%; height: 100%; top: 0; right: 0; cursor: none; position: absolute; } .wcf-quick-view-loader::before { content: ""; background: none !important; width: 48px; height: 48px; display: block; position: absolute; top: 50%; right: 50%; border: 3px solid #fff; margin: 0 auto; border-radius: 50%; border-right-color: transparent; border-left-color: transparent; animation: wcf-qv-spin 575ms infinite linear; } @keyframes wcf-qv-spin { 100% { transform: rotate( -360deg ); } } .wcf-loader-overlay { position: absolute; top: 0; right: 0; background: rgba( 255, 255, 255, 0.4 ); z-index: 2; content: ""; height: 100%; width: 100%; } .wcf-loader::before { border: 3px solid #333; border-right-color: transparent; border-left-color: transparent; } .wcf-loader { z-index: 3; } .wcf-quick-view-bg-ready { top: 0; right: 0; width: 100%; height: 100%; opacity: 0.6; visibility: visible; } #wcf-quick-view-modal { position: fixed; visibility: hidden; opacity: 0; top: 0; right: 0; width: 100%; height: 100%; z-index: 1400; text-align: center; transition: all 0.3s; overflow-x: hidden; overflow-y: auto; } #wcf-quick-view-modal.open { visibility: visible; opacity: 1; } #wcf-quick-view-modal .wcf-content-main-wrapper { text-align: center; position: absolute; width: 100%; height: 100%; right: 0; top: 0; padding: 30px; } #wcf-quick-view-modal .wcf-content-main-wrapper::before { content: ""; display: inline-block; vertical-align: middle; height: 100%; } #wcf-quick-view-modal .wcf-content-main { position: relative; pointer-events: none; display: inline-block; vertical-align: middle; max-width: 100%; margin: 0 auto; text-align: right; z-index: 1045; transform: translateY( -30px ); opacity: 0; transition: transform 0.5s, opacity 0.3s; } #wcf-quick-view-modal.open .wcf-content-main { transform: translateY( 0 ); opacity: 1; width: 100%; } #wcf-quick-view-modal .wcf-content-main::after, #wcf-quick-view-modal .wcf-content-main::before { content: ""; display: table; clear: both; } #wcf-quick-view-modal .wcf-lightbox-content { display: table; pointer-events: auto; background-color: #fff; max-width: 975px; margin: 20px auto; transform: translateZ( 0 ); box-shadow: -3px 3px 20px 0 rgba( 0, 0, 0, 0.15 ); position: relative; } #wcf-quick-view-content { background-color: #fff; padding: 15px 15px 15px 0; border-radius: 0; } #wcf-quick-view-content .wcf-woo-product { overflow: hidden; max-height: 480px; overflow-y: auto; } #wcf-quick-view-content div.summary { margin: 0; padding: 20px 30px 30px 30px; width: 55%; float: right; box-sizing: border-box; } #wcf-quick-view-content div.images { width: 45%; float: right; margin-bottom: 0; } #wcf-quick-view-modal .wcf-qv-image-slider { position: relative; } @media ( min-width: 545px ) { #wcf-quick-view-content div.summary { content: "544"; padding-bottom: -webkit-calc( 10px + 1em ); } } @media ( max-width: 544px ) { #wcf-quick-view-modal .wcf-lightbox-content { display: block; } #wcf-quick-view-content div.images, #wcf-quick-view-content div.summary { width: 100%; float: none; overflow: hidden; margin-bottom: 15px; padding: 0; } #wcf-quick-view-content .summary-content .product_title { font-size: 1.475rem; } #wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p { font-size: 0.98em; } } /* Flex Slider */ body #wcf-quick-view-modal div.product .flex-viewport, body #wcf-quick-view-modal div.product .flex-viewport img { width: 100%; float: none; display: block; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav { margin: 0; padding: 0; list-style: none; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav a { text-decoration: none; display: block; width: 32px; height: 32px; font-size: 32px; line-height: 32px; margin: -20px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba( 0, 0, 0, 0.8 ); text-shadow: -1px 1px 0 rgba( 255, 255, 255, 0.3 ); transition: all 0.3s ease-in-out; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev, #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next { display: inline-block; font-family: dashicons; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev::before { content: "\f341"; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next::before { content: "\f345"; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev { right: -50px; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next { left: -50px; text-align: left; } #wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-prev { opacity: 0.7; right: 10px; } #wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-next { opacity: 0.7; left: 10px; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav { margin: 0; padding: 0; width: 100%; position: absolute; bottom: 10px; text-align: center; } #wcf-quick-view-modal .wcf-qv-image-slider li { list-style: none; } #wcf-quick-view-modal .wcf-qv-slides li { float: right; width: 100%; } #wcf-quick-view-modal .wcf-qv-slides li img { width: 100%; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav li { margin: 0 6px; display: inline-block; zoom: 1; vertical-align: middle; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a { width: 11px; height: 11px; display: block; background: #666; background: rgba( 0, 0, 0, 0.5 ); cursor: pointer; text-indent: -9999px; box-shadow: inset 0 0 3px rgba( 0, 0, 0, 0.3 ); border-radius: 20px; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a.flex-active { background: #000; background: rgba( 0, 0, 0, 0.9 ); cursor: default; } #wcf-quick-view-modal .wcf-content-main-head { background: #fff; border-radius: 50%; box-shadow: 0 0 3px 0 #444; color: #000; font-size: 20px; height: 25px; line-height: 0; overflow: hidden; opacity: 1; position: absolute; padding: 3px; left: -10px; top: -15px; text-align: center; text-decoration: none; width: 25px; z-index: 2; } #wcf-quick-view-close { font-size: 18px; top: 0; left: 0; line-height: 20px; z-index: 2; color: #000; text-decoration: none; } /* New quick view */ #wcf-quick-view-modal .woocommerce-variation-add-to-cart .quantity { display: none !important; opacity: 0 !important; position: absolute !important; } /** * *********************************** * Common Mobile css * *********************************** */ @media only screen and ( max-width: 480px ) { .wcf-qty-options .wcf-item-image { display: inline-block; } .wcf-qty-options .wcf-item { width: 55%; } .wcf-qty-options .wcf-qty { width: 25%; } .wcf-qty-options .wcf-price { width: 20%; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options .wcf-item-wrap { width: 100%; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap.wcf-product-option-before-customer { margin-bottom: 0; /* order: 1; */ } .wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-selection-wrap { display: inline-block; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-decrement { -webkit-border-radius: 3px 3px 0 0; border: 1px solid #dcdada; border-bottom: 0; border-radius: 3px 3px 0 0; display: inline-block; height: 20px; width: 30px; padding: 1px 5px; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-increment { -webkit-border-radius: 0 0 3px 3px; border: 1px solid #dcdada; border-top: 0; border-radius: 0 0 3px 3px; display: inline-block; height: 20px; width: 30px; padding: 1px 5px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 30px; min-width: 20px; border: 1px solid #dcdada; border-top: 0; border-bottom: 0; border-radius: 0; margin-bottom: -2px; } .wcf-item-wrap { display: inline-block; width: 80%; } .wcf-qty-options .wcf-item-selector { display: inline-block; margin-left: 0 !important; width: 15%; } #wcf-quick-view-content { padding: 0; } #wcf-quick-view-content .wcf-woo-product { padding: 15px; } .wcf-embed-checkout-form-one-column .woocommerce-checkout #your_products_heading { font-size: 1em; } } /** * ************************ * Pre Upsell Checkout Start * ************************ */ .wcf-pre-checkout-offer-wrapper { position: fixed; visibility: hidden; overflow-x: hidden; overflow-y: auto; background: rgba( 0, 0, 0, 0.8 ); opacity: 0; transition: opacity 0.25s; z-index: 1042; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1 { color: #333; font-family: inherit; font-size: 1.7em; margin: 10px 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip { color: #555; display: block; font-size: 14px; margin: 5px auto 0 auto; opacity: 0.8; width: -moz-fit-content; width: fit-content; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip:hover { opacity: 1; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content { background-color: #fff; border: 2px #e2e2e2 dashed; border-radius: 4px; box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.04 ); display: inline-block; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-progress-bar { overflow: hidden; margin-bottom: 0; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal { max-width: 950px; background-color: #fff; position: relative; border-radius: 4px; top: 0; transform: translate( 0%, 0% ); width: 100%; min-height: 350px; overflow: hidden; font-family: inherit; margin: 20px auto; box-shadow: 0 0 20px 0 rgba( 0, 0, 0, 0.1 ); } .wcf-pre-checkout-screen-size .open #wcf-pre-checkout-offer-modal { top: 50%; transform: translate( 0%, -50% ); } .wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav { margin-bottom: 30px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress { position: relative; display: table; table-layout: fixed; width: 100%; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step { display: table-cell; text-align: center; position: relative; width: 100%; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title { margin-bottom: 12px; white-space: nowrap; font: inherit; /*text-transform: uppercase;*/ letter-spacing: 0.6px; font-size: 14px; color: #6d6d6d; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title { color: inherit; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::before, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::after { background: var( --wcf-primary-color ); } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after { left: 0; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after { height: 4px; content: ""; background: #e2e2e2; display: block; position: absolute; width: 50%; bottom: 8px; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before { right: 0; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:first-child .wcf-nav-bar-step-line::before, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:last-child .wcf-nav-bar-step-line::after { background: #000; display: none !important; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active + .wcf-nav-bar-step.active .wcf-nav-bar-step-line::after { background: #e2e2e2 !important; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step { background: var( --wcf-primary-color ); } .wcf-pre-checkout-offer-wrapper .wcf-progress-nav-step { width: 20px; height: 20px; border-radius: 3px; margin: auto; position: relative; background: #e2e2e2; vertical-align: middle; text-align: center; z-index: 2; line-height: 17px; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step::before { content: ""; margin: 0; color: #fff; display: inline-block; font: normal normal 400 13px/20px cartflows-icon; speak: none; vertical-align: middle; -webkit-font-smoothing: antialiased; border: 1px #fff solid; border-radius: 1px; width: 6px; height: 6px; background-color: #fff; line-height: 7px; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn { border: 1px solid; border-color: #f16334; background: #f16334; border-radius: 3px; color: #fff; font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1; margin-top: 0; padding: 12px 16px; width: 100%; outline: none; min-height: 48px; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title { margin-bottom: 10px; position: relative; text-align: center; right: 0; bottom: 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1 { color: #333; font-size: 1.5em; font-weight: 700; margin-top: 0; margin-bottom: 8px; } .wcf-pre-checkout-offer-wrapper .wcf-content-main-head { text-align: center; position: relative; padding: 10px; width: 100%; margin-bottom: 30px; } .wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf_first_name { color: var( --wcf-primary-color ); } .wcf-pre-checkout-offer-wrapper .wcf-lightbox-content { padding: 50px; } .wcf-pre-checkout-offer-wrapper.open { visibility: visible; opacity: 1; text-align: center; /*position: absolute;*/ width: 100%; height: 100%; right: 0; top: 0; padding: 30px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action { padding: 5px 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins { background: none; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-amount.amount, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins .woocommerce-Price-amount.amount { display: inline-block; font-weight: 600; font-size: 17px; margin-bottom: 3px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price del .woocommerce-Price-amount.amount { font-weight: 400; text-decoration: line-through; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info { display: inline-block; width: 49.7%; padding: 30px; vertical-align: middle; text-align: center; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details { text-align: right; padding-right: 10px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions { padding: 0 30px 30px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action { font-size: 12px; padding-top: 0; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { font-family: inherit; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { color: #555; margin-top: 5px; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span { color: #555; font-size: 18px; font-weight: 500; padding: 0 5px; } @media only screen and ( max-width: 768px ) { .wcf-pre-checkout-offer-wrapper .wcf-lightbox-content { padding: 25px 15px; } .wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav, .wcf-pre-checkout-offer-wrapper .wcf-content-main-head { margin-bottom: 20px; } .wcf-pre-checkout-offer-wrapper.open { overflow: auto; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info { display: block; width: 100%; padding: 15px 15px 10px 15px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details { text-align: center; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc { text-align: center; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action { margin-bottom: 0; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal { width: 100%; top: 0%; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { font-size: 1em; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions { display: inline-block; width: 100%; } } /* SMARTPHONES LANDSCAPE */ @media only screen and ( max-width: 600px ) { /* Rigth Arrow*/ .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow { background: #f16334; height: 2px; width: 18px; margin: 0 10px; position: relative; cursor: pointer; right: auto; vertical-align: middle; text-align: right; top: 10px; padding: 1px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after { content: ""; background: #f16334; position: absolute; height: 2px; width: 10px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before { left: -1px; bottom: -3px; transform: rotate( 45deg ); } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after { left: -1px; top: -3px; transform: rotate( -45deg ); } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-currencySymbol { float: none; margin-left: 6px; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title { white-space: unset; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step .wcf-nav-bar-step-line { display: none; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step { display: block; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title::before { content: "\e901"; color: #f16334; font: normal normal 400 13px/1 cartflows-icon; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal { width: 100%; top: 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions { display: block; width: 100%; overflow: hidden; margin-bottom: 10px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-add-cart-btn, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-skip-btn { width: 100%; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { font-size: 1em; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn { font-size: 15px; margin-top: 10px; } /* Common element */ .wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip { font-size: 1.3em; line-height: 1.3em; } /* Common element */ } /** * ************************ * Pre Upsell Checkout End * ************************ */ .wcf-bump-order-grid-wrap { display: flex; width: 100%; -js-display: flex; flex-wrap: wrap; margin: 20px 0 0; justify-content: space-between; } .wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer { width: calc( 55% - 40px ); float: right; /*display: unset;*/ /*display: -webkit-box; display: -webkit-flex;*/ /*margin: unset;*/ } /* * ***************************************** * Order Bump Layout Specific Responsive CSS * ***************************************** */ .wcf-ob-column-50 { width: calc( 50% - 10px ); } .wcf-ob-column-100 { width: 100%; } @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer { width: 100%; } .wcf-ob-column-50, .wcf-ob-column-100 { width: 100%; } } /** * **************************** * Modern Checkout Layout Style * **************************** */ /* Products Option. */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-customer #your_products_heading, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-order #your_products_heading { margin-top: 0; font-weight: 500; } /* .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-order-wrap .wcf-product-option-before-order { margin-bottom: 10px; } */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap { width: 100%; display: inline-block; margin: 0; padding: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"] { min-width: 18px; width: 18px; height: 18px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::before { margin: 1px 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap { padding: 0; margin: 20px 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap.wcf-after-customer { margin: 20px 0 0 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap { width: 100%; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options { padding: 0; background-color: var( --wcf-yp-bg-color ); border: 1px solid var( --wcf-yp-box-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { color: var( --wcf-yp-text-color ); padding: 1em 1.2em; position: relative; border-bottom: 1px solid var( --wcf-yp-box-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { margin: -1px -15px 0; color: var( --wcf-yp-hl-text-color ); border-bottom: 1px solid var( --wcf-yp-hl-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-item-wrap { font-size: 14px; font-weight: 400; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-header .wcf-field-label { font-weight: 500; font-size: 15px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-item, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-qty, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-price { padding: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price { font-weight: 400; } /* Products Option End. */ /* Products Option & Order bump. */ /* Order Bump CSS for Modern Checkout */ /* Modern Checkout Responsive CSS */ @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-grid-wrap { margin: 10px 0 0; } } /* Useful when Design Settings are not enabled. */ /* .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-style-1.wcf-after-order .wcf-content-container, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-style-1.wcf-after-payment .wcf-content-container { border: 1px solid #ddd; } */ /* Order Bump Skin loader & Product Options loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .blockUI.blockOverlay, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay { background: #fff !important; opacity: 0 !important; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay { opacity: 1 !important; border: 1px solid #d6d7db !important; border-radius: 4px !important; } /* .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap.wcf-loading { border: none !important; } */ /* Order Bump Loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap .blockUI.blockOverlay::before { background: url( "../images/order-bump-skeleton.svg" ) right top; width: 100%; height: 100%; position: absolute; content: ""; top: 0; right: 0; animation: none; z-index: 2; margin: 0; transform: scale( 0.92 ); } /* Few adjestment regarding the order bump loaders */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-3 .blockUI.blockOverlay::before, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-4 .blockUI.blockOverlay::before { top: -10px; } /* Few adjestment regarding the order bump loaders */ /* Order Bump Loader */ /* Product Options loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before { background: none; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before { background-repeat: no-repeat; top: 0; right: 0; animation: none; height: 100%; width: 100%; margin: 0; } /* Product Options loader */ /* Order Bump Skin loader & Product Options loader */ /** * **************************** * Modern Checkout Layout Style * **************************** */ /* Instant Checkout PRO Styles*/ /* Instant Checkout Product Options */ .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap .wcf-qty-options { padding: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { padding: 15px; border: 1px solid var( --wcf-field-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { padding: 15px; border-bottom: 1px solid var( --wcf-field-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:last-child { border-bottom: 0 !important; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap:not( .wcf-yp-skin-cards ) .wcf-qty-options { border: 1px solid var( --wcf-ic-section-border-color ); background-color: var( --wcf-payment-section-bg-color ); border-radius: 5px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row:has( input[type="radio"]:checked ) { border: 1px solid var( --wcf-primary-color ); background-color: color-mix( in sRGB, var( --wcf-primary-color ) 10%, transparent ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options:has( input[type="radio"]:checked ) .wcf-highlight { margin-top: 0; background-color: #fff; position: relative; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight:has( input[type="radio"]:checked )::before { content: ""; width: 100%; position: absolute; height: 100%; background-color: color-mix( in sRGB, var( --wcf-primary-color ) 10%, transparent ); right: 0; border-radius: 4px; } /* Instant Checkout Product Options */ .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-bump-order-wrap.wcf-after-customer { margin-bottom: 2px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-all-bump-order-wrap.wcf-before-checkout { margin-top: 0; } /* Instant Checkout PRO Styles*/ assets/css/checkout-styles.css000064400000274714147600244370012524 0ustar00/* * ***************************** * CSS vars for PRoduct options * ***************************** */ body .wcf-pre-checkout-offer-wrapper { --wcf-primary-color: #f16334; } :root { --wcf-yp-text-color: #404040; /* Used. */ --wcf-yp-bg-color: #f3f3f3; /* Used. */ --wcf-yp-border-color: #ccc; /* Used */ --wcf-yp-hl-text-color: var( --wcf-yp-text-color ); /* Used */ --wcf-yp-hl-bg-color: #fff; /* Used */ --wcf-yp-hl-border-color: var( --wcf-yp-border-color ); /* Used */ --wcf-yp-hl-flag-text-color: #fff; /* Used */ --wcf-yp-hl-flag-bg-color: var( --wcf-primary-color ); /* Used */ } .wcf-embed-checkout-form-modern-checkout { --wcf-yp-text-color: #555; --wcf-yp-bg-color: #fff; --wcf-yp-box-border-color: #d6d7db; --wcf-yp-hl-text-color: var( --wcf-yp-text-color ); } .wcf-embed-checkout-form-instant-checkout { --wcf-yp-hl-flag-bg-color: var( --wcf-primary-color ); /* Used */ } /** * ******************** * Basic ( Move this css to checkout template file ) * ******************** */ .wcf-embed-checkout-form #payment div.payment_box .woocommerce-SavedPaymentMethods { padding: 0; margin-top: 10px; } /* checkout */ /** * ************************ * Two Step Checkout Start * ************************ */ .wcf-embed-checkout-form-two-step { width: 100%; margin: 0 auto; } .wcf-embed-checkout-form-two-step .woocommerce { border-top: none; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; border-width: 2px; border-color: #ddd; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; padding: 10px 25px 25px; overflow: hidden; background-color: #fff; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav { border-left-style: solid; border-right-style: solid; border-width: 2px; border-top-style: solid; border-color: #ddd; border-top-left-radius: 3px; border-top-right-radius: 3px; display: block; width: 100%; margin: 0 auto; padding-bottom: 0; /*min-width: 800px;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note { border: 1px dashed; border-color: #f16334; margin-bottom: 20px; padding: 10px 15px; border-radius: 3px; color: #fff; background-color: #f16334; position: relative; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before { content: ""; border: 10px solid; border-top-color: #f16334; position: absolute; width: 20px; height: 20px; bottom: -20px; left: auto; top: auto; border-left: 10px transparent solid; border-right: 10px transparent solid; border-bottom: 10px transparent solid; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns { display: inline-block; width: 100%; } .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button { border-color: var( --wcf-btn-bg-color ); background-color: var( --wcf-btn-bg-color ); font-family: inherit; font-weight: inherit; letter-spacing: 0.5px; width: 100%; padding: 15px 25px; font-size: 16px; line-height: 1.5; border-radius: 3px; color: var( --wcf-btn-text-color ); text-transform: none; text-align: center; display: block; /* Added to fix the two steps visibility with thrive builder*/ } .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover { background-color: var( --wcf-btn-bg-hover-color ); border-color: var( --wcf-btn-bg-hover-color ); color: var( --wcf-btn-hover-text-color ); } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text { display: inline-block; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-next-button-icon-wrap, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button-content { display: block; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text { font-size: 1.15em; font-weight: 700; display: inline-block; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text { font-size: 0.9em; font-weight: 400; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt { margin-right: 5px; display: inline-block; font-weight: 700; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note p { margin: 0; } .wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps { background-color: #f4f4f4; -js-display: flex; display: flex; list-style: none; margin-left: 0; margin-bottom: 0; padding: 0; width: 100%; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps { flex: 1; width: 100%; text-align: left; vertical-align: middle; position: relative; /*border-top-right-radius: 5px; border-top-left-radius: 5px;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a { align-items: center; -js-display: flex; display: flex; padding: 15px; width: 100%; /*overflow: hidden;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-heading { /*float: left;*/ display: inline-block; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number { display: inline-block; font-weight: 700; font-size: 25px; line-height: 1.5; /*float: left;*/ margin-right: 10px; vertical-align: middle; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name { font-weight: 600; /*text-transform: uppercase;*/ font-size: 14px; line-height: 1.5; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name { font-size: 13px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one { /*border-top: 3px solid #F4F4F4;*/ opacity: 1; /*border-top: 2px solid; border-color: #d4d4d4;*/ } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-two { /*border-top: 2px solid; border-color: #d4d4d4;*/ opacity: 1; /*float: right;*/ /*border-bottom: 1px solid #d7d8d7;*/ } .wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-one.wcf-current::before { left: 0; top: 0; width: 100%; border-top-left-radius: 0; } .wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-two.wcf-current::before { right: 0; top: 0; width: 100%; border-top-right-radius: 0; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current::before { content: ""; background-color: #f16334; border-top-left-radius: 3px; width: calc( 100% + 2px ); height: 2px; position: absolute; left: -2px; top: -2px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current::before { content: ""; background-color: #f16334; border-top-right-radius: 3px; width: calc( 100% + 2px ); height: 2px; position: absolute; right: -2px; top: -2px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current { background-color: #fff; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name { color: var( --wcf-heading-color ); } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a { text-decoration: none; color: #444; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current a { text-decoration: none; color: #444; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active { color: #444; border: none; outline: none; } .wcf-embed-checkout-form-two-step .woocommerce-checkout { display: block; width: 100%; /*overflow: hidden;*/ } .wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set, .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap, .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap, .wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper { display: block; width: 100%; float: none; padding: 0; border-radius: 0; margin-top: 10px; margin-bottom: 20px; } .wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper { margin-top: 0; margin-bottom: 30px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .col-1 { margin-top: 10px; } .wcf-embed-checkout-form-two-step .woocommerce-additional-fields > h3, .wcf-embed-checkout-form-two-step .woocommerce-billing-fields > h3, .wcf-embed-checkout-form-two-step #order_review_heading, .wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { display: none; } .wcf-embed-checkout-form-two-step .woocommerce #ship-to-different-address { font-size: 15px; margin-bottom: 10px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { display: none; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap { display: none; margin-top: 10px; margin-bottom: 0; float: none; width: 100%; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment { display: block; } .wcf-embed-checkout-form-two-step table.shop_table #shipping_method { min-width: 130px; display: inline-block; } .wcf-embed-checkout-form-two-step #order_review { padding: 0; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row { padding: 0.5em 0 0; } .wcf-embed-checkout-form-two-step table.shop_table thead tr th:nth-child( 2 ), .wcf-embed-checkout-form-two-step table.shop_table tbody tr td:nth-child( 2 ), .wcf-embed-checkout-form-two-step table.shop_table tfoot tr td:nth-child( 2 ) { text-align: right; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap.mt20 { margin-top: 0 !important; } /* Product Variations Start */ .wcf-embed-checkout-form-two-step .woocommerce-checkout #your_products_heading { margin: 20px 0 0; padding: 3px 3px 20px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-item { width: 60%; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price, .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty { width: 20%; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 50px; } .wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options { padding: 15px; } .wcf-embed-checkout-form-two-step .wcf-bump-order-style-1.wcf-after-customer, .wcf-embed-checkout-form-two-step .wcf-bump-order-style-2.wcf-after-customer, .wcf-embed-checkout-form-two-step .wcf-bump-order-style-3.wcf-after-customer { margin: 0 auto 1em; } /* Two Step checkout Hide/Show CSS */ .wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-checkout-fields-wrapper, .wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-product-option-before-customer, .wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-order-wrap { display: block; } .wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-checkout-fields-wrapper, .wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-product-option-before-customer, .wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-order-wrap { display: none; } /* Two Step checkout Hide/Show CSS */ /* Product variations End */ /* Bump Order Compatibility Starts */ .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row label.checkbox { margin-bottom: 0; } /* Bump Order Compatibility Ends*/ .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment div.payment_box { font-size: 0.8em; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment ul.payment_methods { background-color: #f7f7f7; padding: 15px; } /* Thrive Builder Compatibility for two step */ #tve_editor ol, #tve_editor ul { margin: 0; } /* Thrive Builder Compatibility for two step */ /** * ************************ * Two Step Checkout End * ************************ */ /** * **************************************** * Mobile css for two step navigation Start * **************************************** */ @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav { width: 100%; min-width: 100%; margin: 0 auto; padding-bottom: 0; } .wcf-embed-checkout-form .woocommerce-checkout .col2-set { margin: 10px 0 0; } .wcf-embed-checkout-form-two-step .woocommerce .woocommerce-info, .wcf-embed-checkout-form-two-step .woocommerce .woocommerce-notices-wrapper .woocommerce-message, .wcf-embed-checkout-form-two-step .woocommerce .woocommerce-NoticeGroup .woocommerce-message { padding: 1em 1em 1em 1.5em; margin: 0; } .wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-1, .wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-1, .wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-2, .wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-2, .wcf-embed-checkout-form-two-step .woocommerce .wcf-order-wrap, .wcf-embed-checkout-form-two-step .woocommerce-page .wcf-order-wrap { padding: 0; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading { margin: 0; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps > li::before { content: ""; position: relative; background: #f16334; display: block; width: 42%; height: 2px; top: 15px; left: 0; z-index: 1; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps > li::after { content: ""; position: relative; background: #f16334; display: block; width: 51%; height: 2px; top: -36px; left: 52%; z-index: 1; } .wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-33, .wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-50, .wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-100, .wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-33, .wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-50, .wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-100 { width: 100%; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps { padding: 7px 3px 7px 10px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a { padding: 10px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number { font-size: 20px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name, .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name { font-size: 12px; } .wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button { padding: 15px; } .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text { font-size: 1em; } .wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row, .wcf-embed-checkout-form-two-step .woocommercet #payment .form-row { padding: 0.5em 0 0; } .wcf-embed-checkout-form-two-step .woocommerce #payment #place_order { margin-bottom: 0; } .wcf-embed-checkout-form .woocommerce form .wcf-column-33, .wcf-embed-checkout-form .woocommerce form .wcf-column-50, .wcf-embed-checkout-form .woocommerce form .wcf-column-100 { width: 100%; } } /** * *************************************** * Mobile css for two step navigation end * *************************************** */ /* Order Bump */ .wcf-embed-checkout-form .woocommerce form .wcf-all-bump-order-wrap:empty { margin: 0; } .wcf-bump-order-wrap { display: block; float: none; margin: 0 0 1.2em; overflow: hidden; word-break: break-word; white-space: normal; } .wcf-bump-order-wrap .wcf-bump-order-field-wrap .wcf-pointing-arrow { margin-right: 0; vertical-align: middle; transform: scaleX( 1 ); } .wcf-bump-order-wrap del { font-weight: 400; color: #7a7a7a; font-size: 16px; } .wcf-bump-order-wrap span.wcf-discount-price, .wcf-bump-order-wrap span.wcf-normal-price { font-weight: 600; color: #444; } /* Image width CSS */ .wcf-bump-order-wrap.wcf-ob-column-50 .wcf-bump-order-offer-content-left { max-width: 30%; } .wcf-bump-order-wrap.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 15%; } /* Before customer Start */ .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-offer-content-left { max-width: 25%; } /* Before customer End */ /* After customer Start*/ .wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 25%; } .wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-50 .wcf-bump-order-offer-content-left { max-width: 40%; } /* After customer End */ /* After order Start*/ .wcf-bump-order-wrap.wcf-after-order.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 30%; } /* After order End*/ /* After payment Start*/ .wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-100 .wcf-bump-order-offer-content-left { max-width: 30%; } .wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-50 .wcf-bump-order-offer-content-left { max-width: 40%; } /* After payment End*/ /* Image width CSS */ @keyframes wcf-blinker { 0% { visibility: hidden; } 40% { visibility: hidden; } } .wcf-blink { animation: wcf-blinker 0.8s linear infinite; animation-direction: alternate; } .wcf-bump-order-wrap .wcf-bump-order-desc p { margin: 0 0 0.6em; padding: 0; } .wcf-bump-order-wrap .wcf-bump-order-desc p:last-child { margin: 0; padding: 0; } .wcf-bump-order-wrap .wcf-bump-order-desc ul, .wcf-bump-order-wrap .wcf-bump-order-desc li { margin: 0; padding: 0; list-style-position: inside; } .wcf-bump-order-wrap .wcf-bump-order-desc ol { margin: 0; padding: 0; } .wcf-bump-order-wrap h1, .wcf-bump-order-wrap h2, .wcf-bump-order-wrap h3, .wcf-bump-order-wrap h4, .wcf-bump-order-wrap h5, .wcf-bump-order-wrap h6 { margin: 0; padding: 0; font-weight: 500; line-height: 1.3em; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce form #payment .wcf-bump-order-wrap .wcf-bump-order-field-wrap label, .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label { margin: 0 !important; vertical-align: middle; font-size: 1em; line-height: 1.3em; letter-spacing: 0; font-family: inherit; font-weight: inherit; text-transform: none; } /** * *************************** * Radio Buttons & checkbox * *************************** */ .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"] { border-radius: 50%; margin-right: 4px; line-height: 10px; } .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before { content: "\e600"; margin: 0; /* color: #f16334; */ } .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"]:checked::before { background-color: #f16334; border-radius: 50px; content: "\2022"; font-size: 24px; height: 6px; line-height: 16px; margin: 4px; text-indent: -9999px; width: 6px; } .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"], .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"], .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"], .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"], .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"] { border: 1px solid #b4b9be; background: #fff; color: #555; clear: none; cursor: pointer; display: inline-block; line-height: 0; height: 16px; margin: -4px 4px 0 0; outline: 0; padding: 0 !important; text-align: center; vertical-align: middle; width: 16px; min-width: 16px; -webkit-appearance: none; box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.1 ); transition: 0.05s border-color ease-in-out; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-selection-wrap { -js-display: flex; display: flex; padding: 5px 0; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-change-icon { border: 1px solid #dcdada; height: 30px; width: 26px; margin: 0; padding: 6px 6px; color: #555; text-align: center; font-weight: 500; cursor: pointer; font-size: 13px; margin-bottom: 0; -js-display: flex; display: flex; justify-content: center; align-items: center; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-decrement { border-radius: 3px 0 0 3px; border-right: 0; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-increment { border-radius: 0 3px 3px 0; border-left: 0; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater { width: 40px; min-width: 40px; min-height: 30px; padding: 2px 5px; color: #666; margin: 0; text-align: center; border: 1px solid #dcdada; border-left: 0; border-right: 0; border-radius: 0; -webkit-appearance: textfield; appearance: textfield; outline: none; line-height: 1; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:focus, .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:active, .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:hover { outline: none; } .wcf-order-bump-quantity-updater::-webkit-inner-spin-button, .wcf-order-bump-quantity-updater::-webkit-outer-spin-button { -webkit-appearance: none; } .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:focus, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="radio"]:focus, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="radio"]:not( :checked ):focus { border-color: #f16334; /* box-shadow: 0 0 2px rgba( 241, 99, 52, 0.8 ); */ } .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::before, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type="radio"]:checked::before { display: inline-block; float: left; font: normal normal 400 15px/1 cartflows-icon; speak: none; vertical-align: middle; width: 6px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type="checkbox"]:not( :checked )::after, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:not( :checked )::after { opacity: 0; transform: scale( 0 ); } .wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type="checkbox"]:checked::after, .wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::after { opacity: 1; transform: scale( 1 ); } /* * *********************** * Bump Order Style Three Start * *********************** */ .wcf-bump-order-style-3 { border-width: 1px; border-style: dashed; border-color: #e5e7eb; background: #fff; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); border-radius: 4px; display: inline-block; padding: 20px; width: 100%; overflow: unset; position: relative; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap { -js-display: flex; display: flex; align-items: center; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { align-self: center; max-width: 60px; text-align: center; width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"] { height: 20px; width: 20px; margin: 0 15px 0 0; border-radius: 3px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"]:checked::before, .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"]:checked::before { font: normal normal 400 16px/1 cartflows-icon; width: 20px; top: 1px; position: relative; left: 0; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { max-width: 25%; margin-right: 10px; align-self: center; width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img { width: 100%; vertical-align: middle; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label { -js-display: flex; display: flex; font-size: 18px; color: #1a1e23; font-weight: 600; } /* .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap label input { margin: 0 20px; } */ .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { align-self: center; margin-left: 10px; max-width: 100%; width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-desc { /* font-size: 13px; */ margin-top: 10px; } .wcf-bump-order-style-3 .wcf-content-container { padding: 25px 0; } .wcf-embed-checkout-form .woocommerce #payment #place_order::before { display: inline-block; } /* Mobile CSS for Style 3 */ @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-3 .wcf-bump-order-info { display: block; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { max-width: 100%; margin: 0 0 10px 0; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { max-width: 65px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"] { margin: 0 10px 0 0; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { flex: 5; } } /* Mobile CSS for Style 3 */ /* Style 3 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { display: block; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-action, .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-info, .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text, .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-label { display: block; text-align: center; width: 100%; max-width: 100%; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text { margin: 15px 0 0; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-image { margin: 0 auto; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-label { display: block; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text { margin: 0 10px 0 0; text-align: right; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow { transform: rotate( 180deg ); } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image { /* margin-right: 0; */ margin-left: 7px; } .wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action input[type="checkbox"] { margin: 0 5px 0 0; } /* ***** Right ***** */ /* Style 3 image layout CSS */ /* * *********************** * Bump Order Style Three End * *********************** */ /* * **************************** * Bump Order Style Four Start * **************************** */ .wcf-bump-order-style-4 { border-width: 1px; border-style: solid; border-color: #e5e7eb; background: #fff; border-radius: 4px; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); display: inline-block; padding: 20px; position: relative; width: 100%; overflow: unset; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap { -js-display: flex; display: flex; /* justify-content: space-between; */ align-items: center; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { text-align: center; -js-display: flex; display: flex; justify-content: center; width: auto; white-space: nowrap; margin-left: 15px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button { margin: 0; border-width: 1px; border-color: #ccc; border-style: none; color: #333; padding: 8px 20px; border-radius: 3px; text-decoration: none; text-transform: none; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button:hover { /*background-color: #f9f9f9;*/ cursor: pointer; } .wcf-bump-order-style-4.wcf-after-order .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button { padding: 8px 12px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button span { background-color: #333; padding: 0 5px; border-radius: 50px; color: #fff; margin: 0 8px 0 0; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"] { display: none !important; /*height: 25px; width: 25px; margin: 0 15px 0 0; border-radius: 3px;*/ } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"]:checked::before { font: normal normal 400 20px/1 cartflows-icon; width: 20px; top: 2px; position: relative; left: 2px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { -webkit-box-flex: 0; -moz-box-flex: 0; max-width: 25%; width: 100%; margin-right: 15px; align-self: center; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img { /*height: 80px; width: 80px;*/ width: 100%; vertical-align: middle; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label { color: #1a1e23; font-size: 18px; margin-bottom: 5px; font-weight: 600; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap label input { /*margin: 0 20px;*/ } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { align-items: center; width: 100%; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-info { flex: 0 0 calc( 100% - 100px ); -webkit-flex: 0 0 -webkit-calc( 100% - 115px ); } /* .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-desc { font-size: 13px; } */ .wcf-bump-order-style-4 .wcf-bump-order-offer { font-size: 18px; color: #f06434; } .wcf-bump-order-style-4 .wcf-content-container { padding: 25px 0; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button .wcf-processing { opacity: 0.7; background: #fff; pointer-events: none; } /* Mobile CSS for Style 3 */ @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action { margin: 15px 0 0 0; text-align: left; display: block; line-height: 2; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image { flex: 0 0 80px; -webkit-flex: 0 0 80px; } .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap, .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text { display: block; } } /* Mobile CSS for Style 3 */ /* Style 4 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { display: block; text-align: center; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-image { margin: 0 auto; max-width: 30%; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-action { text-align: center; margin: 10px 0 0 0; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-text { margin: 15px 0; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap { text-align: right; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action { min-width: 80px; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text { margin: 0 15px; } .wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image { margin: 0; } /* ***** Right ***** */ /* Style 4 image layout CSS */ /* * **************************** * Bump Order Style Four End * **************************** */ /* * **************************** * Bump Order Style Five Start * **************************** */ .wcf-bump-order-style-5 { background: #fff; border-width: 1px; border-style: solid; border-color: #e5e7eb; border-radius: 4px; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); display: inline-block; padding: 20px; position: relative; width: 100%; overflow: unset; } .wcf-bump-order-style-5 .wcf-bump-order-field-wrap { -js-display: flex; display: flex; align-items: center; } .wcf-bump-order-style-5 .wcf-bump-order-label, .wcf-bump-order-style-5 .wcf-bump-order-desc { margin: 0 0 15px 0; } /* Addded to normalize the font weight from parent classes. */ .wcf-bump-order-style-5 .wcf-bump-order-desc { font-weight: 400; } /* Addded to normalize the font weight from parent classes. */ .wcf-bump-order-style-5 .wcf-bump-order-action { -js-display: flex; display: flex; line-height: 1.2; padding: 5px 0; width: -moz-fit-content; width: fit-content; vertical-align: middle; } .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"] { height: 20px; width: 20px; margin: 0 10px 0 0 !important; border-radius: 3px; } .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"]:checked::before { font: normal normal 400 16px/1 cartflows-icon; width: 20px; top: 1px; position: relative; left: 0; } .wcf-bump-order-style-5 .wcf-bump-order-label { font-weight: 600; color: #1a1e23; font-size: 18px; line-height: 1; } .wcf-bump-order-style-5 .wcf-bump-order-info { -js-display: flex; display: flex; align-items: center; } /* Style 5 position related CSS */ /* Position: top */ .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-top { display: block; text-align: center; width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-image { margin: 0 0 15px 0; display: inline-block; text-align: center; max-width: 30%; } .wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-action { -js-display: inline-flex; display: inline-flex; } /* Position: top */ /* Position: right */ .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image { margin: 0 0 0 15px; } .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-text { text-align: right; } .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-action { -js-display: inline-flex; display: inline-flex; } /* Position: right */ /* Style 5 position related CSS */ .wcf-bump-order-style-5 .wcf-bump-order-image { max-width: 30%; margin: 0 15px 0 0; width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-text { width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-image img { width: 100%; } .wcf-bump-order-style-5 .wcf-bump-order-cb-button { margin: 0; border: 1px solid #ccc; color: #333; padding: 8px 20px; border-radius: 3px; text-decoration: none; text-transform: none; } .wcf-bump-order-style-5 .wcf-processing { opacity: 0.7; background: #fff; pointer-events: none; } .wcf-bump-order-style-5 .wcf-bump-remove-from-cart:hover { color: #fff; background: #e43b2c; } .wcf-bump-order-style-5 .wcf-bump-order-cb-button:hover { /*background-color: #f9f9f9;*/ cursor: pointer; } .wcf-bump-order-style-5 .wcf-bump-order-action.wcf-ob-action-button { border: none; padding: 0; line-height: unset; } .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action.wcf-ob-action-button input[type="checkbox"] { display: none !important; } /* Mobile CSS for Style 5 */ @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-info { display: block; } .wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-image { max-width: 100%; margin: 0 0 15px 0; } .wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image { margin: 15px 0 0; } } /* Mobile CSS for Style 5 */ /* * **************************** * Bump Order Style Five End * **************************** */ /* * *********************** * Bump Order Style Two Start * *********************** */ .wcf-bump-order-style-2 { background: #fff; border: 1px #e5e7eb dashed; border-radius: 4px; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); } .wcf-bump-order-style-2 .wcf-content-container { -js-display: flex; display: flex; } .wcf-bump-order-style-2 .wcf-bump-order-offer { padding: 20px 25px; font-size: 1.1em; color: #1a1e23; font-weight: 600; } .wcf-bump-order-style-2 .wcf-bump-order-offer-content-right { width: 100%; } .wcf-bump-order-style-2 .wcf-bump-order-desc { padding: 0 25px 20px; } .wcf-bump-order-style-2 .wcf-bump-order-field-wrap { background-color: #f7fafc; border-top: 1px #e5e7eb solid; padding: 15px 25px; margin: 0; font-size: 1.1em; display: block; } .wcf-bump-order-style-2 .wcf-bump-order-field-wrap, .wcf-bump-order-style-2 .wcf-bump-order-field-wrap * { cursor: pointer; } .wcf-bump-order-style-2 .wcf-bump-order-field-wrap .wcf-bump-order-label { margin-left: 1px; } /* When there is image */ .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left, .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { align-self: center; } .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left img { padding: 0 0 15px 20px; } .wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left { width: auto; } .wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 85%; } .wcf-show-coupon-field-toggle { padding-top: 1em; } @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-2 .wcf-content-container { display: block; } .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right, .wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 100%; } } /* Style 2 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container { display: block; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { text-align: center; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right { display: block; width: 100%; margin: 0 auto; text-align: center; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left { max-width: 40%; padding: 0 20px; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img { padding: 0 0 20px 0; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap { text-align: right; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right, .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left { align-self: center; text-align: right; } .wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img { padding: 0 20px 20px 0; } /* ***** Right ***** */ /* Style 2 image layout CSS */ /* * *********************** * Bump Order Style Two End * *********************** */ /* * ************************* * Bump Order Style One Start * ************************* */ .wcf-bump-order-style-1 { background: #fff; border-style: solid; border-width: 1px; border-color: #e5e7eb; border-radius: 4px; display: inline-block; box-shadow: 0 4px 16px -8px rgba( 0, 0, 0, 0.16 ); } .wcf-bump-order-style-1 .wcf-bump-order-offer { padding: 0 25px 10px; color: #1a1e23; font-size: 18px; font-weight: 600; } .wcf-bump-order-style-1 .wcf-content-container { padding: 25px 0; -js-display: flex; display: flex; } .wcf-bump-order-style-1 .wcf-bump-order-offer-content-right { width: 100%; } .wcf-bump-order-style-1 .wcf-bump-order-desc { padding: 0 25px; } .wcf-bump-order-style-1 .wcf-bump-order-field-wrap { border-bottom-style: solid; border-width: 1px; border-color: #e5e7eb; padding: 20px 25px; margin: 0; font-size: 1.1em; display: block; background: #f7fafc; } .wcf-bump-order-style-1 .wcf-bump-order-field-wrap label { cursor: pointer; } .wcf-embed-checkout-form .woocommerce #payment .wcf-bump-order-wrap input[type="checkbox"] { margin: 0 4px 0 0; } .wcf-bump-order-style-1 .wcf-bump-order-field-wrap .wcf-bump-order-label { margin-left: 1px; } /* When there is image */ .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left, .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { align-self: center; } .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left img { padding: 0 0 0 20px; } /* Style 1 image layout CSS */ /* ***** Top ***** */ .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container { display: block; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap { text-align: center; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left, .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right { display: block; width: 100%; margin: 0 auto; text-align: center; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left { max-width: 38%; padding: 0 20px; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img { padding: 0 0 20px 0; } /* ***** Top ***** */ /* ***** Right ***** */ .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap { text-align: right; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right { /* display: inline-block; width: 60%; */ align-self: center; text-align: right; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left { align-self: center; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow { transform: rotate( 180deg ); margin-top: -5px; } .wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img { padding: 0 20px 0 0; } /* ***** Right ***** */ /* Style 1 image layout CSS */ /* * ************************* * Bump Order Style One End * ************************* */ /* * ****************************** * Bump Order style position CSS * ****************************** */ /* .wcf-embed-checkout-form-one-column .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 85%; } */ @media only screen and ( max-width: 520px ) { .wcf-embed-checkout-form-two-column .wcf-bump-order-style-1.wcf-after-customer, .wcf-embed-checkout-form-two-column .wcf-bump-order-style-2.wcf-after-customer, .wcf-embed-checkout-form-two-column .wcf-bump-order-style-3.wcf-after-customer, .wcf-embed-checkout-form-two-column .wcf-bump-order-style-4.wcf-after-customer { width: 100%; } .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right, .wcf-embed-checkout-form-one-column .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left + .wcf-bump-order-offer-content-right { width: 100%; } } @media only screen and ( max-width: 520px ) { .wcf-bump-order-style-1 .wcf-content-container, .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap { display: block; } .wcf-bump-order-wrap .wcf-bump-order-offer-content-left { width: 100%; } .wcf-bump-order-wrap .wcf-bump-order-offer-content-left img { width: 100%; padding: 25px; } .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type="checkbox"], .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"], #order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type="checkbox"] { height: 20px; width: 20px; margin: 0 15px 15px 0; border-radius: 3px; } } /* * ****************************** * Bump Order style position CSS * ****************************** */ /******************************************** * Product options variation CSS ********************************************/ /* Div & Rows*/ .wcf-product-option-wrap { padding: 3px; } .wcf-product-option-wrap h3 { font-family: inherit; font-weight: 600; font-size: 20px; margin: 0 0 25px 0; padding: 3px; } .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row { position: relative; } .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 5px 0 0 0; } .wcf-product-option-wrap input[type="number"]:focus { outline: none; } .wcf-qty-options .wcf-item-selector { display: inline-block; margin-right: 8px; } .wcf-qty-options .wcf-item-all-text { display: inline-block; vertical-align: middle; } .wcf-qty-options .wcf-item-image { width: 55px; /* height: 45px; */ -js-display: inline-flex; display: inline-flex; margin-right: 10px; } .wcf-qty-options .wcf-item-wrap { font-size: 1em; font-weight: 600; line-height: 1.5; } .wcf-qty-options .wcf-display-attributes, .wcf-qty-options .wcf-display-subscription-details { font-size: 0.75em; font-weight: 400; font-style: italic; opacity: 0.65; } .wcf-display-attributes .wcf-att-inner { margin-right: 5px; } .wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep { display: none; } /* Hide Quantity */ .wcf-qty-hidden.wcf-qty { visibility: hidden; pointer-events: none; opacity: 0; } /** ************************* * Highlight Option ************************* */ .wcf-qty-options .wcf-item-wrap { line-height: 1.8; } .wcf-qty-options ins { background: none; } .wcf-qty-options .wcf-price del .woocommerce-Price-amount { font-size: inherit; opacity: 0.45; color: inherit; } .wcf-qty-options .wcf-price ins .woocommerce-Price-amount { margin-left: 4px; } .wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt { vertical-align: middle; } /** * ************************ * Checkout layout specific css * ************************ */ .wcf-embed-checkout-form-one-column .wcf-product-option-wrap { clear: left; margin: 15px 0; width: 100%; } .wcf-embed-checkout-form-two-column .wcf-product-option-wrap { margin: 15px 0; width: 55%; float: left; padding-right: 40px; } .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer, .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order, .wcf-embed-checkout-form-two-column .wcf-order-wrap .wcf-product-option-wrap.wcf-product-option-before-order { width: 100%; padding: 0; } /************************************ * Product options Classic Style ************************************/ .wcf-yp-skin-classic .wcf-qty-options { border: none; /*border-bottom: 0;*/ background-color: var( --wcf-yp-bg-color ); border-radius: 4px; border-collapse: collapse; font-family: inherit; font-weight: inherit; font-size: 1em; margin: 0 0 0 0 !important; padding: 15px; text-align: left; width: 100%; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header { border-bottom: 1px dashed var( --wcf-yp-border-color ); } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label { font-weight: 600; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not( .wcf-highlight ):last-child, .wcf-embed-checkout-form .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not( .wcf-highlight ):last-child { border: none; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item, .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty, .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price { padding: 0; line-height: 1.4em; border: none; position: relative; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { color: var( --wcf-yp-text-color ); -js-display: flex; display: flex; justify-content: space-between; position: relative; padding: 10px 0; border-bottom: 1px solid var( --wcf-yp-border-color ); align-items: center; font-size: 0.95em; cursor: pointer; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item, .wcf-yp-skin-classic .wcf-qty-options .wcf-qty, .wcf-yp-skin-classic .wcf-qty-options .wcf-price { display: inline-block; vertical-align: middle; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item { -js-display: flex; display: flex; align-items: center; width: 70%; flex: 4; margin-right: 10px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext { font-size: 0.95em; line-height: 1.5; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap + .wcf-item-subtext { margin-top: 5px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty { -js-display: flex; display: flex; width: 20%; text-align: center; align-items: center; justify-content: center; flex: 1; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 40px; min-width: 40px; min-height: 30px; padding: 2px 5px; color: #666; margin: 0; text-align: center; border: 1px solid #dcdada; border-left: 0; border-right: 0; border-radius: 0; -webkit-appearance: textfield; appearance: textfield; line-height: 1; } .wcf-yp-skin-classic .wcf-qty-options .wcf-price { -js-display: flex; display: flex; align-items: center; width: 10%; text-align: right; justify-content: flex-end; flex: 1; margin-left: 10px; font-size: 0.95em; font-weight: 400; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { background-color: var( --wcf-yp-hl-bg-color ); border: 1px solid var( --wcf-yp-hl-border-color ); color: var( --wcf-yp-hl-text-color ); font-weight: 500; padding: 18px 28px; margin: -1px -28px 0; font-size: 0.95em; border-radius: 4px; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); } .wcf-yp-skin-classic .wcf-qty-table-titles + .wcf-highlight { margin-top: 15px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight + .wcf-highlight { margin-top: 25px; } .wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head { position: absolute; top: -10px; right: -10px; background: var( --wcf-yp-hl-flag-bg-color ); color: var( --wcf-yp-hl-flag-text-color ); border-radius: 3px; padding: 3px 9px; font-size: 0.75em; font-weight: 400; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap { font-size: 0.95em; font-weight: 600; } .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext { opacity: 0.75; } .wcf-yp-skin-classic .wcf-qty-options .wcf-item-image { margin-right: 15px; } /* Layout and position specific classic css */ .wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { padding: 18px; margin-left: -20px; margin-right: -20px; } /*********************************************** * Product options classic Style skeleton loader ***********************************************/ /* Classic Style loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row.wcf-qty-table-titles::before, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before { content: ""; position: absolute; background: url( "../images/product-options-classic-loader.svg" ) 15px 15px, #fff; background-repeat: no-repeat; width: 100%; height: 100%; z-index: 1; left: 0; top: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before { background-color: #f9f9f9; } /* Classic Style loader */ /* Card Loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::after { content: ""; position: absolute; width: 100%; height: 100%; background-color: #f7f7f7; border-radius: 0.35em; top: 0; left: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::before { content: ""; position: absolute; background: url( "../images/product-options-card-loader.svg" ) center center; background-repeat: no-repeat; transform: scale( 0.92 ); width: 100%; height: 100%; z-index: 1; left: -5px; top: 0; } /* Card Loader */ /****************************** * Product options Cards Style ******************************/ .wcf-yp-skin-cards .wcf-qty-options { -js-display: flex; display: flex; flex-wrap: wrap; margin: 0 -10px; font-size: 1em; width: calc( 100% + 20px ); } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { background-color: #f7f7f7; border: 1px solid #b0b0b0; padding: 20px 30px; margin: 0 10px 22px; border-radius: 0.35em; width: calc( 50% - 20px ); font-size: 1em; font-weight: 600; cursor: pointer; position: relative; } .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight { background-color: #fff; box-shadow: 0 5px 10px -5px rgba( 150, 150, 150, 0.5 ); overflow: hidden; } .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price { font-size: 1.08em; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options { margin: 0 0 3px; } .wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head { position: absolute; width: 12em; top: 1.8em; right: -3em; background: #f16334; color: #fff; padding: 0.22em 0; text-align: center; font-size: 0.8em; font-weight: 700; transform: rotate( 45deg ); -webkit-transform: rotate( 45deg ); } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item { -js-display: flex; display: flex; align-items: flex-start; } .wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector, .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-top: 5px; position: relative; } .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image { margin-right: 15px; width: 80px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options { margin: 0 0 5px 0; width: 100%; position: relative; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 1.07em; font-weight: 600; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap { margin-bottom: 5px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext { font-size: inherit; font-weight: 400; opacity: 0.75; margin-bottom: 15px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input { max-width: 50px; text-align: center; min-height: 30px; padding: 2px; margin: 0; border: none; border-radius: 0; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input { border: 1px solid #dcdada; border-left: 0; border-right: 0; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty { max-width: 100px; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-wrap { -js-display: flex; display: flex; /* width: 100%; */ } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn { line-height: 1; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn.max-quantity-reached { color: #dcdada; cursor: not-allowed; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon { border: 1px solid #dcdada; height: 30px; width: 26px; margin: 0; padding: 6px 6px; color: #555; text-align: center; font-weight: 500; cursor: pointer; font-size: 13px; margin-bottom: 0; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon:hover { background-color: #f7f7f7; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-decrement { border-radius: 3px 0 0 3px; border-right: 0; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-increment { border-radius: 0 3px 3px 0; border-left: 0; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type="number"]::-webkit-inner-spin-button, .wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { align-items: center; display: inline-block; margin-top: 0; margin-right: 10px; vertical-align: middle; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { margin-right: 0; } /* Hide Quantity */ .wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty { display: none !important; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { font-size: 0.95em; } /* Layou specific cards width */ .wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row, .wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row, .wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row { width: 100%; } @media ( max-width: 768px ) { .wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row, .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { width: 100%; padding: 15px 20px; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row:last-child { margin-bottom: 0; } .wcf-yp-skin-cards .wcf-qty-options .wcf-item { width: 100%; } .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty { width: 40%; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price { width: auto; vertical-align: middle; } .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext { font-size: 0.9em; } } /** * ************************ * Quick View modal popup * Variation in popup * ************************ */ #wcf-quick-view-content { font-family: Montserrat, sans-serif; } #wcf-quick-view-content .summary-content .product_title { display: inline-block; font-size: 2rem; font-family: inherit; font-weight: 400; width: 100%; margin: 0 0 0.5em 0; padding: 0 0 0; border: none; border-bottom: none; line-height: 1.3; } #wcf-quick-view-content .summary-content .woocommerce-product-rating { margin: 0 0 0.5em 0; } #wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating, #wcf-quick-view-content .summary-content .woocommerce-product-rating .comment-form-rating .stars a, #wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating::before { color: #f16334; } #wcf-quick-view-content .summary-content .price, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price { margin: 0 0 0.5em; font-family: inherit; font-weight: 400; } #wcf-quick-view-content .summary-content .wc-stripe-payment-request-wrapper { padding: 0; } #wcf-quick-view-content .summary-content .price del, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price del { opacity: 1; margin-right: 10px; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-detail { margin: 0; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-avail { display: none; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .stock.in-stock { font-size: 0.9em; } #wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p { font-size: 0.9em; line-height: 1.85714285714286; margin-top: 0; margin-bottom: 20px; } #wcf-quick-view-content .summary-content div.product { padding: 0; display: inline-block; vertical-align: middle; } #wcf-quick-view-content .summary-content form.cart { margin-bottom: 0; } #wcf-quick-view-content .summary-content .variations { border-bottom: 1px #ddd solid; padding-bottom: 1em; } #wcf-quick-view-content .summary-content .variations label { font-size: 13px; font-weight: 400; } #wcf-quick-view-content .summary-content .single_variation_wrap .single_variation { margin-bottom: 1em; } #wcf-quick-view-content .summary-content .single_variation_wrap .single_variation .woocommerce-variation-description { display: none; } #wcf-quick-view-content .variations_form .variations td { padding: 5px 0; } #wcf-quick-view-content .summary-content .variations td.label { padding-right: 0.4em; vertical-align: middle; } #wcf-quick-view-content .summary-content .variations select { background-color: #fff; background-image: none; border: 1px solid; border-color: #d4d4d4; border-radius: 0; box-shadow: inset 0 -1em 0.7em 0 rgba( 0, 0, 0, 0.01 ); color: #555; display: inline-block; font-family: inherit; font-weight: inherit; font-size: 14px; height: auto; line-height: 1.42857143 !important; min-height: 34px; outline: none; padding: 7px 12px; width: auto; -webkit-appearance: none; } #wcf-quick-view-content .summary-content a { color: #f16334; text-decoration: none; } #wcf-quick-view-content .summary-content .reset_variations { text-decoration: none; font-size: 11px; color: #b5b5b5; /*text-transform: uppercase;*/ letter-spacing: 0.5px; } #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-add-to-cart button { border: 1px solid; border-color: #f16334; background: #f16334; border-radius: 3px; color: #fff; font-family: inherit; font-weight: inherit; font-size: 16px; letter-spacing: 0.5px; line-height: 1; margin-top: 15px; padding: 10px 30px; width: auto; } @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form-one-column .wcf-product-option-wrap { padding: 0 18px; } .wcf-embed-checkout-form-two-column .wcf-product-option-wrap { width: 100%; float: none; padding: 0 10px; } } /* Quick View Modal */ .wcf-clear::before, .wcf-clear::after { content: " "; display: table; } .wcf-clear::after { clear: both; } html.wcf-quick-view-is-open, html.wcf-quick-view-is-open body, html.wcf-pre-checkout-offer-open, html.wcf-pre-checkout-offer-open body { overflow: hidden; } .wcf-quick-view-bg { position: fixed; visibility: hidden; overflow: hidden; background: #0b0b0b; opacity: 0; transition: opacity 0.25s; z-index: 1042; } .wcf-quick-view-loader { z-index: 1000; border: none; margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; cursor: none; position: absolute; } .wcf-quick-view-loader::before { content: ""; background: none !important; width: 48px; height: 48px; display: block; position: absolute; top: 50%; left: 50%; border: 3px solid #fff; margin: 0 auto; border-radius: 50%; border-left-color: transparent; border-right-color: transparent; animation: wcf-qv-spin 575ms infinite linear; } @keyframes wcf-qv-spin { 100% { transform: rotate( 360deg ); } } .wcf-loader-overlay { position: absolute; top: 0; left: 0; background: rgba( 255, 255, 255, 0.4 ); z-index: 2; content: ""; height: 100%; width: 100%; } .wcf-loader::before { border: 3px solid #333; border-left-color: transparent; border-right-color: transparent; } .wcf-loader { z-index: 3; } .wcf-quick-view-bg-ready { top: 0; left: 0; width: 100%; height: 100%; opacity: 0.6; visibility: visible; } #wcf-quick-view-modal { position: fixed; visibility: hidden; opacity: 0; top: 0; left: 0; width: 100%; height: 100%; z-index: 1400; text-align: center; transition: all 0.3s; overflow-x: hidden; overflow-y: auto; } #wcf-quick-view-modal.open { visibility: visible; opacity: 1; } #wcf-quick-view-modal .wcf-content-main-wrapper { text-align: center; position: absolute; width: 100%; height: 100%; left: 0; top: 0; padding: 30px; } #wcf-quick-view-modal .wcf-content-main-wrapper::before { content: ""; display: inline-block; vertical-align: middle; height: 100%; } #wcf-quick-view-modal .wcf-content-main { position: relative; pointer-events: none; display: inline-block; vertical-align: middle; max-width: 100%; margin: 0 auto; text-align: left; z-index: 1045; transform: translateY( -30px ); opacity: 0; transition: transform 0.5s, opacity 0.3s; } #wcf-quick-view-modal.open .wcf-content-main { transform: translateY( 0 ); opacity: 1; width: 100%; } #wcf-quick-view-modal .wcf-content-main::after, #wcf-quick-view-modal .wcf-content-main::before { content: ""; display: table; clear: both; } #wcf-quick-view-modal .wcf-lightbox-content { display: table; pointer-events: auto; background-color: #fff; max-width: 975px; margin: 20px auto; transform: translateZ( 0 ); box-shadow: 3px 3px 20px 0 rgba( 0, 0, 0, 0.15 ); position: relative; } #wcf-quick-view-content { background-color: #fff; padding: 15px 0 15px 15px; border-radius: 0; } #wcf-quick-view-content .wcf-woo-product { overflow: hidden; max-height: 480px; overflow-y: auto; } #wcf-quick-view-content div.summary { margin: 0; padding: 20px 30px 30px 30px; width: 55%; float: left; box-sizing: border-box; } #wcf-quick-view-content div.images { width: 45%; float: left; margin-bottom: 0; } #wcf-quick-view-modal .wcf-qv-image-slider { position: relative; } @media ( min-width: 545px ) { #wcf-quick-view-content div.summary { content: "544"; padding-bottom: -webkit-calc( 10px + 1em ); } } @media ( max-width: 544px ) { #wcf-quick-view-modal .wcf-lightbox-content { display: block; } #wcf-quick-view-content div.images, #wcf-quick-view-content div.summary { width: 100%; float: none; overflow: hidden; margin-bottom: 15px; padding: 0; } #wcf-quick-view-content .summary-content .product_title { font-size: 1.475rem; } #wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p, #wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p { font-size: 0.98em; } } /* Flex Slider */ body #wcf-quick-view-modal div.product .flex-viewport, body #wcf-quick-view-modal div.product .flex-viewport img { width: 100%; float: none; display: block; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav { margin: 0; padding: 0; list-style: none; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav a { text-decoration: none; display: block; width: 32px; height: 32px; font-size: 32px; line-height: 32px; margin: -20px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba( 0, 0, 0, 0.8 ); text-shadow: 1px 1px 0 rgba( 255, 255, 255, 0.3 ); transition: all 0.3s ease-in-out; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev, #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next { display: inline-block; font-family: dashicons; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev::before { content: "\f341"; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next::before { content: "\f345"; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev { left: -50px; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next { right: -50px; text-align: right; } #wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-prev { opacity: 0.7; left: 10px; } #wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-next { opacity: 0.7; right: 10px; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav { margin: 0; padding: 0; width: 100%; position: absolute; bottom: 10px; text-align: center; } #wcf-quick-view-modal .wcf-qv-image-slider li { list-style: none; } #wcf-quick-view-modal .wcf-qv-slides li { float: left; width: 100%; } #wcf-quick-view-modal .wcf-qv-slides li img { width: 100%; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav li { margin: 0 6px; display: inline-block; zoom: 1; vertical-align: middle; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a { width: 11px; height: 11px; display: block; background: #666; background: rgba( 0, 0, 0, 0.5 ); cursor: pointer; text-indent: -9999px; box-shadow: inset 0 0 3px rgba( 0, 0, 0, 0.3 ); border-radius: 20px; } #wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a.flex-active { background: #000; background: rgba( 0, 0, 0, 0.9 ); cursor: default; } #wcf-quick-view-modal .wcf-content-main-head { background: #fff; border-radius: 50%; box-shadow: 0 0 3px 0 #444; color: #000; font-size: 20px; height: 25px; line-height: 0; overflow: hidden; opacity: 1; position: absolute; padding: 3px; right: -10px; top: -15px; text-align: center; text-decoration: none; width: 25px; z-index: 2; } #wcf-quick-view-close { font-size: 18px; top: 0; right: 0; line-height: 20px; z-index: 2; color: #000; text-decoration: none; } /* New quick view */ #wcf-quick-view-modal .woocommerce-variation-add-to-cart .quantity { display: none !important; opacity: 0 !important; position: absolute !important; } /** * *********************************** * Common Mobile css * *********************************** */ @media only screen and ( max-width: 480px ) { .wcf-qty-options .wcf-item-image { display: inline-block; } .wcf-qty-options .wcf-item { width: 55%; } .wcf-qty-options .wcf-qty { width: 25%; } .wcf-qty-options .wcf-price { width: 20%; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options .wcf-item-wrap { width: 100%; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap.wcf-product-option-before-customer { margin-bottom: 0; /* order: 1; */ } .wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-selection-wrap { display: inline-block; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-decrement { -webkit-border-radius: 3px 3px 0 0; border: 1px solid #dcdada; border-bottom: 0; border-radius: 3px 3px 0 0; display: inline-block; height: 20px; width: 30px; padding: 1px 5px; } .wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-increment { -webkit-border-radius: 0 0 3px 3px; border: 1px solid #dcdada; border-top: 0; border-radius: 0 0 3px 3px; display: inline-block; height: 20px; width: 30px; padding: 1px 5px; } .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection { width: 30px; min-width: 20px; border: 1px solid #dcdada; border-top: 0; border-bottom: 0; border-radius: 0; margin-bottom: -2px; } .wcf-item-wrap { display: inline-block; width: 80%; } .wcf-qty-options .wcf-item-selector { display: inline-block; margin-right: 0 !important; width: 15%; } #wcf-quick-view-content { padding: 0; } #wcf-quick-view-content .wcf-woo-product { padding: 15px; } .wcf-embed-checkout-form-one-column .woocommerce-checkout #your_products_heading { font-size: 1em; } } /** * ************************ * Pre Upsell Checkout Start * ************************ */ .wcf-pre-checkout-offer-wrapper { position: fixed; visibility: hidden; overflow-x: hidden; overflow-y: auto; background: rgba( 0, 0, 0, 0.8 ); opacity: 0; transition: opacity 0.25s; z-index: 1042; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1 { color: #333; font-family: inherit; font-size: 1.7em; margin: 10px 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip { color: #555; display: block; font-size: 14px; margin: 5px auto 0 auto; opacity: 0.8; width: -moz-fit-content; width: fit-content; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip:hover { opacity: 1; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content { background-color: #fff; border: 2px #e2e2e2 dashed; border-radius: 4px; box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.04 ); display: inline-block; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-progress-bar { overflow: hidden; margin-bottom: 0; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal { max-width: 950px; background-color: #fff; position: relative; border-radius: 4px; top: 0; transform: translate( 0%, 0% ); width: 100%; min-height: 350px; overflow: hidden; font-family: inherit; margin: 20px auto; box-shadow: 0 0 20px 0 rgba( 0, 0, 0, 0.1 ); } .wcf-pre-checkout-screen-size .open #wcf-pre-checkout-offer-modal { top: 50%; transform: translate( 0%, -50% ); } .wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav { margin-bottom: 30px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress { position: relative; display: table; table-layout: fixed; width: 100%; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step { display: table-cell; text-align: center; position: relative; width: 100%; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title { margin-bottom: 12px; white-space: nowrap; font: inherit; /*text-transform: uppercase;*/ letter-spacing: 0.6px; font-size: 14px; color: #6d6d6d; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title { color: inherit; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::before, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::after { background: var( --wcf-primary-color ); } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after { right: 0; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after { height: 4px; content: ""; background: #e2e2e2; display: block; position: absolute; width: 50%; bottom: 8px; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before { left: 0; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:first-child .wcf-nav-bar-step-line::before, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:last-child .wcf-nav-bar-step-line::after { background: #000; display: none !important; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active + .wcf-nav-bar-step.active .wcf-nav-bar-step-line::after { background: #e2e2e2 !important; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step { background: var( --wcf-primary-color ); } .wcf-pre-checkout-offer-wrapper .wcf-progress-nav-step { width: 20px; height: 20px; border-radius: 3px; margin: auto; position: relative; background: #e2e2e2; vertical-align: middle; text-align: center; z-index: 2; line-height: 17px; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step::before { content: ""; margin: 0; color: #fff; display: inline-block; font: normal normal 400 13px/20px cartflows-icon; speak: none; vertical-align: middle; -webkit-font-smoothing: antialiased; border: 1px #fff solid; border-radius: 1px; width: 6px; height: 6px; background-color: #fff; line-height: 7px; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn { border: 1px solid; border-color: #f16334; background: #f16334; border-radius: 3px; color: #fff; font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1; margin-top: 0; padding: 12px 16px; width: 100%; outline: none; min-height: 48px; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title { margin-bottom: 10px; position: relative; text-align: center; left: 0; bottom: 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1 { color: #333; font-size: 1.5em; font-weight: 700; margin-top: 0; margin-bottom: 8px; } .wcf-pre-checkout-offer-wrapper .wcf-content-main-head { text-align: center; position: relative; padding: 10px; width: 100%; margin-bottom: 30px; } .wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf_first_name { color: var( --wcf-primary-color ); } .wcf-pre-checkout-offer-wrapper .wcf-lightbox-content { padding: 50px; } .wcf-pre-checkout-offer-wrapper.open { visibility: visible; opacity: 1; text-align: center; /*position: absolute;*/ width: 100%; height: 100%; left: 0; top: 0; padding: 30px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action { padding: 5px 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins { background: none; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-amount.amount, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins .woocommerce-Price-amount.amount { display: inline-block; font-weight: 600; font-size: 17px; margin-bottom: 3px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price del .woocommerce-Price-amount.amount { font-weight: 400; text-decoration: line-through; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info { display: inline-block; width: 49.7%; padding: 30px; vertical-align: middle; text-align: center; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details { text-align: left; padding-left: 10px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions { padding: 0 30px 30px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action { font-size: 12px; padding-top: 0; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { font-family: inherit; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { color: #555; margin-top: 5px; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span { color: #555; font-size: 18px; font-weight: 500; padding: 0 5px; } @media only screen and ( max-width: 768px ) { .wcf-pre-checkout-offer-wrapper .wcf-lightbox-content { padding: 25px 15px; } .wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav, .wcf-pre-checkout-offer-wrapper .wcf-content-main-head { margin-bottom: 20px; } .wcf-pre-checkout-offer-wrapper.open { overflow: auto; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info { display: block; width: 100%; padding: 15px 15px 10px 15px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details { text-align: center; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc { text-align: center; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action { margin-bottom: 0; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal { width: 100%; top: 0%; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { font-size: 1em; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions { display: inline-block; width: 100%; } } /* SMARTPHONES LANDSCAPE */ @media only screen and ( max-width: 600px ) { /* Rigth Arrow*/ .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow { background: #f16334; height: 2px; width: 18px; margin: 0 10px; position: relative; cursor: pointer; left: auto; vertical-align: middle; text-align: left; top: 10px; padding: 1px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after { content: ""; background: #f16334; position: absolute; height: 2px; width: 10px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before { right: -1px; bottom: -3px; transform: rotate( -45deg ); } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after { right: -1px; top: -3px; transform: rotate( 45deg ); } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-currencySymbol { float: none; margin-right: 6px; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title { white-space: unset; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step .wcf-nav-bar-step-line { display: none; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress, .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step { display: block; } .wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title::before { content: "\e901"; color: #f16334; font: normal normal 400 13px/1 cartflows-icon; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal { width: 100%; top: 0; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions { display: block; width: 100%; overflow: hidden; margin-bottom: 10px; } .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-add-cart-btn, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-skip-btn { width: 100%; } .wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span { font-size: 1em; } .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn { font-size: 15px; margin-top: 10px; } /* Common element */ .wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1, .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip { font-size: 1.3em; line-height: 1.3em; } /* Common element */ } /** * ************************ * Pre Upsell Checkout End * ************************ */ .wcf-bump-order-grid-wrap { display: flex; width: 100%; -js-display: flex; flex-wrap: wrap; margin: 20px 0 0; justify-content: space-between; } .wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer { width: calc( 55% - 40px ); float: left; /*display: unset;*/ /*display: -webkit-box; display: -webkit-flex;*/ /*margin: unset;*/ } /* * ***************************************** * Order Bump Layout Specific Responsive CSS * ***************************************** */ .wcf-ob-column-50 { width: calc( 50% - 10px ); } .wcf-ob-column-100 { width: 100%; } @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer { width: 100%; } .wcf-ob-column-50, .wcf-ob-column-100 { width: 100%; } } /** * **************************** * Modern Checkout Layout Style * **************************** */ /* Products Option. */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-customer #your_products_heading, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-order #your_products_heading { margin-top: 0; font-weight: 500; } /* .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-order-wrap .wcf-product-option-before-order { margin-bottom: 10px; } */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap { width: 100%; display: inline-block; margin: 0; padding: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"] { min-width: 18px; width: 18px; height: 18px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type="checkbox"]:checked::before { margin: 1px 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap { padding: 0; margin: 20px 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap.wcf-after-customer { margin: 20px 0 0 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap { width: 100%; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options { padding: 0; background-color: var( --wcf-yp-bg-color ); border: 1px solid var( --wcf-yp-box-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { color: var( --wcf-yp-text-color ); padding: 1em 1.2em; position: relative; border-bottom: 1px solid var( --wcf-yp-box-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight { margin: -1px -15px 0; color: var( --wcf-yp-hl-text-color ); border-bottom: 1px solid var( --wcf-yp-hl-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-item-wrap { font-size: 14px; font-weight: 400; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-header .wcf-field-label { font-weight: 500; font-size: 15px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-item, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-qty, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-price { padding: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price { font-weight: 400; } /* Products Option End. */ /* Products Option & Order bump. */ /* Order Bump CSS for Modern Checkout */ /* Modern Checkout Responsive CSS */ @media only screen and ( max-width: 768px ) { .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-grid-wrap { margin: 10px 0 0; } } /* Useful when Design Settings are not enabled. */ /* .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-style-1.wcf-after-order .wcf-content-container, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-style-1.wcf-after-payment .wcf-content-container { border: 1px solid #ddd; } */ /* Order Bump Skin loader & Product Options loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .blockUI.blockOverlay, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay { background: #fff !important; opacity: 0 !important; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay { opacity: 1 !important; border: 1px solid #d6d7db !important; border-radius: 4px !important; } /* .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap.wcf-loading { border: none !important; } */ /* Order Bump Loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap .blockUI.blockOverlay::before { background: url( "../images/order-bump-skeleton.svg" ) left top; width: 100%; height: 100%; position: absolute; content: ""; top: 0; left: 0; animation: none; z-index: 2; margin: 0; transform: scale( 0.92 ); } /* Few adjestment regarding the order bump loaders */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-3 .blockUI.blockOverlay::before, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-4 .blockUI.blockOverlay::before { top: -10px; } /* Few adjestment regarding the order bump loaders */ /* Order Bump Loader */ /* Product Options loader */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before { background: none; } .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before { background-repeat: no-repeat; top: 0; left: 0; animation: none; height: 100%; width: 100%; margin: 0; } /* Product Options loader */ /* Order Bump Skin loader & Product Options loader */ /** * **************************** * Modern Checkout Layout Style * **************************** */ /* Instant Checkout PRO Styles*/ /* Instant Checkout Product Options */ .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap .wcf-qty-options { padding: 0; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { padding: 15px; border: 1px solid var( --wcf-field-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row { padding: 15px; border-bottom: 1px solid var( --wcf-field-border-color ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:last-child { border-bottom: 0 !important; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap:not( .wcf-yp-skin-cards ) .wcf-qty-options { border: 1px solid var( --wcf-ic-section-border-color ); background-color: var( --wcf-payment-section-bg-color ); border-radius: 5px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row:has( input[type="radio"]:checked ) { border: 1px solid var( --wcf-primary-color ); background-color: color-mix( in sRGB, var( --wcf-primary-color ) 10%, transparent ); } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options:has( input[type="radio"]:checked ) .wcf-highlight { margin-top: 0; background-color: #fff; position: relative; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight:has( input[type="radio"]:checked )::before { content: ""; width: 100%; position: absolute; height: 100%; background-color: color-mix( in sRGB, var( --wcf-primary-color ) 10%, transparent ); left: 0; border-radius: 4px; } /* Instant Checkout Product Options */ .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-bump-order-wrap.wcf-after-customer { margin-bottom: 2px; } .wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-all-bump-order-wrap.wcf-before-checkout { margin-top: 0; } /* Instant Checkout PRO Styles*/ assets/css/flexslider-rtl.css000064400000013062147600244370012321 0ustar00/* * jQuery FlexSlider v2.7.2 * https://www.woocommerce.com/flexslider/ * * Copyright 2012 WooThemes * Free to use under the GPLv2 and later license. * http://www.gnu.org/licenses/gpl-2.0.html * * Contributing author: Tyler Smith (@mbmufffin) * */ /* ==================================================================================================================== * RESETS * ====================================================================================================================*/ .flex-container a:hover, .flex-slider a:hover { outline: none; } .slides, .slides > li, .flex-control-nav, .flex-direction-nav { margin: 0; padding: 0; list-style: none; } .flex-pauseplay span { text-transform: capitalize; } /* ==================================================================================================================== * BASE STYLES * ====================================================================================================================*/ .flexslider { margin: 0; padding: 0; } .flexslider .slides > li { display: none; -webkit-backface-visibility: hidden; } .flexslider .slides img { width: 100%; display: block; } .flexslider .slides:after { content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } html[xmlns] .flexslider .slides { display: block; } * html .flexslider .slides { height: 1%; } .no-js .flexslider .slides > li:first-child { display: block; } /* ==================================================================================================================== * DEFAULT THEME * ====================================================================================================================*/ .flexslider { margin: 0 0 60px; background: #fff; border: 4px solid #fff; position: relative; zoom: 1; border-radius: 4px; -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); } .flexslider .slides { zoom: 1; } .flexslider .slides img { height: auto; -moz-user-select: none; } .flex-viewport { max-height: 2000px; transition: all 1s ease; } .loading .flex-viewport { max-height: 300px; } @-moz-document url-prefix() { .loading .flex-viewport { max-height: none; } } .carousel li { margin-left: 5px; } .flex-direction-nav { *height: 0; } .flex-direction-nav a { text-decoration: none; display: block; width: 40px; height: 60px; margin: 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba(0, 0, 0, 0.8); text-shadow: -1px 1px 0 rgba(255, 255, 255, 0.3); transition: all 0.3s ease-in-out; } .flex-direction-nav a:before { /*font-family: "flexslider-icon";*/ font-size: 40px; display: inline-block; content: '\f001'; color: rgba(0, 0, 0, 0.8); text-shadow: -1px 1px 0 rgba(255, 255, 255, 0.3); } .flex-direction-nav a.flex-next:before { content: '\f002'; } .flex-direction-nav .flex-prev { right: -50px; } .flex-direction-nav .flex-next { left: -50px; text-align: left; } .flexslider:hover .flex-direction-nav .flex-prev { opacity: 0.7; right: 10px; } .flexslider:hover .flex-direction-nav .flex-prev:hover { opacity: 1; } .flexslider:hover .flex-direction-nav .flex-next { opacity: 0.7; left: 10px; } .flexslider:hover .flex-direction-nav .flex-next:hover { opacity: 1; } .flex-direction-nav .flex-disabled { opacity: 0!important; filter: alpha(opacity=0); cursor: default; z-index: -1; } .flex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; right: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; } .flex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; } .flex-pauseplay a:hover { opacity: 1; } .flex-pauseplay a.flex-play:before { content: '\f003'; } .flex-control-nav { width: 100%; position: absolute; bottom: -40px; text-align: center; } .flex-control-nav li { margin: 0 6px; display: inline-block; zoom: 1; *display: inline; } .flex-control-paging li a { width: 11px; height: 11px; display: block; background: #666; background: rgba(0, 0, 0, 0.5); cursor: pointer; text-indent: -9999px; -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); border-radius: 20px; } .flex-control-paging li a:hover { background: #333; background: rgba(0, 0, 0, 0.7); } .flex-control-paging li a.flex-active { background: #000; background: rgba(0, 0, 0, 0.9); cursor: default; } .flex-control-thumbs { margin: 15px 0 0; position: static; overflow: hidden; } .flex-control-thumbs li { width: 25%; float: right; width: 24%; width: calc( 25% - 0.75em); margin: 0; margin-left: 1em; margin-bottom: 1em; } .flex-control-thumbs li:nth-child(4n) { margin: 0; } .flex-control-thumbs img { width: 100%; height: auto; display: block; cursor: pointer; -moz-user-select: none; transition: all 1s ease; } .flex-control-thumbs img:hover { opacity: 1; } .flex-control-thumbs .flex-active { opacity: 1; cursor: default; } /* ==================================================================================================================== * RESPONSIVE * ====================================================================================================================*/ @media screen and (max-width: 860px) { .flex-direction-nav .flex-prev { opacity: 1; right: 10px; } .flex-direction-nav .flex-next { opacity: 1; left: 10px; } } assets/css/flexslider.css000064400000013061147600244370011521 0ustar00/* * jQuery FlexSlider v2.7.2 * https://www.woocommerce.com/flexslider/ * * Copyright 2012 WooThemes * Free to use under the GPLv2 and later license. * http://www.gnu.org/licenses/gpl-2.0.html * * Contributing author: Tyler Smith (@mbmufffin) * */ /* ==================================================================================================================== * RESETS * ====================================================================================================================*/ .flex-container a:hover, .flex-slider a:hover { outline: none; } .slides, .slides > li, .flex-control-nav, .flex-direction-nav { margin: 0; padding: 0; list-style: none; } .flex-pauseplay span { text-transform: capitalize; } /* ==================================================================================================================== * BASE STYLES * ====================================================================================================================*/ .flexslider { margin: 0; padding: 0; } .flexslider .slides > li { display: none; -webkit-backface-visibility: hidden; } .flexslider .slides img { width: 100%; display: block; } .flexslider .slides:after { content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } html[xmlns] .flexslider .slides { display: block; } * html .flexslider .slides { height: 1%; } .no-js .flexslider .slides > li:first-child { display: block; } /* ==================================================================================================================== * DEFAULT THEME * ====================================================================================================================*/ .flexslider { margin: 0 0 60px; background: #fff; border: 4px solid #fff; position: relative; zoom: 1; border-radius: 4px; -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); } .flexslider .slides { zoom: 1; } .flexslider .slides img { height: auto; -moz-user-select: none; } .flex-viewport { max-height: 2000px; transition: all 1s ease; } .loading .flex-viewport { max-height: 300px; } @-moz-document url-prefix() { .loading .flex-viewport { max-height: none; } } .carousel li { margin-right: 5px; } .flex-direction-nav { *height: 0; } .flex-direction-nav a { text-decoration: none; display: block; width: 40px; height: 60px; margin: 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba(0, 0, 0, 0.8); text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); transition: all 0.3s ease-in-out; } .flex-direction-nav a:before { /*font-family: "flexslider-icon";*/ font-size: 40px; display: inline-block; content: '\f001'; color: rgba(0, 0, 0, 0.8); text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); } .flex-direction-nav a.flex-next:before { content: '\f002'; } .flex-direction-nav .flex-prev { left: -50px; } .flex-direction-nav .flex-next { right: -50px; text-align: right; } .flexslider:hover .flex-direction-nav .flex-prev { opacity: 0.7; left: 10px; } .flexslider:hover .flex-direction-nav .flex-prev:hover { opacity: 1; } .flexslider:hover .flex-direction-nav .flex-next { opacity: 0.7; right: 10px; } .flexslider:hover .flex-direction-nav .flex-next:hover { opacity: 1; } .flex-direction-nav .flex-disabled { opacity: 0!important; filter: alpha(opacity=0); cursor: default; z-index: -1; } .flex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; left: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; } .flex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; } .flex-pauseplay a:hover { opacity: 1; } .flex-pauseplay a.flex-play:before { content: '\f003'; } .flex-control-nav { width: 100%; position: absolute; bottom: -40px; text-align: center; } .flex-control-nav li { margin: 0 6px; display: inline-block; zoom: 1; *display: inline; } .flex-control-paging li a { width: 11px; height: 11px; display: block; background: #666; background: rgba(0, 0, 0, 0.5); cursor: pointer; text-indent: -9999px; -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); border-radius: 20px; } .flex-control-paging li a:hover { background: #333; background: rgba(0, 0, 0, 0.7); } .flex-control-paging li a.flex-active { background: #000; background: rgba(0, 0, 0, 0.9); cursor: default; } .flex-control-thumbs { margin: 15px 0 0; position: static; overflow: hidden; } .flex-control-thumbs li { width: 25%; float: left; width: 24%; width: calc( 25% - 0.75em); margin: 0; margin-right: 1em; margin-bottom: 1em; } .flex-control-thumbs li:nth-child(4n) { margin: 0; } .flex-control-thumbs img { width: 100%; height: auto; display: block; cursor: pointer; -moz-user-select: none; transition: all 1s ease; } .flex-control-thumbs img:hover { opacity: 1; } .flex-control-thumbs .flex-active { opacity: 1; cursor: default; } /* ==================================================================================================================== * RESPONSIVE * ====================================================================================================================*/ @media screen and (max-width: 860px) { .flex-direction-nav .flex-prev { opacity: 1; left: 10px; } .flex-direction-nav .flex-next { opacity: 1; right: 10px; } } assets/css/frontend-rtl.css000064400000021406147600244370012000 0ustar00/*-------------------------------------------------------------- # Loader ---------------------------------------------------------------*/ .wcf-loader-bg.show { display: block; } .wcf-loader-bg { display: none; position: fixed; width: 100%; height: 100%; right: 0; top: 0; overflow: hidden; background: rgba( 0, 0, 0, 0.5 ); z-index: 99999; animation: popup 0.7s; } .wcf-loader-wrap { width: 100%; max-width: 500px; height: auto; min-height: 140px; top: 50%; right: 50%; position: relative; transform: translate( 50%, -50% ); overflow: hidden; background: #fff; border-radius: 3px; padding: 50px; } .wcf-order-msg { text-align: center; } .wcf-order-msg .wcf-payment-success { color: #28a745; } .wcf-order-msg .wcf-payment-failed { color: #dc3545; } .wcf-order-msg p { margin: 0 0 0.7em; } .wcf-order-msg .wcf-note { font-size: 13px; } .wcf-order-msg .wcf-note-no { display: none; } p.wcf-process-msg { font-size: 1.2em; } .wcf-loader, .wcf-loader::after { border-radius: 50%; width: 8em; height: 8em; } .wcf-loader { margin: 25px auto; font-size: 10px; position: relative; text-indent: -9999em; border-top: 5px solid #d4d4d4; border-left: 5px solid #d4d4d4; border-bottom: 5px solid #d4d4d4; border-right: 5px solid #f16334; transform: translateZ( 0 ); animation: load8 550ms infinite linear; } /* * ********************************************************* * Thank you extended css * ********************************************************* */ .wcf-offer-child-order ul.order_details { padding: 0; } /* * ********************************************************* * Upsell/Downsell shortcodes * ********************************************************* */ /* Product Images */ .woocommerce-product-gallery .slides { position: relative; white-space: nowrap; overflow: hidden; } .woocommerce-product-gallery .woocommerce-product-gallery__image { width: 100%; display: inline-block; } .woocommerce-product-gallery .flex-direction-nav a { height: 60px; } .woocommerce-product-gallery .flex-direction-nav .flex-prev, .woocommerce-product-gallery .flex-direction-nav .flex-next { display: inline-block; font-family: dashicons; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .woocommerce-product-gallery .flex-direction-nav .flex-prev::before { content: "\f341"; } .woocommerce-product-gallery .flex-direction-nav .flex-next::before { content: "\f345"; } .woocommerce-product-gallery .flex-direction-nav .flex-prev { right: -50px; } .woocommerce-product-gallery .flex-direction-nav .flex-next { left: -50px; text-align: left; } .woocommerce-product-gallery:hover .flex-direction-nav .flex-prev { opacity: 0.7; right: 10px; } .woocommerce-product-gallery:hover .flex-direction-nav .flex-next { opacity: 0.7; left: 10px; } /* Price shortcode */ .wcf-offer-price { font-size: 22px; } .wcf-offer-price .del { padding-left: 6px; text-decoration: line-through; opacity: 0.5; } .wcf-offer-shipping-fee { display: block; font-size: 15px; } /* * ********************************************************* * CSS for the select options on the Upsell & Downsell page * ********************************************************* */ .wcf-embeded-product-variation-wrap .variations_form .variations { margin: 0; } .wcf-embeded-product-variation-wrap .variations_form .variations td.label, .wcf-embeded-product-quantity-wrap .quantity label.screen-reader-text { font-weight: 600; font-family: inherit; margin-top: 10px; } .wcf-embeded-product-variation-wrap .variations_form .variations td.label, .wcf-embeded-product-variation-wrap .variations_form .variations td.value { padding: 0 0 5px 0; vertical-align: middle; } .wcf-embeded-product-quantity-wrap .quantity input[type="number"], .wcf-embeded-product-variation-wrap .variations_form .variations select { background-color: #fff; background-image: none; border: 1px solid; border-color: #d4d4d4; border-radius: 0; box-shadow: inset 0 -1em 0.7em 0 rgba( 0, 0, 0, 0.01 ); color: #a5a5a5; display: inline-block; font-family: inherit; font-weight: inherit; font-size: 14px; height: auto; line-height: 1.42857143 !important; min-height: 34px; outline: none; padding: 10px 15px; max-width: 100%; /*min-width: 85%;*/ width: 100%; margin-left: 0; -webkit-appearance: none; } .wcf-embeded-product-variation-wrap .variations_form .variations select:focus, .wcf-embeded-product-quantity-wrap .quantity input[type="number"]:focus { background: #fff; transition: 0.2s; } .wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap { float: right; margin-left: 40px; vertical-align: middle; } .wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .single_variation { overflow: hidden; } .wcf-embeded-product-variation-wrap .single_variation_wrap .single_variation .woocommerce-variation-description { display: none; } .wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations { text-decoration: none; font-family: inherit; font-weight: 500; font-size: 10px; float: left; margin-top: 10px; color: #a00a00; text-transform: uppercase; letter-spacing: 0.5px; display: none; } .wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations::before { content: "\274C"; font-size: 8px; margin-left: 5px; } .wcf-embeded-product-variation-wrap .variations_form .price, .wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .woocommerce-variation-price { margin: 0; font-family: inherit; font-weight: 400; overflow: hidden; min-height: 35px; vertical-align: middle; line-height: 2.12; } .wcf-embeded-product-variation-wrap .variations .var_not_selected { border: 1px solid #e2401c !important; } .cartflows-container .single_variation_wrap .woocommerce-variation { display: none !important; } .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-quantity-wrap .quantity input[type="number"] { max-width: 250px; max-width: 200px; } .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-variation-wrap table tbody, .wcf-embeded-product-variation-wrap table tbody tr, .wcf-embeded-product-variation-wrap table tbody tr td, .wcf-embeded-product-variation-wrap table tbody tr td, .wcf-embeded-product-variation-wrap table tfoot, .wcf-embeded-product-variation-wrap table tfoot tr, .wcf-embeded-product-variation-wrap table tfoot tr td, .wcf-embeded-product-variation-wrap table tfoot tr td { width: 100%; display: block !important; } .wcf-embeded-product-quantity-wrap .quantity { display: block; } .wcf-embeded-product-quantity-wrap .quantity .screen-reader-text { clip-path: none; display: inline-block; visibility: visible; opacity: 1; position: relative !important; top: 0; color: #404040; font-size: 15px; min-height: 34px; min-height: 22px; width: 100%; padding-top: 0; } .wcf-embeded-product-quantity-wrap .quantity label { padding: 5px 0; width: 100%; } .editor-sidebar__panel .wcf-license-restriction-box { font-style: normal; color: #1e1e1e; } .wcf-license-restriction-box { padding: 0; text-align: center; } .wcf-license-restriction-box-icon { width: 100px; } .wcf-license-restriction-box .wcf-license-restriction-box-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 20px 0 0 0; } .wcf-license-restriction-box .wcf-license-restriction-box-message { font-size: 11px; line-height: 1.8; margin: 5px 0 0 0; } .wcf-license-restriction-box .wcf-license-restriction-button { display: inline-block; margin: 20px 0 0 0; border: 1px dotted transparent; font-weight: 500; text-decoration: none; cursor: pointer; background-color: #f16334; padding: 8px 16px; color: #fff; } @media ( min-width: 769px ) { .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-quantity-wrap .quantity input[type="number"] { max-width: 80%; } } @media ( max-width: 768px ) { .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-quantity-wrap .quantity input[type="number"] { max-width: 100%; } } /* * ********************************************************* * CSS for the select options on the Upsell & Downsell page * ********************************************************* */ @keyframes load8 { 0% { transform: rotate( 0deg ); } 100% { transform: rotate( -360deg ); } } @keyframes popup { 0% { transform: scale( 1.2 ); } } /** * Astra Addon Compatibility CSS. * * Removing the raw HTML of plus/minus buttons on the upsell page. * Restricted only to offer page using wcf-offer-product-quantity class. */ body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^="minus_qty"], body[class*=" astra-addon-"] .wcf-offer-product-quantity a#minus_qty, body[class*=" astra-addon-"] .wcf-offer-product-quantity a#plus_qty, body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^="plus_qty"] { display: none !important; } assets/css/frontend.css000064400000021411147600244370011175 0ustar00/*-------------------------------------------------------------- # Loader ---------------------------------------------------------------*/ .wcf-loader-bg.show { display: block; } .wcf-loader-bg { display: none; position: fixed; width: 100%; height: 100%; left: 0; top: 0; overflow: hidden; background: rgba( 0, 0, 0, 0.5 ); z-index: 99999; animation: popup 0.7s; } .wcf-loader-wrap { width: 100%; max-width: 500px; height: auto; min-height: 140px; top: 50%; left: 50%; position: relative; transform: translate( -50%, -50% ); overflow: hidden; background: #fff; border-radius: 3px; padding: 50px; } .wcf-order-msg { text-align: center; } .wcf-order-msg .wcf-payment-success { color: #28a745; } .wcf-order-msg .wcf-payment-failed { color: #dc3545; } .wcf-order-msg p { margin: 0 0 0.7em; } .wcf-order-msg .wcf-note { font-size: 13px; } .wcf-order-msg .wcf-note-no { display: none; } p.wcf-process-msg { font-size: 1.2em; } .wcf-loader, .wcf-loader::after { border-radius: 50%; width: 8em; height: 8em; } .wcf-loader { margin: 25px auto; font-size: 10px; position: relative; text-indent: -9999em; border-top: 5px solid #d4d4d4; border-right: 5px solid #d4d4d4; border-bottom: 5px solid #d4d4d4; border-left: 5px solid #f16334; transform: translateZ( 0 ); animation: load8 550ms infinite linear; } /* * ********************************************************* * Thank you extended css * ********************************************************* */ .wcf-offer-child-order ul.order_details { padding: 0; } /* * ********************************************************* * Upsell/Downsell shortcodes * ********************************************************* */ /* Product Images */ .woocommerce-product-gallery .slides { position: relative; white-space: nowrap; overflow: hidden; } .woocommerce-product-gallery .woocommerce-product-gallery__image { width: 100%; display: inline-block; } .woocommerce-product-gallery .flex-direction-nav a { height: 60px; } .woocommerce-product-gallery .flex-direction-nav .flex-prev, .woocommerce-product-gallery .flex-direction-nav .flex-next { display: inline-block; font-family: dashicons; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .woocommerce-product-gallery .flex-direction-nav .flex-prev::before { content: "\f341"; } .woocommerce-product-gallery .flex-direction-nav .flex-next::before { content: "\f345"; } .woocommerce-product-gallery .flex-direction-nav .flex-prev { left: -50px; } .woocommerce-product-gallery .flex-direction-nav .flex-next { right: -50px; text-align: right; } .woocommerce-product-gallery:hover .flex-direction-nav .flex-prev { opacity: 0.7; left: 10px; } .woocommerce-product-gallery:hover .flex-direction-nav .flex-next { opacity: 0.7; right: 10px; } /* Price shortcode */ .wcf-offer-price { font-size: 22px; } .wcf-offer-price .del { padding-right: 6px; text-decoration: line-through; opacity: 0.5; } .wcf-offer-shipping-fee { display: block; font-size: 15px; } /* * ********************************************************* * CSS for the select options on the Upsell & Downsell page * ********************************************************* */ .wcf-embeded-product-variation-wrap .variations_form .variations { margin: 0; } .wcf-embeded-product-variation-wrap .variations_form .variations td.label, .wcf-embeded-product-quantity-wrap .quantity label.screen-reader-text { font-weight: 600; font-family: inherit; margin-top: 10px; } .wcf-embeded-product-variation-wrap .variations_form .variations td.label, .wcf-embeded-product-variation-wrap .variations_form .variations td.value { padding: 0 0 5px 0; vertical-align: middle; } .wcf-embeded-product-quantity-wrap .quantity input[type="number"], .wcf-embeded-product-variation-wrap .variations_form .variations select { background-color: #fff; background-image: none; border: 1px solid; border-color: #d4d4d4; border-radius: 0; box-shadow: inset 0 -1em 0.7em 0 rgba( 0, 0, 0, 0.01 ); color: #a5a5a5; display: inline-block; font-family: inherit; font-weight: inherit; font-size: 14px; height: auto; line-height: 1.42857143 !important; min-height: 34px; outline: none; padding: 10px 15px; max-width: 100%; /*min-width: 85%;*/ width: 100%; margin-right: 0; -webkit-appearance: none; } .wcf-embeded-product-variation-wrap .variations_form .variations select:focus, .wcf-embeded-product-quantity-wrap .quantity input[type="number"]:focus { background: #fff; transition: 0.2s; } .wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap { float: left; margin-right: 40px; vertical-align: middle; } .wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .single_variation { overflow: hidden; } .wcf-embeded-product-variation-wrap .single_variation_wrap .single_variation .woocommerce-variation-description { display: none; } .wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations { text-decoration: none; font-family: inherit; font-weight: 500; font-size: 10px; float: right; margin-top: 10px; color: #a00a00; text-transform: uppercase; letter-spacing: 0.5px; display: none; } .wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations::before { content: "\274C"; font-size: 8px; margin-right: 5px; } .wcf-embeded-product-variation-wrap .variations_form .price, .wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .woocommerce-variation-price { margin: 0; font-family: inherit; font-weight: 400; overflow: hidden; min-height: 35px; vertical-align: middle; line-height: 2.12; } .wcf-embeded-product-variation-wrap .variations .var_not_selected { border: 1px solid #e2401c !important; } .cartflows-container .single_variation_wrap .woocommerce-variation { display: none !important; } .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-quantity-wrap .quantity input[type="number"] { max-width: 250px; max-width: 200px; } .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-variation-wrap table tbody, .wcf-embeded-product-variation-wrap table tbody tr, .wcf-embeded-product-variation-wrap table tbody tr td, .wcf-embeded-product-variation-wrap table tbody tr td, .wcf-embeded-product-variation-wrap table tfoot, .wcf-embeded-product-variation-wrap table tfoot tr, .wcf-embeded-product-variation-wrap table tfoot tr td, .wcf-embeded-product-variation-wrap table tfoot tr td { width: 100%; display: block !important; } .wcf-embeded-product-quantity-wrap .quantity { display: block; } .wcf-embeded-product-quantity-wrap .quantity .screen-reader-text { clip-path: none; display: inline-block; visibility: visible; opacity: 1; position: relative !important; top: 0; color: #404040; font-size: 15px; min-height: 34px; min-height: 22px; width: 100%; padding-top: 0; } .wcf-embeded-product-quantity-wrap .quantity label { padding: 5px 0; width: 100%; } .editor-sidebar__panel .wcf-license-restriction-box { font-style: normal; color: #1e1e1e; } .wcf-license-restriction-box { padding: 0; text-align: center; } .wcf-license-restriction-box-icon { width: 100px; } .wcf-license-restriction-box .wcf-license-restriction-box-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 20px 0 0 0; } .wcf-license-restriction-box .wcf-license-restriction-box-message { font-size: 11px; line-height: 1.8; margin: 5px 0 0 0; } .wcf-license-restriction-box .wcf-license-restriction-button { display: inline-block; margin: 20px 0 0 0; border: 1px dotted transparent; font-weight: 500; text-decoration: none; cursor: pointer; background-color: #f16334; padding: 8px 16px; color: #fff; } @media ( min-width: 769px ) { .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-quantity-wrap .quantity input[type="number"] { max-width: 80%; } } @media ( max-width: 768px ) { .wcf-embeded-product-variation-wrap table, .wcf-embeded-product-quantity-wrap .quantity input[type="number"] { max-width: 100%; } } /* * ********************************************************* * CSS for the select options on the Upsell & Downsell page * ********************************************************* */ @keyframes load8 { 0% { transform: rotate( 0deg ); } 100% { transform: rotate( 360deg ); } } @keyframes popup { 0% { transform: scale( 1.2 ); } } /** * Astra Addon Compatibility CSS. * * Removing the raw HTML of plus/minus buttons on the upsell page. * Restricted only to offer page using wcf-offer-product-quantity class. */ body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^="minus_qty"], body[class*=" astra-addon-"] .wcf-offer-product-quantity a#minus_qty, body[class*=" astra-addon-"] .wcf-offer-product-quantity a#plus_qty, body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^="plus_qty"] { display: none !important; } assets/css/license-popup-rtl.css000064400000004645147600244370012752 0ustar00.is-active.cartflows-processing + span { margin-right: 5px; } .is-active.cartflows-processing { display: inline-block; margin: 0; vertical-align: text-top; } .cartflows-processing { display: none; -webkit-animation: cssanimation 0.72s ease infinite; -moz-animation: cssanimation 0.72s ease infinite; -o-animation: cssanimation 0.72s ease infinite; } #cartflows-license-popup-overlay { background: #000000b3; filter: alpha( opacity=70 ); position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 100050; } #cartflows-license-popup table { border: none !important; box-shadow: none !important; } #cartflows-license-popup .inner { transform: translate( 50%, -50% ); background: #fff; box-sizing: border-box; position: fixed; background-color: #fff; z-index: 100059; text-align: right; top: 50%; right: 50%; box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); } #cartflows-license-popup .heading { float: right; font-weight: 600; line-height: 35px; overflow: hidden; padding: 0 20px; text-overflow: ellipsis; white-space: nowrap; width: calc( 100% - 40px ); background: #fcfcfc; font-size: 14px; border-bottom: 1px solid #e5e5e5; } #cartflows-license-popup .contents { clear: both; padding: 10px 0 15px 0; } #cartflows-license-popup .notice { margin: 0 20px 5px 20px; } .cartflows-heading { background: #f9f9f9; border-left: 1px solid #e1e1e1; padding: 13px 15px; width: 25%; color: #333; font-weight: 700; } .cartflows-content { padding: 13px 15px; position: relative; } .cartflows-row td { border-bottom: 1px solid #f0f0f0; } .cartflows-license-popup-open-button.inactive { color: #f44336; } .cartflows-license-popup-open-button.active { color: #3db634; } .cartflows-table-export { width: auto; } .cartflows-table-export td, .cartflows-table-export th { border: none !important; box-shadow: none !important; padding: 12px 15px; } .cartflows-close-popup-button { position: absolute; right: auto; left: 3px; width: 29px; top: 4px; height: 29px; border: 0; padding: 0; background: none; cursor: pointer; outline: none; transition: color 0.1s ease-in-out, background 0.1s ease-in-out; } #cartflows-license-popup td, #cartflows-license-popup th { padding: 12px 20px; border: none; } #cartflows-license-popup .submit-button-td { text-align: center; padding-top: 0; } .submit-button-td .description { margin: 10px 0 0 0; } #cartflows-license-popup .activate-license { padding: 10px 20px; } assets/css/license-popup.css000064400000004643147600244370012151 0ustar00.is-active.cartflows-processing + span { margin-left: 5px; } .is-active.cartflows-processing { display: inline-block; margin: 0; vertical-align: text-top; } .cartflows-processing { display: none; -webkit-animation: cssanimation 0.72s ease infinite; -moz-animation: cssanimation 0.72s ease infinite; -o-animation: cssanimation 0.72s ease infinite; } #cartflows-license-popup-overlay { background: #000000b3; filter: alpha( opacity=70 ); position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100050; } #cartflows-license-popup table { border: none !important; box-shadow: none !important; } #cartflows-license-popup .inner { transform: translate( -50%, -50% ); background: #fff; box-sizing: border-box; position: fixed; background-color: #fff; z-index: 100059; text-align: left; top: 50%; left: 50%; box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); } #cartflows-license-popup .heading { float: left; font-weight: 600; line-height: 35px; overflow: hidden; padding: 0 20px; text-overflow: ellipsis; white-space: nowrap; width: calc( 100% - 40px ); background: #fcfcfc; font-size: 14px; border-bottom: 1px solid #e5e5e5; } #cartflows-license-popup .contents { clear: both; padding: 10px 0 15px 0; } #cartflows-license-popup .notice { margin: 0 20px 5px 20px; } .cartflows-heading { background: #f9f9f9; border-right: 1px solid #e1e1e1; padding: 13px 15px; width: 25%; color: #333; font-weight: 700; } .cartflows-content { padding: 13px 15px; position: relative; } .cartflows-row td { border-bottom: 1px solid #f0f0f0; } .cartflows-license-popup-open-button.inactive { color: #f44336; } .cartflows-license-popup-open-button.active { color: #3db634; } .cartflows-table-export { width: auto; } .cartflows-table-export td, .cartflows-table-export th { border: none !important; box-shadow: none !important; padding: 12px 15px; } .cartflows-close-popup-button { position: absolute; left: auto; right: 3px; width: 29px; top: 4px; height: 29px; border: 0; padding: 0; background: none; cursor: pointer; outline: none; transition: color 0.1s ease-in-out, background 0.1s ease-in-out; } #cartflows-license-popup td, #cartflows-license-popup th { padding: 12px 20px; border: none; } #cartflows-license-popup .submit-button-td { text-align: center; padding-top: 0; } .submit-button-td .description { margin: 10px 0 0 0; } #cartflows-license-popup .activate-license { padding: 10px 20px; } assets/css/multistep-checkout-rtl.css000064400000017345147600244370014021 0ustar00/** * Multistep Checkout CSS */ /* Navigation Buttons CSS Start */ .wcf-multistep-nav-btn-group { -js-display: inline-flex; display: inline-flex; margin: 20px 0 20px 0; position: relative; /* left: 50%; */ font-size: 16px; justify-content: space-between; width: 100%; } .wcf-multistep-nav-btn-group span { background-color: var( --wcf-btn-bg-color ); border: 1px solid; border-color: var( --wcf-btn-bg-color ); color: var( --wcf-btn-text-color ); cursor: pointer; float: right; width: auto; text-align: center; border-radius: 4px; font-weight: 400; padding: 11px 15px; } .wcf-multistep-nav-btn-group span:hover { border-color: var( --wcf-btn-bg-hover-color ); background-color: var( --wcf-btn-bg-hover-color ); color: var( --wcf-btn-hover-text-color ); } .wcf-multistep-nav-btn-group a { align-self: center; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-buttons-wrapper { -js-display: flex; display: flex; justify-content: space-between; align-items: center; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-nav-back-btn { display: inline-block; align-self: center; width: 50%; font-size: 16px; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment #place_order { display: inline-block; padding: 11px 15px; width: 50%; clear: both; float: none; } /* Navigation Buttons CSS End */ /* Important CSS for multistep checkout Start */ /* Hide shipping and payment when billing class available */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .woocommerce-checkout-payment, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-option-heading, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-step-review-details, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-col-2.col-2 { display: none; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-multistep-nav-back-btn { visibility: hidden; } /* Hide Billing and payment when shipping class available */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-col-1, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-option-heading, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-step-review-details, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .woocommerce-checkout-payment { display: none; } /* Hide Billing and Shipping when payment class available */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-1, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-2.col-2, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-multistep-nav-btn-group { display: none; } /* Important CSS for multistep checkout End */ /* Top Navigation Buttons CSS Start */ .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb { width: 100%; /* padding: 20px; */ margin: 10px 0 10px 10px; } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb { display: inline-block; margin: 5px 0 5px 5px; } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a { color: var( --wcf-text-color ); } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a.wcf-current-step { color: var( --wcf-primary-color ); } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb:not( :last-child ) ::after { content: "\00bb"; height: 16px; width: 16px; margin-right: 10px; color: #000; } /* Top Navigation Buttons CSS End */ /* Custom Shipping methods CSS Start */ .wcf-multistep-shipping-table { margin: 15px 0 15px 0; } .wcf-multistep-shipping-table .woocommerce-shipping-totals.shipping th { display: none; } .wcf-multistep-shipping-table table { margin: 0; } .wcf-multistep-shipping-table ul#shipping_method li { padding: 12px; margin: 0; } .wcf-multistep-shipping-table ul#shipping_method li input { vertical-align: middle; height: 18px; width: 18px; cursor: pointer; margin: 2px 0 0 11px; border: 1px solid #d1d5db; border-radius: 50%; line-height: 0; box-shadow: inset 0 1px 2px rgb( 0 0 0 / 10% ); transition: 0.05s border-color ease-in-out; -webkit-appearance: none; } .wcf-multistep-shipping-table ul#shipping_method li input:checked::before { background-color: var( --wcf-primary-color ); border-radius: 50px; content: "\2022"; text-indent: -9999px; display: inline-block; font: normal normal 400 15px/1 cartflows-icon; vertical-align: middle; -webkit-font-smoothing: antialiased; margin: 5px; width: 6px; height: 6px; } .wcf-multistep-shipping-table ul#shipping_method li label { vertical-align: middle; cursor: pointer; } .wcf-multistep-shipping-table ul#shipping_method { border-radius: 4px; border: 1px solid #d6d7db; } .wcf-multistep-shipping-table ul#shipping_method li:not( :last-child ) { border-bottom: 1px solid #d6d7db; } .wcf-multistep-shipping-table .wcf-shipping-error-msg { display: block; background-color: #fff5f5; border: solid 1px #f3d5d8; padding: 20px; color: #a10000; margin: 1rem 0 1rem; font-size: 14px; width: 100%; border-radius: 4px; font-weight: 400; } /* Custom Shipping methods CSS End */ /* Custom sections CSS Start */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper { border: 1px solid #d6d7db; border-radius: 4px; padding: 0; margin: 15px 0 15px 0; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li:not( :last-child ) { border-bottom: 1px solid #d6d7db; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li { -js-display: flex; display: flex; padding: 0 0.85em; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-details-inner { padding: 0.85em 0; -js-display: flex; display: flex; flex: 1; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-label { flex: 0 0 6em; font-weight: 400; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-content { color: #404040; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-link { text-align: left; padding: 0.85em 0; flex: 0 0 auto; width: 16.66666667%; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details .wcf-review-detail-link .wcf-step-link { color: #b3b3b3; white-space: nowrap; text-decoration: none; } /* Custom sections CSS End */ /* Show product option on step 1 if position is set to after customer details */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-product-option-wrap.wcf-product-option-after-customer, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-payment .wcf-product-option-wrap.wcf-product-option-after-customer { display: none; } /* Show order bump on step 1 if position is set to after customer details */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-bump-order-grid-wrap.wcf-after-customer, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-bump-order-grid-wrap.wcf-after-customer { display: none; } assets/css/multistep-checkout.css000064400000017344147600244370013221 0ustar00/** * Multistep Checkout CSS */ /* Navigation Buttons CSS Start */ .wcf-multistep-nav-btn-group { -js-display: inline-flex; display: inline-flex; margin: 20px 0 20px 0; position: relative; /* left: 50%; */ font-size: 16px; justify-content: space-between; width: 100%; } .wcf-multistep-nav-btn-group span { background-color: var( --wcf-btn-bg-color ); border: 1px solid; border-color: var( --wcf-btn-bg-color ); color: var( --wcf-btn-text-color ); cursor: pointer; float: left; width: auto; text-align: center; border-radius: 4px; font-weight: 400; padding: 11px 15px; } .wcf-multistep-nav-btn-group span:hover { border-color: var( --wcf-btn-bg-hover-color ); background-color: var( --wcf-btn-bg-hover-color ); color: var( --wcf-btn-hover-text-color ); } .wcf-multistep-nav-btn-group a { align-self: center; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-buttons-wrapper { -js-display: flex; display: flex; justify-content: space-between; align-items: center; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-nav-back-btn { display: inline-block; align-self: center; width: 50%; font-size: 16px; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment #place_order { display: inline-block; padding: 11px 15px; width: 50%; clear: both; float: none; } /* Navigation Buttons CSS End */ /* Important CSS for multistep checkout Start */ /* Hide shipping and payment when billing class available */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .woocommerce-checkout-payment, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-option-heading, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-step-review-details, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-col-2.col-2 { display: none; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-multistep-nav-back-btn { visibility: hidden; } /* Hide Billing and payment when shipping class available */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-col-1, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-option-heading, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-step-review-details, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .woocommerce-checkout-payment { display: none; } /* Hide Billing and Shipping when payment class available */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-1, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-2.col-2, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-multistep-nav-btn-group { display: none; } /* Important CSS for multistep checkout End */ /* Top Navigation Buttons CSS Start */ .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb { width: 100%; /* padding: 20px; */ margin: 10px 10px 10px 0; } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb { display: inline-block; margin: 5px 5px 5px 0; } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a { color: var( --wcf-text-color ); } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a.wcf-current-step { color: var( --wcf-primary-color ); } .wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb:not( :last-child ) ::after { content: "\00bb"; height: 16px; width: 16px; margin-left: 10px; color: #000; } /* Top Navigation Buttons CSS End */ /* Custom Shipping methods CSS Start */ .wcf-multistep-shipping-table { margin: 15px 0 15px 0; } .wcf-multistep-shipping-table .woocommerce-shipping-totals.shipping th { display: none; } .wcf-multistep-shipping-table table { margin: 0; } .wcf-multistep-shipping-table ul#shipping_method li { padding: 12px; margin: 0; } .wcf-multistep-shipping-table ul#shipping_method li input { vertical-align: middle; height: 18px; width: 18px; cursor: pointer; margin: 2px 11px 0 0; border: 1px solid #d1d5db; border-radius: 50%; line-height: 0; box-shadow: inset 0 1px 2px rgb( 0 0 0 / 10% ); transition: 0.05s border-color ease-in-out; -webkit-appearance: none; } .wcf-multistep-shipping-table ul#shipping_method li input:checked::before { background-color: var( --wcf-primary-color ); border-radius: 50px; content: "\2022"; text-indent: -9999px; display: inline-block; font: normal normal 400 15px/1 cartflows-icon; vertical-align: middle; -webkit-font-smoothing: antialiased; margin: 5px; width: 6px; height: 6px; } .wcf-multistep-shipping-table ul#shipping_method li label { vertical-align: middle; cursor: pointer; } .wcf-multistep-shipping-table ul#shipping_method { border-radius: 4px; border: 1px solid #d6d7db; } .wcf-multistep-shipping-table ul#shipping_method li:not( :last-child ) { border-bottom: 1px solid #d6d7db; } .wcf-multistep-shipping-table .wcf-shipping-error-msg { display: block; background-color: #fff5f5; border: solid 1px #f3d5d8; padding: 20px; color: #a10000; margin: 1rem 0 1rem; font-size: 14px; width: 100%; border-radius: 4px; font-weight: 400; } /* Custom Shipping methods CSS End */ /* Custom sections CSS Start */ .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper { border: 1px solid #d6d7db; border-radius: 4px; padding: 0; margin: 15px 0 15px 0; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li:not( :last-child ) { border-bottom: 1px solid #d6d7db; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li { -js-display: flex; display: flex; padding: 0 0.85em; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-details-inner { padding: 0.85em 0; -js-display: flex; display: flex; flex: 1; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-label { flex: 0 0 6em; font-weight: 400; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-content { color: #404040; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-link { text-align: right; padding: 0.85em 0; flex: 0 0 auto; width: 16.66666667%; } .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details .wcf-review-detail-link .wcf-step-link { color: #b3b3b3; white-space: nowrap; text-decoration: none; } /* Custom sections CSS End */ /* Show product option on step 1 if position is set to after customer details */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-product-option-wrap.wcf-product-option-after-customer, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-payment .wcf-product-option-wrap.wcf-product-option-after-customer { display: none; } /* Show order bump on step 1 if position is set to after customer details */ .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-bump-order-grid-wrap.wcf-after-customer, .wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-bump-order-grid-wrap.wcf-after-customer { display: none; } assets/css/optin-styles-divi-rtl.css000064400000011676147600244370013574 0ustar00.wcf-clear::before, .wcf-clear::after { content: " "; display: table; } .wcf-clear::after { clear: both; } /** * *********************************** * Custom Width Classes * *********************************** */ .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33 { width: 33.33%; } .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50 { width: 50%; } .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100 { width: 100%; margin-top: 0 !important; } /* Select2 */ .et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible { height: 0 !important; min-height: 0 !important; width: 0 !important; margin: 0 !important; } .et_pb_module #wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 26px; min-height: 26px; overflow: visible; padding-right: 0; } /** * ******************** * Fields Skins * ******************** */ .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row label:not( .checkbox ), .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label { position: absolute; z-index: 999; margin-top: 19px; margin-right: 15px; transition: all 0.235s ease; overflow: hidden; white-space: nowrap; } .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label { margin-top: 8px; font-size: 12px; } /* Compatibility for the Astra Labels as placeholder */ .ast-checkout-labels-as-placeholders .et_pb_module #wcf-optin-form form #customer_details .form-row label { opacity: 1; position: relative; padding: 0; margin: 0 0 8px 0; line-height: 1em; } .ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row label { position: absolute; margin-top: 19px; padding: 0 1.02em; opacity: 1; } .ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row.wcf-anim-label label { margin-top: 8px; font-size: 12px; } .ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox { position: relative; margin: 0; padding: 0; } /* Compatibility for the Astra Labels as placeholder */ .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="text"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="email"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="password"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="tel"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row textarea, .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row select, .wcf-optin-form.wcf-field-floating-labels .select2-container--default .select2-selection--single { padding: 25px 12px 5px; } .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label-fix label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label-fix label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label-fix label { position: relative; margin: 0; } .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox { position: relative; margin: 0; } /** * **************************************** * Mobile css for two step navigation Start * **************************************** */ @media only screen and ( max-width: 768px ) { .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33, .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50, .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100 { width: 100%; } } /** * ************************ * Optimize Checkout fields * ************************ */ .et_pb_module #wcf-optin-form .wcf-hide-field { -js-display: flex !important; display: flex !important; align-items: center; font-size: 13px; } .et_pb_module #wcf-optin-form .wcf-hide-field label, .et_pb_module #wcf-optin-form .wcf-hide-field span { display: none !important; } .et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20 { margin-top: 0; } assets/css/optin-styles-divi.css000064400000011674147600244370012773 0ustar00.wcf-clear::before, .wcf-clear::after { content: " "; display: table; } .wcf-clear::after { clear: both; } /** * *********************************** * Custom Width Classes * *********************************** */ .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33 { width: 33.33%; } .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50 { width: 50%; } .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100 { width: 100%; margin-top: 0 !important; } /* Select2 */ .et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible { height: 0 !important; min-height: 0 !important; width: 0 !important; margin: 0 !important; } .et_pb_module #wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 26px; min-height: 26px; overflow: visible; padding-left: 0; } /** * ******************** * Fields Skins * ******************** */ .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row label:not( .checkbox ), .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label { position: absolute; z-index: 999; margin-top: 19px; margin-left: 15px; transition: all 0.235s ease; overflow: hidden; white-space: nowrap; } .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label { margin-top: 8px; font-size: 12px; } /* Compatibility for the Astra Labels as placeholder */ .ast-checkout-labels-as-placeholders .et_pb_module #wcf-optin-form form #customer_details .form-row label { opacity: 1; position: relative; padding: 0; margin: 0 0 8px 0; line-height: 1em; } .ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row label { position: absolute; margin-top: 19px; padding: 0 1.02em; opacity: 1; } .ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row.wcf-anim-label label { margin-top: 8px; font-size: 12px; } .ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox { position: relative; margin: 0; padding: 0; } /* Compatibility for the Astra Labels as placeholder */ .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="text"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="email"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="password"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type="tel"], .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row textarea, .wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row select, .wcf-optin-form.wcf-field-floating-labels .select2-container--default .select2-selection--single { padding: 25px 12px 5px; } .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label-fix label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label-fix label, .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label-fix label { position: relative; margin: 0; } .wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox { position: relative; margin: 0; } /** * **************************************** * Mobile css for two step navigation Start * **************************************** */ @media only screen and ( max-width: 768px ) { .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33, .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50, .et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100 { width: 100%; } } /** * ************************ * Optimize Checkout fields * ************************ */ .et_pb_module #wcf-optin-form .wcf-hide-field { -js-display: flex !important; display: flex !important; align-items: center; font-size: 13px; } .et_pb_module #wcf-optin-form .wcf-hide-field label, .et_pb_module #wcf-optin-form .wcf-hide-field span { display: none !important; } .et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20 { margin-top: 0; } assets/css/optin-styles-rtl.css000064400000001657147600244370012641 0ustar00.wcf-clear::before, .wcf-clear::after { content: " "; display: table; } .wcf-clear::after { clear: both; } /* Select2 */ .wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible { height: 0 !important; min-height: 0 !important; width: 0 !important; margin: 0 !important; } .wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 26px; min-height: 26px; overflow: visible; padding-right: 0; } /** * ************************ * Optimize Checkout fields * ************************ */ .wcf-optin-form .wcf-hide-field { -js-display: flex !important; display: flex !important; align-items: center; font-size: 13px; } .wcf-optin-form .wcf-hide-field label, .wcf-optin-form .wcf-hide-field span { display: none !important; } .wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20 { margin-top: 0; } assets/css/optin-styles.css000064400000001656147600244370012041 0ustar00.wcf-clear::before, .wcf-clear::after { content: " "; display: table; } .wcf-clear::after { clear: both; } /* Select2 */ .wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible { height: 0 !important; min-height: 0 !important; width: 0 !important; margin: 0 !important; } .wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 26px; min-height: 26px; overflow: visible; padding-left: 0; } /** * ************************ * Optimize Checkout fields * ************************ */ .wcf-optin-form .wcf-hide-field { -js-display: flex !important; display: flex !important; align-items: center; font-size: 13px; } .wcf-optin-form .wcf-hide-field label, .wcf-optin-form .wcf-hide-field span { display: none !important; } .wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20 { margin-top: 0; } assets/elementor-assets/css/style.css000064400000003731147600244370014015 0ustar00@font-face { font-family: "wcf-el-pro"; src: url( "../fonts/wcf-el-pro.eot?nn1pkj" ); src: url( "../fonts/wcf-el-pro.eot?nn1pkj#iefix" ) format( "embedded-opentype" ), url( "../fonts/wcf-el-pro.ttf?nn1pkj" ) format( "truetype" ), url( "../fonts/wcf-el-pro.woff?nn1pkj" ) format( "woff" ), url( "../fonts/wcf-el-pro.svg?nn1pkj#wcf-el-pro" ) format( "svg" ); font-weight: normal; font-style: normal; font-display: block; } [class^="wcf-pro-el-icon-"], [class*=" wcf-pro-el-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: "wcf-el-pro" !important; speak: never; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .wcf-pro-el-icon-offer-product-description::before { content: "\e900"; } .wcf-pro-el-icon-offer-product-image::before { content: "\e901"; } .wcf-pro-el-icon-offer-product-price::before { content: "\e902"; } .wcf-pro-el-icon-offer-product-quantity::before { content: "\e903"; } .wcf-pro-el-icon-offer-product-title::before { content: "\e904"; } .wcf-pro-el-icon-offer-product-variations::before { content: "\e905"; } .wcf-pro-el-icon-yes-no-button::before { content: "\e906"; } .wcf-pro-el-icon-yes-no-link::before { content: "\e907"; } .wcf-license-restriction-box { padding: 0px; text-align: center; } .wcf-license-restriction-box-icon { width: 100px; } .wcf-license-restriction-box-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 20px 0 0 0; } .wcf-license-restriction-box-message { font-size: 11px; line-height: 1.8; margin: 5px 0 0 0; } .wcf-license-restriction-box .wcf-license-restriction-button { display: inline-block; margin: 20px 0 0 0; border: 1px dotted transparent; font-weight: 500; text-decoration: none; cursor: pointer; background-color: #f16334; padding: 8px 16px; color: #fff; } assets/elementor-assets/fonts/wcf-el-pro.eot000064400000030274147600244370015172 0ustar00¼0 0LPéP½#wcf-el-proRegularVersion 1.0wcf-el-pro €0OS/2ø¼`cmapVÒŽTgasppglyf­y¼nx,headà -x6hheaÄÌ-°$hmtx&S-Ô0loca2*'.maxp4. name¿†Ù;.@ªpost/ì Ǚ̙Ìë3 @éÀÿÀ@À@ 8  éÿýÿÿ éÿýÿÿÿãÿÿ797979ÿÀ¶s~Œ—¬ºÈÓà49FXdp|%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#32#!"&=%!3!2652654&#!"3%%%5'.*#"&'7546;2654&#!"3%2654&#!"3%!"!54&#'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632C£þx‡Õ #  $  $ žþ©¡þ{ W *þÙýhþ™ð#þõ›šªþÙ'þÙ:þ© … þ­þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  a[Ø©×x# #  $­ þ¿kªþë  ó ÞLjÃ011a010w“þ{V² þù N ›  ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶†·ÊÙä#w|‰›§³¿%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#26#"#*#"#"&'<1<5"#"&33:327265<54&'#"&'.'.#*#2&'.7>3203"32676&'.%%%5'.*#"&'7<546;7>3>3:3:76&#*#";'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632Ú:þx‡Õ #  $  $ ,'#8(-,-Y---$:Õ5!),--Y-,-++.  >?4 U 4,-+ ý#hþ™ð#þõ29($2 0£   /þÇþ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  & Ø©×x# #  $Ó+ 2$H$%;6'-&$I$+)#H$+  \"?5"'/" >LjÃ011a010Rç“þ{4%;+•+ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶x”ÔßøY^k}‰•¡%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&##"&'.'"327>7654'.'&2#"&=.5463232654&#"&546754632#"&54&#"%%%5'.*#"&'7.5467>3'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&546323“þx‡Õ #  $  $ 'H"$$""W0/X! Þ+&&88&&+,&&88&&,(   (  ýhþ™ð#þõ$"!V0–þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  XRØ©×x# #  $#!X/0W""$$")'8&&+,&&88&&,+&&8Á($ $'$ $ 8LjÃ011a010§’“þ{H /X!"$AÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶¥°ÏÝë lq~œ¨´%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&##"&'.'<#%>54&'.'.#"3267>%%%5'.*#"&'7.5467>7>3:3"'&4?622654&+"3'32654&+54&#"#";3265'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632sþx‡Õ #  $  $ 1/ 9"3(H/¹ 2+"?) 2+"?)ü`hþ™ð#þõb9"3Z½ ½ ! p H' '  ' '  Tþ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  ^XØ©×x# #  $^9"3(H/ 9" +"?) 2+"?) 2ªÇˆÃ011a010Êo“þ{K#(H/ – ½ ½Ù   ²  ' '  ' ýÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶s~©·Â×åóþ _dqƒ›§%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#32#!"&=%!3!2653#";2654&+53326=4&+"326=2654&+"3%%%5'.*#"&'7546;2654&+"372654&+"37!"!54&#'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632D¤þx‡Õ #  $  $ žþª þ{ V þ³3 . 3$eüÊhþ™ð#þõœ™«eeewþª … þ­þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  a[Ø©×x# #  $­ þ¿kªþë  W‰ ‰   œ ÞLjÃ011a010w“þ{V² þù N ›  ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿ¿¶‰œ­¼ÈÏÚùZ_l~Š–¢%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#7>32;0212#0"'&'.=#67>5##%52&'&670276&'"077'%%%'.*#"&'746730237'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632/þx‡Õ #  $  $ yS kþ£ «’'  ^"9 þ«,!gÂh+ý(hþ™ð#þõ‡¬–þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  TNØ©×x# #  $Í{ Q­ -2#+*+U++*( Uþö6 “#,  ±Î¾g,LjÃ011a0107“þ{K 9±ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÖúªDS…¸sÜ ì1"#*#"#.'.5<5467>327:332#"&/'./-7627'&4?57>7>5<54&'.#"#*#"#"32:323'&67>"#"#"#"&#"&5<?>52636232632323'#*'"&'.'.'0&54&5<5645063423023:7267>76454&'.'.'.'.'.'.'.5467>7>7>3:23333#10"#*'"&'"&#.#"#"'+3:7263>7623023001"##"#"&'.'.'.5467>7>7>32#"&'.'.'.5467>7>7>32#"&#.'.'./.'.'#01""#*#*#"&#&"'0415467>;:31<'<=465263627:3:3221#"#%##"#*#*#"&#"&5"4='.'461>3:3:323221>7>?>5627263:3:3204&'.'.'.#"3267>7>7>5%4&'.#"3`?>>}>>>!8 &  a`aÁ`aa 9 L  U“;  L’>99Y((Y   Sÿþú$"0c‡¸—ÈÜ%'7>'.'%&6?326?64''&""*#"#*'"&5<?>52636232632322'#"&#.'.'.'0&54&5<5641463063023:3>7>76454&'.'.'.'.'.'.'.5467>7>7>3:22333#10#"&'"&'"&#.#"#'3267267>726302321"0##"&'.'.'.5467>7>7>32+%#"&'.'.'.5467>7>7>32!##"#*#*#"&#"&5"4='.'465>3:3:32321>7>?>5267263:3:32%1#"#*#*#"&#"&'04=467>;:21<'<=465263623623::21#"+"&#"&'.'./.'.'#4&'.'.'.#"3267>7>7>5%4&'.#"3úz<þš w  Generated by IcoMoon assets/elementor-assets/fonts/wcf-el-pro.ttf000064400000030014147600244370015170 0ustar00 €0OS/2ø¼`cmapVÒŽTgasppglyf­y¼nx,headà -x6hheaÄÌ-°$hmtx&S-Ô0loca2*'.maxp4. name¿†Ù;.@ªpost/ì Ǚ̙Ìë3 @éÀÿÀ@À@ 8  éÿýÿÿ éÿýÿÿÿãÿÿ797979ÿÀ¶s~Œ—¬ºÈÓà49FXdp|%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#32#!"&=%!3!2652654&#!"3%%%5'.*#"&'7546;2654&#!"3%2654&#!"3%!"!54&#'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632C£þx‡Õ #  $  $ žþ©¡þ{ W *þÙýhþ™ð#þõ›šªþÙ'þÙ:þ© … þ­þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  a[Ø©×x# #  $­ þ¿kªþë  ó ÞLjÃ011a010w“þ{V² þù N ›  ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶†·ÊÙä#w|‰›§³¿%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#26#"#*#"#"&'<1<5"#"&33:327265<54&'#"&'.'.#*#2&'.7>3203"32676&'.%%%5'.*#"&'7<546;7>3>3:3:76&#*#";'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632Ú:þx‡Õ #  $  $ ,'#8(-,-Y---$:Õ5!),--Y-,-++.  >?4 U 4,-+ ý#hþ™ð#þõ29($2 0£   /þÇþ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  & Ø©×x# #  $Ó+ 2$H$%;6'-&$I$+)#H$+  \"?5"'/" >LjÃ011a010Rç“þ{4%;+•+ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶x”ÔßøY^k}‰•¡%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&##"&'.'"327>7654'.'&2#"&=.5463232654&#"&546754632#"&54&#"%%%5'.*#"&'7.5467>3'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&546323“þx‡Õ #  $  $ 'H"$$""W0/X! Þ+&&88&&+,&&88&&,(   (  ýhþ™ð#þõ$"!V0–þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  XRØ©×x# #  $#!X/0W""$$")'8&&+,&&88&&,+&&8Á($ $'$ $ 8LjÃ011a010§’“þ{H /X!"$AÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶¥°ÏÝë lq~œ¨´%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&##"&'.'<#%>54&'.'.#"3267>%%%5'.*#"&'7.5467>7>3:3"'&4?622654&+"3'32654&+54&#"#";3265'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632sþx‡Õ #  $  $ 1/ 9"3(H/¹ 2+"?) 2+"?)ü`hþ™ð#þõb9"3Z½ ½ ! p H' '  ' '  Tþ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  ^XØ©×x# #  $^9"3(H/ 9" +"?) 2+"?) 2ªÇˆÃ011a010Êo“þ{K#(H/ – ½ ½Ù   ²  ' '  ' ýÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶s~©·Â×åóþ _dqƒ›§%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#32#!"&=%!3!2653#";2654&+53326=4&+"326=2654&+"3%%%5'.*#"&'7546;2654&+"372654&+"37!"!54&#'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632D¤þx‡Õ #  $  $ žþª þ{ V þ³3 . 3$eüÊhþ™ð#þõœ™«eeewþª … þ­þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  a[Ø©×x# #  $­ þ¿kªþë  W‰ ‰   œ ÞLjÃ011a010w“þ{V² þù N ›  ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿ¿¶‰œ­¼ÈÏÚùZ_l~Š–¢%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#7>32;0212#0"'&'.=#67>5##%52&'&670276&'"077'%%%'.*#"&'746730237'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632/þx‡Õ #  $  $ yS kþ£ «’'  ^"9 þ«,!gÂh+ý(hþ™ð#þõ‡¬–þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  TNØ©×x# #  $Í{ Q­ -2#+*+U++*( Uþö6 “#,  ±Î¾g,LjÃ011a0107“þ{K 9±ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÖúªDS…¸sÜ ì1"#*#"#.'.5<5467>327:332#"&/'./-7627'&4?57>7>5<54&'.#"#*#"#"32:323'&67>"#"#"#"&#"&5<?>52636232632323'#*'"&'.'.'0&54&5<5645063423023:7267>76454&'.'.'.'.'.'.'.5467>7>7>3:23333#10"#*'"&'"&#.#"#"'+3:7263>7623023001"##"#"&'.'.'.5467>7>7>32#"&'.'.'.5467>7>7>32#"&#.'.'./.'.'#01""#*#*#"&#&"'0415467>;:31<'<=465263627:3:3221#"#%##"#*#*#"&#"&5"4='.'461>3:3:323221>7>?>5627263:3:3204&'.'.'.#"3267>7>7>5%4&'.#"3`?>>}>>>!8 &  a`aÁ`aa 9 L  U“;  L’>99Y((Y   Sÿþú$"0c‡¸—ÈÜ%'7>'.'%&6?326?64''&""*#"#*'"&5<?>52636232632322'#"&#.'.'.'0&54&5<5641463063023:3>7>76454&'.'.'.'.'.'.'.5467>7>7>3:22333#10#"&'"&'"&#.#"#'3267267>726302321"0##"&'.'.'.5467>7>7>32+%#"&'.'.'.5467>7>7>32!##"#*#*#"&#"&5"4='.'465>3:3:32321>7>?>5267263:3:32%1#"#*#*#"&#"&'04=467>;:21<'<=465263623623::21#"+"&#"&'.'./.'.'#4&'.'.'.#"3267>7>7>5%4&'.#"3úz<þš w 7%>3:12'&6?>57>26?62376/&#"&#32#!"&=%!3!2652654&#!"3%%%5'.*#"&'7546;2654&#!"3%2654&#!"3%!"!54&#'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632C£þx‡Õ #  $  $ žþ©¡þ{ W *þÙýhþ™ð#þõ›šªþÙ'þÙ:þ© … þ­þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  a[Ø©×x# #  $­ þ¿kªþë  ó ÞLjÃ011a010w“þ{V² þù N ›  ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶†·ÊÙä#w|‰›§³¿%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#26#"#*#"#"&'<1<5"#"&33:327265<54&'#"&'.'.#*#2&'.7>3203"32676&'.%%%5'.*#"&'7<546;7>3>3:3:76&#*#";'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632Ú:þx‡Õ #  $  $ ,'#8(-,-Y---$:Õ5!),--Y-,-++.  >?4 U 4,-+ ý#hþ™ð#þõ29($2 0£   /þÇþ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  & Ø©×x# #  $Ó+ 2$H$%;6'-&$I$+)#H$+  \"?5"'/" >LjÃ011a010Rç“þ{4%;+•+ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶x”ÔßøY^k}‰•¡%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&##"&'.'"327>7654'.'&2#"&=.5463232654&#"&546754632#"&54&#"%%%5'.*#"&'7.5467>3'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&546323“þx‡Õ #  $  $ 'H"$$""W0/X! Þ+&&88&&+,&&88&&,(   (  ýhþ™ð#þõ$"!V0–þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  XRØ©×x# #  $#!X/0W""$$")'8&&+,&&88&&,+&&8Á($ $'$ $ 8LjÃ011a010§’“þ{H /X!"$AÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶¥°ÏÝë lq~œ¨´%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&##"&'.'<#%>54&'.'.#"3267>%%%5'.*#"&'7.5467>7>3:3"'&4?622654&+"3'32654&+54&#"#";3265'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632sþx‡Õ #  $  $ 1/ 9"3(H/¹ 2+"?) 2+"?)ü`hþ™ð#þõb9"3Z½ ½ ! p H' '  ' '  Tþ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  ^XØ©×x# #  $^9"3(H/ 9" +"?) 2+"?) 2ªÇˆÃ011a010Êo“þ{K#(H/ – ½ ½Ù   ²  ' '  ' ýÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÀ¶s~©·Â×åóþ _dqƒ›§%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#32#!"&=%!3!2653#";2654&+53326=4&+"326=2654&+"3%%%5'.*#"&'7546;2654&+"372654&+"37!"!54&#'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632D¤þx‡Õ #  $  $ žþª þ{ V þ³3 . 3$eüÊhþ™ð#þõœ™«eeewþª … þ­þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  a[Ø©×x# #  $­ þ¿kªþë  W‰ ‰   œ ÞLjÃ011a010w“þ{V² þù N ›  ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿ¿¶‰œ­¼ÈÏÚùZ_l~Š–¢%#"&9#0&#%.'&4'1<7>7%>3:12'&6?>57>26?62376/&#"&#7>32;0212#0"'&'.=#67>5##%52&'&670276&'"077'%%%'.*#"&'746730237'%'4&/.7>/&4?6&/./.&/&"/&3726322?>26?>?%'%"32654&"326?64'"&54632'"32654&"&54632/þx‡Õ #  $  $ yS kþ£ «’'  ^"9 þ«,!gÂh+ý(hþ™ð#þõ‡¬–þ›¤  s  $ $  $ $  üQ¤e¢þ™4( ¡¡(  j  TNØ©×x# #  $Í{ Q­ -2#+*+U++*( Uþö6 “#,  ±Î¾g,LjÃ011a0107“þ{K 9±ÅY”     ##     $$YÅYÅCn¡   ¯   ÃA   ÿÖúªDS…¸sÜ ì1"#*#"#.'.5<5467>327:332#"&/'./-7627'&4?57>7>5<54&'.#"#*#"#"32:323'&67>"#"#"#"&#"&5<?>52636232632323'#*'"&'.'.'0&54&5<5645063423023:7267>76454&'.'.'.'.'.'.'.5467>7>7>3:23333#10"#*'"&'"&#.#"#"'+3:7263>7623023001"##"#"&'.'.'.5467>7>7>32#"&'.'.'.5467>7>7>32#"&#.'.'./.'.'#01""#*#*#"&#&"'0415467>;:31<'<=465263627:3:3221#"#%##"#*#*#"&#"&5"4='.'461>3:3:323221>7>?>5627263:3:3204&'.'.'.#"3267>7>7>5%4&'.#"3`?>>}>>>!8 &  a`aÁ`aa 9 L  U“;  L’>99Y((Y   Sÿþú$"0c‡¸—ÈÜ%'7>'.'%&6?326?64''&""*#"#*'"&5<?>52636232632322'#"&#.'.'.'0&54&5<5641463063023:3>7>76454&'.'.'.'.'.'.'.5467>7>7>3:22333#10#"&'"&'"&#.#"#'3267267>726302321"0##"&'.'.'.5467>7>7>32+%#"&'.'.'.5467>7>7>32!##"#*#*#"&#"&5"4='.'465>3:3:32321>7>?>5267263:3:32%1#"#*#*#"&#"&'04=467>;:21<'<=465263623623::21#"+"&#"&'.'./.'.'#4&'.'.'.#"3267>7>7>5%4&'.#"3úz<þš w  Loading... assets/images/image-placeholder.png000064400000030420147600244370013371 0ustar00‰PNG  IHDR,,y}Žu pHYsÄÄ•+ IDATxœíù—\å}æŸ÷}oUuu·–HÌ.‹›a;‰“q&sf‰s’Ìñœ9óGÌ™ùS29g&™ãÉà@°³;ÃâqŒ±±ÁÆ ¬^°k饺«êÞû¾óûWµ0‚V×½íç£ÓRwÕ]Þ{[÷©ïö~_aŒ1 „ g=By¿P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­¡˜õÈξBÌp$d'BÁjgÎœÁüSÜyçQôz½©÷µÖBdÂP–%Š¢Q×5Æã1Œ1î5¢PÙ6£ÑƒÁeUB Á`ë¨Ê NµÁ:–——±²²Š!ææºØØBJº6 Öóý>ªªP•êºÇìõz(”B·Û1㲄1…RÇÐÚ¸kÑ(ŠRJ…B¯ÛÃ\‹‹‹B@kÁ`“Þ@»±oß>,-íÅÒÒ:NØD‘‰¦ÖzÓ{>±¼¼‚µµ5”e‰ª®Ýþ@9®°´´û÷_‰ùùyHI§d–“þÏ'3Ekƒ?þã?Á±{îÁK/½„ùù>€áh ¥êZ£,KH)Qk !%„¨êÒ=œóó}hmPU•8)Q×5*'l€ýùytŠs½TQ@€Rb¾?~ÂýÜév­kM•e !””ößBÙcŠª1u];}0‰ìH·;% €²¬P–c¬Öa(%±¸¸¸sêZÃU(¬¯{a]ÁÚêÊr )%Œ„AðŒ1ÐÚ@) í£ ŠN‹ ˜ë÷ÑqÂéÏU׃ÁVVV°¼|ÿí¿þZŽ3„VƒXY]E~{öìÅý|Ì €’Ù”þ ƒ VHìÏƘððgV†ßoâá/ûÍEÇMÞèt¬Õ&…„é¹ÂÙăx±Ê~÷m¯×Å\¯‡]‹»à.#¾é77Væç±ÿÊýðwÂ{Ng€ÙSzáÔu]CJiV ÞJ&^‡\­5´Ö¨ªÿðÅ¿O¬V2 (X ¢ ¥Âh\B) ¥¤áÁ2á™ÝÄ- O§t£ð«Ælò ‰ôÁž~{Ò am#œ ¥c0ÖMvÊ‹=ï&Ž'Ó''lÉ%†ƒX«ÍçK˜D Ýþ&n% ”²÷1ÖæÇ™Š®„ûÀû¯Ü²,7uÕÉö@Áj6¦cÿe­(öÛÄ2ñ&ÜC››“ìâ÷KtfJ\¼û—žJ‘iŸ¨M´~ìnÁ%´þY·1€0:X2©M'`-’ëñÛM­?‘(™VÀ´—¼PBAHmÏ"¢X1LÜÝô^X R ßïS°f «A ôz½L¤Á¢IÝ¿)·Äy7Æè Ah¼+‰Ì³/‡íL¯T¡Â»&ZFÒŸ?Cº_*ć^¥n©xwÑ™nRÈdŒ&±žâ5ÄëMdnÒ2ôU¸wqé­Sï.{¹L,8o©y·Ú¾-°k×"ƒõO#Û«AŒÇ%ŠN­ ÷bÊò²dE%ZUHÞMͨàR…›ô0˜TUãÔCL*L’Ì›ÄȸòÁTU…ZׇX[]CUU¶¡¬0 Q×5jmK&|9È|¿ƒW]…W€ÖeYA RXóÛ!1ÏÂÂVW×pð ÈŒ `5ˆñhlËÂÃñAd£5ʪŠ¦Ë ú=DÈdå5CZ×ÐÚ ™ðÆZðÔÒ zbÑlæ~ºý´sélèG@×5´1GX__Ç`0ˆcP(…Ý»wc8¡S(ÌÍÍAHñhŒ•Õ5()B=–1J)ôº]Ø2[¾QYqЛ³u^®Ü‡\{¢!ì1víZDQtܵƠúh4Â[oý oþóX °¶6@·kk·ÞxýŸñŸüd,¡HÜdc „”¨êêƒýrÉ–@Áj«««Ø³g ½„`{ð\`ŒÁ믟Æòò(U@) [ƒåÓõÐét!¥@n½9óµK@UÕ¨ê uUO¡J©l ¶ô@ºqX¡³âÔív¡”B·ÛE¿?gÏ-æææ ¥Ä•ûvaqqºÝn(Rb<ac8t–  1 ‰~ —©(3ß~¿›nº7Ýtc¶Õh4Æ_>þôçúS»{Ï·ªê –d6P°„Ö5ææcæÊÅh £ Ö×7ð;Ÿú—Ø»wï–œó½ê†·ºÞh®×ÃîÝ»·ô˜[…ÖNð'Ê)Œ1>5jガ³ž)ü¸hBȼÀÇx’øŽ”*¸Z[sNqѯ_6FãñT‰Eˆ!º UE—p–ÐÂjR (¥‚V%)±tVJAÐ-Ùrʲ´UîY©†ÉjÕö-íÃòò…™‘ÐÂjý~ßÝcÜÊ‹2ýt²µ,/¯`×®]ñ>On` æçû(iaÍ V“1Ãw1·ÌWÀ“­åÍ7ßÄÁƒ ·&på¿Œ®r“àÿüQ»l_ŠÈþ¶ó )X[ÏÙsç°gÏä•îÇõuÌqZÎLáÿüQ–¥s÷’ùlÉßI}%ÙbbQîÄô¤ä_?’Ì Vƒ0¡9RJ*¼ úýyŒF£Ù p‡³iÉB2óZJÅøጡ`5ˆ²´]‘<$iLÅ(ŠeYÎ`t;)dÖ 'L4÷Ý1¤@jù’Ù@Áj£ñR¦Q+„¢E_éî;†’­Å[¶Zë)w0méÃ[?[(X Bk ¥ŠÐº%Vº#ˆ”Rró,ùPÔuœ¦çÆ?pS‰TÁÒÅYBÁjIë˜ RA^Í:¬Ëƒ°‹aLö«ñ3´18a{÷ì™Ù «QLõ7yö :…B­ëÍ°C¹páΟ¿p™çñ%ÉŽÍNc –/\`ó¾Cû¶AÈP0 x‡$4ísnÉx\þRÔa666\‹“dšHx  z½î¬‡¹eŒÜJ×YFȦĤávïú!±¶‚¨ûþx\^r¿°áp„¹^oª„"L-tÎwŠeÛfXéÞ ”[¢]¤ü|Ýl¼Ç¦ßw{öìÁ`0ˆÓb€3òøuLí{ÈbYFˆ(ìÆλÜ/¹]{oÃ9`ï¹0öß!ƒg?2D~Ãá0N€öY3Ä–2½îÎ)ݽ{7–——]¬Ê»u6V$ƒe’{0Qr¸îTeyÉI ­õDF¡¥Œ6úâî)Ùv(X âÀþýX____íöeêtwŽKØëu¡”DYUA¥ÒNxN«Ý…PR„XRºB¶—ÕÕ5ôæz@\ÄT@ÝOzöß !²x™ ¬±gÏnt;ëùH‘Çj¬¬¬bÏì°¶¶†Ï~öÏñ½ïËÆ»\ݵXYYAU×Q \Æ/|‰ýã¦Ê¤YTW…þâw^ÄoÿÖo^r§/eðÓ>;)\üŠ‚5[(X BJ‰…Å÷S¢TŽsgÏbiéÒ‹Fü“Ÿâÿù_àø}à[/¼ˆ×_ãÃv‹øÄ'>ŽWð2666¢hyÝÊ„ÇÄ x| ÚhèºÆ¹sç±´w]}ð’Çà§÷¤ÙF‘裷°äD|l?¬†Ñ÷Au3‘G7««+XZÚ{IÇûé[oá‹_|÷?ð F£î»ÿA|õÙ¯ã»ßýÞŽúƒÓívñ™ÏüN¼ú¼ñúë(« U]ÙÚ°‚MÌÖ¥_µÖ¨ª£q‰oëüëßý$(ÆÀÆÑ€¬-u–§¤eÕ(X c<oÞ¥×õï]ÂÊÃ'OžÆSO}÷Ýÿ€ dK…ª®qç]ÇðÊOáɧ¾Ô§ßïã3Ÿù¸êÀ•øæ7žÃ»ïþ£ñUU£®5´¶_FèZ£®kTu…ªª0ñì³ÏàÿàÓؽûƒÍPJbc4Ú¤.5fkµ1;´qb›ào a¬¯oÄ`r¶Fž‹°¼O âäÉSøö‹ßű{ŽC PŠB¡Ó) ¥Àí·ÝŽáþ ˜#'„À}÷ÇüÌÁÔc<÷õ¯áGo¾‰ÑhŒápŒñ¸Äx<Æh\b4*ñî»?Çw¿ó|û[Ïã?ÿ§ÏàW~åš|î……,//‡Ÿ3Oê½Bo.23X‡Õ0†£aH©»˜Iaäû;Æ©S§ñÊ«'päÈQTuN¡P*ô%BÀHƒn¸Ë–ñù üáü>º È@öz=|âÇÇ?þkøúןÃ÷¿÷"FãJ*ŒÇc!°0?‡C×Âoüú¯ášk}èsJ)¡µÙĪE¨ÅÉÚ­ÙAÁj帄®Å#efÇå/¬¸>sæ ^~凸éÆ›QÕ”²;}©ŒŒpÝ $ö.íÅ‘Å;ñù/ü5~ïßÿÛKr9/'B<üðCxøᇠµÆ`0@·ÛE·Û½,‚!/j=ESEA±š1t DUUXs•ß¶ra™t!ææzX__¿èþçÎÃWžùn¾ù”U!¤í3%cC@!d²P«­®ïv»øè­·ãÑGÇp8ܶë}¿H)±k×.ô&§Ïl!J*›Ü佸l=>TWSòá¡`5K2Hꀤ+ KKKØØØ\PÖ××ñÄ“_Âwݪªâ|¼Ðù7f¾ÂŠÒJ¢S˜ï÷q×ÝÇðèccccãò_lƒÐZGWÏ¢ˆ-,,¼ç¹üP°„ÖÆuÞ´VEpã„]³°Ûí`³6¤Æ<ñÄS¸÷Þ{Ûh\¥xÚt ™D $V–=R sý9;vO<ùÔv]r#ÐZÛÂдLŠ«Áš›ëÑš1¬á»kf}Ýý{ÖÖ(Šé°ã?}å\wÎƨª*ˆT a= dÓ*n\E)%z½vïYÂW¿úìv\r# ˜ëõÎÎÙÌõôådvP°DL§ûJë¤ÚÝ??{óóóÙ>/¿üHÕA§ÓÅx\B)‰¢Pv]?)³`rš® ;d|ë‚^}ðj¼óî9¼ôÒË—íZ›ÄÊʪ½¯"•Z§v4§æÌ VƒH­cK»C{[Tš¶Nyçwñ㟼…ýû ,ËhYywÒO –"º;I?2ÿGÀZZ·Þz+¾óÝ—ðöÛoÏæfl#Æhk^D‹Œt­±¾¾>õA¶ VÃH'ù†æuÆ>TÝN7Ä«ªÂ3_}‡Æx\Âw°±+1áö¹•x¤â»íò W6‡O)…»ÃSO?ùÉO¶÷&l;Âö"K¦àĆ5qÐ`}€~¿?»a V“PJNWS‡¹sÀÒ¾}xë­ŸžzêK8rô(†Ãj]ÛÀ¹OÍû, âSqaXk ±ƒgh*T­¸…Â]wó_û&¾ñÍç·õ^l7¾SæF–ûŠ+?Ï VƒðõXz[@×\s Nœ8“'OB¡,5Fã±]º]Nˆ]þOÞ¢%í†7D@Eƒ’ …R¸ãÎ;qæíŸã™ˆ70(”̺™N6óƒA˜-@f«AøE²xbüinn«k|å™gqÕÁ«CF°PÒuéÄÄ~Ö€¤?|œ˜âW­ñ ¼kØ) ÜúÑbc8Æ#Ÿ{£ÑhïÊ6`–ùºèü'Kn½L¶ VƒB`÷î]¾3pÀÇœ„XX\ľ}WX¡*Š¢€T BJÛM -ÍÄj…)¼£uh l L¯¿îz9r}ìq¼óÎ;[f„6¡ k#æqÚ­¸Eào at'?ŽøH¾åæøåða(%Ý:z1€>e]…ˆìxYidÒ .[*~bBH%Ñï÷ñÐCãëÏ}§NŸÞ²ëž5¾yàT“@‡oàGf «a\X^ÎÖ"#•µ Šd2sÈ&Soüö¾]ÀÄ÷­ëCßO]Nýó¹tR =z'^{í üà•W.ßÍØ&üœK?sªy¢{Öìáo a­§³z@Èö)7Fù+!r‹ -~íQÃ10á&ú ¤/Võ¥ö}64:Ê–/ž¿å–Ãxûíwñ ßÚÒ{°ÝìÚµ_²®ÜÍÒ—Ø<‘\(XMCÄZª‰uÜûqÒ¥â“åF§é®áù6qÿ\,E衶ËÈ o¿ÕZãС_ÁúÆÏ·X´±±±z^y|,уªªÑé°Ó¬¡`5/Vi%ºoœ}ü'+Cû8S¶)bJ>Í6†Ô}³ššÇ˜ †ÑÆèÄE4Ö…T®:ˆóç—ñÊ+¯^žr™ñ P„•¶¾6Mƒ²_òz‡dë¡`5Œ¹^7{º×¢…£³…=Ëô$½³€˜šwæUVÄ0›–\¶r ÒRˆø^XÀÔWI…ë®»¯¿ñ#¼øâw.Ó¹¼Jåk~ {a—+XÖ0s(X ÃN³‰ç–…ú)ç–ù/¿D{lÒCí~Z Œ[ŠÝgÁÒIСq]¶:Œw='âdéX‚*m½Ö-‡oÁ¹ó+xæ™ö˜vºMK°|Ü®ªjèºÞæQ‘I(XMc"Ž¨BA*ãZ.î|¸ (“®\òZ”¦îƒ¾%MëÒx—ÂK_E?Ü7Îüðe ùÈG U÷÷ÿ€ºEø\ï"+F‹ó¢s£É6BÁjþIcNB¸:«$3è²y*iòÝEÊã3öÁÌ]¿M›{!t]OåŦöp·ÿÀ~:t-ÿü_µ¦{i·Û™²n£‹l²{Ff«a1®Zì®ÅÊOvŽË¹OÐu Ôë‰Hƒµ…i÷0 ÀgÕi_xøz®L%Ã1¤”XܵˆÛÜ/üÕßâìÙs—ù®}x¤R¡Ur )¾•R¢®Úc1îT(X cr©¬EŒLZÈ$“C1¨ïk¥ j+·ƒ…àŒ„,pÍ¦í ±ÈbÑhì„ãYÙ1LR„*%zÝ.ŽÝsO<ù4Îœ9s¹nÙ–àçenjD¹×tŸ=,,iëy^ ’î¤p?ÇBP,(¿MÏë ZRÊðqåCîápYvQ$V•ùÔ‹¥"·À¤@…»î¾O=ýe|ò“¿Ž«üwÇ×DUØŽ0 P•%êºÆúº­£:pஸbß90ªª‚îv L´X£ lÝo2[(X £ªª÷qO(50fRØŒÆ#&eBÄ÷}]—„„nW{‰c&b$¢¨y± îSˆà˜IÑ* ÜsÏq|ñŸÄ¿û7¿‹+®¸â’ïËù pâ‡'pòÔk‡(Ë Ý^ý~½^‹ €ï~ï% ‡ø­Oþæ%­ÝévQUõÔ-HW¬™CÁju]#4+NŠ9/Fb…„±n£·â\Cg!%‡Óƾ:uP ï檧=o±!Z"F˜0ðH)Ñétðàƒâ¯ÿöïñ¿ÿiìÚµø¾îÇ;+§žþ„¸êàA9z§ÍØ™¼ÈÕů>tÝnO=ýÿpôèÜ{üØûêa¥¤îÆ-a¬˜ !Ð)è6~d4c ”*¦bCiœé¢yªÄm›j<™q2©ï2±D"ñ =¾`µvüqLûµ®Q×öK×:¬.ã·lоStpüø½xäsÆv.ïÁ·_üžþÒ—q÷±ã¸ýö£XZºÂ]ƒ Ý*ü¢~á c †ÃŽß{Nž:G>÷ØûZKÐ ¹ŸŽcïEŒ…z¯»O¶ VÓðž[Ú1 é3žÙ &„rKk¢nʘ)K @–AÌŽ“(¤*+L¶`5–IÔZ£®4ªºFåD«®ìWU×YæMHùþ<î9~/ûËÏ¿gÖ÷_zo½uGŽÜÑh ¸‰ß±•Nš€(”펪\½ZYU¸í¶#¸éæÃøŸúY¼ôò+¨ë‹/Ñå“ &ù“úºÝ^Rðq™5ü 4 ?Õ˜ o …€·ŒGaÛûJ÷¸L•N¾7Ñš(y@ø'·(L"¤!°o¬èiomÕÓâ¥ë\´vïÞ…›o9Œ?ý³Ï†. )/¿ü¼ñÆ›¸ö#×A—.+b— [ò!£鲨J)H%C€¼Óéà_üê¯â›Ï¿€¯}ý¹‹®+(ü„óÄÒô÷@¸páÞ÷ï‘\(X Cʼ¤ÚLZF‘>[S”/o°%Ö=«ëÄUÓ^Èü—ά§f˜r/ÓþXiͪv5_SâUU™hI!±oß><ðàƒxäsáĉ“aÜgÏžÅé×^Çu×ßc,§°PZΑºÁ2N#R~©3W¿¦µÁ=÷Ü‹·Þ:ƒü¿OljÙy×/ØVYÍš½_ŒcÍ VÃðˤ› ›B“ªZãJ­*W4êbP>ÎTûŸuRåEl²E² ‹XOcd~ñ‹8~®Î «½;™Æ´„@¿ßÇ'>ñë8ýÚxäsâܹóøÚמÃá÷¢°Ö’_š,³¦Ò{!âPývq:‘o:hpø£·bqq/þì}e™WµG78à±rYUÆ°f«AXÃFÉ,­¸A^²l`rå \í¬­5ªZÛSŽ×® D*pÓ­VÄäé¬oÑlÒ–"VìÃÀ¯ž,4{œ[n9ŒûïO=ý4Nœ:…ѸDQùq…¿fæ?ÆjûD0ííyƒ5&CÖt×îݸó®cø›¿ù»©„:¥PÞfï…p¢Gf «Aáº* – „L[’5œn#3™Kô¤±&·"N4×Z#¸p!»ç„+šy@1å¦ù‚Kû¥¤t‹dؽ2‹Îè0í§®5î¼ë>ý{ŸFÇeüÂT$$¢$ˆ–ÕDÁNG(Ü¢±.@¯„`Ðét0.k¼úÀCh¶IDAT‰›*læ2­úðV%|l‘ÌÖa5ïFù‡1X9±S$Ÿôù?Å×-ÅŸÝR’ÎxnZ”›W$4ÆÄbQXa°"+Ü‹>æ”YI00éõ¤c‚Àp4b•™ù󹚟÷˜¾ã]âdÌRºz6 i­5n»ý¾ùü·pþüy<üÐÇ „ĸ,áëð¾ÜAký‹o4¹ìP°„€*ŠPK• ’0ªØ}q£W$“(‰1Y«MCk8÷Há³µŸÉTc`DRIŸ¹¥&-áü/?;ÛGÅ÷áã^¹»¨a;˜×R„Ð9¬N9+Í _˜_é®Ó—¤+—AôÝœ*J7£í±µÖ8~ü^¼üÒ÷±wϬ®­¡77¬4c’Xl?¬ª®.ý—J¶ VCñk«òVS,Xa1ÞÔ0AĤ0Ê­£ DG÷Nµ˜(òÖEâbHÎ ãG>n’mE¼†¬ò= Êk£í¼½¬ÀÕïŸË Xòz°®œæ!¿ämv0€°¢ZUî¸ã.|õÙg±ºº‚O}ê_MÛŸ¿?ßÇ`mð^¿2² P°DUUPJÅ„¡`×ëÂŃÂfp.V0½Œ³€¬5a |æÏYd~eü²^5|‰R\I'fýÆMœö‘¥`‰\@BÌ)O˜°gŒÕ9s&™Ö­¬ìJ3=ŒŠüñ¤ ìgçJ¶qÔ0RÂ`\–¸÷¾û±¾>°–g2P“IºeÀÈl¡`5ßâ$u,I ƒÌÚð¬˜,ƒp®¤á}cì>ó(Âyê VZ›¼Š"9q™J{\Ð/ˆW*U¹”\¹ð¸ »wqSë IXË»ÃþØB@РYR€D0)ƒN°<{÷îuÉOæ’~ ’]1ˆÌ VÃð)tÿ`z7-ŸfƒÖòà40!vñmᦖÈÄ 2FÁ°©}ë¦q ï²É<Žå²ééµ1™¸`bh1ßh·±x'Ž¹Ä!X_ÉÅ!D°’§Bfë¿l64$ÂMpç2Ê߸i?iM™ Îûº5Ò (X ¢ª*·z& 1dbœÉ[ÞóY²‹Ê ¤˜xÝj‚Ì*\tC,S¡ÄòŒÐ›¸|˜Ž]ALó0Q p§‚Z»ÀywÒמù¬Ÿ€vÅ£Ù-q–gÌt†û&ËØjyZZ3‡‚Õ |…·‹‹ÇÒ÷`Æ t®ó@¶T}T« 8&y¸SãB¸×ÒÌœ&¼¦Ø8aógñ1ò ÆÀ‡¹}mW°j&î¹£"Íðb> c“PXnHšd 3?Æ[¢^äŒM|êЄ/«ôXFø©8&ñ !ZµÐN†‚Õ Ö\Ú<ˆUBÈP9ÕÐ@­Ã›5©3q¡ÕPëD£M‡|žæk7Y:Ž#ºJ»¢F†¹u©›”†›6[AÚWÅK7æl¢5òÀ:‚ø‰¼Ê ñ§:N †î¬–¸ÖÐ0Z‡{á#Dt}i†q¥±È6ù™AÁj‹ ó¡)uïb9‚ňÄõñ¥ ÆĸSj‚d±­`yÅh’߬/Ü,“ïc&@CÀvAÐ2V€ÛÊöM–31'“À¶2ÂÖ€¹±¥çÉ÷O¬Ääx>)‘·Üq—š?†qÖ–«Ê@:½Èßg?N!º½ʲr÷DB*Îd›5¬¡”²Mæ‚ä]œøi/¥ ²'B|ÌǾ.CFPfn€ÊâôN¸|{)í:eÊ W¥­ã‚³Ää„•ÅÐLPÜ#‹–ß{ªòá„ÙÇ®~Áöi²Ô šwkýj¾-Íd@ÞCI £ ºÝFÃÑ/+¹¼P°FèÐ)bÜÊ÷’ÒfÊü ÐÙæ¾ ÓZœ#ƒàXó(Ö=Ùs¤≠$ ¥ 1©èråA|iÕ'NRN3}ÈCêyØæbE%»,Fg6qÍüux«Ê dÿÒ–6ö'Öxùô ¸{/…­[3ÊuN§ƒA;…ÝÉP°„oa{J™ØTOHaB h*>Ø+oÈL¼áb:„ÉÀvÇ8­%ñ<£E· «ÏÆù÷.X(SAöôÛÄÜ™ºð0@§Iéô#[ïcM¡‚B„BnÁ˜0]ÉÀÞ3íâS¡±ßD/+pÉB¸F©P1ð>s(X ba~ë붖ð ž:!PöÓÆ ŽÈÕá©Ob`!6ƒÄ*I-¬M­_„qµ·°| 1P(¬H^‰åq”yX=I…R‹ÉJý4Ú.òmýè¸o ±Mñ †’*‹Ï¥û\ºrü=ìF#º„³†‚Õ Š¢@YQ×5„siü?õ§]¢Ì @:9Æ«¢õ’á'¼<cìú|pq,?o1‰…Å|l©®];˜(ÞÌÆr© îDtƒ4M(HèÔà®5 žÇÍs¡”ÆÆ̤’™ešØý­néT}…x_+ýË «Aôz=”e m ¤ .{±òå œÑ3Z6†W|±Uëq•f ZY.Dÿ─a¡»½@ªBØö0ÂØ@{º0V<äd€l‚DOæü¹BÓ¬4*µ&E"Ö"¬ðÂÑ@ËÕÙ$xWÓ¸iI¾ÌÁíz!¯UwÈö@ÁjEQ„©Õ RÁp®!tpݤv›}‰‚tAw³]¼ùÃS@èBš×ýyŒÑÐZ&ã¢Y6é’ú—íñuRr0ù¶¾öÉÏù+””aã…ÂõþŠ¯‡ñ¼‡PH¬<÷ÍT,-±º\ÉFŠ ÷íâ™I²=P°F·ÛqY«äaõ•wU’ø‹-Õy¼JkH#¢û—qô‘ug‘ù*Ò:&­½;dâÒWˆõJ!äƒ<8ºl~ehÿÀ§–œ€ã—¡´`ZyLú—ØD$/"ˆ©´LnâoC|͸‚X÷5Ynå„Qr©ú™CÁjE¡²xŽwK¼ØÄ,^LQàDòÀ†N ¾,!Ý߉NZmîæJ%)ÿÔíJ³€V_ f'e¯fb ŸÁ„µÞ‚iÀHß;ÙW·«Æ$Vf0Ýu›ðSö~:Θ@%Äñ$»MdíÆRÔþ^“™BÁj(©¥¸n³RW®¤šªØÏd€´÷Ÿ¹0ÁB8f<)¦M‘¿íM¤±*Û£9^?ŽðÞdÞÌŠDìïØ[šS™Å‰á%²­Í¤l$Í:BØ&€¹6úóÖÎu&³„‚Õ0æz=Tuž²––F,$õº.+èŠâÅÄTAB?(»A´T\­WjpäÖRþ€Oѽe¢×Ó„X•¶]¼»©ë:$¼¥‚é ?[q.ÃÆþÜqêP8×&®ç¤kœ&¬úë–"¯ƒ‹©oMf «a8°k««è]qE(ˆÌ¬÷¯€°U؉ð¤SpÒîš1îøB ÚÒ(·î&ùJ'»Y’Í‹¦X¸à§nGB?eÆVï'¢àŒ/(uµçÔÚ@©¤ÜÀ¹ÂÆ‹u0Õòy…VÌ㵦¢o–£0•ðû»¿¤ètø¸ÌþÆpâÔkØwž°3€Ø:HbIöAõ+5KDK+Ä©ºiî/ÛJ^rÒã‚óÆ–. º„BØI×AÓÇ{32“?Ú¸• åq"_xj›ìÅ`|ˆÑ¹Hx]ë$S ÀeJ}‡VÚP¾!¬ ,—FLìÒ ’¤Ùø},ŽÖÌ¡`5Œýû¯ÄWŸ}×^ûÆ=¤VBWPƒÌ“õX²ïšÈ²!5c2‹+ßÑ[haé¢Êt—Mê¤Â8ƒx—ËBÎýƒ]70XJ!È-ÂuÆ ·ÿha u´ø²ø”sãdÒö8µ8¥^_w& ™À4ÓéÉžX³‡‚Õ0°1Ü@Y–Áe­ã„]/Xa¹.À®c|Æ’zѸ¸³†Ìú˜Â‹U°Ö2û$×·‰—ÿ9ÍRÚkI+ÉC••¥éhåDëjúdÖ½´ÛÔîzƒ»›Ë*‰Pð™Ö˜…r+Rûõó‹ O„Dá\Â@ÁjBôºœ:yn óó(:Ôuþ\ ‹ aÅ—ÚØH¹Õ^º.ʪ ÁaoeÀž;…BUÛÆ{™f&$È¥á²|ÙÂ8§0Ý%É6š¸Øéäô"_êÅ&Ô›™¤ÌT…ü¤ù'BW c'g'÷°pËÝk­Qé €@¯Û…T¶ù`YVRC åîb6Õ%"ªºÿN§€bÖ̆Å%c<ãìÙ³ Ö±¶¶æV‡XY^Áp4ŠQcÐ) Û °ÁóÑh:‚*UØBR¥°0ßGYÕa¯_\¡77‡Ý»÷`qaE§€R ¥‚û$}à: ’§n©ý1Øû$€1®ƒ©±sùt­1.KŒFÃÌòÉcS&ˆ[¯7‡N§Ä'›À »^`§ÓAQ(m0 pöìYlll0‡n½Gig¶XÀêêʲ„ÀÒÒöï?€={ö Pl§ÕÕœ:}åx„#GnÇÇ|à2ýÖÉû‚õKÎh4ÂÏÏžÅÙŸŸÅÊÊ ´ÖX^YÅp8BQ(ôû}(©0 ljß ‘ûÀp8‚”JYñètŠPÊP×5´³êTa­­ æçÑíu!„@]k»ÈC’ñÔZ£ªj”åeY¢ª*øù|¾‘¡²N¡  +²{—öâªû±°°€¢(°¸¸˜/N;1ƒÁ:Þ~çmœ9ó6V–W0.Çîzö_y%¾»wï~ÏØÙ(X¤ÑLþ÷L‹FÅE£rd§BÁ"„´F !­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZ‹Ò(X„Ö@Á"„´ !¤5P°!­‚Ei ,BHk `BZÃÿÅæâî'íKIEND®B`‚assets/images/order-bump-skeleton.svg000064400000003102147600244370013735 0ustar00 Loading... assets/images/order-review-skeleton.svg000064400000005062147600244370014302 0ustar00 Loading... assets/images/placeholder.jpg000064400000015641147600244370012315 0ustar00ÿØÿàJFIFHHÿáExifII*ÿáohttp://ns.adobe.com/xap/1.0/ ÿÛC     ÿÀ ÿÄ ÿÄL  !1AQ"7aq³Bu‘$2RVrt‚’“±²#6s”ÒÓ3CUWbd¡¢ÑñÿÚ?ýˆ]u3‹ÝBÃ3û¶)m°Ú$‚‚µðÄù¢•^æ¢ôUÚDMþ¢ýÆ®S^qË}â¥l•tQM#YØŽsʉ¿wSÚkæ¯qgŸiþ£Ý0ûMŽÓ-= ÍdRTE"½QX×uÙ誽ć‡^%®z³Õâùe¾Š–©´é5Ò#š’"/žÕærõMÚ©·r;À¸Š[ˆ^(.ú[—Cˆâê©£¦I.¬kÜŒsº±‰ÊäÙyz®ÿŒ†7D¸¨Îµ/Rh0ÛÕ’Õ 5SeY$¦ŠDzrÆç¦ÜÏTíjwØ<׫½?gª¾Ý&Hé¨éß4ï_šÆ¢ª¯Ø†²OÇ.£­CÖ›³6%zù6¾9UÈÝú"ªIÕvõ%‡döüÓ Ê­nÞ úVLÄß~UTêÕõ¢î‹ëC$ ^a™c˜‚l—)¹2š’ê÷uW9{Ôís—¹×|׎²¶­ð`xõ- *9Q“W5e™Éã²*5¾Ï;Úamœgë%JK[%²²=ü覢åÝ=JÅEBíÑ$±Í`™lrÛd·]ã‰du*»ž9›næ?dñNŠˆ½{Ë$ê®Y_‚éå×.µÁµ¾R(çEV9wDë²¢÷øšñòäÔÿÉ»îfÿP|¹5?ònÇû™¿Ô%ºÅ6s©º“C†Þ춸iªc™Ï’–9éÉž›s=Sµ< è=¯^š2O¥¥þ&æ`Ø{7Ñ4þé¦TÒ®&=9ä?¥Gî˜Fpœ®ååÔe³tž‚¥²#vçoÎbúœÕTö)»Õú‡ŽPéãõ/á<öæÛ¾Ç"¦ïj·v·ó•U·ŠìhÞO\òüŽ·&º½_S]Pù¦TìEUßdõ"tOBqÂo§{7æTû‰ É+Ʀ¡üA„Ó`”3íSy“š¡½[NÅE_Úw*{ãZáÄï“â“æ±Ñ9mÔõ¬¤’ \Õr'ØWþ¤ñ6 ‚ Cøe¢¿MkçÞJ7|.½±9v‘©ìvËúê_€Ô>-u&·1ÔÊŒj—|_czÓÃ/šé¿Þ=SÇ7ØßZ“Îx[Æk1š\çQè>5ti5¾G*GKÕ®z'á9É×e舽Š½–eû‡È-î·Ï€[é·nÍš‚‚F/Š9›n¾ÝÐóèž‚ãÚ1|”5Ž­«­™~üš4k™/›OµU6ÝvéÑ á â+ЖGôzÿ3M^á·°f:¿mÇòkk*èæŠu’žETG+a{“±Qz*"›=ònÐÿùwEûr˜÷ã:-¥¸uâ,ƒÃi¨ë!G$U¹ê­G"µ{\©ÕP”GµëÓFIô´¿ÄÜÌûfú&ŸÝ4ÊšUÄǧ<‡ô¨ýÓ ž»išXñKQ­”ûSÝlT‘Wr§FÔ6ìïÖj}¬_=S«¹ N‘A¤orüƒ§ò¼ÝV>ÖÅ·‚=\ï³À‘i™­f–f¡t§þ®–Ñ5-³™;dVÿXôö5Q¿¬¾Ÿ„ßNöoÌ©÷’Q¨®rì‰Úªi¼êêV§\r&礎OƒÛúôò,ÝSó—w~±lcùTÜ?®“×g6¦ª…_S/Àg^Z·yèíÑy^OcJcJs™ôßPm¹tNrÇMP‰TÖüø]æ½?eWo^ÆõÒÔÓÖÓGYI3dŠV#â‘‹º9ª›¢§©Pæh~«Ã=>§äPÕ"¤½ÕsoýëÞÃj¨«±Ue¹Qiå·@ø9{94TÿÁè½ÖËm²Ö\`F«à¥’F#“¢«Zª›úºé§Ü`ê~UÙ±›ªÈÚ{…Ò yÝ ,¨ôcäFª¢¬ªˆ»/‚›*BøŠô%‘ý¿ÌÓM1\s#ÊïqXñJ jk¥G,PÂäG*#UWeUNäR[òâò&çþ!Ÿç..4ïQ0kò\æÅUFʘ Je¨‘̨çï¶Ê¾(^ÑízôÑ’}-/ñ73þÃÙ¾‰§÷M2¦•q1éÏ!ý*?tÃdèðJ=Iá¾×ˆUò£ªqÊU¦•ÉþÊfÄÕc¾§"oêÝ C¢ÄïÕù\xT4K”•ßø;“«eæåT_ —µ}FÜçØ}»á¦ëˆÚÑ<• †F+öÙd~Û¹ëës•Wë5ï„ßNöoÌ©÷’W\PêôJªÛI?%m×z*M—ªs"ó»êfý|U dÑ­¾k5ö¦Ïi®Š’:Jo+=TÌW5»®ÍnÉÞ½eK'ä#”þ_[ÿÂ?ÿ¥­ZÑjªî—(k`¯ëD«QÕMب½û*/×ê6„Cþ˜i‹qêÉù«,OJw"¯UwX—ìEo깬\bèíÂב¿T¬”n’‚¹—/&Ýü„ȈÔzø5ȉ×ñ·ñC üUÕi¥¡˜†_lšák…Wà’Ó¹<µ:*î­ÙʈöïØ›¢§­6DfkiÝU‚ªß`Ç.ÕÔS>&¥C#‰æj¦ê¨ç/Fè}ev¯ãQQRÉ+™z¦‘튪Ö6F¹Î]»‘UWÁ æ!|EzÈþ_æiªZŸZ4ÏR¨sí=D´ÔÑÌײ•sÕ_š›#•µS¼¾þ\:Uÿ¾ÿ†‡ýS+„ñg§yæUEˆÚ,÷xêk¥VDúˆ#F"ì«ÕRE^ïÑ=šðy‹æ¹mÃ-«Ì+á–áTéŸ p±ZÅ^äܶ,¶Èì¶zK4R«ÛIM-{“«‘­F¢¯ØzJP¸FÆu 2®Ì«²Úúyk¤kß P±ZÝšè«×¸³q{ 8¾5oÆ©ç|±Û袧d¯DG=Ôj*íÞ»cÄqX®ë mz¹\µ©FÄ•\©²¯>Ûï·¬ášâôù®'pÄêêŸW WBùcDW1½7+Í2áCÓ,Ò“4·åUÕ2Ò$ˆØf‰ˆ×s1Ì]Õ:üâ×+Ýfáúß­::ëÆWYI dÔñ1ZŽrîçõï]šŸª†KFôfÁ£6j«Uš¶j©+*YêªÔs‘f·§ru_ÖR`EµsJlš¿‹·½TÉOäê40µñ¹7EÛ~åETÿði Ö½ÈåÈ,¹}uJOL°ÏM¥Èo°Ã–š è jµŒ’9Ý‘US¢"ö÷Ÿ5wQª´òÅJë5±µ×k­|t6š7¿•¯™ýŠåüTïú“¦û‘œ“!×í1³»:Ê.;Õº™ÍuÒÝCHødŠ%TG:'ªùÛoó“°±–íV?ñí²D’9(ü½;Õ:9ªÎf¯Ù±WéÆYÄ~¥aÔ™®éˆÁg?$UUíå{˜»ìåNÖ“ü¢õ~ÅôÖ¿ ©u,—;}–IäV1ÞEÓ²%r슻òó'fûì}ÓLŽ¿/Óû>Qtdm©¯·Ç<í…ªŒG9»®Èª»'ÖaôÏP/™~e—Ø.±S¶ Ñ”ôK jŽV*;~eU]×¢vluên¢äö¼ž×¦ºyo¥žùuó,ÕÊï#GNÞÙ껪*"x§°Âßsm^Ò ¨ïz_i¼ØjjÙO[UCJè&¢W®Èý·Ts7íï,l†¾k^?]t¦F¬”ÔrË=7Nf±U7õn†G2û®{¦–œº÷-ª­…Ï™´ìV±$sSdUUNˆçf¬åW<#Nnù]‘:ª†—ÊBÙÚ®b¯2'TEE^ß'lºq;YŽÓeTÄ+YQFÊ–P6ˆä‘®j9ŽWlŽÙvëÓr[¥ú…A©Øu>UEHúg½ÎŠª’EÝÐLÕÙÌUé¿ŠvtTè„Jí›ëóWoz}ÔØ)éí4”óyK¥4®s¼£ª›±Þ*½Ý„χPá¡™º‹[iž¡eûÝÖˆ¤c›v;Uwß~ C›kŽgdØþYÓRXn §jÜ©fsÞŽET]Øí—±| –)¨ùí«Q¡ÒýT·[>_Fú‹UÊЯH¦FoÌÇ5ûª9~¯Ya¬Ñ»•ºƒTµ+®B®¾CÊ’ÊßÌfêq¾×ÐæÜLãQcu‘Õ³¶UOsšèöEå¬cS§6ûtðSѪ¾ŸôÛóî~á…šVúý'Æ·¬'o_Œ²ˆ§™Ÿ ÎôÿÙšÿ‰òÜï^‰E’-d,ðŽ¥¼ÍDõy§F»*ýÓ4Ý›ô\‚ETõ¢0Ÿf8ÜŽ)qÅjj w9)ß+Š¬G5StEïMΚx¾5 C¦e¾Ò”í•é²½.êž½ŠÛ…ýLÀ-úYbÃërÚ(®–H›Bù‘$W¾wò·oÝ6ö“ý]ôU’}Wî\DtwX´²Í¥˜ýªëŸÚ©êiíP²x%¬j9ŽF¦è©Ü§Ÿ‡[¥º÷žêÚÑ[M5Eò'Á<.ækÚ©&Ê‹Þ‡¡Ê®âùË¿.æïÝ÷ÉéâÅt"óº|ú,½¹]¦õnrî«d‘UWû•03ú Ç¿E“Þ¼îâ+ЖGôzÿ3Læú?±} KîšAø_r¥·-‰Íni[ÊßÀ1´Y¾%„ñ1—Ôå¹-¾9í”-…õ2r£Õ#jª!mZ®¶ë庽¢¶:ŠZˆÑðO·kÚ½ŠŠSÚ©X.ªÚƒa“SÛßSz‰Ð6u_=®ÝSd^ÍÓí=´×ën°ëý‹!Â%}]§ ¨umͱ9±:iZ­lMW"n½‹Ó»Ü1§šsƒçZ«¨3eøÍ-ÁÔ÷¨›ª¿"+]º'·dû WÃñ\2ÖüS¤·Â÷s=”°#9×ÅÊU}¤U}?é·çÜýà 4§õ!®^%ìÍ·c׈,2Ô>–ƒ“™UœËÎæ¦Ûr÷÷¡óÈ«þS•Ò\±jû;r y®m5ÓžI!r'2r9É·*;¿~ŠduÙïÛ¢d"¯¯fÜÏ$Ä®Y\Ô«;mÔRT:¿•_ÈÕ^]û·Øé·_[”iü9+)V¸Z¥!s·V#âæåUïÛr½’Í.ŠXî2ÚiPŽÉ;©Ú¯EIß²óm¿M‰f®ú*É>‚«÷.1zc²O¤ÜÓYé^÷Z!W=ÔíUUåNª»=†}JÔx`‰¬coÑ#XÆ숛I؈rTVñ|ŠäÛ›é¿ß'§‹DЋÎÿOïã%—¶¹ºoV×"¢¥’DT^ïêTÀpÏè3ýOz󻈯BYÑëüÍ3šwèþÅô5/ºiá}mÙtˆžk³JÞUñü¯¶[n|Næl¹[à¨kmT*Ôž$z"ù6ön…£RÂÚzhYlM˜ÈÚˆODì*ý¶Û«õKQ]A ÊÛä<«,Hí¼Çön‡-TÄ3¬ËI^œ‘Ñ\Òãlgý¼è‹²z›æ'µÅ¢n›à7¼O4˲ œ´î‚ûrŽ¢‰!‘UÈֵȼȨ›/TìÜ™ö®àº~ͱ|Ûe­óXV­_Òw±YXƧà5Uz#¼;Œ¦!U­òÞšÌêÓÃoònç}²¦wKÍ·›²=6ñ:pÌùiÕl§P¯²S¹—VÓCll2+œÈcj£¹·DÙUQ«²oاÌóOï·½LÄóË”íK4µ ¸¶i®|µæ싺§Ñví;õNk5 ÅIñÍ”W{M|uÖš¹ªÖÊÏšíºò¯±;{ÎMa×íO²»É-K%Rµ·K•%k¦|±"¢«bb§›¾ß9{ ,ðQãß[#H⊋àôìUèÖ£9ZŸfÅa§Ÿúk‡Ra–»^#<|ü’ÔVÔs»™îzï³Q;\Oò‹-û(ÓZü~¥´±ÜîY ‘÷yÎø•«²ªoË̽»o±÷M1ÊüCOìø½Ññº¦‚ߺ*±\Öì»*¢nŸQ‡Ó=?¾b–_ºËNè/·FTQ$2*¹ˆíù‘Q6^©Ù¹Õ©úw”ܲ‹^¦iÕm$W»ToôõÛùÊwuXÜ­êÕEUT__vÈa¯øf¯ë ´V-CµZ¬–z¶TWÓQÖ:¢jÕbîŒßdF±W·¿³·bÆÈh&ºcõÖºUjISG,Qó.ÈŽsWR²Àq¾$´û¢Ãm¶¬Bx(cs#–zÚŽw"¹]×f¢w’íAÅòŒëHëqiRŠ+½}¹±ÊŒ‘ÞA³yªäG*+¹wEÙvÜŽ[-œNÑc´Øµ1 6SÑÇMzMQ$ŒkZçF«vWl›õé¹-Òí=¡Ó> ZŽ­õ/kÝ-]\‰³§™Ë»ž©×oíè‰ÕH•ÛÖ+®Þõ¦°TSÝ©)áòwJ™Zæù65vc|Q{û ž6¡ÍC3µŠÓBK÷»mÈö+6íw:"ï¾ý†#Mðæ'šåùÒJwA}¹G=C"«‘­k‘y‘Q6^©Ù¹×zÓÛ÷ݺөö i›L–ÉhoQI"µïutjÔDTró*oº§à¡6ÿÙassets/images/product-option.svg000064400000003465147600244370013041 0ustar00 assets/images/product-options-card-loader.svg000064400000002753147600244370015376 0ustar00 assets/images/product-options-classic-loader.svg000064400000002447147600244370016106 0ustar00 assets/js/admin-notice.js000064400000001474147600244370011404 0ustar00( function ( $ ) { const CartFlowsProAdminNotice = { /** * Init */ init() { this._bind(); }, /** * Binds events */ _bind() { $( document ).on( 'click', '.cartflows-dismissible-notice .notice-dismiss', CartFlowsProAdminNotice.disable_license_admin_notice ); }, /** * Import * * @param {Object} event event data. */ disable_license_admin_notice( event ) { event.preventDefault(); $.ajax( { url: ajaxurl, type: 'POST', data: { action: 'cartflows_disable_activate_license_notice', security: CartFlowsProAdminNoticeVars._nonce, }, } ) .done( function () {} ) .fail( function () {} ) .always( function () {} ); }, }; /** * Initialization */ $( function () { CartFlowsProAdminNotice.init(); } ); } )( jQuery ); assets/js/analytics.js000064400000010325147600244370011017 0ustar00( function ( $ ) { function setCookie( cName, cValue, expDays ) { const date = new Date(); date.setTime( date.getTime() + expDays * 24 * 60 * 60 * 1000 ); const expires = 'expires=' + date.toUTCString(); document.cookie = cName + '=' + cValue + '; ' + expires + '; path=/'; } function getCookie( cName ) { const name = cName + '='; const cDecoded = decodeURIComponent( document.cookie ); //to be careful const cArr = cDecoded.split( '; ' ); let res = []; cArr.forEach( ( val ) => { if ( val.indexOf( name ) === 0 ) { res = val.substring( name.length ); } } ); return res; } async function load_frontend_analytics() { if ( cartflows && '' !== cartflows.current_step ) { const flow_id = cartflows.current_flow, step_id = cartflows.current_step, flow_cookie = cartflows.flow_cookie + flow_id, step_cookie = cartflows.step_cookie + flow_id; let flow_cookieData = getCookie( flow_cookie ); if ( flow_cookieData.length > 0 ) { flow_cookieData = JSON.parse( decodeURIComponent( flow_cookieData ) ); } const is_returning = flow_cookieData.includes( step_id ); if ( ! is_returning ) { flow_cookieData.push( step_id ); } setCookie( flow_cookie, encodeURIComponent( JSON.stringify( flow_cookieData ) ), cartflows.analytics_cookie_expire_time ); let base_url = cartflows?.analytics_base_url; // Added a fallback if the URL is not formed or empty or does not have the complete website URL. if ( '' === base_url || 'null' === base_url || '/wp-json/cartflows-pro/v1/flow-analytics/' === base_url ) { const basePath = window.location.pathname.split( '/' )[ 1 ] || '', full_url = window.location.origin + '/' + basePath + '/wp-json'; base_url = `${ full_url }cartflows-pro/v1/flow-analytics/`; } const url = base_url, urlParams = new URLSearchParams( window.location.search ), paramsArray = []; if ( urlParams.size > 0 ) { urlParams.forEach( function ( value, key ) { paramsArray.push( { name: key, value } ); } ); } let step_cookieData = getCookie( step_cookie ); const data = { step_id: cartflows.current_step, flow_id: cartflows.current_flow, is_returning, flow_cookie_data: JSON.stringify( flow_cookieData ), step_cookie_data: step_cookieData, url_params: JSON.stringify( paramsArray ), }; try { fetch( url, { method: 'POST', // *GET, POST, PUT, DELETE, etc. mode: 'cors', // no-cors, *cors, same-origin cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached credentials: 'omit', // include, *same-origin, omit headers: { 'Content-Type': 'application/json', }, redirect: 'follow', // manual, *follow, error referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url body: JSON.stringify( data ), // body data type must match "Content-Type" header } ) .then( ( js_data ) => js_data.json() ) .then( ( response ) => { if ( response.success ) { step_cookieData = getCookie( step_cookie ); const prev_control_id = response.prev_control_id; step_cookieData = step_cookieData.length > 0 ? JSON.parse( decodeURIComponent( step_cookieData ) ) : {}; if ( prev_control_id && step_cookieData.hasOwnProperty( prev_control_id ) ) { step_cookieData[ prev_control_id ].conversion = 'yes'; setCookie( step_cookie, encodeURIComponent( JSON.stringify( step_cookieData ) ), cartflows.analytics_cookie_expire_time ); } step_cookieData[ cartflows.control_step ] = JSON.parse( response.current_step_visit ); setCookie( step_cookie, encodeURIComponent( JSON.stringify( step_cookieData ) ), cartflows.analytics_cookie_expire_time ); } } ); } catch ( error ) { console.log( error ); } } } $( function () { load_frontend_analytics(); } ); } )( jQuery ); assets/js/checkout.js000064400000167652147600244370010655 0ustar00( function ( $ ) { const wcf_page_title_notification = { vars: { originalTitle: document.title, interval: null, }, On( notification, intervalSpeed ) { const _this = this; _this.vars.interval = setInterval( function () { document.title = _this.vars.originalTitle === document.title ? notification : _this.vars.originalTitle; }, intervalSpeed ? intervalSpeed : 1000 ); }, Off() { clearInterval( this.vars.interval ); document.title = this.vars.originalTitle; }, }; const wcf_update_product_options_cart_item_key = function () { $( document ).on( 'wcf_cart_data_restored', function ( e, wcf_cart_data ) { if ( 'yes' === cartflows.is_product_options && wcf_cart_data ) { $( '.wcf-qty-row' ).each( function () { const product_data = $( this ).data( 'options' ); if ( product_data ) { if ( product_data.unique_id in wcf_cart_data ) { product_data.cart_item_key = wcf_cart_data[ product_data.unique_id ]; $( this ).attr( 'data-options', JSON.stringify( product_data ) ); } } } ); } } ); }; const wcf_animate_browser_tab = function () { if ( 'yes' !== cartflows_animate_tab_fields.enabled ) { return; } $( window ).blur( function () { wcf_page_title_notification.On( cartflows_animate_tab_fields.title ); } ); $( window ).on( 'focus', function () { wcf_page_title_notification.Off(); } ); }; // Scroll to top for the two step navigation. const wcf_scroll_to_top = function ( scrollTo ) { if ( scrollTo.length ) { event.preventDefault(); $( 'html, body' ) .stop() .animate( { scrollTop: scrollTo.offset().top - 50, }, 100 ); } }; const wcf_display_spinner = function () { $( '.woocommerce-checkout-review-order-table, .wcf-product-option-wrap, .wcf-bump-order-wrap' ).block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6, }, } ); }; const wcf_remove_spinner = function ( rsp ) { if ( ! cartflows.wcf_refresh_checkout ) { if ( jQuery( '.wc_payment_methods' ).length ) { if ( rsp.hasOwnProperty( 'cart_total' ) ) { // Update the Fragements for order bump & product options add/remove. if ( rsp.hasOwnProperty( 'fragments' ) ) { $.each( rsp.fragments, function ( key, value ) { // Update the Fragments for place order button to update the cart price displayed on button. if ( '#place_order' === key ) { const selected_payment_gateway = $( ".wc_payment_methods input[name='payment_method']:checked" ); const smartMenuExists = $( '#cppw-paypal-button-container .paypal-buttons #smart-menu' ).length > 0; if ( selected_payment_gateway.length > 0 ) { $( key ).replaceWith( value ); const selected_payment_method = selected_payment_gateway.val(); if ( 'ppcp' === selected_payment_method || 'ppcp-gateway' === selected_payment_method ) { $( key ).addClass( 'ppcp-hidden' ); } if ( 'cppw_paypal' === selected_payment_method && smartMenuExists ) { $( key ).css( 'display', 'none' ); } selected_payment_gateway.trigger( 'click' ); } } else { $( key ).replaceWith( value ); } } ); } if ( parseFloat( rsp.cart_total ) > 0 ) { /** * Universal trigger just like update_checkout but of CartFlows. * This trigger will be trigger after Order Bump, product options, quantity update in processes. */ $( 'body' ).trigger( 'cartflows_update_checkout' ); /** * Force the update of fragment and execute the update_checkout trigger to update the page. * This trigger will be forced only when the product is not added in the cart OR any exception is thrown. */ if ( rsp.force_update ) { $( 'body' ).trigger( 'update_checkout' ); } $( '.woocommerce-checkout-review-order-table, .wcf-product-option-wrap, .wcf-bump-order-wrap' ).unblock(); } else { $( 'body' ).trigger( 'update_checkout' ); $( '.woocommerce-checkout-review-order-table, .wcf-product-option-wrap, .wcf-bump-order-wrap' ).unblock(); } } } else { $( 'body' ).trigger( 'update_checkout' ); $( '.woocommerce-checkout-review-order-table, .wcf-product-option-wrap, .wcf-bump-order-wrap' ).unblock(); } } else { $( 'body' ).trigger( 'update_checkout' ); $( '.woocommerce-checkout-review-order-table, .wcf-product-option-wrap, .wcf-bump-order-wrap' ).unblock(); } }; /** * Re-calculate the cart total by triggering 'updated_cart_totals' trigger. */ const wcf_re_calculate_totals = function () { // Re-calculate the cart total $( document.body ).trigger( 'updated_cart_totals' ); }; const wcf_product_quantity_var_options = function () { const wcf_variation_validation_trigger_click = function () { $( 'form.woocommerce-checkout' ).on( 'checkout_place_order', function ( e ) { const invalid_var = $( '.wcf-select-variation-attribute.wcf-invalid-variation' ); if ( invalid_var.length > 0 ) { e.preventDefault(); wcf_scroll_to_top( invalid_var ); return ! 1; } } ); $( '.wcf-select-variation-attribute' ).on( 'click', function ( e ) { e.preventDefault(); const wrap = $( this ).closest( '.wcf-qty-row' ); wrap.find( '.wcf-item-choose-options a' ).trigger( 'click' ); } ); }; $( '.wcf-qty-row' ).on( 'click', function ( event ) { if ( $( event.target ).is( '.wcf-multiple-sel, .wcf-single-sel, .wcf-qty, .wcf-qty-selection, .wcf-variable-item-popup-text, .wcf-qty-selection-btn, .wcf-qty-increment-icon, .wcf-qty-decrement-icon' ) ) { return; } const single_selection = $( this ).find( '.wcf-single-sel' ), multiple_selection = $( this ).find( '.wcf-multiple-sel' ); if ( single_selection.length > 0 ) { single_selection.trigger( 'click' ); } else if ( multiple_selection.length > 0 ) { multiple_selection.trigger( 'click' ); } } ); /* Single Selection */ $( document ).on( 'change', '.wcf-single-sel', function () { const $this = $( this ); const wrapper = $this.closest( '.wcf-qty-options' ); const wrap = $this.closest( '.wcf-qty-row' ); const option = wrap.data( 'options' ); const input = wrap.find( '.wcf-qty input' ); let input_quantity = parseInt( input.val() ); const checkout_id = $( '._wcf_checkout_id' ).val(); if ( 0 >= input_quantity || isNaN( input_quantity ) ) { input.val( 1 ); input_quantity = 1; } option.input_quantity = input_quantity; option.checkout_id = checkout_id; const post_data = $( 'form.checkout' ).serialize(); wcf_display_spinner(); wrapper.addClass( 'wcf-loading' ); $.ajax( { url: cartflows.ajax_url, data: { action: 'wcf_single_selection', option, post_data, security: cartflows.wcf_single_selection_nonce, }, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'cartflows_data' ) ) { wrap.find( '.wcf-display-quantity' ).html( response.cartflows_data.display_quantity ); wrap.find( '.wcf-display-price' ).html( response.cartflows_data.display_price ); wrap.find( '.wcf-display-discount-value' ).html( response.cartflows_data.display_discount_value ); wrap.find( '.wcf-display-discount-percent' ).html( response.cartflows_data.display_discount_percent ); wrap.find( '.wcf_subscription_price' ).html( response.cartflows_data.subscription_price ); wrap.find( '.wcf_subscription_fee' ).html( response.cartflows_data.sign_up_fee ); } wcf_remove_spinner( response ); wrapper.removeClass( 'wcf-loading' ); option.cart_item_key = response.cart_item_key; wrap.attr( 'data-options', JSON.stringify( option ) ); // Re-calculate the cart total wcf_re_calculate_totals(); }, error() { $( '.woocommerce-checkout-review-order-table' ).unblock(); }, } ); } ); /* Multiple Selection */ $( document ).on( 'change', '.wcf-multiple-sel', function () { const checked_cb = $( '.wcf-multiple-sel:checked' ); const $this = $( this ); const wrap = $this.closest( '.wcf-qty-row' ); const input = wrap.find( '.wcf-qty input' ); let input_quantity = parseInt( input.val() ); if ( 0 >= input_quantity || isNaN( input_quantity ) ) { input.val( 1 ); input_quantity = 1; } if ( 0 === checked_cb.length ) { $this.prop( 'checked', true ); $this.prop( 'disabled', true ); return; } if ( 1 === checked_cb.length ) { checked_cb.prop( 'disabled', true ); } else { checked_cb.removeAttr( 'disabled' ); } const option = wrap.data( 'options' ); const checkout_id = $( '._wcf_checkout_id' ).val(); option.checkout_id = checkout_id; option.input_quantity = input_quantity; option.checked = 'no'; const post_data = $( 'form.checkout' ).serialize(); if ( $this.is( ':checked' ) ) { option.checked = 'yes'; } wcf_display_spinner(); $( '.wcf-qty-options' ).addClass( 'wcf-loading' ); $.ajax( { url: cartflows.ajax_url, data: { action: 'wcf_multiple_selection', option, post_data, security: cartflows.wcf_multiple_selection_nonce, }, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'cartflows_data' ) ) { wrap.find( '.wcf-display-quantity' ).html( response.cartflows_data.display_quantity ); wrap.find( '.wcf-display-price' ).html( response.cartflows_data.display_price ); wrap.find( '.wcf-display-discount-value' ).html( response.cartflows_data.display_discount_value ); wrap.find( '.wcf-display-discount-percent' ).html( response.cartflows_data.display_discount_percent ); wrap.find( '.wcf_subscription_price' ).html( response.cartflows_data.subscription_price ); wrap.find( '.wcf_subscription_fee' ).html( response.cartflows_data.sign_up_fee ); } wcf_remove_spinner( response ); $( '.wcf-qty-options' ).removeClass( 'wcf-loading' ); option.cart_item_key = response.cart_item_key; wrap.attr( 'data-options', JSON.stringify( option ) ); // Re-calculate the cart total wcf_re_calculate_totals(); }, error() { $( '.woocommerce-checkout-review-order-table' ).unblock(); }, } ); } ); /* Force All Selection */ $( document ).on( 'change', '.wcf-var-sel', function () { const $this = $( this ); const wrap = $this.closest( '.wcf-qty-row' ); const input = wrap.find( '.wcf-qty input' ); const option = wrap.data( 'options' ); const input_quantity = parseInt( input.val() ); const checkout_id = $( '._wcf_checkout_id' ).val(); option.checkout_id = checkout_id; option.input_quantity = input_quantity; wcf_display_spinner(); $( '.wcf-qty-options' ).addClass( 'wcf-loading' ); $.ajax( { url: cartflows.ajax_url, data: { action: 'wcf_variation_selection', option, security: cartflows.wcf_variation_selection_nonce, }, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'cartflows_data' ) ) { wrap.find( '.wcf-display-quantity' ).html( response.cartflows_data.display_quantity ); wrap.find( '.wcf-display-price' ).html( response.cartflows_data.display_price ); wrap.find( '.wcf-display-discount-value' ).html( response.cartflows_data.display_discount_value ); wrap.find( '.wcf-display-discount-percent' ).html( response.cartflows_data.display_discount_percent ); wrap.find( '.wcf_subscription_price' ).html( response.cartflows_data.subscription_price ); wrap.find( '.wcf_subscription_fee' ).html( response.cartflows_data.sign_up_fee ); } wcf_remove_spinner( response ); $( '.wcf-qty-options' ).removeClass( 'wcf-loading' ); // Re-calculate the cart total wcf_re_calculate_totals(); }, error() { $( '.woocommerce-checkout-review-order-table' ).unblock(); }, } ); } ); /* Quantity Selection For All type */ $( document ).on( 'change', '.wcf-qty-selection', function () { const $this = $( this ), wrap = $this.closest( '.wcf-qty-row' ), item_selector = wrap.find( '.wcf-item-selector' ); if ( item_selector.length > 0 ) { const selector_input = item_selector.find( 'input' ); if ( selector_input.length > 0 && ! selector_input.is( ':checked' ) ) { return; } } const is_sold_individually = Boolean( $this.data( 'sale-limit' ) ); // Skip the ajax call if the sold individual option is enabled for the selected product OR a variation. if ( is_sold_individually ) { return; } let input_quantity = parseInt( $this.val() ); if ( 0 >= input_quantity || isNaN( input_quantity ) ) { $this.val( 1 ); input_quantity = 1; } const max_quantity = parseInt( $this.attr( 'max' ) ); if ( max_quantity && input_quantity > max_quantity ) { $this.val( max_quantity ); return; } const option = wrap.data( 'options' ), checkout_id = $( '._wcf_checkout_id' ).val(); option.input_quantity = input_quantity; option.checkout_id = checkout_id; const post_data = $( 'form.checkout' ).serialize(); if ( typeof data !== 'undefined' ) { option.cart_item_key = data.cart_item_key; } wcf_display_spinner(); $( '.wcf-qty-options' ).addClass( 'wcf-loading' ); $.ajax( { url: cartflows.ajax_url, data: { action: 'wcf_quantity_update', option, post_data, security: cartflows.wcf_quantity_update_nonce, }, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'cartflows_data' ) ) { wrap.find( '.wcf-display-quantity' ).html( response.cartflows_data.display_quantity ); wrap.find( '.wcf-display-price' ).html( response.cartflows_data.display_price ); wrap.find( '.wcf-display-discount-value' ).html( response.cartflows_data.display_discount_value ); wrap.find( '.wcf-display-discount-percent' ).html( response.cartflows_data.display_discount_percent ); wrap.find( '.wcf_subscription_price' ).html( response.cartflows_data.subscription_price ); wrap.find( '.wcf_subscription_fee' ).html( response.cartflows_data.sign_up_fee ); } wcf_remove_spinner( response ); $( '.wcf-qty-options' ).removeClass( 'wcf-loading' ); // Re-calculate the cart total wcf_re_calculate_totals(); }, error() { $( '.woocommerce-checkout-review-order-table' ).unblock(); }, } ); } ); /* Variation attribute and click trigger */ wcf_variation_validation_trigger_click(); /* Variation Popup */ wcf_quick_view(); }; const wcf_do_not_remove_single_product = function () { const checked_cb = $( '.wcf-multiple-sel:checked' ); if ( 1 === checked_cb.length ) { checked_cb.prop( 'checked', true ); checked_cb.prop( 'disabled', true ); } }; const wcf_remove_product = function () { $( document ).on( 'cartflows_remove_product', function ( e, p_id ) { jQuery( '.wcf-multiple-sel[value="' + p_id + '"]' ).prop( 'checked', false ); jQuery( '.wcf-single-sel[value="' + p_id + '"]' ).prop( 'checked', false ); } ); }; const wcf_order_bump_ajax = function () { let wcf_order_bump_clicked = false; $( document ).on( 'change', '.wcf-bump-order-cb', function () { if ( true === wcf_order_bump_clicked ) { return false; } wcf_order_bump_clicked = true; const $this = $( this ); const product_id = $this.data( 'ob_data' ).product_id; const checkout_id = $( '[name=_wcf_checkout_id]' ).val(); const bump_offer_data = $this.attr( 'data-ob_data' ), ob_id = $this.data( 'ob_data' ).ob_id; const bump_offer_qty = $this .closest( '.wcf-bump-order-content' ) .find( '.wcf-order-bump-quantity-updater' ) .val(); const button_class = $this .closest( '.wcf-bump-order-field-wrap' ) .find( '.wcf-bump-order-cb-button' ); const bump_offer_wrap = $this.closest( '.wcf-bump-order-wrap' ); let is_add_to_cart = ''; const data = { post_data: $( 'form.checkout' ).serialize(), security: cartflows.wcf_bump_order_process_nonce, _wcf_checkout_id: checkout_id, _wcf_product_id: product_id, _bump_offer_data: bump_offer_data ? bump_offer_data : '', _bump_offer_qty: bump_offer_qty > 0 ? bump_offer_qty : '', action: 'wcf_bump_order_process', }; let bump_product_ids = $( '[name=_wcf_bump_products]' ).val(); if ( '' === bump_product_ids ) { bump_product_ids = {}; } else { bump_product_ids = JSON.parse( bump_product_ids ); } if ( $this.is( ':checked' ) ) { data._wcf_bump_product_action = 'add_bump_product'; is_add_to_cart = true; } else { data._wcf_bump_product_action = 'remove_bump_product'; is_add_to_cart = false; } // Display spinner for specific order bump. bump_offer_wrap.block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6, }, } ); $.ajax( { url: cartflows.ajax_url, data, dataType: 'json', type: 'POST', success( response ) { wcf_remove_spinner( response ); if ( button_class.length > 0 ) { if ( is_add_to_cart ) { button_class.toggleClass( 'wcf-bump-add-to-cart wcf-bump-remove-from-cart' ); button_class.text( $this.data( 'remove' ) ); } else { button_class.toggleClass( 'wcf-bump-remove-from-cart wcf-bump-add-to-cart' ); button_class.text( $this.data( 'add' ) ); } } // Update the order bump data in the checkout field if it is added or removed. if ( response.cart_item_key ) { if ( $this.is( ':checked' ) ) { bump_product_ids[ ob_id ] = { id: product_id, price: response.cartflows_data.total_product_price, }; } else { delete bump_product_ids[ ob_id ]; } $( '[name=_wcf_bump_products]' ).val( JSON.stringify( bump_product_ids ) ); } else if ( $this.is( ':checked' ) ) { /** * Unchecking the specific order bump which was clicked. * Reason: $this was not working with certain templates due which have to modify this code. */ $( '[name=wcf-bump-order-cb-' + ob_id + ']' ).removeAttr( 'checked' ); } // Re-calculate the cart total wcf_re_calculate_totals(); }, error() { $( '.woocommerce-checkout-review-order-table' ).unblock(); }, } ); wcf_order_bump_clicked = false; return false; } ); }; const wcf_nav_tab_hide_show_events = function () { /* Ready */ wcf_nav_tab_hide_show(); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).addClass( 'step-one' ); /* Change Custom Field*/ $( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a' ).on( 'click', function ( e ) { e.preventDefault(); wcf_nav_tab_hide_show(); } ); /* Change on click of next button */ $( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns a' ).on( 'click', function ( e ) { e.preventDefault(); // Check form validation before go to step two. wcf_nav_tab_hide_show_next_btn(); } ); }; const wcf_nav_tab_hide_show_next_btn = function () { if ( wcf_two_step_validations() ) { $( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.wcf-current' ).removeClass( 'wcf-current' ); const selector = $( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns a' ).attr( 'href' ); if ( selector === '#customer_details' ) { wcf_scroll_to_top( $( '.wcf-embed-checkout-form-nav' ) ); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).removeClass( 'step-two' ); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).addClass( 'step-one' ); $( '.wcf-embed-checkout-form-two-step' ) .find( '.step-one' ) .addClass( 'wcf-current' ); } else if ( selector === '#wcf-order-wrap' ) { wcf_scroll_to_top( $( '.wcf-embed-checkout-form-nav' ) ); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).removeClass( 'step-one' ); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).addClass( 'step-two' ); $( '.wcf-embed-checkout-form-two-step' ) .find( '.step-two' ) .addClass( 'wcf-current' ); } } }; const wcf_nav_tab_hide_show = function () { $( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a' ).on( 'click', function ( e ) { e.preventDefault(); // Check form validation before go to step two. // if ( $("div").hasClass("wcf-embed-checkout-form-two-step") && ! $('form[name="checkout"]').valid() ) { // return false; // } if ( wcf_two_step_validations() ) { const $this = $( this ), wrap = $this.closest( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div' ); // validated = wcf_woocommerce_field_validate(); // if(validated === false){ // return false; // } $( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.wcf-current' ).removeClass( 'wcf-current' ); wrap.addClass( 'wcf-current' ); const selector = $this .closest( '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div a' ) .attr( 'href' ); if ( selector === '#customer_details' ) { $( '.wcf-embed-checkout-form-two-step .woocommerce' ).removeClass( 'step-two' ); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).addClass( 'step-one' ); } else if ( selector === '#wcf-order-wrap' ) { $( '.wcf-embed-checkout-form-two-step .woocommerce' ).removeClass( 'step-one' ); $( '.wcf-embed-checkout-form-two-step .woocommerce' ).addClass( 'step-two' ); } } } ); }; /* Autocomplete Zip Code */ const wcf_autocomplete_zip_data = function () { let zip_code_timeout; $( document.body ).on( 'textInput input change keypress paste', '#billing_postcode, #shipping_postcode', function () { const $this = $( this ), type = $this.attr( 'id' ).split( '_' )[ 0 ], country = $( '#' + type + '_country' ).val(); if ( '' === country ) { return; } const zip_code = $this.val().trim(); if ( '' === zip_code ) { return; } clearTimeout( zip_code_timeout ); zip_code_timeout = setTimeout( function () { if ( -1 === [ 'GB', 'CA' ].indexOf( country ) ) { get_zip_data_and_update( type, country, zip_code ); } }, 800 ); } ); const get_zip_data_and_update = function ( type, country, zip_code ) { $.ajax( { url: 'https://api.zippopotam.us/' + country + '/' + zip_code, cache: ! 0, dataType: 'json', type: 'GET', success( result ) { $.each( result.places, function () { $( '#' + type + '_city' ) .val( this[ 'place name' ] ) .trigger( 'change' ); $( '[name="' + type + '_state"]:visible' ) .val( this[ 'state abbreviation' ] ) .trigger( 'change' ); return false; } ); }, error() {}, } ); }; }; /** * Quick View */ const wcf_quick_view = function () { const quick_view_btn = $( '.wcf-item-choose-options a' ); const modal_wrap = $( '.wcf-quick-view-wrapper' ); modal_wrap.appendTo( document.body ); const wcf_quick_view_bg = modal_wrap.find( '.wcf-quick-view-bg' ), wcf_qv_modal = modal_wrap.find( '#wcf-quick-view-modal' ), wcf_qv_content = wcf_qv_modal.find( '#wcf-quick-view-content' ), wcf_qv_close_btn = wcf_qv_modal.find( '#wcf-quick-view-close' ), wcf_qv_wrapper = wcf_qv_modal.find( '.wcf-content-main-wrapper' ); quick_view_btn.off( 'click' ).on( 'click', function ( e ) { e.preventDefault(); const $this = $( this ); /* Check if product is selected */ const cls_wrap = $this.closest( '.wcf-item' ); if ( ! cls_wrap.find( '.wcf-item-selector input' ).is( ':checked' ) ) { cls_wrap.find( '.wcf-item-selector input' ).trigger( 'click' ); } const product_id = $this.data( 'product' ); $this.addClass( 'wcf-variation-popup-open' ); if ( ! wcf_qv_modal.hasClass( 'loading' ) ) { wcf_qv_modal.addClass( 'loading' ); } if ( ! wcf_quick_view_bg.hasClass( 'wcf-quick-view-bg-ready' ) ) { wcf_quick_view_bg.addClass( 'wcf-quick-view-bg-ready' ); } $( document ).trigger( 'wcf_quick_view_loading' ); wcf_qv_ajax_call( $this, product_id ); } ); const wcf_qv_ajax_call = function ( t, product_id ) { wcf_qv_modal.css( 'opacity', 0 ); $.ajax( { url: cartflows.ajax_url, data: { action: 'wcf_woo_quick_view', product_id, }, dataType: 'html', type: 'POST', success( data ) { wcf_qv_content.html( data ); wcf_qv_content_height(); }, } ); }; const wcf_qv_content_height = function () { // Variation Form const form_variation = wcf_qv_content.find( '.variations_form' ); form_variation.trigger( 'check_variations' ); form_variation.trigger( 'reset_image' ); if ( ! wcf_qv_modal.hasClass( 'open' ) ) { wcf_qv_modal.removeClass( 'loading' ).addClass( 'open' ); const scrollbar_width = wcf_get_scrollbar_width(); const $html = $( 'html' ); $html.css( 'margin-right', scrollbar_width ); $html.addClass( 'wcf-quick-view-is-open' ); } if ( form_variation.length > 0 && 'function' === typeof form_variation.wc_variation_form ) { form_variation.wc_variation_form(); form_variation.find( 'select' ).trigger( 'change' ); } /*wcf_qv_content.imagesLoaded( function(e) { var image_slider_wrap = wcf_qv_modal.find('.wcf-qv-image-slider'); if ( image_slider_wrap.find('li').length > 1 ) { image_slider_wrap.flexslider({ animation: "slide", start: function( slider ){ setTimeout(function() { wcf_update_summary_height( true ); }, 300); }, }); }else{ setTimeout(function() { wcf_update_summary_height( true ); }, 300); } });*/ const image_slider_wrap = wcf_qv_modal.find( '.wcf-qv-image-slider' ); if ( image_slider_wrap.find( 'li' ).length > 1 ) { image_slider_wrap.flexslider( { animation: 'slide', start() { setTimeout( function () { wcf_update_summary_height( true ); }, 300 ); }, } ); } else { setTimeout( function () { wcf_update_summary_height( true ); }, 300 ); } // Add trrigger to slide back to the varations selected image while in flexslider. $( document ).on( 'woocommerce_gallery_reset_slide_position', function () { // Varations image is always replaced at the first index of the slider. image_slider_wrap.flexslider( 0 ); } ); // stop loader $( document ).trigger( 'wcf_quick_view_loader_stop' ); }; const wcf_qv_close_modal = function () { // Close box by click overlay wcf_qv_wrapper.on( 'click', function ( e ) { if ( this === e.target ) { wcf_qv_close(); } } ); // Close box with esc key $( document ).on( 'keyup', function ( e ) { if ( e.keyCode === 27 ) { wcf_qv_close(); } } ); // Close box by click close button wcf_qv_close_btn.on( 'click', function ( e ) { e.preventDefault(); wcf_qv_close(); } ); const wcf_qv_close = function () { wcf_quick_view_bg.removeClass( 'wcf-quick-view-bg-ready' ); wcf_qv_modal.removeClass( 'open' ).removeClass( 'loading' ); $( 'html' ).removeClass( 'wcf-quick-view-is-open' ); $( 'html' ).css( 'margin-right', '' ); quick_view_btn.removeClass( 'wcf-variation-popup-open' ); setTimeout( function () { wcf_qv_content.html( '' ); }, 600 ); }; }; /*var ast_qv_center_modal = function() { ast_qv_wrapper.css({ 'width' : '', 'height' : '' }); ast_qv_wrapper_w = ast_qv_wrapper.width(), ast_qv_wrapper_h = ast_qv_wrapper.height(); var window_w = $(window).width(), window_h = $(window).height(), width = ( ( window_w - 60 ) > ast_qv_wrapper_w ) ? ast_qv_wrapper_w : ( window_w - 60 ), height = ( ( window_h - 120 ) > ast_qv_wrapper_h ) ? ast_qv_wrapper_h : ( window_h - 120 ); ast_qv_wrapper.css({ 'left' : (( window_w/2 ) - ( width/2 )), 'top' : (( window_h/2 ) - ( height/2 )), 'width' : width + 'px', 'height' : height + 'px' }); }; */ const wcf_update_summary_height = function ( update_css ) { const quick_view = wcf_qv_content, img_height = quick_view .find( '.product .wcf-qv-image-slider' ) .first() .height(), summary = quick_view.find( '.product .summary.entry-summary' ), content = summary.css( 'content' ); if ( 'undefined' !== typeof content && 544 === content.replace( /[^0-9]/g, '' ) && 0 !== img_height && null !== img_height ) { summary.css( 'height', img_height ); } else { summary.css( 'height', '' ); } if ( true === update_css ) { wcf_qv_modal.css( 'opacity', 1 ); } }; const wcf_get_scrollbar_width = function () { const div = $( '
' ); // Append our div, do our calculation and then remove it $( 'body' ).append( div ); const w1 = $( 'div', div ).innerWidth(); div.css( 'overflow-y', 'scroll' ); const w2 = $( 'div', div ).innerWidth(); $( div ).remove(); return w1 - w2; }; wcf_qv_close_modal(); //wcf_update_summary_height(); window.addEventListener( 'resize', function () { wcf_update_summary_height(); } ); /* Add to cart ajax */ /** * wcf_add_to_cart_ajax class. */ const wcf_add_to_cart_ajax = function () { modal_wrap .off( 'click', '#wcf-quick-view-content .single_add_to_cart_button' ) .off( 'wcf_added_to_cart' ) .on( 'click', '#wcf-quick-view-content .single_add_to_cart_button', this.onAddToCart ) .on( 'wcf_added_to_cart', this.updateButton ); }; /** * Handle the add to cart event. * * @param {Object} e event data. */ wcf_add_to_cart_ajax.prototype.onAddToCart = function ( e ) { e.preventDefault(); const $form = $( this ).closest( 'form' ); // If the form inputs are invalid if ( ! $form[ 0 ].checkValidity() ) { $form[ 0 ].reportValidity(); return false; } const $thisbutton = $( this ), product_id = $form.find( 'input[name="product_id"]' ).val() || '', variation_id = $form.find( 'input[name="variation_id"]' ).val() || '', choose_var = $( '.wcf-variation-popup-open' ), qty_wrap = choose_var.closest( '.wcf-qty-row' ), qty_selection = qty_wrap.find( '.wcf-qty-selection' ), input_quantity = qty_selection.val() || 1, qty_options = qty_wrap.data( 'options' ), checkout_id = $( '._wcf_checkout_id' ).val(), item_wrap = qty_wrap.find( '.wcf-item-wrap' ); qty_options.input_quantity = input_quantity; qty_options.checkout_id = checkout_id; if ( $thisbutton.is( '.single_add_to_cart_button' ) ) { $thisbutton.removeClass( 'added' ); $thisbutton.addClass( 'loading' ); // Ajax action. if ( variation_id !== '' ) { jQuery.ajax( { url: cartflows.ajax_url, type: 'POST', data: { action: 'wcf_add_cart_single_product', form_data: $form.serialize(), product_id, variation_id, quantity: input_quantity, option: qty_options, security: cartflows.wcf_quick_view_add_cart_nonce, }, dataType: 'json', success( response ) { if ( response.hasOwnProperty( 'cartflows_data' ) && 'yes' === response.cartflows_data.added_to_cart ) { const result = response.cartflows_data; /* Update Attributes to Name in summary */ choose_var .closest( '.wcf-item' ) .find( '.wcf-display-attributes' ) .html( result.display_attr ); choose_var .closest( '.wcf-item' ) .find( '.wcf-item-image' ) .html( result.variation_image ); /* Update Variaiton id in attributes */ choose_var.attr( 'data-variation', result.variation_id ); qty_options.variation_id = result.variation_id; qty_options.original_price = result.original_price; qty_options.discounted_price = result.discounted_price; qty_options.subscription_price = result.subscription_price; qty_options.sign_up_fee = result.signup_fee; qty_wrap.attr( 'data-options', JSON.stringify( qty_options ) ); /* Item selector */ const var_selection = qty_wrap.find( '.wcf-item-selector' ); if ( var_selection.length > 0 ) { const var_options = qty_wrap.data( 'options' ); var_options.variation_id = result.variation_id; qty_wrap.attr( 'data-options', JSON.stringify( var_options ) ); } /* Set display data */ qty_wrap .find( '.wcf-display-quantity' ) .html( result.display_quantity ); qty_wrap .find( '.wcf-display-price' ) .html( result.display_price ); qty_wrap .find( '.wcf-display-discount-value' ) .html( result.display_discount_value ); qty_wrap .find( '.wcf-display-discount-percent' ) .html( result.display_discount_percent ); item_wrap .find( '.wcf_subscription_price' ) .html( result.display_subscription_price ); item_wrap .find( '.wcf_subscription_period' ) .html( result.display_subscription_details ); item_wrap .find( '.wcf_subscription_fee' ) .html( result.display_signup_fee ); item_wrap .find( '.wcf_subscription_free_trial' ) .html( result.trial_period_string ); } // Trigger event so themes can refresh other areas. $( document.body ).trigger( 'wc_fragment_refresh' ); modal_wrap.trigger( 'wcf_added_to_cart', [ $thisbutton, ] ); }, } ); } /*else { jQuery.ajax ({ url: cartflows.ajax_url, type:'POST', data:'action=wcf_add_cart_single_product&product_id=' + product_id + '&quantity=' + quantity, success:function(results) { // Trigger event so themes can refresh other areas. $( document.body ).trigger( 'wc_fragment_refresh' ); //modal_wrap.trigger( 'wcf_added_to_cart', [ $thisbutton ] ); $( "body" ).trigger( "update_checkout" ); wcf_qv_close_btn.trigger( 'click' ); } }); }*/ } }; /** * Update cart page elements after add to cart events. * */ wcf_add_to_cart_ajax.prototype.updateButton = function () { $( 'body' ).trigger( 'update_checkout' ); wcf_qv_close_btn.trigger( 'click' ); }; /** * Init wcf_add_to_cart_ajax. */ new wcf_add_to_cart_ajax(); }; const wcf_two_step_validations = function () { const $billing_inputs = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-account-fields' ).find( 'input[type="text"], input[type="tel"], input[type="email"], input[type="password"]' ); const $billing_chekboxes = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-account-fields' ).find( 'input[type="checkbox"]' ); const $billing_select = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-billing-fields' ).find( '.select2' ); const $shipping_inputs = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-shipping-fields' ).find( 'input[type="text"], input[type="tel"], input[type="email"], input[type="password"]' ); const $shipping_chekboxes = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper' ).find( 'input[type="checkbox"]' ); const $shipping_select = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout .woocommerce-shipping-fields' ).find( '.select2' ); const is_ship_to_diff = $( '.wcf-embed-checkout-form-two-step form.woocommerce-checkout' ) .find( 'h3#ship-to-different-address input[type="checkbox"]:checked' ) .val(); //Add focus class on clicked on input types let access = true, field_focus = ''; Array.from( $billing_inputs ).forEach( function ( $this ) { const type = $this.type, name = $this.name, field_row = $this.closest( '.form-row' ), field_value = $.trim( $this.value ); let has_class = field_row.classList.contains( 'validate-required' ); // whiteSpace = /\s/g.test(field_value); if ( name === 'account_password' || name === 'account_username' ) { const create_acc_checkbox = document.getElementById( 'createaccount' ); if ( create_acc_checkbox ) { if ( $( create_acc_checkbox ).is( ':checked' ) ) { has_class = true; } else { has_class = false; } } else { has_class = true; } } if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { if ( 'email' === type && false === /^([a-zA-Z0-9_\+\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,14})$/.test( field_value ) ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } $this.classList.remove( 'field-required' ); } } ); Array.from( $billing_chekboxes ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ); let field_value = false; if ( $( $this ).is( ':checked' ) ) { field_value = true; } if ( has_class && false === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); Array.from( $billing_select ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( field_row.querySelector( '.select2-selection__rendered[title]' ) ); //Need to update naming convention. name = field_row.querySelector( 'select' ).name; //eslint-disable-line if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); if ( '1' === is_ship_to_diff ) { Array.from( $shipping_inputs ).forEach( function ( $this ) { const type = $this.type, field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( $this.value ); if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { if ( 'email' === type && false === /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test( field_value ) ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } $this.classList.remove( 'field-required' ); } } ); Array.from( $shipping_select ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( field_row.querySelector( '.select2-selection__rendered[title]' ) ); //Need to update naming convention. name = field_row.querySelector( 'select' ).name; //eslint-disable-line if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); Array.from( $shipping_chekboxes ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ); let field_value = false; if ( $( $this ).is( ':checked' ) ) { field_value = true; } if ( has_class && false === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); } // Focus the errored field if ( '' !== field_focus ) { field_focus.focus(); } return access; }; /*$(".wcf-qty [type='number']").on('keyup mouseup', function (event) { var input = jQuery(this).val(); var input2 = input+jQuery(this).text(); var step = jQuery(this).attr("step"); var min = jQuery(this).attr("min"); if(!Number.isNaN(input2)){ if(parseInt(input2) > min){ var remainder = input2%step; if(remainder !== 0){ var new_value = parseInt(input2) - remainder; jQuery(this).val(new_value); } } } }).trigger('mouseup'); jQuery(".wcf-qty [type='number']").on('focusout',function (evt) { // var input = String.fromCharCode(evt.which); var input = jQuery(this).val(); // var input_text = jQuery(this).text(); // if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105)) { var min = jQuery(this).attr("min"); if(!Number.isNaN(input)){ if(parseInt(input) < min){ jQuery(this).val(min); } } });*/ const wcf_order_bump_buttons = function () { $( document ).on( 'click', '.wcf-bump-order-cb-button', function () { const $this = $( this ), parent_class = $this.closest( '.wcf-bump-order-action' ), input = parent_class.find( 'input[type="checkbox"]' ); if ( $this.hasClass( 'wcf-bump-add-to-cart' ) ) { input.attr( 'checked', true ); $this.text( $this.data( 'adding' ) ); } else { input.attr( 'checked', false ); $this.text( $this.data( 'removing' ) ); } parent_class.find( '.wcf-bump-order-cb' ).trigger( 'change' ); } ); }; const quantity_changer = function () { $( '.wcf-qty-selection-btn' ).click( function ( e ) { e.preventDefault(); const quantity_input = $( this ) .parents( '.wcf-qty' ) .find( '.wcf-qty-selection' ), is_sold_individually = Boolean( quantity_input.data( 'sale-limit' ) ); // Return if the product is set to sold 1 per order. if ( is_sold_individually ) { return false; } const val = parseInt( quantity_input.val(), 10 ), min_value = parseInt( quantity_input.attr( 'min' ) ), max_value = parseInt( quantity_input.attr( 'max' ) ); if ( $( e.target ).hasClass( 'wcf-qty-increment' ) ) { quantity_input.val( val + 1 ); // Disable the quantity selector if the max quantity is reached. if ( max_value && quantity_input.val() >= max_value ) { $( e.target ).addClass( 'max-quantity-reached' ); } else { $( e.target ).removeClass( 'max-quantity-reached' ); } } else { $( '.wcf-qty-increment' ).removeClass( 'max-quantity-reached' ); quantity_input.val( val <= min_value ? min_value : val - 1 ); } $( '.wcf-qty-selection' ).trigger( 'change' ); } ); }; const ob_quantity_changer = function () { let wcf_order_bump_qty_update = false; $( document ).on( 'click', '.wcf-ob-qty-selection-btn', function ( e ) { e.preventDefault(); if ( true === wcf_order_bump_qty_update ) { return false; } wcf_order_bump_qty_update = true; const $this = $( this ), quantity_input = $this .parents( '.wcf-ob-qty-selection-wrap' ) .find( '.wcf-order-bump-quantity-updater' ), min_value = quantity_input.attr( 'min' ); let updated_qty = ''; const val = parseInt( quantity_input.val(), 10 ); if ( $( e.target ).hasClass( 'wcf-ob-qty-increment' ) ) { updated_qty = val + 1; quantity_input.val( updated_qty ); } else { updated_qty = val <= min_value ? min_value : val - 1; quantity_input.val( updated_qty ); } // Make a ajax call to update the quantity in the cart. update_ob_quantity( $this, updated_qty ); wcf_order_bump_qty_update = false; $( '.wcf-order-bump-quantity-updater' ).trigger( 'change' ); } ); }; const update_ob_quantity = function ( $this, updated_qty ) { const bump_offer_wrap = $this.closest( '.wcf-bump-order-wrap' ), checkbox_field = bump_offer_wrap.find( '#wcf-bump-order-cb' ), bump_offer_data = checkbox_field.attr( 'data-ob_data' ), ob_data = checkbox_field.data( 'ob_data' ), product_id = ob_data.product_id; const data = { _wcf_product_id: product_id, _bump_offer_data: bump_offer_data ? bump_offer_data : '', _bump_offer_qty: updated_qty > 0 ? updated_qty : '', security: cartflows.wcf_update_order_bump_qty_nonce, action: 'wcf_update_order_bump_qty', }; if ( false === checkbox_field.is( ':checked' ) ) { return; } data._wcf_bump_product_action = 'add_bump_product'; // Display spinner for specific order bump. bump_offer_wrap.block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6, }, } ); wcf_display_spinner(); $.ajax( { url: cartflows.ajax_url, data, dataType: 'json', type: 'POST', success( response ) { // Re-calculate the cart total wcf_re_calculate_totals(); wcf_remove_spinner( response ); }, error() { $( '.woocommerce-checkout-review-order-table' ).unblock(); }, } ); return false; }; const multistep_checkout_buttons_navigation = function () { let previous_step = 'billing', current_step = 'billing'; // Next button. $( document ).on( 'click', '.wcf-multistep-nav-next-btn', function wcf_show_next_step( e ) { e.preventDefault(); const next_step_element = $( '.wcf-multistep-nav-next-btn' ), next_step_element_target = next_step_element.attr( 'data-target' ); if ( current_step !== next_step_element_target ) { if ( wcf_multistep_field_validations() ) { remove_current_step_class(); previous_step = current_step; current_step = next_step_element_target; if ( 'shipping' === next_step_element_target ) { show_shipping_step(); } else if ( 'payment' === next_step_element_target ) { show_payment_step(); } scrollToTop(); } } } ); // Back button. $( document ).on( 'click', '.wcf-multistep-nav-back-btn', function wcf_show_previous_step( e ) { e.preventDefault(); const previous_step_element = $( '.wcf-multistep-nav-back-btn' ); previous_step_element_target = previous_step_element.attr( 'data-target' ); if ( current_step !== previous_step_element_target ) { if ( wcf_multistep_field_validations() ) { remove_current_step_class(); previous_step = current_step; current_step = previous_step_element_target; if ( '' === previous_step_element_target ) { previous_step_element.css( 'visibility', 'hidden' ); } else if ( 'shipping' === previous_step_element_target ) { show_shipping_step(); } else if ( 'billing' === previous_step_element_target ) { show_billing_step(); } scrollToTop(); } } } ); // Breadcrumbs. $( document ).on( 'click', '.wcf-checkout-breadcrumb a', function wcf_show_previous_step( e ) { e.preventDefault(); const breadcrum_tab = $( e.target ).attr( 'data-tab' ); if ( current_step !== breadcrum_tab ) { if ( wcf_multistep_field_validations() ) { previous_step = current_step; current_step = breadcrum_tab; remove_current_step_class(); if ( 'billing' === breadcrum_tab ) { show_billing_step(); } else if ( 'shipping' === breadcrum_tab ) { show_shipping_step(); } else if ( 'payment' === breadcrum_tab ) { show_payment_step(); } scrollToTop(); } } } ); // Custom sections. $( document ).on( 'click', '.wcf-step-link', function wcf_show_previous_step( e ) { e.preventDefault(); const tab_target = $( e.target ).attr( 'data-target' ); if ( current_step !== tab_target ) { if ( wcf_multistep_field_validations() ) { previous_step = current_step; current_step = tab_target; remove_current_step_class(); if ( 'billing' === tab_target ) { show_billing_step(); } else if ( 'shipping' === tab_target ) { show_shipping_step(); } } } } ); function show_billing_step() { const next_step_element = $( '.wcf-multistep-nav-next-btn' ), previous_step_element = $( '.wcf-multistep-nav-back-btn' ); if ( 'shipping' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-shipping' ); } if ( 'payment' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-payment' ); } $( '.wcf-embed-checkout-form' ).addClass( 'wcf-billing' ); if ( cartflows.is_hide_shipping_tab ) { next_step_element.attr( 'data-target', 'payment' ); } else { next_step_element.attr( 'data-target', 'shipping' ); } previous_step_element.attr( 'data-target', '' ); $( '.wcf-checkout-breadcrumb.information-step a' ).addClass( 'wcf-current-step' ); next_step_element.text( cartflows.multistep_buttons_strings.billing ); } function show_shipping_step() { const next_step_element = $( '.wcf-multistep-nav-next-btn' ), previous_step_element = $( '.wcf-multistep-nav-back-btn' ); if ( 'billing' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-billing' ); } if ( 'payment' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-payment' ); } $( '.wcf-embed-checkout-form' ).addClass( 'wcf-shipping' ); next_step_element.attr( 'data-target', 'payment' ); previous_step_element.attr( 'data-target', 'billing' ); $( '.wcf-checkout-breadcrumb.shipping-step a' ).addClass( 'wcf-current-step' ); updateEmailValue(); next_step_element.text( cartflows.multistep_buttons_strings.shipping ); } function show_payment_step() { const previous_step_element = $( '.wcf-multistep-nav-back-btn' ); if ( 'shipping' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-shipping' ); } if ( 'billing' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-billing' ); } if ( cartflows.is_hide_shipping_tab ) { previous_step_element.attr( 'data-target', 'billing' ); } else { previous_step_element.attr( 'data-target', 'shipping' ); } $( '.wcf-embed-checkout-form' ).addClass( 'wcf-payment' ); $( '.wcf-checkout-breadcrumb.payment-step a' ).addClass( 'wcf-current-step' ); updateEmailValue(); } function updateEmailValue() { // Update email if it is changed. $( '.wcf-review-detail-content.contact-details' ).text( $( '.wcf-embed-checkout-form form.woocommerce-checkout' ) .find( 'input[type="email"]' ) .val() ); } function scrollToTop( scroll_to = 'wcf-embed-checkout-form', delay = 1000 ) { $( 'html, body' ).animate( { scrollTop: $( '#' + scroll_to ).offset().top, }, delay ); } function remove_current_step_class() { if ( $( '.wcf-current-step' ).length ) { $( '.wcf-current-step' ).removeClass( 'wcf-current-step' ); } } const wcf_multistep_field_validations = function () { //Add focus class on clicked on input types let access = true, field_focus = ''; if ( 'billing' === current_step ) { const $billing_inputs = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields-custom, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-account-fields' ).find( 'input[type="text"], input[type="tel"], input[type="email"], input[type="password"]' ); const $billing_chekboxes = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-account-fields' ).find( 'input[type="checkbox"]' ); const $billing_select = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields' ).find( '.select2' ); Array.from( $billing_inputs ).forEach( function ( $this ) { const type = $this.type, name = $this.name, field_row = $this.closest( '.form-row' ), field_value = $.trim( $this.value ); let has_class = field_row.classList.contains( 'validate-required' ); // whiteSpace = /\s/g.test(field_value); if ( name === 'billing_password' ) { if ( $( '.wcf-email-validation-block' ).hasClass( 'success' ) && ! cartflows?.multistep_buttons_strings ?.is_guest_checkout ) { has_class = true; } else { has_class = false; } } if ( name === 'account_password' || name === 'account_username' ) { const create_acc_checkbox = document.getElementById( 'createaccount' ); if ( create_acc_checkbox ) { if ( $( create_acc_checkbox ).is( ':checked' ) ) { has_class = true; } else { has_class = false; } } else { has_class = true; } } if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { if ( 'email' === type && false === /^([a-zA-Z0-9_\+\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,14})$/.test( field_value ) ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } $this.classList.remove( 'field-required' ); } } ); Array.from( $billing_chekboxes ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ); let field_value = false; if ( $( $this ).is( ':checked' ) ) { field_value = true; } if ( has_class && false === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); Array.from( $billing_select ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( field_row.querySelector( '.select2-selection__rendered[title]' ) ); //Need to update naming convention. name = field_row.querySelector( 'select' ).name; //eslint-disable-line if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); } if ( 'shipping' === current_step ) { const $shipping_inputs = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields' ).find( 'input[type="text"], input[type="tel"], input[type="email"], input[type="password"]' ); const $shipping_chekboxes = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper' ).find( 'input[type="checkbox"]' ); const $shipping_select = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields' ).find( '.select2' ); const is_ship_to_diff = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout' ) .find( 'h3#ship-to-different-address input[type="checkbox"]:checked' ) .val(); if ( '1' === is_ship_to_diff ) { Array.from( $shipping_inputs ).forEach( function ( $this ) { const type = $this.type, field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( $this.value ); if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { if ( 'email' === type && false === /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test( field_value ) ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } $this.classList.remove( 'field-required' ); } } ); Array.from( $shipping_select ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( field_row.querySelector( '.select2-selection__rendered[title]' ) ); //Need to update naming convention. name = field_row.querySelector( 'select' ).name; //eslint-disable-line if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); Array.from( $shipping_chekboxes ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ); let field_value = false; if ( $( $this ).is( ':checked' ) ) { field_value = true; } if ( has_class && false === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); } } // Focus the errored field if ( '' !== field_focus ) { field_focus.focus(); } return access; }; }; $( function () { wcf_remove_product(); wcf_animate_browser_tab(); if ( 'yes' === cartflows.allow_autocomplete_zipcode ) { wcf_autocomplete_zip_data(); } wcf_product_quantity_var_options(); wcf_do_not_remove_single_product(); wcf_order_bump_ajax(); wcf_order_bump_buttons(); if ( $( '.wcf-embed-checkout-form-two-step' ).length > 0 ) { wcf_nav_tab_hide_show_events(); } //In multi checkout case we need to update the cart item key of the data-option for the product options. wcf_update_product_options_cart_item_key(); quantity_changer(); ob_quantity_changer(); multistep_checkout_buttons_navigation(); } ); } )( jQuery ); assets/js/flexslider.js000064400000160050147600244370011172 0ustar00/* * jQuery FlexSlider v2.7.2 * Copyright 2012 WooThemes * Contributing Author: Tyler Smith */ ; (function ($) { var focused = true; //FlexSlider: Object Instance $.flexslider = function(el, options) { var slider = $(el); // making variables public //if rtl value was not passed and html is in rtl..enable it by default. if(typeof options.rtl=='undefined' && $('html').attr('dir')=='rtl'){ options.rtl=true; } slider.vars = $.extend({}, $.flexslider.defaults, options); var namespace = slider.vars.namespace, msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture, touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch, // deprecating this idea, as devices are being released with both of these events eventType = "click touchend MSPointerUp keyup", watchedEvent = "", watchedEventClearTimer, vertical = slider.vars.direction === "vertical", reverse = slider.vars.reverse, carousel = (slider.vars.itemWidth > 0), fade = slider.vars.animation === "fade", asNav = slider.vars.asNavFor !== "", methods = {}; // Store a reference to the slider object $.data(el, "flexslider", slider); // Private slider methods methods = { init: function() { slider.animating = false; // Get current slide and make sure it is a number slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 ); if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; } slider.animatingTo = slider.currentSlide; slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last); slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' ')); slider.slides = $(slider.vars.selector, slider); slider.container = $(slider.containerSelector, slider); slider.count = slider.slides.length; // SYNC: slider.syncExists = $(slider.vars.sync).length > 0; // SLIDE: if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; } slider.prop = (vertical) ? "top" : ( slider.vars.rtl ? "marginRight" : "marginLeft" ); slider.args = {}; // SLIDESHOW: slider.manualPause = false; slider.stopped = false; //PAUSE WHEN INVISIBLE slider.started = false; slider.startTimeout = null; // TOUCH/USECSS: slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() { var obj = document.createElement('div'), props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective']; for (var i in props) { if ( obj.style[ props[i] ] !== undefined ) { slider.pfx = props[i].replace('Perspective','').toLowerCase(); slider.prop = "-" + slider.pfx + "-transform"; return true; } } return false; }()); slider.isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; slider.ensureAnimationEnd = ''; // CONTROLSCONTAINER: if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer); // MANUAL: if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls); // CUSTOM DIRECTION NAV: if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav); // RANDOMIZE: if (slider.vars.randomize) { slider.slides.sort(function() { return (Math.round(Math.random())-0.5); }); slider.container.empty().append(slider.slides); } slider.doMath(); // INIT slider.setup("init"); // CONTROLNAV: if (slider.vars.controlNav) { methods.controlNav.setup(); } // DIRECTIONNAV: if (slider.vars.directionNav) { methods.directionNav.setup(); } // KEYBOARD: if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) { $(document).bind('keyup', function(event) { var keycode = event.keyCode; if (!slider.animating && (keycode === 39 || keycode === 37)) { var target = (slider.vars.rtl? ((keycode === 37) ? slider.getTarget('next') : (keycode === 39) ? slider.getTarget('prev') : false) : ((keycode === 39) ? slider.getTarget('next') : (keycode === 37) ? slider.getTarget('prev') : false) ) ; slider.flexAnimate(target, slider.vars.pauseOnAction); } }); } // MOUSEWHEEL: if (slider.vars.mousewheel) { slider.bind('mousewheel', function(event, delta, deltaX, deltaY) { event.preventDefault(); var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev'); slider.flexAnimate(target, slider.vars.pauseOnAction); }); } // PAUSEPLAY if (slider.vars.pausePlay) { methods.pausePlay.setup(); } //PAUSE WHEN INVISIBLE if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); } // SLIDSESHOW if (slider.vars.slideshow) { if (slider.vars.pauseOnHover) { slider.hover(function() { if (!slider.manualPlay && !slider.manualPause) { slider.pause(); } }, function() { if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); } }); } // initialize animation //If we're visible, or we don't use PageVisibility API if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) { (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play(); } } // ASNAV: if (asNav) { methods.asNav.setup(); } // TOUCH if (touch && slider.vars.touch) { methods.touch(); } // FADE&&SMOOTHHEIGHT || SLIDE: if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); } slider.find("img").attr("draggable", "false"); // API: start() Callback setTimeout(function(){ slider.vars.start(slider); }, 200); }, asNav: { setup: function() { slider.asNav = true; slider.animatingTo = Math.floor(slider.currentSlide/slider.move); slider.currentItem = slider.currentSlide; slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide"); if(!msGesture){ slider.slides.on(eventType, function(e){ e.preventDefault(); var $slide = $(this), target = $slide.index(); var posFromX; if(slider.vars.rtl){ posFromX = -1*($slide.offset().right - $(slider).scrollLeft()); // Find position of slide relative to right of slider container } else { posFromX = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container } if( posFromX <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) { slider.flexAnimate(slider.getTarget("prev"), true); } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) { slider.direction = (slider.currentItem < target) ? "next" : "prev"; slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); } }); }else{ el._slider = slider; slider.slides.each(function (){ var that = this; that._gesture = new MSGesture(); that._gesture.target = that; that.addEventListener("MSPointerDown", function (e){ e.preventDefault(); if(e.currentTarget._gesture) { e.currentTarget._gesture.addPointer(e.pointerId); } }, false); that.addEventListener("MSGestureTap", function (e){ e.preventDefault(); var $slide = $(this), target = $slide.index(); if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) { slider.direction = (slider.currentItem < target) ? "next" : "prev"; slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); } }); }); } } }, controlNav: { setup: function() { if (!slider.manualControls) { methods.controlNav.setupPaging(); } else { // MANUALCONTROLS: methods.controlNav.setupManual(); } }, setupPaging: function() { var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging', j = 1, item, slide; slider.controlNavScaffold = $('
    '); if (slider.pagingCount > 1) { for (var i = 0; i < slider.pagingCount; i++) { slide = slider.slides.eq(i); if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); } item = $( '' ).attr( 'href', '#' ).text( j ); if ( slider.vars.controlNav === "thumbnails" ) { item = $( '' ).attr( 'src', slide.attr( 'data-thumb' ) ); } if ( '' !== slide.attr( 'data-thumb-alt' ) ) { item.attr( 'alt', slide.attr( 'data-thumb-alt' ) ); } if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) { var captn = slide.attr( 'data-thumbcaption' ); if ( '' !== captn && undefined !== captn ) { var caption = $('' ).addClass( namespace + 'caption' ).text( captn ); item.append( caption ); } } var liElement = $( '
  1. ' ); item.appendTo( liElement ); liElement.append( '
  2. ' ); slider.controlNavScaffold.append(liElement); j++; } } // CONTROLSCONTAINER: (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold); methods.controlNav.set(); methods.controlNav.active(); slider.controlNavScaffold.delegate('a, img', eventType, function(event) { event.preventDefault(); if (watchedEvent === "" || watchedEvent === event.type) { var $this = $(this), target = slider.controlNav.index($this); if (!$this.hasClass(namespace + 'active')) { slider.direction = (target > slider.currentSlide) ? "next" : "prev"; slider.flexAnimate(target, slider.vars.pauseOnAction); } } // setup flags to prevent event duplication if (watchedEvent === "") { watchedEvent = event.type; } methods.setToClearWatchedEvent(); }); }, setupManual: function() { slider.controlNav = slider.manualControls; methods.controlNav.active(); slider.controlNav.bind(eventType, function(event) { event.preventDefault(); if (watchedEvent === "" || watchedEvent === event.type) { var $this = $(this), target = slider.controlNav.index($this); if (!$this.hasClass(namespace + 'active')) { (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev"; slider.flexAnimate(target, slider.vars.pauseOnAction); } } // setup flags to prevent event duplication if (watchedEvent === "") { watchedEvent = event.type; } methods.setToClearWatchedEvent(); }); }, set: function() { var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a'; slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider); }, active: function() { slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active"); }, update: function(action, pos) { if (slider.pagingCount > 1 && action === "add") { slider.controlNavScaffold.append($('
  3. ' + slider.count + '
  4. ')); } else if (slider.pagingCount === 1) { slider.controlNavScaffold.find('li').remove(); } else { slider.controlNav.eq(pos).closest('li').remove(); } methods.controlNav.set(); (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active(); } }, directionNav: { setup: function() { var directionNavScaffold = $(''); // CUSTOM DIRECTION NAV: if (slider.customDirectionNav) { slider.directionNav = slider.customDirectionNav; // CONTROLSCONTAINER: } else if (slider.controlsContainer) { $(slider.controlsContainer).append(directionNavScaffold); slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer); } else { slider.append(directionNavScaffold); slider.directionNav = $('.' + namespace + 'direction-nav li a', slider); } methods.directionNav.update(); slider.directionNav.bind(eventType, function(event) { event.preventDefault(); var target; if (watchedEvent === "" || watchedEvent === event.type) { target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev'); slider.flexAnimate(target, slider.vars.pauseOnAction); } // setup flags to prevent event duplication if (watchedEvent === "") { watchedEvent = event.type; } methods.setToClearWatchedEvent(); }); }, update: function() { var disabledClass = namespace + 'disabled'; if (slider.pagingCount === 1) { slider.directionNav.addClass(disabledClass).attr('tabindex', '-1'); } else if (!slider.vars.animationLoop) { if (slider.animatingTo === 0) { slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1'); } else if (slider.animatingTo === slider.last) { slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1'); } else { slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); } } else { slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); } } }, pausePlay: { setup: function() { var pausePlayScaffold = $('
    '); // CONTROLSCONTAINER: if (slider.controlsContainer) { slider.controlsContainer.append(pausePlayScaffold); slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer); } else { slider.append(pausePlayScaffold); slider.pausePlay = $('.' + namespace + 'pauseplay a', slider); } methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play'); slider.pausePlay.bind(eventType, function(event) { event.preventDefault(); if (watchedEvent === "" || watchedEvent === event.type) { if ($(this).hasClass(namespace + 'pause')) { slider.manualPause = true; slider.manualPlay = false; slider.pause(); } else { slider.manualPause = false; slider.manualPlay = true; slider.play(); } } // setup flags to prevent event duplication if (watchedEvent === "") { watchedEvent = event.type; } methods.setToClearWatchedEvent(); }); }, update: function(state) { (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText); } }, touch: function() { var startX, startY, offset, cwidth, dx, startT, onTouchStart, onTouchMove, onTouchEnd, scrolling = false, localX = 0, localY = 0, accDx = 0; if(!msGesture){ onTouchStart = function(e) { if (slider.animating) { e.preventDefault(); } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) { slider.pause(); // CAROUSEL: cwidth = (vertical) ? slider.h : slider. w; startT = Number(new Date()); // CAROUSEL: // Local vars for X and Y points. localX = e.touches[0].pageX; localY = e.touches[0].pageY; offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : (carousel && slider.currentSlide === slider.last) ? slider.limit : (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; startX = (vertical) ? localY : localX; startY = (vertical) ? localX : localY; el.addEventListener('touchmove', onTouchMove, false); el.addEventListener('touchend', onTouchEnd, false); } }; onTouchMove = function(e) { // Local vars for X and Y points. localX = e.touches[0].pageX; localY = e.touches[0].pageY; dx = (vertical) ? startX - localY : (slider.vars.rtl?-1:1)*(startX - localX); scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY)); var fxms = 500; if ( ! scrolling || Number( new Date() ) - startT > fxms ) { e.preventDefault(); if (!fade && slider.transitions) { if (!slider.vars.animationLoop) { dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1); } slider.setProps(offset + dx, "setTouch"); } } }; onTouchEnd = function(e) { // finish the touch by undoing the touch session el.removeEventListener('touchmove', onTouchMove, false); if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { var updateDx = (reverse) ? -dx : dx, target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { slider.flexAnimate(target, slider.vars.pauseOnAction); } else { if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); } } } el.removeEventListener('touchend', onTouchEnd, false); startX = null; startY = null; dx = null; offset = null; }; el.addEventListener('touchstart', onTouchStart, false); }else{ el.style.msTouchAction = "none"; el._gesture = new MSGesture(); el._gesture.target = el; el.addEventListener("MSPointerDown", onMSPointerDown, false); el._slider = slider; el.addEventListener("MSGestureChange", onMSGestureChange, false); el.addEventListener("MSGestureEnd", onMSGestureEnd, false); function onMSPointerDown(e){ e.stopPropagation(); if (slider.animating) { e.preventDefault(); }else{ slider.pause(); el._gesture.addPointer(e.pointerId); accDx = 0; cwidth = (vertical) ? slider.h : slider. w; startT = Number(new Date()); // CAROUSEL: offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : (carousel && slider.currentSlide === slider.last) ? slider.limit : (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; } } function onMSGestureChange(e) { e.stopPropagation(); var slider = e.target._slider; if(!slider){ return; } var transX = -e.translationX, transY = -e.translationY; //Accumulate translations. accDx = accDx + ((vertical) ? transY : transX); dx = (slider.vars.rtl?-1:1)*accDx; scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY)); if(e.detail === e.MSGESTURE_FLAG_INERTIA){ setImmediate(function (){ el._gesture.stop(); }); return; } if (!scrolling || Number(new Date()) - startT > 500) { e.preventDefault(); if (!fade && slider.transitions) { if (!slider.vars.animationLoop) { dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1); } slider.setProps(offset + dx, "setTouch"); } } } function onMSGestureEnd(e) { e.stopPropagation(); var slider = e.target._slider; if(!slider){ return; } if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { var updateDx = (reverse) ? -dx : dx, target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { slider.flexAnimate(target, slider.vars.pauseOnAction); } else { if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); } } } startX = null; startY = null; dx = null; offset = null; accDx = 0; } } }, resize: function() { if (!slider.animating && slider.is(':visible')) { if (!carousel) { slider.doMath(); } if (fade) { // SMOOTH HEIGHT: methods.smoothHeight(); } else if (carousel) { //CAROUSEL: slider.slides.width(slider.computedW); slider.update(slider.pagingCount); slider.setProps(); } else if (vertical) { //VERTICAL: slider.viewport.height(slider.h); slider.setProps(slider.h, "setTotal"); } else { // SMOOTH HEIGHT: if (slider.vars.smoothHeight) { methods.smoothHeight(); } slider.newSlides.width(slider.computedW); slider.setProps(slider.computedW, "setTotal"); } } }, smoothHeight: function(dur) { if (!vertical || fade) { var $obj = (fade) ? slider : slider.viewport; (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).innerHeight()}, dur) : $obj.innerHeight(slider.slides.eq(slider.animatingTo).innerHeight()); } }, sync: function(action) { var $obj = $(slider.vars.sync).data("flexslider"), target = slider.animatingTo; switch (action) { case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break; case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break; case "pause": $obj.pause(); break; } }, uniqueID: function($clone) { // Append _clone to current level and children elements with id attributes $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() { var $this = $(this); $this.attr( 'id', $this.attr( 'id' ) + '_clone' ); }); return $clone; }, pauseInvisible: { visProp: null, init: function() { var visProp = methods.pauseInvisible.getHiddenProp(); if (visProp) { var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange'; document.addEventListener(evtname, function() { if (methods.pauseInvisible.isHidden()) { if(slider.startTimeout) { clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible } else { slider.pause(); //Or just pause } } else { if(slider.started) { slider.play(); //Initiated before, just play } else { if (slider.vars.initDelay > 0) { setTimeout(slider.play, slider.vars.initDelay); } else { slider.play(); //Didn't init before: simply init or wait for it } } } }); } }, isHidden: function() { var prop = methods.pauseInvisible.getHiddenProp(); if (!prop) { return false; } return document[prop]; }, getHiddenProp: function() { var prefixes = ['webkit','moz','ms','o']; // if 'hidden' is natively supported just return it if ('hidden' in document) { return 'hidden'; } // otherwise loop over all the known prefixes until we find one for ( var i = 0; i < prefixes.length; i++ ) { if ((prefixes[i] + 'Hidden') in document) { return prefixes[i] + 'Hidden'; } } // otherwise it's not supported return null; } }, setToClearWatchedEvent: function() { clearTimeout(watchedEventClearTimer); watchedEventClearTimer = setTimeout(function() { watchedEvent = ""; }, 3000); } }; // public methods slider.flexAnimate = function(target, pause, override, withSync, fromNav) { if (!slider.vars.animationLoop && target !== slider.currentSlide) { slider.direction = (target > slider.currentSlide) ? "next" : "prev"; } if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev"; if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) { if (asNav && withSync) { var master = $(slider.vars.asNavFor).data('flexslider'); slider.atEnd = target === 0 || target === slider.count - 1; master.flexAnimate(target, true, false, true, fromNav); slider.direction = (slider.currentItem < target) ? "next" : "prev"; master.direction = slider.direction; if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) { slider.currentItem = target; slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); target = Math.floor(target/slider.visible); } else { slider.currentItem = target; slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); return false; } } slider.animating = true; slider.animatingTo = target; // SLIDESHOW: if (pause) { slider.pause(); } // API: before() animation Callback slider.vars.before(slider); // SYNC: if (slider.syncExists && !fromNav) { methods.sync("animate"); } // CONTROLNAV if (slider.vars.controlNav) { methods.controlNav.active(); } // !CAROUSEL: // CANDIDATE: slide active class (for add/remove slide) if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); } // INFINITE LOOP: // CANDIDATE: atEnd slider.atEnd = target === 0 || target === slider.last; // DIRECTIONNAV: if (slider.vars.directionNav) { methods.directionNav.update(); } if (target === slider.last) { // API: end() of cycle Callback slider.vars.end(slider); // SLIDESHOW && !INFINITE LOOP: if (!slider.vars.animationLoop) { slider.pause(); } } // SLIDE: if (!fade) { var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW, margin, slideString, calcNext; // INFINITE LOOP / REVERSE: if (carousel) { margin = slider.vars.itemMargin; calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo; slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext; } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") { slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0; } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") { slideString = (reverse) ? 0 : (slider.count + 1) * dimension; } else { slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension; } slider.setProps(slideString, "", slider.vars.animationSpeed); if (slider.transitions) { if (!slider.vars.animationLoop || !slider.atEnd) { slider.animating = false; slider.currentSlide = slider.animatingTo; } // Unbind previous transitionEnd events and re-bind new transitionEnd event slider.container.unbind("webkitTransitionEnd transitionend"); slider.container.bind("webkitTransitionEnd transitionend", function() { clearTimeout(slider.ensureAnimationEnd); slider.wrapup(dimension); }); // Insurance for the ever-so-fickle transitionEnd event clearTimeout(slider.ensureAnimationEnd); slider.ensureAnimationEnd = setTimeout(function() { slider.wrapup(dimension); }, slider.vars.animationSpeed + 100); } else { slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){ slider.wrapup(dimension); }); } } else { // FADE: if (!touch) { slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing); slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); } else { slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 }); slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 }); slider.wrapup(dimension); } } // SMOOTH HEIGHT: if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); } } }; slider.wrapup = function(dimension) { // SLIDE: if (!fade && !carousel) { if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) { slider.setProps(dimension, "jumpEnd"); } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) { slider.setProps(dimension, "jumpStart"); } } slider.animating = false; slider.currentSlide = slider.animatingTo; // API: after() animation Callback slider.vars.after(slider); }; // SLIDESHOW: slider.animateSlides = function() { if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); } }; // SLIDESHOW: slider.pause = function() { clearInterval(slider.animatedSlides); slider.animatedSlides = null; slider.playing = false; // PAUSEPLAY: if (slider.vars.pausePlay) { methods.pausePlay.update("play"); } // SYNC: if (slider.syncExists) { methods.sync("pause"); } }; // SLIDESHOW: slider.play = function() { if (slider.playing) { clearInterval(slider.animatedSlides); } slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed); slider.started = slider.playing = true; // PAUSEPLAY: if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); } // SYNC: if (slider.syncExists) { methods.sync("play"); } }; // STOP: slider.stop = function () { slider.pause(); slider.stopped = true; }; slider.canAdvance = function(target, fromNav) { // ASNAV: var last = (asNav) ? slider.pagingCount - 1 : slider.last; return (fromNav) ? true : (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true : (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false : (target === slider.currentSlide && !asNav) ? false : (slider.vars.animationLoop) ? true : (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false : (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false : true; }; slider.getTarget = function(dir) { slider.direction = dir; if (dir === "next") { return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1; } else { return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1; } }; // SLIDE: slider.setProps = function(pos, special, dur) { var target = (function() { var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo, posCalc = (function() { if (carousel) { return (special === "setTouch") ? pos : (reverse && slider.animatingTo === slider.last) ? 0 : (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : (slider.animatingTo === slider.last) ? slider.limit : posCheck; } else { switch (special) { case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos; case "setTouch": return (reverse) ? pos : pos; case "jumpEnd": return (reverse) ? pos : slider.count * pos; case "jumpStart": return (reverse) ? slider.count * pos : pos; default: return pos; } } }()); return (posCalc * ((slider.vars.rtl)?1:-1)) + "px"; }()); if (slider.transitions) { if (slider.isFirefox) { target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + (parseInt(target)+'px') + ",0,0)"; } else { target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + ((slider.vars.rtl?-1:1)*parseInt(target)+'px') + ",0,0)"; } dur = (dur !== undefined) ? (dur/1000) + "s" : "0s"; slider.container.css("-" + slider.pfx + "-transition-duration", dur); slider.container.css("transition-duration", dur); } slider.args[slider.prop] = target; if (slider.transitions || dur === undefined) { slider.container.css(slider.args); } slider.container.css('transform',target); }; slider.setup = function(type) { // SLIDE: if (!fade) { var sliderOffset, arr; if (type === "init") { slider.viewport = $('
    ').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container); // INFINITE LOOP: slider.cloneCount = 0; slider.cloneOffset = 0; // REVERSE: if (reverse) { arr = $.makeArray(slider.slides).reverse(); slider.slides = $(arr); slider.container.empty().append(slider.slides); } } // INFINITE LOOP && !CAROUSEL: if (slider.vars.animationLoop && !carousel) { slider.cloneCount = 2; slider.cloneOffset = 1; // clear out old clones if (type !== "init") { slider.container.find('.clone').remove(); } slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true')) .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true')); } slider.newSlides = $(slider.vars.selector, slider); sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset; // VERTICAL: if (vertical && !carousel) { slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%"); setTimeout(function(){ slider.newSlides.css({"display": "block"}); slider.doMath(); slider.viewport.height(slider.h); slider.setProps(sliderOffset * slider.h, "init"); }, (type === "init") ? 100 : 0); } else { slider.container.width((slider.count + slider.cloneCount) * 200 + "%"); slider.setProps(sliderOffset * slider.computedW, "init"); setTimeout(function(){ slider.doMath(); if(slider.vars.rtl){ if (slider.isFirefox) { slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "right", "display": "block"}); } else { slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"}); } } else{ slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"}); } // SMOOTH HEIGHT: if (slider.vars.smoothHeight) { methods.smoothHeight(); } }, (type === "init") ? 100 : 0); } } else { // FADE: if(slider.vars.rtl){ slider.slides.css({"width": "100%", "float": 'right', "marginLeft": "-100%", "position": "relative"}); } else{ slider.slides.css({"width": "100%", "float": 'left', "marginRight": "-100%", "position": "relative"}); } if (type === "init") { if (!touch) { //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing); if (slider.vars.fadeFirstSlide == false) { slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1}); } else { slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing); } } else { slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2}); } } // SMOOTH HEIGHT: if (slider.vars.smoothHeight) { methods.smoothHeight(); } } // !CAROUSEL: // CANDIDATE: active slide if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); } //FlexSlider: init() Callback slider.vars.init(slider); }; slider.doMath = function() { var slide = slider.slides.first(), slideMargin = slider.vars.itemMargin, minItems = slider.vars.minItems, maxItems = slider.vars.maxItems; slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width(); if (slider.isFirefox) { slider.w = slider.width(); } slider.h = slide.height(); slider.boxPadding = slide.outerWidth() - slide.width(); // CAROUSEL: if (carousel) { slider.itemT = slider.vars.itemWidth + slideMargin; slider.itemM = slideMargin; slider.minW = (minItems) ? minItems * slider.itemT : slider.w; slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w; slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems : (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems : (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth; slider.visible = Math.floor(slider.w/(slider.itemW)); slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible; slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1); slider.last = slider.pagingCount - 1; slider.limit = (slider.pagingCount === 1) ? 0 : (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin; } else { slider.itemW = slider.w; slider.itemM = slideMargin; slider.pagingCount = slider.count; slider.last = slider.count - 1; } slider.computedW = slider.itemW - slider.boxPadding; slider.computedM = slider.itemM; }; slider.update = function(pos, action) { slider.doMath(); // update currentSlide and slider.animatingTo if necessary if (!carousel) { if (pos < slider.currentSlide) { slider.currentSlide += 1; } else if (pos <= slider.currentSlide && pos !== 0) { slider.currentSlide -= 1; } slider.animatingTo = slider.currentSlide; } // update controlNav if (slider.vars.controlNav && !slider.manualControls) { if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) { methods.controlNav.update("add"); } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) { if (carousel && slider.currentSlide > slider.last) { slider.currentSlide -= 1; slider.animatingTo -= 1; } methods.controlNav.update("remove", slider.last); } } // update directionNav if (slider.vars.directionNav) { methods.directionNav.update(); } }; slider.addSlide = function(obj, pos) { var $obj = $(obj); slider.count += 1; slider.last = slider.count - 1; // append new slide if (vertical && reverse) { (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj); } else { (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj); } // update currentSlide, animatingTo, controlNav, and directionNav slider.update(pos, "add"); // update slider.slides slider.slides = $(slider.vars.selector + ':not(.clone)', slider); // re-setup the slider to accomdate new slide slider.setup(); //FlexSlider: added() Callback slider.vars.added(slider); }; slider.removeSlide = function(obj) { var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj; // update count slider.count -= 1; slider.last = slider.count - 1; // remove slide if (isNaN(obj)) { $(obj, slider.slides).remove(); } else { (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove(); } // update currentSlide, animatingTo, controlNav, and directionNav slider.doMath(); slider.update(pos, "remove"); // update slider.slides slider.slides = $(slider.vars.selector + ':not(.clone)', slider); // re-setup the slider to accomdate new slide slider.setup(); // FlexSlider: removed() Callback slider.vars.removed(slider); }; //FlexSlider: Initialize methods.init(); }; // Ensure the slider isn't focussed if the window loses focus. $( window ).blur( function ( e ) { focused = false; }).focus( function ( e ) { focused = true; }); //FlexSlider: Default Settings $.flexslider.defaults = { namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril animation: "fade", //String: Select your animation type, "fade" or "slide" easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" reverse: false, //{NEW} Boolean: Reverse the animation direction animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide) slideshow: true, //Boolean: Animate slider automatically slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds randomize: false, //Boolean: Randomize slide order fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade" thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav. // Usability features pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage. useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches // Primary Controls controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false) prevText: "Previous", //String: Set the text for the "previous" directionNav item nextText: "Next", //String: Set the text for the "next" directionNav item // Secondary Navigation keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present. mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel pausePlay: false, //Boolean: Create pause/play dynamic element pauseText: "Pause", //String: Set the text for the "pause" pausePlay item playText: "Play", //String: Set the text for the "play" pausePlay item // Special properties controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found. manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. customDirectionNav: "", //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace) sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care. asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider // Carousel Options itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding. itemMargin: 0, //{NEW} Integer: Margin between carousel items. minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this. maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit. move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items. allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide // Browser Specific isFirefox: false, // {NEW} Boolean: Set to true when Firefox is the browser used. // Callback API start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation after: function(){}, //Callback: function(slider) - Fires after each slider animation completes end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed init: function() {}, //{NEW} Callback: function(slider) - Fires after the slider is initially setup rtl: false //{NEW} Boolean: Whether or not to enable RTL mode }; //FlexSlider: Plugin Function $.fn.flexslider = function(options) { if (options === undefined) { options = {}; } if (typeof options === "object") { return this.each(function() { var $this = $(this), selector = (options.selector) ? options.selector : ".slides > li", $slides = $this.find(selector); if ( ( $slides.length === 1 && options.allowOneSlide === false ) || $slides.length === 0 ) { $slides.fadeIn(400); if (options.start) { options.start($this); } } else if ($this.data('flexslider') === undefined) { new $.flexslider(this, options); } }); } else { // Helper strings to quickly perform functions on the slider var $slider = $(this).data('flexslider'); switch (options) { case "play": $slider.play(); break; case "pause": $slider.pause(); break; case "stop": $slider.stop(); break; case "next": $slider.flexAnimate($slider.getTarget("next"), true); break; case "prev": case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break; default: if (typeof options === "number") { $slider.flexAnimate(options, true); } } } }; })(jQuery); assets/js/frontend.js000064400000105701147600244370010652 0ustar00( function ( $ ) { const CartFlowsHelper = { getUrlParameter( param ) { const page_url = decodeURIComponent( window.location.search.substring( 1 ) ), url_variables = page_url.split( '&' ); let parameter_name, i; for ( i = 0; i < url_variables.length; i++ ) { parameter_name = url_variables[ i ].split( '=' ); if ( parameter_name[ 0 ] === param ) { return parameter_name[ 1 ] === undefined ? true : parameter_name[ 1 ]; } } }, is_doing_offer_ajax: false, }; const trigger_offer_events = function ( ajax_data ) { if ( ajax_data.offer_action ) { // Prepare the offer data to sent to event. const event_data = { action: ajax_data.action, flow_id: ajax_data.flow_id, input_qty: ajax_data.input_qty, offer_action: ajax_data.offer_action, offer_type: ajax_data.offer_type, order_id: ajax_data.order_id, product_id: ajax_data.product_id, step_id: ajax_data.step_id, variation_id: ajax_data.variation_id, }; // Create a custom event and dispatch it. document.dispatchEvent( new CustomEvent( ajax_data.action, { bubbles: true, // The bubbles will make sure that the code executes in the line-by-line pattern only. detail: event_data, // eslint-disable-line quote-props } ) ); } }; const wcf_process_offer = function ( ajax_data ) { ajax_data._nonce = cartflows_offer[ ajax_data.action + '_nonce' ]; // Stop sending multiple ajax requests at the same time to avoid duplicate orders. if ( ! CartFlowsHelper.is_doing_offer_ajax ) { CartFlowsHelper.is_doing_offer_ajax = true; } else { console.log( 'Muliple Clicks detected: Offer accepted ajax is already in progress.' ); return; } $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( data ) { const msg = data.message; const msg_class = 'wcf-payment-' + data.status; // Trigger the offer accept/reject events. trigger_offer_events( ajax_data ); $( 'body' ).trigger( 'wcf-update-msg', [ msg, msg_class ] ); // Updating the state to ajax complete. CartFlowsHelper.is_doing_offer_ajax = false; setTimeout( function () { window.location.href = data.redirect; }, 600 ); }, } ); }; const wcf_offer_button_action = function () { const default_page_builder = cartflows.default_page_builder; $( 'a[href*="wcf-up-offer-yes"]' ).each( function ( e ) { const $this = $( this ); if ( e === 0 ) { if ( default_page_builder === 'bricks-builder' ) { $this.attr( 'class', 'wcf-upsell-offer' ); } else { $this.attr( 'id', 'wcf-upsell-offer' ); } } else if ( default_page_builder === 'bricks-builder' ) { $this.attr( 'class', 'wcf-upsell-offer-' + e ); } else { $this.attr( 'id', 'wcf-upsell-offer-' + e ); } } ); $( 'a[href*="wcf-down-offer-yes"]' ).each( function ( e ) { const $this = $( this ); if ( e === 0 ) { if ( default_page_builder === 'bricks-builder' ) { $this.attr( 'class', 'wcf-downsell-offer' ); } else { $this.attr( 'id', 'wcf-downsell-offer' ); } } else if ( default_page_builder === 'bricks-builder' ) { $this.attr( 'class', 'wcf-downsell-offer' ); } else { $this.attr( 'id', 'wcf-downsell-offer-' + e ); } } ); $( document ).on( 'click', 'a[href*="wcf-up-offer"], a[href*="wcf-down-offer"]', function ( e ) { e.preventDefault(); //check if it is a bricks builder admin page let urlQueryString = window.location.search; urlQueryString = urlQueryString.substring( 1 ); if ( urlQueryString && urlQueryString.includes( 'bricks=run' ) ) { return false; } const $this = $( this ), is_disabled = $this.attr( 'disabled' ) ? true : false; if ( ! is_disabled ) { $this.attr( 'disabled', true ); } else { // Skip the workflow if clicked multiple times on the same buttons. console.log( 'Restricted action: Multiple button clicks detected.' ); return false; } const href = $this.attr( 'href' ), step_id = cartflows_offer.step_id, product_id = cartflows_offer.product_id, order_id = cartflows_offer.order_id, order_key = cartflows_offer.order_key, flow_id = cartflows.current_flow; let offer_action = 'yes', offer_type = 'upsell', variation_id = 0, input_qty = 0; if ( href.indexOf( 'wcf-up-offer' ) !== -1 ) { offer_type = 'upsell'; if ( href.indexOf( 'wcf-up-offer-yes' ) !== -1 ) { offer_action = 'yes'; } else { offer_action = 'no'; } } if ( href.indexOf( 'wcf-down-offer' ) !== -1 ) { offer_type = 'downsell'; if ( href.indexOf( 'wcf-down-offer-yes' ) !== -1 ) { offer_action = 'yes'; } else { offer_action = 'no'; } } if ( 'yes' === offer_action ) { const variation_wrapper = $( '.wcf-offer-product-variation' ); if ( variation_wrapper.length > 0 ) { const variation_form = variation_wrapper.find( '.variations_form' ), variation_input = variation_form.find( 'input.variation_id' ); // Set variation id here. variation_id = parseInt( variation_input.val() ); if ( $( '.var_not_selected' ).length > 0 || '' === variation_id || 0 === variation_id ) { // variation_form.find('.variations select').addClass('var_not_selected'); variation_form .find( '.variations select' ) .each( function () { if ( $( this ).val().length === 0 ) { $( this ).addClass( 'var_not_selected' ); } } ); $( [ document.documentElement, document.body, ] ).animate( { scrollTop: variation_form .find( '.variations select' ) .offset().top - 100, }, 1000 ); return false; } } } if ( 'yes' === cartflows_offer.skip_offer && 'yes' === offer_action ) { return; } $( 'body' ).trigger( 'wcf-show-loader', offer_action ); if ( 'yes' === offer_action ) { action = 'wcf_' + offer_type + '_accepted'; } else { action = 'wcf_' + offer_type + '_rejected'; } const quantity_wrapper = $( '.wcf-offer-product-quantity' ); if ( quantity_wrapper.length > 0 ) { const quantity_input = quantity_wrapper.find( 'input[name="quantity"]' ); const quantity_value = parseInt( quantity_input.val() ); if ( quantity_value > 0 ) { input_qty = quantity_value; } } const ajax_data = { action: '', offer_action, offer_type, step_id, product_id, variation_id, input_qty, order_id, order_key, flow_id, stripe_sca_payment: false, stripe_intent_id: '', _nonce: '', }; if ( 'yes' === offer_action ) { if ( 'stripe' === cartflows_offer.payment_method ) { ajax_data.action = 'wcf_stripe_sca_check'; ajax_data._nonce = cartflows_offer.wcf_stripe_sca_check_nonce; $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'intent_secret' ) ) { const stripe = Stripe( response.stripe_pk ); stripe .handleCardPayment( response.intent_secret ) .then( function ( res ) { if ( res.error ) { throw res.error; } if ( 'requires_capture' !== res.paymentIntent.status && 'succeeded' !== res.paymentIntent.status ) { return; } ajax_data.action = action; ajax_data.stripe_sca_payment = true; ajax_data.stripe_intent_id = res.paymentIntent.id; wcf_process_offer( ajax_data ); } ) .catch( function () { window.location.reload(); } ); } else { ajax_data.action = action; wcf_process_offer( ajax_data ); } }, } ); } else if ( 'mollie_wc_gateway_creditcard' === cartflows_offer.payment_method || 'mollie_wc_gateway_ideal' === cartflows_offer.payment_method ) { wcf_handle_mollie_payment_gateways( ajax_data, cartflows_offer.payment_method ); } else if ( 'ppcp-gateway' === cartflows_offer.payment_method ) { wcf_init_create_paypal_payments_order( ajax_data, cartflows_offer.payment_method ); } else if ( 'cpsw_stripe' === cartflows_offer.payment_method || 'cpsw_stripe_element' === cartflows_offer.payment_method ) { if ( 'cpsw_stripe' === cartflows_offer.payment_method ) { ajax_data.action = 'wcf_cpsw_create_payment_intent'; ajax_data._nonce = cartflows_offer.wcf_cpsw_create_payment_intent_nonce; } else { ajax_data.action = 'wcf_cpsw_create_payment_element_intent'; ajax_data._nonce = cartflows_offer.wcf_cpsw_create_payment_element_intent_nonce; } $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'client_secret' ) && '' !== response.client_secret ) { const stripe = Stripe( response.cpsw_pk ); stripe .confirmCardPayment( response.client_secret ) .then( function ( resp ) { console.log( resp ); if ( resp.error ) { throw resp.error; } if ( 'requires_capture' !== resp.paymentIntent.status && 'succeeded' !== resp.paymentIntent.status ) { return; } ajax_data.action = action; ajax_data.cpsw_intent_id = resp.paymentIntent.id; ajax_data.cpsw_payment_method = resp.paymentIntent.payment_method; wcf_process_offer( ajax_data ); } ) .catch( function () { window.location.reload(); } ); } else { ajax_data.action = action; wcf_process_offer( ajax_data ); } }, } ); } else if ( 'woocommerce_payments' === cartflows_offer.payment_method ) { ajax_data.action = 'wcf_woop_create_payment_intent'; ajax_data.wcf_wc_payment_nonce = cartflows_offer.wcf_woop_create_payment_intent_nonce; $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { if ( response.hasOwnProperty( 'client_secret' ) && '' !== response.client_secret && 'succeeded' !== response.status ) { const stripe = Stripe( response.client_public ); stripe .confirmCardPayment( response.client_secret ) .then( function ( resp ) { console.log( resp ); if ( resp.error ) { throw resp.error; } if ( 'requires_capture' !== resp.paymentIntent.status && 'succeeded' !== resp.paymentIntent.status ) { console.log( 'Order not complete. Received status: ' + resp.paymentIntent .status ); return; } ajax_data.action = action; ajax_data.woop_intent_id = resp.paymentIntent.id; ajax_data.woop_payment_method = resp.paymentIntent.payment_method; wcf_process_offer( ajax_data ); } ) .catch( function () { window.location.reload(); } ); } else { ajax_data.action = action; ajax_data.woop_intent_id = response.client_intend; wcf_process_offer( ajax_data ); } }, } ); } else if ( 'cppw_paypal' === cartflows_offer.payment_method ) { ajax_data.action = 'wcf_cppw_create_paypal_order'; ajax_data._nonce = cartflows_offer.wcf_cppw_create_paypal_order_nonce; $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { if ( 'succeeded' === response.status ) { ajax_data.action = action; ajax_data.transaction_id = response.transaction_id; wcf_process_offer( ajax_data ); } else { ajax_data.action = action; wcf_process_offer( ajax_data ); } }, } ); } else { ajax_data.action = action; wcf_process_offer( ajax_data ); } } else { ajax_data.action = action; wcf_process_offer( ajax_data ); } return false; } ); }; const wcf_handle_mollie_payment_gateways = function ( ajax_data, gateway ) { if ( 'mollie_wc_gateway_creditcard' === gateway ) { ajax_data.action = 'wcf_mollie_creditcard_process'; ajax_data._nonce = cartflows_offer.wcf_mollie_creditcard_process_nonce; } if ( 'mollie_wc_gateway_ideal' === gateway ) { ajax_data.action = 'wcf_mollie_ideal_process'; ajax_data._nonce = cartflows_offer.wcf_mollie_ideal_process_nonce; } $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { console.log( response ); if ( 'success' === response.result ) { window.location.href = response.redirect; } else { ajax_data.action = action; wcf_process_offer( ajax_data ); } }, } ); }; /* * Function to Create the PayPal Payments order as the offer is accepted. */ const wcf_init_create_paypal_payments_order = function ( ajax_data ) { ajax_data.action = 'wcf_create_paypal_payments_order'; ajax_data._nonce = cartflows_offer.wcf_create_paypal_order_nonce; $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { console.log( response ); if ( 'success' === response.status ) { // Redirect to PayPal's page for approving the order by making the payment. window.location.href = response.redirect; } else { ajax_data.action = 'wcf_' + ajax_data.offer_type + '_accepted'; wcf_process_offer( ajax_data ); } }, } ); }; /* * Function to capture the PayPal Payments order once it is created. */ const wcf_capture_paypal_payments_order = function () { // Capture the call after approving the created order. if ( 'undefined' !== typeof cartflows_offer ) { const is_ppcp_return = CartFlowsHelper.getUrlParameter( 'wcf-ppcp-return' ); let ppcp_nonce = ''; if ( is_ppcp_return ) { ppcp_nonce = cartflows_offer.wcf_capture_paypal_order_nonce; const ajax_data = { action: 'wcf_capture_paypal_order', step_id: cartflows_offer.step_id, order_id: cartflows_offer.order_id, _nonce: ppcp_nonce, }; $( 'body' ).trigger( 'wcf-show-loader', 'yes' ); $.ajax( { url: cartflows.ajax_url, data: ajax_data, dataType: 'json', type: 'POST', success( response ) { console.log( response ); if ( 'success' === response.status ) { const offer_type = cartflows_offer.offer_type; const data = { action: 'wcf_' + offer_type + '_accepted', offer_action: 'yes', offer_type, step_id: cartflows_offer.step_id, product_id: cartflows_offer.product_id, order_id: cartflows_offer.order_id, order_key: cartflows_offer.order_key, flow_id: cartflows.current_flow, stripe_sca_payment: false, stripe_intent_id: '', _nonce: ppcp_nonce, }; wcf_process_offer( data ); } else { data.action = data.action = 'wcf_' + data.offer_type + '_accepted'; wcf_process_offer( data ); } }, } ); } } }; const wcf_offer_quantity_shortcode = function () { /* Offer Quantity Shortcode */ const offer_quantity = $( '.wcf-offer-product-quantity' ); if ( offer_quantity.length > 0 ) { /* Sync all variation and quanity */ $( '.wcf-offer-product-quantity .qty' ).on( 'change', function () { const qty = $( this ).val(); $( '.wcf-offer-product-quantity .qty' ).val( qty ); } ); } }; const wcf_offer_variation_shortcode = function () { /* Offer Variation Shortcode */ const offer_variation = $( '.wcf-offer-product-variation .variations select' ); if ( offer_variation.length > 0 ) { $( '.wcf-variable-price-range' ).show().siblings().remove(); // $('.wcf-offer-product-variation input.variation_id').change(function(){ $( '.wcf-offer-product-variation .variations select' ).on( 'change', function () { const $this = $( this ); const attr_val = $this.data( 'attribute_name' ); if ( 0 !== $this.length ) { const selected_option = $this.val(); $( '.wcf-offer-product-variation [data-attribute_name ="' + attr_val + '"]' ).each( function () { $( this ).val( selected_option ); if ( '' === selected_option || 0 === selected_option ) { $( this ).addClass( 'var_not_selected' ); } else { $( this ).removeClass( 'var_not_selected' ); } } ); } } ); $( '.variations_form' ).on( 'found_variation', function ( event, variation ) { const discount_type = cartflows_offer.discount_type, discount_value = cartflows_offer.discount_value, currency_symbol = cartflows_offer.currency_symbol, regular_price = variation.display_price; let custom_price = variation.display_price; if ( discount_value > 0 ) { if ( 'discount_percent' === discount_type ) { custom_price = custom_price - ( custom_price * discount_value ) / 100; } else if ( 'discount_price' === discount_type ) { custom_price = custom_price - discount_value; } } let price_html = ''; if ( regular_price !== custom_price ) { price_html += ''; price_html += currency_symbol + regular_price.toFixed( 2 ); price_html += ''; price_html += ''; price_html += currency_symbol + custom_price.toFixed( 2 ); price_html += ''; } else { price_html += ''; price_html += currency_symbol + regular_price.toFixed( 2 ); price_html += ''; } price_html += ''; $( '.wcf-offer-price' ).html( price_html ); } ); } else { $( '.wcf-variable-price-range' ).remove(); $( '.wcf-offer-price-inner' ).show(); } }; const wcf_offer_image_shortcode = function () { /* Offer product gallery */ const product_gallery = jQuery( '.woocommerce-product-gallery' ); if ( product_gallery.length > 0 ) { if ( product_gallery.find( '.woocommerce-product-gallery__image' ) .length >= 1 ) { const slider_obj = jQuery( '.woocommerce-product-gallery' ).flexslider( { animation: 'slide', animationLoop: false, controlNav: 'thumbnails', selector: '.slides .woocommerce-product-gallery__image', directionNav: false, } ); $( window ).on( 'load', function () { slider_obj.trigger( 'resize' ); } ); /* Variation change gallery */ const variations_form = $( '.variations_form' ); if ( variations_form.length > 0 ) { /** * Reset the slide position if the variation has a different image than the current one * * @param {Object} variation variation data. */ const maybe_trigger_slide_position_reset = function ( variation ) { const $form = variations_form, $product_gallery = $( '.woocommerce-product-gallery' ), new_image_id = variation && variation.image_id ? variation.image_id : ''; let reset_slide_position = false; if ( $form.attr( 'current-image' ) !== new_image_id ) { reset_slide_position = true; } $form.attr( 'current-image', new_image_id ); if ( reset_slide_position ) { $product_gallery.flexslider( 0 ); } }; /** * Sets product images for the chosen variation * * @param {Object} variation variation data. */ const variations_image_update = function ( variation ) { const $form = variations_form, $product_gallery = $( '.woocommerce-product-gallery' ), $gallery_nav = $product_gallery.find( '.flex-control-nav' ); if ( variation && variation.image && variation.image.src && variation.image.src.length > 1 ) { // See if the gallery has an image with the same original src as the image we want to switch to. const galleryHasImage = $gallery_nav.find( 'li img[data-o_src="' + variation.image.gallery_thumbnail_src + '"]' ).length > 0; // If the gallery has the image, reset the images. We'll scroll to the correct one. if ( galleryHasImage ) { variations_image_reset(); } // See if gallery has a matching image we can slide to. const slideToImage = $gallery_nav.find( 'li img[src="' + variation.image.gallery_thumbnail_src + '"]' ); if ( slideToImage.length > 0 ) { slideToImage.trigger( 'click' ); $form.attr( 'current-image', variation.image_id ); window.setTimeout( function () { $( window ).trigger( 'resize' ); $product_gallery.trigger( 'woocommerce_gallery_init_zoom' ); }, 20 ); return; } const $product_img_wrap = $product_gallery .find( '.woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder' ) .eq( 0 ), $product_img = $product_img_wrap.find( '.wp-post-image' ), $product_link = $product_img_wrap .find( 'a' ) .eq( 0 ); $product_img.wc_set_variation_attr( 'src', variation.image.src ); $product_img.wc_set_variation_attr( 'height', variation.image.src_h ); $product_img.wc_set_variation_attr( 'width', variation.image.src_w ); $product_img.wc_set_variation_attr( 'srcset', variation.image.srcset ); $product_img.wc_set_variation_attr( 'sizes', variation.image.sizes ); $product_img.wc_set_variation_attr( 'title', variation.image.title ); $product_img.wc_set_variation_attr( 'data-caption', variation.image.caption ); $product_img.wc_set_variation_attr( 'alt', variation.image.alt ); $product_img.wc_set_variation_attr( 'data-src', variation.image.full_src ); $product_img.wc_set_variation_attr( 'data-large_image', variation.image.full_src ); $product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w ); $product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h ); $product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src ); const $gallery_img = $gallery_nav.find( 'li:eq(0) img' ); $gallery_img.wc_set_variation_attr( 'src', variation.image.gallery_thumbnail_src ); $product_link.wc_set_variation_attr( 'href', variation.image.full_src ); } else { variations_image_reset(); } window.setTimeout( function () { $( window ).trigger( 'resize' ); maybe_trigger_slide_position_reset( variation ); }, 20 ); }; /** * Reset main image to defaults. */ const variations_image_reset = function () { const $product_gallery = $( '.woocommerce-product-gallery' ), $gallery_nav = $product_gallery.find( '.flex-control-nav' ), $gallery_img = $gallery_nav.find( 'li:eq(0) img' ), $product_img_wrap = $product_gallery .find( '.woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder' ) .eq( 0 ), $product_img = $product_img_wrap.find( '.wp-post-image' ), $product_link = $product_img_wrap .find( 'a' ) .eq( 0 ); $product_img.wc_reset_variation_attr( 'src' ); $product_img.wc_reset_variation_attr( 'width' ); $product_img.wc_reset_variation_attr( 'height' ); $product_img.wc_reset_variation_attr( 'srcset' ); $product_img.wc_reset_variation_attr( 'sizes' ); $product_img.wc_reset_variation_attr( 'title' ); $product_img.wc_reset_variation_attr( 'data-caption' ); $product_img.wc_reset_variation_attr( 'alt' ); $product_img.wc_reset_variation_attr( 'data-src' ); $product_img.wc_reset_variation_attr( 'data-large_image' ); $product_img.wc_reset_variation_attr( 'data-large_image_width' ); $product_img.wc_reset_variation_attr( 'data-large_image_height' ); $product_img_wrap.wc_reset_variation_attr( 'data-thumb' ); $gallery_img.wc_reset_variation_attr( 'src' ); $product_link.wc_reset_variation_attr( 'href' ); }; $( '.variations_form' ).on( 'found_variation', function ( event, variation ) { variations_image_update( variation ); } ); } } } }; // ******************** For Image Slider ******************** $( window ).on( 'elementor/frontend/init', function () { elementorFrontend.hooks.addAction( 'frontend/element_ready/offer-product-image.default', wcf_offer_image_shortcode ); } ); const wcf_offer_shortcode_events = function () { wcf_offer_quantity_shortcode(); wcf_offer_variation_shortcode(); wcf_offer_image_shortcode(); }; const wcf_facebook_pixel = function () { jQuery( document ).ajaxComplete( function ( event, xhr ) { if ( ! xhr.hasOwnProperty( 'responseJSON' ) ) { return; } const fragmants = xhr.responseJSON.hasOwnProperty( 'fragments' ) ? xhr.responseJSON.fragments : null; if ( fragmants && fragmants.hasOwnProperty( 'added_to_cart_data' ) ) { fbq( 'track', 'AddToCart', fragmants.added_to_cart_data.added_to_cart ); } const cartflows_fb_data = cartflows.fb_setting; if ( 'enable' === cartflows_fb_data.facebook_pixel_add_payment_info && fragmants && fragmants.hasOwnProperty( 'fb_add_payment_info_data' ) ) { // Update cart data for add payment info event cartflows.fb_add_payment_info_data = fragmants.fb_add_payment_info_data; } } ); }; const wcf_tiktok_pixel = function () { jQuery( document ).ajaxComplete( function ( event, xhr ) { if ( ! xhr.hasOwnProperty( 'responseJSON' ) ) { return; } /* global ttq */ const fragmants = xhr.responseJSON.hasOwnProperty( 'fragments' ) ? xhr.responseJSON.fragments : null; if ( fragmants && fragmants.hasOwnProperty( 'tiktok_added_to_cart_data' ) ) { ttq.track( 'AddToCart', fragmants.tiktok_added_to_cart_data?.added_to_cart ); } const cartflows_tiktok_data = cartflows.tik_setting; if ( 'enable' === cartflows_tiktok_data?.enable_tiktok_add_payment_info && fragmants && fragmants.hasOwnProperty( 'tiktok_add_payment_info_data' ) ) { // Update cart data for add payment info event cartflows.tiktok_add_payment_info_data = fragmants.tiktok_add_payment_info_data; } } ); }; const wcf_pinterest_pixel = function () { jQuery( document ).ajaxComplete( function ( event, xhr ) { if ( ! xhr.hasOwnProperty( 'responseJSON' ) ) { return; } /* global pintrk */ const fragmants = xhr.responseJSON.hasOwnProperty( 'fragments' ) ? xhr.responseJSON.fragments : null; if ( typeof pintrk !== 'undefined' && fragmants && fragmants.hasOwnProperty( 'pinterest_added_to_cart_data' ) ) { pintrk( 'track', 'AddToCart', fragmants.pinterest_added_to_cart_data?.added_to_cart ); } const cartflows_pinterest_data = cartflows.pinterest_setting; if ( 'enable' === cartflows_pinterest_data?.enable_pinterest_add_payment_info && fragmants && fragmants.hasOwnProperty( 'pinterest_add_payment_info_data' ) ) { // Update cart data for add payment info event cartflows.pinterest_add_payment_info_data = fragmants.pinterest_add_payment_info_data; } } ); }; const wcf_snapchat_pixel = function () { jQuery( document ).ajaxComplete( function ( event, xhr ) { if ( ! xhr.hasOwnProperty( 'responseJSON' ) ) { return; } /* global snaptr */ const fragmants = xhr.responseJSON.hasOwnProperty( 'fragments' ) ? xhr.responseJSON.fragments : null; if ( fragmants && fragmants.hasOwnProperty( 'snapchat_added_to_cart_data' ) ) { snaptr( 'track', 'ADD_CART', fragmants.snapchat_added_to_cart_data?.added_to_cart ); } } ); }; const wcf_google_analytics = function () { jQuery( document ).ajaxComplete( function ( event, xhr, settings ) { if ( ! xhr.hasOwnProperty( 'responseJSON' ) ) { return; } const cartflows_ga_data = cartflows.ga_setting; const ga_add_to_cart = cartflows_ga_data.enable_add_to_cart; const ga_payment_info = cartflows_ga_data.enable_add_payment_info; const is_checkout_page = cartflows.is_checkout_page; if ( is_checkout_page ) { // track only if the bump order is accepted. const fragmants = xhr.responseJSON.hasOwnProperty( 'fragments' ) ? xhr.responseJSON.fragments : null; if ( settings.hasOwnProperty( 'data' ) ) { if ( settings.data.indexOf( 'action=wcf_bump_order_process' ) !== -1 ) { if ( 'enable' === ga_add_to_cart ) { if ( fragmants && fragmants.hasOwnProperty( 'ga_added_to_cart_data' ) ) { gtag( 'event', 'add_to_cart', JSON.parse( fragmants.ga_added_to_cart_data .add_to_cart ) ); } if ( fragmants && fragmants.hasOwnProperty( 'ga_remove_to_cart_data' ) ) { gtag( 'event', 'remove_from_cart', JSON.parse( fragmants.ga_remove_to_cart_data .remove_from_cart ) ); } } if ( 'enable' === ga_payment_info ) { if ( fragmants && fragmants.hasOwnProperty( 'ga_add_payment_info_data' ) ) { // Update cart data for add payment info event cartflows.add_payment_info_data = fragmants.ga_add_payment_info_data; } } } } } } ); }; const wcf_google_ads_pixel = function () { jQuery( document ).ajaxComplete( function ( event, xhr, settings ) { if ( ! xhr.hasOwnProperty( 'responseJSON' ) ) { return; } const cartflows_gads_data = cartflows?.gads_setting; const gads_add_to_cart = cartflows_gads_data?.enable_google_ads_add_to_cart; const gads_payment_info = cartflows_gads_data?.enable_google_ads_add_payment_info; const is_checkout_page = cartflows?.is_checkout_page; if ( is_checkout_page ) { // track only if the bump order is accepted. const fragmants = xhr.responseJSON.hasOwnProperty( 'fragments' ) ? xhr.responseJSON.fragments : null; if ( settings.hasOwnProperty( 'data' ) ) { if ( settings.data.indexOf( 'action=wcf_bump_order_process' ) !== -1 ) { if ( 'enable' === gads_add_to_cart ) { if ( fragmants && fragmants.hasOwnProperty( 'gads_added_to_cart_data' ) ) { gtag( 'event', 'add_to_cart', JSON.parse( fragmants.gads_added_to_cart_data .add_to_cart ) ); } if ( fragmants && fragmants.hasOwnProperty( 'gads_remove_to_cart_data' ) ) { gtag( 'event', 'remove_from_cart', JSON.parse( fragmants.gads_remove_to_cart_data .remove_from_cart ) ); } } if ( 'enable' === gads_payment_info ) { if ( fragmants && fragmants.hasOwnProperty( 'gads_add_payment_info_data' ) ) { // Update cart data for add payment info event cartflows.add_payment_info_data = fragmants.gads_add_payment_info_data; } } } } } } ); }; $( function () { $( 'body' ).on( 'wcf-show-loader', function ( event, action ) { if ( 'no' === action ) { jQuery( '.wcf-note-yes' ).hide(); jQuery( '.wcf-note-no' ).show(); jQuery( '.wcf-process-msg' ).hide(); } $( '.wcf-loader-bg' ).addClass( 'show' ); } ); $( 'body' ).on( 'wcf-hide-loader', function () { console.log( 'Hide Loader' ); $( '.wcf-loader-bg' ).removeClass( 'show' ); } ); $( 'body' ).on( 'wcf-update-msg', function ( event, msg, msg_class ) { $( '.wcf-order-msg .wcf-process-msg' ) .text( msg ) .addClass( msg_class ) .show(); } ); wcf_offer_button_action(); wcf_offer_shortcode_events(); if ( '1' !== cartflows.is_pb_preview ) { wcf_facebook_pixel(); wcf_tiktok_pixel(); wcf_google_analytics(); wcf_pinterest_pixel(); wcf_google_ads_pixel(); wcf_snapchat_pixel(); } if ( 'undefined' !== typeof cartflows_offer ) { const is_mollie_return = CartFlowsHelper.getUrlParameter( 'wcf-mollie-return' ); let mollie_nonce = ''; if ( is_mollie_return ) { if ( 'mollie_wc_gateway_creditcard' === cartflows_offer.payment_method ) { mollie_nonce = cartflows_offer.wcf_mollie_creditcard_process_nonce; } if ( 'mollie_wc_gateway_ideal' === cartflows_offer.payment_method ) { mollie_nonce = cartflows_offer.wcf_mollie_ideal_process_nonce; } const offer_type = cartflows_offer.offer_type; const ajax_data = { action: 'wcf_' + offer_type + '_accepted', offer_action: 'yes', offer_type, step_id: cartflows_offer.step_id, product_id: cartflows_offer.product_id, order_id: cartflows_offer.order_id, order_key: cartflows_offer.order_key, flow_id: cartflows.current_flow, stripe_sca_payment: false, stripe_intent_id: '', _nonce: mollie_nonce, }; wcf_process_offer( ajax_data ); } } wcf_capture_paypal_payments_order(); } ); } )( jQuery ); assets/js/license-popup.js000064400000015626147600244370011624 0ustar00( function ( $ ) { const CartFlowsProLicense = { /** * Init */ init() { this._check_popup(); this._bind(); }, _check_popup() { const self = CartFlowsProLicense; const open_popup = self._getUrlParameter( 'cartflows-license-popup' ) || ''; if ( open_popup && 'Deactivated' === CartFlowsProLicenseVars.activation_status ) { self._open_popup(); } }, /** * Binds events */ _bind() { // $( document ).on( // 'click', // '.cartflows-license-popup-open-button', // CartFlowsProLicense._export_button_click // ); $( document ).on( 'click', '.cartflows-close-popup-button', CartFlowsProLicense._close_popup ); $( document ).on( 'click', '#cartflows-license-popup-overlay', CartFlowsProLicense._close_popup ); $( document ).on( 'click', '.cartflows-activate-license', CartFlowsProLicense._activate_license ); $( document ).on( 'click', '.cartflows-deactivate-license', CartFlowsProLicense._deactivate_license ); }, /** * Debugging. * * @param {Object} data Mixed data. */ _log( data ) { const date = new Date(); const time = date.toLocaleTimeString(); if ( typeof data === 'object' ) { console.log( '%c ' + JSON.stringify( data ) + ' ' + time, 'background: #ededed; color: #444' ); } else { console.log( '%c ' + data + ' ' + time, 'background: #ededed; color: #444' ); } }, _export_button_click( e ) { e.preventDefault(); CartFlowsProLicense._open_popup(); }, _open_popup() { const popup = $( '#cartflows-license-popup-overlay, #cartflows-license-popup' ), license_key = $( '#cartflows-license-popup' ).attr( 'data-license-key' ) || '', contents = popup.find( '.contents' ); console.log( license_key ); // Add validate license window. if ( 'Activated' === license_key ) { contents.html( wp.template( 'cartflows-deactivate-license' ) ); } else { contents.html( wp.template( 'cartflows-activate-license' ) ); } popup.show(); }, _close_popup() { const popup = $( '#cartflows-license-popup-overlay, #cartflows-license-popup' ); if ( popup.hasClass( 'validating' ) ) { // Proceed? if ( ! confirm( 'WARNING! License request not complete!!\n\nPlease wait for a moment until complete the license request.' ) ) { return; } } popup.hide(); }, /** * Import * * @param {Object} event event data. */ _activate_license( event ) { event.preventDefault(); const parent = $( '#cartflows-license-popup' ), license_key = parent.find( '.license_key' ).val() || ''; if ( ! license_key.length ) { return; } const btn = $( this ); if ( btn.hasClass( 'disabled' ) || btn.hasClass( 'validating' ) ) { return; } parent.addClass( 'validating' ); btn.find( '.text' ).text( 'Validating..' ); const contents = parent.find( '.contents' ); if ( contents.find( '.notice' ).length ) { contents.find( '.notice' ).remove(); } btn.find( '.cartflows-processing' ).addClass( 'is-active' ); const license_nonce = parent.find( '.license_nonce' ).val() || ''; $.ajax( { url: ajaxurl, type: 'POST', data: { action: 'cartflows_activate_license', license_key, security: license_nonce, }, } ) .done( function ( data ) { parent.removeClass( 'validating' ); btn.find( '.cartflows-processing' ).removeClass( 'is-active' ); if ( data.success ) { const license_btn = $( '.cartflows-license-popup-open-button' ); license_btn .removeClass( 'active' ) .addClass( 'inactive' ) .text( 'Deactivate License' ); btn.find( '.text' ).text( 'Successfully Activated! Reloading..' ); parent.attr( 'data-license-key', license_key ); setTimeout( function () { // CartFlowsProLicense._close_popup(); location.reload(); }, 2500 ); parent .find( 'input' ) .addClass( 'disabled' ) .attr( 'readonly', 'readonly' ); // var msg = data.data.message || data.data; // if( msg ) { // contents.append( '

    ' + msg + '

    ' ); // } } else { const msg = data.data.error || data.data || ''; if ( msg ) { contents.append( '

    ' + msg + '

    ' ); } btn.find( '.text' ).text( 'Failed!' ); } // tb_remove(); } ) .fail( function () {} ) .always( function () {} ); }, /** * Import * * @param {Object} event event data. */ _deactivate_license( event ) { event.preventDefault(); const self = $( this ); const license_btn = $( '.cartflows-license-popup-open-button' ); const parent = $( '#cartflows-license-popup' ); const contents = parent.find( '.contents' ); const deactivate_license_nonce = parent.find( '.deactivate_license_nonce' ).val() || ''; parent.addClass( 'validating' ); self.find( '.text' ).text( 'Deactivating..' ); if ( contents.find( '.notice' ).length ) { contents.find( '.notice' ).remove(); } self.find( '.cartflows-processing' ).addClass( 'is-active' ); $.ajax( { url: ajaxurl, type: 'POST', data: { action: 'cartflows_deactivate_license', security: deactivate_license_nonce, }, } ) .done( function ( data ) { parent.removeClass( 'validating' ); self.find( '.cartflows-processing' ).removeClass( 'is-active' ); if ( data.success ) { license_btn .removeClass( 'inactive' ) .addClass( 'active' ) .text( 'Activate License' ); self.find( '.text' ).text( 'Successfully Deactivated! Reloading..' ); parent.attr( 'data-license-key', '' ); setTimeout( function () { location.reload(); // CartFlowsProLicense._close_popup(); }, 2500 ); } else { const msg = data.data.message || data.data || data.response || ''; if ( msg ) { contents.append( '

    ' + msg + '

    ' ); } self.find( '.text' ).text( 'Failed!' ); } // tb_remove(); } ) .fail( function () {} ) .always( function () {} ); }, _getUrlParameter( param ) { const page_url = decodeURIComponent( window.location.search.substring( 1 ) ), url_variables = page_url.split( '&' ); let parameter_name, i; for ( i = 0; i < url_variables.length; i++ ) { parameter_name = url_variables[ i ].split( '=' ); if ( parameter_name[ 0 ] === param ) { return parameter_name[ 1 ] === undefined ? true : parameter_name[ 1 ]; } } }, }; /** * Initialization */ $( function () { CartFlowsProLicense.init(); } ); } )( jQuery ); assets/js/optin.js000064400000000461147600244370010161 0ustar00( function ( $ ) { /** * Initialize selectWoo */ const wcf_initialize_selectwoo = function () { const select_fields = jQuery( '.form-row select' ); $( select_fields ).each( function () { $( this ).selectWoo(); } ); }; $( function () { wcf_initialize_selectwoo(); } ); } )( jQuery ); assets/js/pre-checkout.js000064400000014627147600244370011432 0ustar00jQuery( function ( $ ) { if ( jQuery( '#wcf-pre-checkout-offer-modal' ).length < 1 ) { return; } let current_gateway = ''; function wcf_pre_checkout_process() { const payment_method = jQuery( 'form.checkout' ) .find( 'input[name="payment_method"]:checked' ) .val(); current_gateway = payment_method; jQuery( '.wcf_validation_error' ).remove(); jQuery( 'form.checkout' ) .addClass( 'loader' ) .block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6, }, } ); $.ajax( { url: wc_checkout_params.wc_ajax_url .toString() .replace( '%%endpoint%%', 'wcf_validate_form' ), data: $( 'form.checkout' ).serialize() + '&security=' + cartflows.wcf_pre_checkout_validate_form_nonce, dataType: 'json', type: 'POST', success( response ) { try { jQuery( 'form.checkout' ).removeClass( 'loader' ).unblock(); let display = ''; if ( response.result === 'success' ) { if ( 'authorize_net_cim_credit_card' === payment_method ) { display = 'yes'; } else { const payment_method_verified = jQuery( 'form.checkout' ).triggerHandler( 'checkout_place_order_' + payment_method ); if ( payment_method_verified === undefined ) { display = 'yes'; } else if ( payment_method_verified !== undefined && payment_method_verified === true ) { display = 'yes'; } else { display = 'no'; } } if ( display === 'yes' ) { const billing_first_name = jQuery( '#billing_first_name' ).val(); const old_title = jQuery( '.wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1' ).text(); const result = old_title.match( /{([^}]+)}/ ); if ( result !== null && billing_first_name.length !== 0 ) { const str_tag = result[ 1 ]; let new_title = ''; if ( str_tag === 'first_name' ) { new_title = old_title.replace( /{(.*?)}/, '' ); } else { new_title = old_title.replace( /{(.*?)}/, '' ); } $( '.wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1' ).html( new_title ); $( '.wcf_first_name' ).text( billing_first_name ); } $( '.wcf-pre-checkout-offer-wrapper' ).addClass( 'open' ); $( 'html' ).addClass( 'wcf-pre-checkout-offer-open' ); $( '.wcf-pre-checkout-offer-action' ).val( '' ); setTimeout( function () { update_popup_height(); }, 100 ); } //end of display } else if ( response.result === 'failure' ) { throw 'Result failure'; } else { throw 'Invalid response'; } } catch ( err ) { if ( response.messages ) { jQuery( 'form.checkout' ).prepend( '
    ' + response.messages + '
    ' ); jQuery( 'form.checkout' ) .removeClass( 'processing' ) .unblock(); jQuery( 'form.checkout' ) .find( '.input-text, select, input:checkbox' ) .trigger( 'validate' ) .blur(); let scrollElement = $( '.wcf_validation_error' ); if ( ! scrollElement.length ) { scrollElement = $( '.form.checkout' ); } $.scroll_to_notices( scrollElement ); } } //end of catch }, //end of success } ); //end of ajax } jQuery( 'form.checkout' ).on( 'checkout_place_order.wcf_pre_checkout', function () { if ( jQuery( '.wcf-pre-checkout-offer-action' ).val() === 'add' ) { setTimeout( function () { wcf_pre_checkout_process(); }, 100 ); return false; } } ); $( 'body' ).on( 'click', '.wcf-pre-checkout-offer-btn', function ( e ) { e.preventDefault(); const checkout_id = $( '._wcf_checkout_id' ).val(); if ( checkout_id !== '' ) { $( '.wcf-pre-checkout-offer-btn' ).html( cartflows.add_to_cart_text ); $.ajax( { url: cartflows.ajax_url, data: { action: 'wcf_add_to_cart', product_quantity: 1, checkout_id, security: cartflows.wcf_pre_checkout_offer_nonce, }, dataType: 'json', type: 'POST', success( response ) { /* Unbind Event */ jQuery( 'form.checkout' ).off( 'checkout_place_order.wcf_pre_checkout' ); if ( 'authorize_net_cim_credit_card' === current_gateway ) { $( 'body' ).trigger( 'update_checkout', { update_shipping_method: false, } ); // Fire updated_checkout event. $( document.body ).on( 'updated_checkout.wcf_pre_checkout', function ( data ) { console.log( data ); $( '.wcf-pre-checkout-offer-action' ).val( '' ); $( '.wcf-pre-checkout-offer-btn' ).html( response.message ); $( '.wcf-pre-checkout-offer-wrapper' ).removeClass( 'open' ); $( 'html' ).removeClass( 'wcf-pre-checkout-offer-open' ); $( 'form.checkout' ).submit(); /* Unbind Event */ $( document.body ).off( 'updated_checkout.wcf_pre_checkout' ); } ); } else { $( '.wcf-pre-checkout-offer-action' ).val( '' ); $( '.wcf-pre-checkout-offer-btn' ).html( response.message ); setTimeout( function () { $( '.wcf-pre-checkout-offer-wrapper' ).removeClass( 'open' ); $( 'html' ).removeClass( 'wcf-pre-checkout-offer-open' ); $( 'form.checkout' ).submit(); }, 600 ); } }, } ); } } ); $( 'body' ).on( 'click', '.wcf-pre-checkout-skip', function () { /* Unbind Event */ jQuery( 'form.checkout' ).off( 'checkout_place_order.wcf_pre_checkout' ); $( '.wcf-pre-checkout-offer-action' ).val( '' ); $( '.wcf-pre-checkout-offer-wrapper' ).removeClass( 'open' ); $( 'html' ).removeClass( 'wcf-pre-checkout-offer-open' ); $( 'form.checkout' ).submit(); } ); $( window ).on( 'resize', function () { update_popup_height(); } ); const update_popup_height = function () { const window_height = $( window ).height(), popup_height = $( '#wcf-pre-checkout-offer-modal' ).height(); if ( popup_height > window_height ) { $( 'html' ).removeClass( 'wcf-pre-checkout-screen-size' ); } else { $( 'html' ).addClass( 'wcf-pre-checkout-screen-size' ); } }; } ); assets/min-css/checkout-styles-divi-rtl.min.css000064400000047621147600244370015612 0ustar00.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .mt20{margin-top:0}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not(.checkbox).woocommerce-form__label-for-checkbox{position:relative;margin:0}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not(.checkbox){position:absolute;z-index:999;margin-top:19px;margin-right:15px;transition:all 235ms ease}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not(.checkbox){margin-top:8px;font-size:12px}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not(.checkbox){position:absolute;z-index:999;margin-top:19px;margin-right:15px;transition:all 235ms ease;overflow:hidden;white-space:nowrap}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not(.checkbox){margin-top:8px;font-size:12px}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .select2-container--default .select2-selection--single,.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=email],.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=password],.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=tel],.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=text]{padding:25px 12px 5px}.et_pb_module .wcf-product-option-wrap{padding:3px}.et_pb_module .wcf-product-option-wrap #your_products_heading{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:3px}.et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row{position:relative}.et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:5px 0 0 0}.et_pb_module .wcf-product-option-wrap input[type=number]:focus{outline:0}.et_pb_module .wcf-qty-options .wcf-item-selector{display:inline-block;margin-left:8px}.et_pb_module .wcf-qty-options .wcf-item-all-text{display:inline-block;vertical-align:middle}.et_pb_module .wcf-qty-options .wcf-item-image{width:55px;-js-display:inline-flex;display:inline-flex;margin-left:10px}.et_pb_module .wcf-qty-options .wcf-item-wrap{font-size:1em;font-weight:600;line-height:1.5}.et_pb_module .wcf-qty-options .wcf-display-attributes,.et_pb_module .wcf-qty-options .wcf-display-subscription-details{font-size:.75em;font-weight:400;font-style:italic;opacity:.65}.et_pb_module .wcf-display-attributes .wcf-att-inner{margin-left:5px}.et_pb_module .wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep{display:none}.et_pb_module .wcf-qty-hidden.wcf-qty{visibility:hidden;pointer-events:none;opacity:0}.et_pb_module .wcf-qty-options .wcf-item-wrap{line-height:1.8}.et_pb_module .wcf-qty-options ins{background:0 0}.et_pb_module .wcf-qty-options .wcf-price del .woocommerce-Price-amount{font-size:inherit;opacity:.45;color:inherit;margin-left:4px}.et_pb_module .wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt{vertical-align:middle}.et_pb_module .wcf-embed-checkout-form-one-column .wcf-product-option-wrap{clear:right;margin:15px 0;width:100%}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap{margin:15px 0;width:55%;float:right;padding-left:40px}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer,.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order{width:100%;padding:0}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options{border:none;border-bottom:0;background-color:#f3f3f3;border-radius:3px;border-collapse:collapse;font-family:inherit;font-weight:inherit;font-size:1em;margin:0!important;padding:15px;text-align:right;width:100%}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header{border-bottom:1px dashed #ccc}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label{font-weight:600}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not(.wcf-highlight):last-child{border:none}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty{padding:.3em 0;line-height:1.4em;border:none}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{-js-display:flex;display:flex;justify-content:space-between;position:relative;padding:10px 0;border-bottom:1px solid #ccc;align-items:center;font-size:.95em}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty{display:inline-block;vertical-align:middle}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item{-js-display:flex;display:flex;align-items:center;width:80%;flex:4;margin-left:10px}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext{font-size:.95em;line-height:1.5}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap+.wcf-item-subtext{margin-top:5px}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty{-js-display:flex;display:flex;width:12%;text-align:center;align-items:center;justify-content:center;flex:1}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:60px;width:45px;padding:2px 10px 2px 10px;margin:0 auto}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price{-js-display:flex;display:flex;align-items:center;width:8%;text-align:left;justify-content:flex-end;flex:1;margin-right:10px;font-size:.95em;font-weight:600}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{background-color:#fff;border:1px solid #ccc;font-weight:500;padding:18px 28px;margin:-1px -28px 0;font-size:.95em;border-radius:4px;box-shadow:0 5px 10px -5px rgba(150,150,150,.5)}.et_pb_module .wcf-yp-skin-classic .wcf-qty-table-titles+.wcf-highlight{margin-top:15px}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight+.wcf-highlight{margin-top:25px}.et_pb_module .wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head{position:absolute;top:-10px;left:-10px;background:#f16334;color:#fff;border-radius:3px;padding:3px 9px;font-size:.75em;font-weight:400}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap{font-size:.95em;font-weight:600}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext{opacity:.75}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item-image{margin-left:15px}.et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{padding:18px;margin-right:-20px;margin-left:-20px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options{-js-display:flex;display:flex;flex-wrap:wrap;margin:0 -10px;font-size:1em;width:calc(100% + 20px)}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{background-color:#f7f7f7;border:1px solid #e8e8e8;padding:20px 30px;margin:0 10px 22px;border-radius:.35em;width:calc(50% - 20px);font-size:1em;font-weight:600}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight{background-color:#fff;box-shadow:0 5px 10px -5px rgba(150,150,150,.5);overflow:hidden}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price{font-size:1.08em}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:0 0 3px}.et_pb_module .wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head{position:absolute;width:12em;top:1.8em;left:-3em;background:#f16334;color:#fff;padding:.22em 0;text-align:center;font-size:.8em;font-weight:700;transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item{-js-display:flex;display:flex;align-items:flex-start}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector{margin-top:5px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image{margin-left:15px;width:80px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options{margin:0 0 5px 15px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:1.07em;font-weight:600}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap{margin-bottom:5px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext{font-size:inherit;font-weight:400;opacity:.75;margin-bottom:15px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input{max-width:50px;text-align:center}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{align-items:center;display:inline-block;margin-top:0;margin-left:15px;vertical-align:middle}.et_pb_module .wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty{display:none!important}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:.95em}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row,.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row,.et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row{width:100%}@media (max-width:768px){.et_pb_module .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.et_pb_module .wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.et_pb_module .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{width:100%;padding:15px 20px}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item{width:100%;padding:0}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{width:auto;vertical-align:middle}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext{font-size:.9em}}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap{display:block;float:none;margin:1em auto 1em;overflow:hidden;width:100%}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1{background:#f1f1f1;border-style:none;border-width:2px;border-color:red;border-radius:3px;display:inline-block}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-style:none;border-width:2px;border-color:red;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#ddd}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label{margin:0!important;vertical-align:middle;font-size:1em;line-height:1.3em;letter-spacing:0;font-family:inherit;font-weight:inherit;text-transform:none}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container{padding:25px 0}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;font-size:1.2em}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2{border:2px red dashed;border-radius:3px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;font-weight:600}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap{border-top:2px red dashed;padding:15px 25px;margin:0;font-size:1.1em;display:block}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step{width:100%;margin:0 auto}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note{border:1px dashed;border-color:#f16334;margin-bottom:20px;padding:10px 15px;padding-top:10px;padding-left:15px;padding-bottom:10px;padding-right:15px;border-radius:3px;color:#fff;background-color:#f16334;position:relative}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before{content:"";border:10px solid;border-top-color:#f16334;position:absolute;width:20px;height:20px;bottom:-20px;right:auto;top:auto;border-right:10px transparent solid;border-left:10px transparent solid;border-bottom:10px transparent solid}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav{border:inherit;border-right-style:solid;border-left-style:solid;border-width:2px;border-top-style:solid;border-color:#ddd;border-top-right-radius:3px;border-top-left-radius:3px;display:block;width:100%;margin:0 auto;padding-bottom:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps{background-color:#f4f4f4;-js-display:flex;display:flex;list-style:none;margin:0;margin-right:0;margin-bottom:0;padding:0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce{border:inherit;border-top:none;border-right-style:solid;border-left-style:solid;border-bottom-style:solid;border-width:2px;border-color:#ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px 20px 20px;overflow:hidden;background-color:#fff}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a{align-items:center;-js-display:flex;display:flex;padding:15px;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number{display:inline-block;font-weight:700;font-size:25px;line-height:1.5;margin-left:10px;vertical-align:middle}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current{background-color:#fff}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one{opacity:1}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps{flex:1;width:100%;text-align:right;vertical-align:middle;position:relative}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited{color:#444;border:none;outline:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name{color:#f16334}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;letter-spacing:.5px;width:100%;padding:15px 25px;font-size:16px;line-height:1.5;border-radius:3px;color:#fff;text-transform:none;text-align:center}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt{margin-left:5px;vertical-align:middle}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{vertical-align:middle}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{display:block;width:100%;float:none;padding:0;border-radius:0;margin-top:10px;margin-bottom:20px}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review{float:none;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a:not(.wcf-next-button){color:#fff}.et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{max-width:100px}.et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{margin-left:0}@media (max-width:768px){.et_pb_module #wcf-embed-checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty{width:40%;margin-left:25px}}assets/min-css/checkout-styles-divi.min.css000064400000047626147600244370015020 0ustar00.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .mt20{margin-top:0}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not(.checkbox).woocommerce-form__label-for-checkbox{position:relative;margin:0}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not(.checkbox){position:absolute;z-index:999;margin-top:19px;margin-left:15px;transition:all 235ms ease}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not(.checkbox){margin-top:8px;font-size:12px}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row label:not(.checkbox){position:absolute;z-index:999;margin-top:19px;margin-left:15px;transition:all 235ms ease;overflow:hidden;white-space:nowrap}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-form-login .form-row.wcf-anim-label label:not(.checkbox),.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label:not(.checkbox){margin-top:8px;font-size:12px}.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .select2-container--default .select2-selection--single,.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=email],.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=password],.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=tel],.et_pb_module #wcf-embed-checkout-form.wcf-field-style-one .woocommerce .form-row input[type=text]{padding:25px 12px 5px}.et_pb_module .wcf-product-option-wrap{padding:3px}.et_pb_module .wcf-product-option-wrap #your_products_heading{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:3px}.et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row{position:relative}.et_pb_module .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:5px 0 0 0}.et_pb_module .wcf-product-option-wrap input[type=number]:focus{outline:0}.et_pb_module .wcf-qty-options .wcf-item-selector{display:inline-block;margin-right:8px}.et_pb_module .wcf-qty-options .wcf-item-all-text{display:inline-block;vertical-align:middle}.et_pb_module .wcf-qty-options .wcf-item-image{width:55px;-js-display:inline-flex;display:inline-flex;margin-right:10px}.et_pb_module .wcf-qty-options .wcf-item-wrap{font-size:1em;font-weight:600;line-height:1.5}.et_pb_module .wcf-qty-options .wcf-display-attributes,.et_pb_module .wcf-qty-options .wcf-display-subscription-details{font-size:.75em;font-weight:400;font-style:italic;opacity:.65}.et_pb_module .wcf-display-attributes .wcf-att-inner{margin-right:5px}.et_pb_module .wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep{display:none}.et_pb_module .wcf-qty-hidden.wcf-qty{visibility:hidden;pointer-events:none;opacity:0}.et_pb_module .wcf-qty-options .wcf-item-wrap{line-height:1.8}.et_pb_module .wcf-qty-options ins{background:0 0}.et_pb_module .wcf-qty-options .wcf-price del .woocommerce-Price-amount{font-size:inherit;opacity:.45;color:inherit;margin-right:4px}.et_pb_module .wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt{vertical-align:middle}.et_pb_module .wcf-embed-checkout-form-one-column .wcf-product-option-wrap{clear:left;margin:15px 0;width:100%}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap{margin:15px 0;width:55%;float:left;padding-right:40px}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer,.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order{width:100%;padding:0}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options{border:none;border-bottom:0;background-color:#f3f3f3;border-radius:3px;border-collapse:collapse;font-family:inherit;font-weight:inherit;font-size:1em;margin:0!important;padding:15px;text-align:left;width:100%}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header{border-bottom:1px dashed #ccc}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label{font-weight:600}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not(.wcf-highlight):last-child{border:none}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty{padding:.3em 0;line-height:1.4em;border:none}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{-js-display:flex;display:flex;justify-content:space-between;position:relative;padding:10px 0;border-bottom:1px solid #ccc;align-items:center;font-size:.95em}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price,.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty{display:inline-block;vertical-align:middle}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item{-js-display:flex;display:flex;align-items:center;width:80%;flex:4;margin-right:10px}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext{font-size:.95em;line-height:1.5}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap+.wcf-item-subtext{margin-top:5px}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty{-js-display:flex;display:flex;width:12%;text-align:center;align-items:center;justify-content:center;flex:1}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:60px;width:45px;padding:2px 10px 2px 10px;margin:0 auto}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-price{-js-display:flex;display:flex;align-items:center;width:8%;text-align:right;justify-content:flex-end;flex:1;margin-left:10px;font-size:.95em;font-weight:600}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{background-color:#fff;border:1px solid #ccc;font-weight:500;padding:18px 28px;margin:-1px -28px 0;font-size:.95em;border-radius:4px;box-shadow:0 5px 10px -5px rgba(150,150,150,.5)}.et_pb_module .wcf-yp-skin-classic .wcf-qty-table-titles+.wcf-highlight{margin-top:15px}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight+.wcf-highlight{margin-top:25px}.et_pb_module .wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head{position:absolute;top:-10px;right:-10px;background:#f16334;color:#fff;border-radius:3px;padding:3px 9px;font-size:.75em;font-weight:400}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap{font-size:.95em;font-weight:600}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext{opacity:.75}.et_pb_module .wcf-yp-skin-classic .wcf-qty-options .wcf-item-image{margin-right:15px}.et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{padding:18px;margin-left:-20px;margin-right:-20px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options{-js-display:flex;display:flex;flex-wrap:wrap;margin:0 -10px;font-size:1em;width:calc(100% + 20px)}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{background-color:#f7f7f7;border:1px solid #e8e8e8;padding:20px 30px;margin:0 10px 22px;border-radius:.35em;width:calc(50% - 20px);font-size:1em;font-weight:600}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight{background-color:#fff;box-shadow:0 5px 10px -5px rgba(150,150,150,.5);overflow:hidden}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price{font-size:1.08em}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:0 0 3px}.et_pb_module .wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head{position:absolute;width:12em;top:1.8em;right:-3em;background:#f16334;color:#fff;padding:.22em 0;text-align:center;font-size:.8em;font-weight:700;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item{-js-display:flex;display:flex;align-items:flex-start}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector{margin-top:5px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item-image{margin-right:15px;width:80px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options{margin:0 15px 5px 0}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:1.07em;font-weight:600}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap{margin-bottom:5px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext{font-size:inherit;font-weight:400;opacity:.75;margin-bottom:15px}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input{max-width:50px;text-align:center}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{align-items:center;display:inline-block;margin-top:0;margin-right:15px;vertical-align:middle}.et_pb_module .wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty{display:none!important}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:.95em}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row,.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row,.et_pb_module .wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row{width:100%}@media (max-width:768px){.et_pb_module .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.et_pb_module .wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.et_pb_module .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{width:100%;padding:15px 20px}.et_pb_module .wcf-embed-checkout-form-two-column .wcf-product-option-wrap,.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-item{width:100%;padding:0}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{width:auto;vertical-align:middle}.et_pb_module .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext{font-size:.9em}}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap{display:block;float:none;margin:1em auto 1em;overflow:hidden;width:100%}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1{background:#f1f1f1;border-style:none;border-width:2px;border-color:red;border-radius:3px;display:inline-block}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-style:none;border-width:2px;border-color:red;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#ddd}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label{margin:0!important;vertical-align:middle;font-size:1em;line-height:1.3em;letter-spacing:0;font-family:inherit;font-weight:inherit;text-transform:none}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-content-container{padding:25px 0}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;font-size:1.2em}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2{border:2px red dashed;border-radius:3px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;font-weight:600}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.et_pb_module #wcf-embed-checkout-form .wcf-bump-order-style-2 .wcf-bump-order-field-wrap{border-top:2px red dashed;padding:15px 25px;margin:0;font-size:1.1em;display:block}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step{width:100%;margin:0 auto}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note{border:1px dashed;border-color:#f16334;margin-bottom:20px;padding:10px 15px;padding-top:10px;padding-right:15px;padding-bottom:10px;padding-left:15px;border-radius:3px;color:#fff;background-color:#f16334;position:relative}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before{content:"";border:10px solid;border-top-color:#f16334;position:absolute;width:20px;height:20px;bottom:-20px;left:auto;top:auto;border-left:10px transparent solid;border-right:10px transparent solid;border-bottom:10px transparent solid}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav{border:inherit;border-left-style:solid;border-right-style:solid;border-width:2px;border-top-style:solid;border-color:#ddd;border-top-left-radius:3px;border-top-right-radius:3px;display:block;width:100%;margin:0 auto;padding-bottom:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps{background-color:#f4f4f4;-js-display:flex;display:flex;list-style:none;margin:0;margin-left:0;margin-bottom:0;padding:0;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce{border:inherit;border-top:none;border-left-style:solid;border-right-style:solid;border-bottom-style:solid;border-width:2px;border-color:#ddd;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:10px 20px 20px;overflow:hidden;background-color:#fff}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a{align-items:center;-js-display:flex;display:flex;padding:15px;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number{display:inline-block;font-weight:700;font-size:25px;line-height:1.5;margin-right:10px;vertical-align:middle}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current{background-color:#fff}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one{opacity:1}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps{flex:1;width:100%;text-align:left;vertical-align:middle;position:relative}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited{color:#444;border:none;outline:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name{color:#f16334}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button{border:1px solid;border-color:#f16334;background-color:#f16334;font-family:inherit;font-weight:inherit;letter-spacing:.5px;width:100%;padding:15px 25px;font-size:16px;line-height:1.5;border-radius:3px;color:#fff;text-transform:none;text-align:center}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt{margin-right:5px;vertical-align:middle}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{vertical-align:middle}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{display:block;width:100%;float:none;padding:0;border-radius:0;margin-top:10px;margin-bottom:20px}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-col2-set .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper{margin:0}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step #order_review_heading,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-additional-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-billing-fields>h3,.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none!important}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review{float:none;width:100%}.et_pb_module #wcf-embed-checkout-form.wcf-embed-checkout-form-two-step .woocommerce a:not(.wcf-next-button){color:#fff}.et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{max-width:100px}.et_pb_module #wcf-embed-checkout-form .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{margin-right:0}@media (max-width:768px){.et_pb_module #wcf-embed-checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty{width:40%;margin-right:25px}}assets/min-css/checkout-styles-rtl.min.css000064400000234000147600244370014646 0ustar00body .wcf-pre-checkout-offer-wrapper{--wcf-primary-color:#f16334}:root{--wcf-yp-text-color:#404040;--wcf-yp-bg-color:#f3f3f3;--wcf-yp-border-color:#ccc;--wcf-yp-hl-text-color:var( --wcf-yp-text-color );--wcf-yp-hl-bg-color:#fff;--wcf-yp-hl-border-color:var( --wcf-yp-border-color );--wcf-yp-hl-flag-text-color:#fff;--wcf-yp-hl-flag-bg-color:var( --wcf-primary-color )}.wcf-embed-checkout-form-modern-checkout{--wcf-yp-text-color:#555;--wcf-yp-bg-color:#fff;--wcf-yp-box-border-color:#d6d7db;--wcf-yp-hl-text-color:var( --wcf-yp-text-color )}.wcf-embed-checkout-form-instant-checkout{--wcf-yp-hl-flag-bg-color:var( --wcf-primary-color )}.wcf-embed-checkout-form #payment div.payment_box .woocommerce-SavedPaymentMethods{padding:0;margin-top:10px}.wcf-embed-checkout-form-two-step{width:100%;margin:0 auto}.wcf-embed-checkout-form-two-step .woocommerce{border-top:none;border-right-style:solid;border-left-style:solid;border-bottom-style:solid;border-width:2px;border-color:#ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px 25px 25px;overflow:hidden;background-color:#fff}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav{border-right-style:solid;border-left-style:solid;border-width:2px;border-top-style:solid;border-color:#ddd;border-top-right-radius:3px;border-top-left-radius:3px;display:block;width:100%;margin:0 auto;padding-bottom:0}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note{border:1px dashed;border-color:#f16334;margin-bottom:20px;padding:10px 15px;border-radius:3px;color:#fff;background-color:#f16334;position:relative}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before{content:"";border:10px solid;border-top-color:#f16334;position:absolute;width:20px;height:20px;bottom:-20px;right:auto;top:auto;border-right:10px transparent solid;border-left:10px transparent solid;border-bottom:10px transparent solid}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns{display:inline-block;width:100%}.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button{border-color:var(--wcf-btn-bg-color);background-color:var(--wcf-btn-bg-color);font-family:inherit;font-weight:inherit;letter-spacing:.5px;width:100%;padding:15px 25px;font-size:16px;line-height:1.5;border-radius:3px;color:var(--wcf-btn-text-color);text-transform:none;text-align:center;display:block}.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover{background-color:var(--wcf-btn-bg-hover-color);border-color:var(--wcf-btn-bg-hover-color);color:var(--wcf-btn-hover-text-color)}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{display:inline-block}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-next-button-icon-wrap,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button-content{display:block}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{font-size:1.15em;font-weight:700;display:inline-block;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text{font-size:.9em;font-weight:400}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt{margin-left:5px;display:inline-block;font-weight:700;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note p{margin:0}.wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps{background-color:#f4f4f4;-js-display:flex;display:flex;list-style:none;margin-right:0;margin-bottom:0;padding:0;width:100%}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps{flex:1;width:100%;text-align:right;vertical-align:middle;position:relative}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a{align-items:center;-js-display:flex;display:flex;padding:15px;width:100%}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-heading{display:inline-block;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number{display:inline-block;font-weight:700;font-size:25px;line-height:1.5;margin-left:10px;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name{font-weight:600;font-size:14px;line-height:1.5}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name{font-size:13px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one{opacity:1}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-two{opacity:1}.wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-one.wcf-current::before{right:0;top:0;width:100%;border-top-right-radius:0}.wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-two.wcf-current::before{left:0;top:0;width:100%;border-top-left-radius:0}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current::before{content:"";background-color:#f16334;border-top-right-radius:3px;width:calc(100% + 2px);height:2px;position:absolute;right:-2px;top:-2px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current::before{content:"";background-color:#f16334;border-top-left-radius:3px;width:calc(100% + 2px);height:2px;position:absolute;left:-2px;top:-2px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current{background-color:#fff}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name{color:var(--wcf-heading-color)}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a{text-decoration:none;color:#444}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current a{text-decoration:none;color:#444}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited{color:#444;border:none;outline:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout{display:block;width:100%}.wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper,.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap,.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{display:block;width:100%;float:none;padding:0;border-radius:0;margin-top:10px;margin-bottom:20px}.wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper{margin-top:0;margin-bottom:30px}.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .col-1{margin-top:10px}.wcf-embed-checkout-form-two-step #order_review_heading,.wcf-embed-checkout-form-two-step .woocommerce-additional-fields>h3,.wcf-embed-checkout-form-two-step .woocommerce-billing-fields>h3,.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none}.wcf-embed-checkout-form-two-step .woocommerce #ship-to-different-address{font-size:15px;margin-bottom:10px}.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap{display:none;margin-top:10px;margin-bottom:0;float:none;width:100%}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment{display:block}.wcf-embed-checkout-form-two-step table.shop_table #shipping_method{min-width:130px;display:inline-block}.wcf-embed-checkout-form-two-step #order_review{padding:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row{padding:.5em 0 0}.wcf-embed-checkout-form-two-step table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form-two-step table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form-two-step table.shop_table thead tr th:nth-child(2){text-align:left}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap.mt20{margin-top:0!important}.wcf-embed-checkout-form-two-step .woocommerce-checkout #your_products_heading{margin:20px 0 0;padding:3px 3px 20px}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-item{width:60%}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price,.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty{width:20%}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:50px}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options{padding:15px}.wcf-embed-checkout-form-two-step .wcf-bump-order-style-1.wcf-after-customer,.wcf-embed-checkout-form-two-step .wcf-bump-order-style-2.wcf-after-customer,.wcf-embed-checkout-form-two-step .wcf-bump-order-style-3.wcf-after-customer{margin:0 auto 1em}.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-checkout-fields-wrapper,.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-product-option-before-customer,.wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-order-wrap{display:block}.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-order-wrap,.wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-checkout-fields-wrapper,.wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-product-option-before-customer{display:none}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row label.checkbox{margin-bottom:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment div.payment_box{font-size:.8em}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment ul.payment_methods{background-color:#f7f7f7;padding:15px}#tve_editor ol,#tve_editor ul{margin:0}@media only screen and (max-width:768px){.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav{width:100%;min-width:100%;margin:0 auto;padding-bottom:0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set{margin:10px 0 0}.wcf-embed-checkout-form-two-step .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form-two-step .woocommerce .woocommerce-info,.wcf-embed-checkout-form-two-step .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 1.5em 1em 1em;margin:0}.wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-1,.wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-2,.wcf-embed-checkout-form-two-step .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form-two-step .woocommerce-page .wcf-order-wrap{padding:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{margin:0}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps>li::before{content:"";position:relative;background:#f16334;display:block;width:42%;height:2px;top:15px;right:0;z-index:1}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps>li::after{content:"";position:relative;background:#f16334;display:block;width:51%;height:2px;top:-36px;right:52%;z-index:1}.wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-100,.wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-33,.wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-50,.wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-100,.wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-33,.wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-50{width:100%}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps{padding:7px 10px 7px 3px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a{padding:10px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number{font-size:20px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name{font-size:12px}.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button{padding:15px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{font-size:1em}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row,.wcf-embed-checkout-form-two-step .woocommercet #payment .form-row{padding:.5em 0 0}.wcf-embed-checkout-form-two-step .woocommerce #payment #place_order{margin-bottom:0}.wcf-embed-checkout-form .woocommerce form .wcf-column-100,.wcf-embed-checkout-form .woocommerce form .wcf-column-33,.wcf-embed-checkout-form .woocommerce form .wcf-column-50{width:100%}}.wcf-embed-checkout-form .woocommerce form .wcf-all-bump-order-wrap:empty{margin:0}.wcf-bump-order-wrap{display:block;float:none;margin:0 0 1.2em;overflow:hidden;word-break:break-word;white-space:normal}.wcf-bump-order-wrap .wcf-bump-order-field-wrap .wcf-pointing-arrow{margin-left:0;vertical-align:middle;transform:scaleX(1)}.wcf-bump-order-wrap del{font-weight:400;color:#7a7a7a;font-size:16px}.wcf-bump-order-wrap span.wcf-discount-price,.wcf-bump-order-wrap span.wcf-normal-price{font-weight:600;color:#444}.wcf-bump-order-wrap.wcf-ob-column-50 .wcf-bump-order-offer-content-left{max-width:30%}.wcf-bump-order-wrap.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:15%}.wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-offer-content-left{max-width:25%}.wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:25%}.wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-50 .wcf-bump-order-offer-content-left{max-width:40%}.wcf-bump-order-wrap.wcf-after-order.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:30%}.wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:30%}.wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-50 .wcf-bump-order-offer-content-left{max-width:40%}@keyframes wcf-blinker{0%{visibility:hidden}40%{visibility:hidden}}.wcf-blink{animation:wcf-blinker .8s linear infinite;animation-direction:alternate}.wcf-bump-order-wrap .wcf-bump-order-desc p{margin:0 0 .6em;padding:0}.wcf-bump-order-wrap .wcf-bump-order-desc p:last-child{margin:0;padding:0}.wcf-bump-order-wrap .wcf-bump-order-desc li,.wcf-bump-order-wrap .wcf-bump-order-desc ul{margin:0;padding:0;list-style-position:inside}.wcf-bump-order-wrap .wcf-bump-order-desc ol{margin:0;padding:0}.wcf-bump-order-wrap h1,.wcf-bump-order-wrap h2,.wcf-bump-order-wrap h3,.wcf-bump-order-wrap h4,.wcf-bump-order-wrap h5,.wcf-bump-order-wrap h6{margin:0;padding:0;font-weight:500;line-height:1.3em}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce form #payment .wcf-bump-order-wrap .wcf-bump-order-field-wrap label{margin:0!important;vertical-align:middle;font-size:1em;line-height:1.3em;letter-spacing:0;font-family:inherit;font-weight:inherit;text-transform:none}.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]{border-radius:50%;margin-left:4px;line-height:10px}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::before{content:"\e600";margin:0}.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]:checked::before{background-color:#f16334;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox],.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox],.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox],.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox],.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;box-shadow:inset 0 1px 2px rgba(0,0,0,.1);transition:50ms border-color ease-in-out}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-selection-wrap{-js-display:flex;display:flex;padding:5px 0}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-change-icon{border:1px solid #dcdada;height:30px;width:26px;margin:0;padding:6px 6px;color:#555;text-align:center;font-weight:500;cursor:pointer;font-size:13px;margin-bottom:0;-js-display:flex;display:flex;justify-content:center;align-items:center}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-decrement{border-radius:0 3px 3px 0;border-left:0}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-increment{border-radius:3px 0 0 3px;border-right:0}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater{width:40px;min-width:40px;min-height:30px;padding:2px 5px;color:#666;margin:0;text-align:center;border:1px solid #dcdada;border-right:0;border-left:0;border-radius:0;-webkit-appearance:textfield;appearance:textfield;outline:0;line-height:1}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:active,.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:focus,.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:hover{outline:0}.wcf-order-bump-quantity-updater::-webkit-inner-spin-button,.wcf-order-bump-quantity-updater::-webkit-outer-spin-button{-webkit-appearance:none}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox]:focus,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox]:focus,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox]:focus,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:focus,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=radio]:focus,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=radio]:not(:checked):focus{border-color:#f16334}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]:checked::before{display:inline-block;float:right;font:normal normal 400 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type=checkbox]:not(:checked)::after,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:not(:checked)::after{opacity:0;transform:scale(0)}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type=checkbox]:checked::after,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::after{opacity:1;transform:scale(1)}.wcf-bump-order-style-3{border-width:1px;border-style:dashed;border-color:#e5e7eb;background:#fff;box-shadow:0 4px 16px -8px rgba(0,0,0,.16);border-radius:4px;display:inline-block;padding:20px;width:100%;overflow:unset;position:relative}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{align-self:center;max-width:60px;text-align:center;width:100%}#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox]{height:20px;width:20px;margin:0 0 0 15px;border-radius:3px}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]:checked::before,.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox]:checked::before{font:normal normal 400 16px/1 cartflows-icon;width:20px;top:1px;position:relative;right:0}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{max-width:25%;margin-left:10px;align-self:center;width:100%}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img{width:100%;vertical-align:middle}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label{-js-display:flex;display:flex;font-size:18px;color:#1a1e23;font-weight:600}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{align-self:center;margin-right:10px;max-width:100%;width:100%}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-desc{margin-top:10px}.wcf-bump-order-style-3 .wcf-content-container{padding:25px 0}.wcf-embed-checkout-form .woocommerce #payment #place_order::before{display:inline-block}@media only screen and (max-width:520px){.wcf-bump-order-style-3 .wcf-bump-order-info{display:block}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{max-width:100%;margin:0 0 10px 0}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{max-width:65px}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]{margin:0 0 0 10px}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{flex:5}}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap{display:block}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-action,.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-info,.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-label,.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text{display:block;text-align:center;width:100%;max-width:100%}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text{margin:15px 0 0}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-image{margin:0 auto}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-label{display:block}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text{margin:0 0 0 10px;text-align:left}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow{transform:rotate(-180deg)}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image{margin-right:7px}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action input[type=checkbox]{margin:0 0 0 5px}.wcf-bump-order-style-4{border-width:1px;border-style:solid;border-color:#e5e7eb;background:#fff;border-radius:4px;box-shadow:0 4px 16px -8px rgba(0,0,0,.16);display:inline-block;padding:20px;position:relative;width:100%;overflow:unset}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{text-align:center;-js-display:flex;display:flex;justify-content:center;width:auto;white-space:nowrap;margin-right:15px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button{margin:0;border-width:1px;border-color:#ccc;border-style:none;color:#333;padding:8px 20px;border-radius:3px;text-decoration:none;text-transform:none}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button:hover{cursor:pointer}.wcf-bump-order-style-4.wcf-after-order .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button{padding:8px 12px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button span{background-color:#333;padding:0 5px;border-radius:50px;color:#fff;margin:0 0 0 8px}#payment .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]{display:none!important}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]:checked::before{font:normal normal 400 20px/1 cartflows-icon;width:20px;top:2px;position:relative;right:2px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{-webkit-box-flex:0;-moz-box-flex:0;max-width:25%;width:100%;margin-left:15px;align-self:center}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img{width:100%;vertical-align:middle}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label{color:#1a1e23;font-size:18px;margin-bottom:5px;font-weight:600}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{align-items:center;width:100%}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-info{flex:0 0 calc(100% - 100px);-webkit-flex:0 0 -webkit-calc(100% - 115px)}.wcf-bump-order-style-4 .wcf-bump-order-offer{font-size:18px;color:#f06434}.wcf-bump-order-style-4 .wcf-content-container{padding:25px 0}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button .wcf-processing{opacity:.7;background:#fff;pointer-events:none}@media only screen and (max-width:520px){.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{margin:15px 0 0 0;text-align:right;display:block;line-height:2}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{flex:0 0 80px;-webkit-flex:0 0 80px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap,.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{display:block}}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap{display:block;text-align:center}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-image{margin:0 auto;max-width:30%}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-action{text-align:center;margin:10px 0 0 0}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-text{margin:15px 0}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap{text-align:left}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action{min-width:80px}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text{margin:0 15px}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image{margin:0}.wcf-bump-order-style-5{background:#fff;border-width:1px;border-style:solid;border-color:#e5e7eb;border-radius:4px;box-shadow:0 4px 16px -8px rgba(0,0,0,.16);display:inline-block;padding:20px;position:relative;width:100%;overflow:unset}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-5 .wcf-bump-order-desc,.wcf-bump-order-style-5 .wcf-bump-order-label{margin:0 0 15px 0}.wcf-bump-order-style-5 .wcf-bump-order-desc{font-weight:400}.wcf-bump-order-style-5 .wcf-bump-order-action{-js-display:flex;display:flex;line-height:1.2;padding:5px 0;width:-moz-fit-content;width:fit-content;vertical-align:middle}#payment .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]{height:20px;width:20px;margin:0 0 0 10px!important;border-radius:3px}.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]:checked::before{font:normal normal 400 16px/1 cartflows-icon;width:20px;top:1px;position:relative;right:0}.wcf-bump-order-style-5 .wcf-bump-order-label{font-weight:600;color:#1a1e23;font-size:18px;line-height:1}.wcf-bump-order-style-5 .wcf-bump-order-info{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-top{display:block;text-align:center;width:100%}.wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-image{margin:0 0 15px 0;display:inline-block;text-align:center;max-width:30%}.wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-action{-js-display:inline-flex;display:inline-flex}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image{margin:0 15px 0 0}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-text{text-align:left}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-action{-js-display:inline-flex;display:inline-flex}.wcf-bump-order-style-5 .wcf-bump-order-image{max-width:30%;margin:0 0 0 15px;width:100%}.wcf-bump-order-style-5 .wcf-bump-order-text{width:100%}.wcf-bump-order-style-5 .wcf-bump-order-image img{width:100%}.wcf-bump-order-style-5 .wcf-bump-order-cb-button{margin:0;border:1px solid #ccc;color:#333;padding:8px 20px;border-radius:3px;text-decoration:none;text-transform:none}.wcf-bump-order-style-5 .wcf-processing{opacity:.7;background:#fff;pointer-events:none}.wcf-bump-order-style-5 .wcf-bump-remove-from-cart:hover{color:#fff;background:#e43b2c}.wcf-bump-order-style-5 .wcf-bump-order-cb-button:hover{cursor:pointer}.wcf-bump-order-style-5 .wcf-bump-order-action.wcf-ob-action-button{border:none;padding:0;line-height:unset}.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action.wcf-ob-action-button input[type=checkbox]{display:none!important}@media only screen and (max-width:520px){.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-info{display:block}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-image{max-width:100%;margin:0 0 15px 0}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image{margin:15px 0 0}}.wcf-bump-order-style-2{background:#fff;border:1px #e5e7eb dashed;border-radius:4px;box-shadow:0 4px 16px -8px rgba(0,0,0,.16)}.wcf-bump-order-style-2 .wcf-content-container{-js-display:flex;display:flex}.wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;color:#1a1e23;font-weight:600}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-right{width:100%}.wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap{background-color:#f7fafc;border-top:1px #e5e7eb solid;padding:15px 25px;margin:0;font-size:1.1em;display:block}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap,.wcf-bump-order-style-2 .wcf-bump-order-field-wrap *{cursor:pointer}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap .wcf-bump-order-label{margin-right:1px}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left,.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{align-self:center}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left img{padding:0 20px 15px 0}.wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left{width:auto}.wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{width:85%}.wcf-show-coupon-field-toggle{padding-top:1em}@media only screen and (max-width:520px){.wcf-bump-order-style-2 .wcf-content-container{display:block}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right,.wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{width:100%}}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container{display:block}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer{text-align:center}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right{display:block;width:100%;margin:0 auto;text-align:center}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left{max-width:40%;padding:0 20px}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img{padding:0 0 20px 0}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer{text-align:left}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right{align-self:center;text-align:left}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img{padding:0 0 20px 20px}.wcf-bump-order-style-1{background:#fff;border-style:solid;border-width:1px;border-color:#e5e7eb;border-radius:4px;display:inline-block;box-shadow:0 4px 16px -8px rgba(0,0,0,.16)}.wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;color:#1a1e23;font-size:18px;font-weight:600}.wcf-bump-order-style-1 .wcf-content-container{padding:25px 0;-js-display:flex;display:flex}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-right{width:100%}.wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-bottom-style:solid;border-width:1px;border-color:#e5e7eb;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#f7fafc}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap label{cursor:pointer}.wcf-embed-checkout-form .woocommerce #payment .wcf-bump-order-wrap input[type=checkbox]{margin:0 0 0 4px}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap .wcf-bump-order-label{margin-right:1px}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left,.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{align-self:center}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left img{padding:0 20px 0 0}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container{display:block}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap{text-align:center}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left,.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right{display:block;width:100%;margin:0 auto;text-align:center}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left{max-width:38%;padding:0 20px}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img{padding:0 0 20px 0}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap{text-align:left}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right{align-self:center;text-align:left}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left{align-self:center}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow{transform:rotate(-180deg);margin-top:-5px}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img{padding:0 0 0 20px}@media only screen and (max-width:520px){.wcf-embed-checkout-form-two-column .wcf-bump-order-style-1.wcf-after-customer,.wcf-embed-checkout-form-two-column .wcf-bump-order-style-2.wcf-after-customer,.wcf-embed-checkout-form-two-column .wcf-bump-order-style-3.wcf-after-customer,.wcf-embed-checkout-form-two-column .wcf-bump-order-style-4.wcf-after-customer{width:100%}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right,.wcf-embed-checkout-form-one-column .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{width:100%}}@media only screen and (max-width:520px){.wcf-bump-order-style-1 .wcf-content-container,.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap{display:block}.wcf-bump-order-wrap .wcf-bump-order-offer-content-left{width:100%}.wcf-bump-order-wrap .wcf-bump-order-offer-content-left img{width:100%;padding:25px}#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox]{height:20px;width:20px;margin:0 0 15px 15px;border-radius:3px}}.wcf-product-option-wrap{padding:3px}.wcf-product-option-wrap h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:3px}.wcf-product-option-wrap .wcf-qty-options .wcf-qty-row{position:relative}.wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:5px 0 0 0}.wcf-product-option-wrap input[type=number]:focus{outline:0}.wcf-qty-options .wcf-item-selector{display:inline-block;margin-left:8px}.wcf-qty-options .wcf-item-all-text{display:inline-block;vertical-align:middle}.wcf-qty-options .wcf-item-image{width:55px;-js-display:inline-flex;display:inline-flex;margin-left:10px}.wcf-qty-options .wcf-item-wrap{font-size:1em;font-weight:600;line-height:1.5}.wcf-qty-options .wcf-display-attributes,.wcf-qty-options .wcf-display-subscription-details{font-size:.75em;font-weight:400;font-style:italic;opacity:.65}.wcf-display-attributes .wcf-att-inner{margin-left:5px}.wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep{display:none}.wcf-qty-hidden.wcf-qty{visibility:hidden;pointer-events:none;opacity:0}.wcf-qty-options .wcf-item-wrap{line-height:1.8}.wcf-qty-options ins{background:0 0}.wcf-qty-options .wcf-price del .woocommerce-Price-amount{font-size:inherit;opacity:.45;color:inherit}.wcf-qty-options .wcf-price ins .woocommerce-Price-amount{margin-right:4px}.wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt{vertical-align:middle}.wcf-embed-checkout-form-one-column .wcf-product-option-wrap{clear:right;margin:15px 0;width:100%}.wcf-embed-checkout-form-two-column .wcf-product-option-wrap{margin:15px 0;width:55%;float:right;padding-left:40px}.wcf-embed-checkout-form-two-column .wcf-order-wrap .wcf-product-option-wrap.wcf-product-option-before-order,.wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer,.wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order{width:100%;padding:0}.wcf-yp-skin-classic .wcf-qty-options{border:none;background-color:var(--wcf-yp-bg-color);border-radius:4px;border-collapse:collapse;font-family:inherit;font-weight:inherit;font-size:1em;margin:0!important;padding:15px;text-align:right;width:100%}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header{border-bottom:1px dashed var(--wcf-yp-border-color)}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label{font-weight:600}.wcf-embed-checkout-form .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not(.wcf-highlight):last-child,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not(.wcf-highlight):last-child{border:none}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item,.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price,.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty{padding:0;line-height:1.4em;border:none;position:relative}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{color:var(--wcf-yp-text-color);-js-display:flex;display:flex;justify-content:space-between;position:relative;padding:10px 0;border-bottom:1px solid var(--wcf-yp-border-color);align-items:center;font-size:.95em;cursor:pointer}.wcf-yp-skin-classic .wcf-qty-options .wcf-item,.wcf-yp-skin-classic .wcf-qty-options .wcf-price,.wcf-yp-skin-classic .wcf-qty-options .wcf-qty{display:inline-block;vertical-align:middle}.wcf-yp-skin-classic .wcf-qty-options .wcf-item{-js-display:flex;display:flex;align-items:center;width:70%;flex:4;margin-left:10px}.wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext{font-size:.95em;line-height:1.5}.wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap+.wcf-item-subtext{margin-top:5px}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty{-js-display:flex;display:flex;width:20%;text-align:center;align-items:center;justify-content:center;flex:1}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:40px;min-width:40px;min-height:30px;padding:2px 5px;color:#666;margin:0;text-align:center;border:1px solid #dcdada;border-right:0;border-left:0;border-radius:0;-webkit-appearance:textfield;appearance:textfield;line-height:1}.wcf-yp-skin-classic .wcf-qty-options .wcf-price{-js-display:flex;display:flex;align-items:center;width:10%;text-align:left;justify-content:flex-end;flex:1;margin-right:10px;font-size:.95em;font-weight:400}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{background-color:var(--wcf-yp-hl-bg-color);border:1px solid var(--wcf-yp-hl-border-color);color:var(--wcf-yp-hl-text-color);font-weight:500;padding:18px 28px;margin:-1px -28px 0;font-size:.95em;border-radius:4px;box-shadow:0 5px 10px -5px rgba(150,150,150,.5)}.wcf-yp-skin-classic .wcf-qty-table-titles+.wcf-highlight{margin-top:15px}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight+.wcf-highlight{margin-top:25px}.wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head{position:absolute;top:-10px;left:-10px;background:var(--wcf-yp-hl-flag-bg-color);color:var(--wcf-yp-hl-flag-text-color);border-radius:3px;padding:3px 9px;font-size:.75em;font-weight:400}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap{font-size:.95em;font-weight:600}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext{opacity:.75}.wcf-yp-skin-classic .wcf-qty-options .wcf-item-image{margin-left:15px}.wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{padding:18px;margin-right:-20px;margin-left:-20px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row.wcf-qty-table-titles::before,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before{content:"";position:absolute;background:url( "../images/product-options-classic-loader.svg" ) 15px 15px,#fff;background-repeat:no-repeat;width:100%;height:100%;z-index:1;right:0;top:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before{background-color:#f9f9f9}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::after{content:"";position:absolute;width:100%;height:100%;background-color:#f7f7f7;border-radius:.35em;top:0;right:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::before{content:"";position:absolute;background:url( "../images/product-options-card-loader.svg" ) center center;background-repeat:no-repeat;transform:scale(.92);width:100%;height:100%;z-index:1;right:-5px;top:0}.wcf-yp-skin-cards .wcf-qty-options{-js-display:flex;display:flex;flex-wrap:wrap;margin:0 -10px;font-size:1em;width:calc(100% + 20px)}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{background-color:#f7f7f7;border:1px solid #b0b0b0;padding:20px 30px;margin:0 10px 22px;border-radius:.35em;width:calc(50% - 20px);font-size:1em;font-weight:600;cursor:pointer;position:relative}.wcf-yp-skin-cards .wcf-qty-options .wcf-highlight{background-color:#fff;box-shadow:0 5px 10px -5px rgba(150,150,150,.5);overflow:hidden}.wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price{font-size:1.08em}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:0 0 3px}.wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head{position:absolute;width:12em;top:1.8em;left:-3em;background:#f16334;color:#fff;padding:.22em 0;text-align:center;font-size:.8em;font-weight:700;transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item{-js-display:flex;display:flex;align-items:flex-start}.wcf-yp-skin-cards .wcf-qty-options .wcf-item-image,.wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector{margin-top:5px;position:relative}.wcf-yp-skin-cards .wcf-qty-options .wcf-item-image{margin-left:15px;width:80px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options{margin:0 0 5px 0;width:100%;position:relative}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:1.07em;font-weight:600}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap{margin-bottom:5px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext{font-size:inherit;font-weight:400;opacity:.75;margin-bottom:15px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input{max-width:50px;text-align:center;min-height:30px;padding:2px;margin:0;border:none;border-radius:0}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input{border:1px solid #dcdada;border-right:0;border-left:0}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{max-width:100px}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-wrap{-js-display:flex;display:flex}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn{line-height:1}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn.max-quantity-reached{color:#dcdada;cursor:not-allowed}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon{border:1px solid #dcdada;height:30px;width:26px;margin:0;padding:6px 6px;color:#555;text-align:center;font-weight:500;cursor:pointer;font-size:13px;margin-bottom:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon:hover{background-color:#f7f7f7}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-decrement{border-radius:0 3px 3px 0;border-left:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-increment{border-radius:3px 0 0 3px;border-right:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type=number]::-webkit-inner-spin-button,.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{align-items:center;display:inline-block;margin-top:0;margin-left:10px;vertical-align:middle}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{margin-left:0}.wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty{display:none!important}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:.95em}.wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row,.wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row,.wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row{width:100%}@media (max-width:768px){.wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{width:100%;padding:15px 20px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row:last-child{margin-bottom:0}.wcf-yp-skin-cards .wcf-qty-options .wcf-item{width:100%}.wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty{width:40%}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{width:auto;vertical-align:middle}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext{font-size:.9em}}#wcf-quick-view-content{font-family:Montserrat,sans-serif}#wcf-quick-view-content .summary-content .product_title{display:inline-block;font-size:2rem;font-family:inherit;font-weight:400;width:100%;margin:0 0 .5em 0;padding:0 0 0;border:none;border-bottom:none;line-height:1.3}#wcf-quick-view-content .summary-content .woocommerce-product-rating{margin:0 0 .5em 0}#wcf-quick-view-content .summary-content .woocommerce-product-rating .comment-form-rating .stars a,#wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating,#wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating::before{color:#f16334}#wcf-quick-view-content .summary-content .price,#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price{margin:0 0 .5em;font-family:inherit;font-weight:400}#wcf-quick-view-content .summary-content .wc-stripe-payment-request-wrapper{padding:0}#wcf-quick-view-content .summary-content .price del,#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price del{opacity:1;margin-left:10px}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-detail{margin:0}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-avail{display:none}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .stock.in-stock{font-size:.9em}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p,#wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p{font-size:.9em;line-height:1.85714285714286;margin-top:0;margin-bottom:20px}#wcf-quick-view-content .summary-content div.product{padding:0;display:inline-block;vertical-align:middle}#wcf-quick-view-content .summary-content form.cart{margin-bottom:0}#wcf-quick-view-content .summary-content .variations{border-bottom:1px #ddd solid;padding-bottom:1em}#wcf-quick-view-content .summary-content .variations label{font-size:13px;font-weight:400}#wcf-quick-view-content .summary-content .single_variation_wrap .single_variation{margin-bottom:1em}#wcf-quick-view-content .summary-content .single_variation_wrap .single_variation .woocommerce-variation-description{display:none}#wcf-quick-view-content .variations_form .variations td{padding:5px 0}#wcf-quick-view-content .summary-content .variations td.label{padding-left:.4em;vertical-align:middle}#wcf-quick-view-content .summary-content .variations select{background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;border-radius:0;box-shadow:inset 0 -1em .7em 0 rgba(0,0,0,.01);color:#555;display:inline-block;font-family:inherit;font-weight:inherit;font-size:14px;height:auto;line-height:1.42857143!important;min-height:34px;outline:0;padding:7px 12px;width:auto;-webkit-appearance:none}#wcf-quick-view-content .summary-content a{color:#f16334;text-decoration:none}#wcf-quick-view-content .summary-content .reset_variations{text-decoration:none;font-size:11px;color:#b5b5b5;letter-spacing:.5px}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-add-to-cart button{border:1px solid;border-color:#f16334;background:#f16334;border-radius:3px;color:#fff;font-family:inherit;font-weight:inherit;font-size:16px;letter-spacing:.5px;line-height:1;margin-top:15px;padding:10px 30px;width:auto}@media only screen and (max-width:768px){.wcf-embed-checkout-form-one-column .wcf-product-option-wrap{padding:0 18px}.wcf-embed-checkout-form-two-column .wcf-product-option-wrap{width:100%;float:none;padding:0 10px}}.wcf-clear::after,.wcf-clear::before{content:" ";display:table}.wcf-clear::after{clear:both}html.wcf-pre-checkout-offer-open,html.wcf-pre-checkout-offer-open body,html.wcf-quick-view-is-open,html.wcf-quick-view-is-open body{overflow:hidden}.wcf-quick-view-bg{position:fixed;visibility:hidden;overflow:hidden;background:#0b0b0b;opacity:0;transition:opacity .25s;z-index:1042}.wcf-quick-view-loader{z-index:1000;border:none;margin:0;padding:0;width:100%;height:100%;top:0;right:0;cursor:none;position:absolute}.wcf-quick-view-loader::before{content:"";background:0 0!important;width:48px;height:48px;display:block;position:absolute;top:50%;right:50%;border:3px solid #fff;margin:0 auto;border-radius:50%;border-right-color:transparent;border-left-color:transparent;animation:wcf-qv-spin 575ms infinite linear}@keyframes wcf-qv-spin{100%{transform:rotate(-360deg)}}.wcf-loader-overlay{position:absolute;top:0;right:0;background:rgba(255,255,255,.4);z-index:2;content:"";height:100%;width:100%}.wcf-loader::before{border:3px solid #333;border-right-color:transparent;border-left-color:transparent}.wcf-loader{z-index:3}.wcf-quick-view-bg-ready{top:0;right:0;width:100%;height:100%;opacity:.6;visibility:visible}#wcf-quick-view-modal{position:fixed;visibility:hidden;opacity:0;top:0;right:0;width:100%;height:100%;z-index:1400;text-align:center;transition:all .3s;overflow-x:hidden;overflow-y:auto}#wcf-quick-view-modal.open{visibility:visible;opacity:1}#wcf-quick-view-modal .wcf-content-main-wrapper{text-align:center;position:absolute;width:100%;height:100%;right:0;top:0;padding:30px}#wcf-quick-view-modal .wcf-content-main-wrapper::before{content:"";display:inline-block;vertical-align:middle;height:100%}#wcf-quick-view-modal .wcf-content-main{position:relative;pointer-events:none;display:inline-block;vertical-align:middle;max-width:100%;margin:0 auto;text-align:right;z-index:1045;transform:translateY(-30px);opacity:0;transition:transform .5s,opacity .3s}#wcf-quick-view-modal.open .wcf-content-main{transform:translateY(0);opacity:1;width:100%}#wcf-quick-view-modal .wcf-content-main::after,#wcf-quick-view-modal .wcf-content-main::before{content:"";display:table;clear:both}#wcf-quick-view-modal .wcf-lightbox-content{display:table;pointer-events:auto;background-color:#fff;max-width:975px;margin:20px auto;transform:translateZ(0);box-shadow:-3px 3px 20px 0 rgba(0,0,0,.15);position:relative}#wcf-quick-view-content{background-color:#fff;padding:15px 15px 15px 0;border-radius:0}#wcf-quick-view-content .wcf-woo-product{overflow:hidden;max-height:480px;overflow-y:auto}#wcf-quick-view-content div.summary{margin:0;padding:20px 30px 30px 30px;width:55%;float:right;box-sizing:border-box}#wcf-quick-view-content div.images{width:45%;float:right;margin-bottom:0}#wcf-quick-view-modal .wcf-qv-image-slider{position:relative}@media (min-width:545px){#wcf-quick-view-content div.summary{content:"544";padding-bottom:-webkit-calc(10px + 1em)}}@media (max-width:544px){#wcf-quick-view-modal .wcf-lightbox-content{display:block}#wcf-quick-view-content div.images,#wcf-quick-view-content div.summary{width:100%;float:none;overflow:hidden;margin-bottom:15px;padding:0}#wcf-quick-view-content .summary-content .product_title{font-size:1.475rem}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p,#wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p{font-size:.98em}}body #wcf-quick-view-modal div.product .flex-viewport,body #wcf-quick-view-modal div.product .flex-viewport img{width:100%;float:none;display:block}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav{margin:0;padding:0;list-style:none}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav a{text-decoration:none;display:block;width:32px;height:32px;font-size:32px;line-height:32px;margin:-20px 0 0;position:absolute;top:50%;z-index:10;overflow:hidden;opacity:0;cursor:pointer;color:rgba(0,0,0,.8);text-shadow:-1px 1px 0 rgba(255,255,255,.3);transition:all .3s ease-in-out}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next,#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev{display:inline-block;font-family:dashicons;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev::before{content:"\f341"}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next::before{content:"\f345"}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev{right:-50px}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next{left:-50px;text-align:left}#wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-prev{opacity:.7;right:10px}#wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-next{opacity:.7;left:10px}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav{margin:0;padding:0;width:100%;position:absolute;bottom:10px;text-align:center}#wcf-quick-view-modal .wcf-qv-image-slider li{list-style:none}#wcf-quick-view-modal .wcf-qv-slides li{float:right;width:100%}#wcf-quick-view-modal .wcf-qv-slides li img{width:100%}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav li{margin:0 6px;display:inline-block;zoom:1;vertical-align:middle}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a{width:11px;height:11px;display:block;background:#666;background:rgba(0,0,0,.5);cursor:pointer;text-indent:-9999px;box-shadow:inset 0 0 3px rgba(0,0,0,.3);border-radius:20px}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a.flex-active{background:#000;background:rgba(0,0,0,.9);cursor:default}#wcf-quick-view-modal .wcf-content-main-head{background:#fff;border-radius:50%;box-shadow:0 0 3px 0 #444;color:#000;font-size:20px;height:25px;line-height:0;overflow:hidden;opacity:1;position:absolute;padding:3px;left:-10px;top:-15px;text-align:center;text-decoration:none;width:25px;z-index:2}#wcf-quick-view-close{font-size:18px;top:0;left:0;line-height:20px;z-index:2;color:#000;text-decoration:none}#wcf-quick-view-modal .woocommerce-variation-add-to-cart .quantity{display:none!important;opacity:0!important;position:absolute!important}@media only screen and (max-width:480px){.wcf-qty-options .wcf-item-image{display:inline-block}.wcf-qty-options .wcf-item{width:55%}.wcf-qty-options .wcf-qty{width:25%}.wcf-qty-options .wcf-price{width:20%}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options .wcf-item-wrap{width:100%}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap.wcf-product-option-before-customer{margin-bottom:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-selection-wrap{display:inline-block}.wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-decrement{-webkit-border-radius:3px 3px 0 0;border:1px solid #dcdada;border-bottom:0;border-radius:3px 3px 0 0;display:inline-block;height:20px;width:30px;padding:1px 5px}.wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-increment{-webkit-border-radius:0 0 3px 3px;border:1px solid #dcdada;border-top:0;border-radius:0 0 3px 3px;display:inline-block;height:20px;width:30px;padding:1px 5px}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:30px;min-width:20px;border:1px solid #dcdada;border-top:0;border-bottom:0;border-radius:0;margin-bottom:-2px}.wcf-item-wrap{display:inline-block;width:80%}.wcf-qty-options .wcf-item-selector{display:inline-block;margin-left:0!important;width:15%}#wcf-quick-view-content{padding:0}#wcf-quick-view-content .wcf-woo-product{padding:15px}.wcf-embed-checkout-form-one-column .woocommerce-checkout #your_products_heading{font-size:1em}}.wcf-pre-checkout-offer-wrapper{position:fixed;visibility:hidden;overflow-x:hidden;overflow-y:auto;background:rgba(0,0,0,.8);opacity:0;transition:opacity .25s;z-index:1042}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1{color:#333;font-family:inherit;font-size:1.7em;margin:10px 0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip{color:#555;display:block;font-size:14px;margin:5px auto 0 auto;opacity:.8;width:-moz-fit-content;width:fit-content}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip:hover{opacity:1}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content{background-color:#fff;border:2px #e2e2e2 dashed;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-progress-bar{overflow:hidden;margin-bottom:0}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal{max-width:950px;background-color:#fff;position:relative;border-radius:4px;top:0;transform:translate(0,0);width:100%;min-height:350px;overflow:hidden;font-family:inherit;margin:20px auto;box-shadow:0 0 20px 0 rgba(0,0,0,.1)}.wcf-pre-checkout-screen-size .open #wcf-pre-checkout-offer-modal{top:50%;transform:translate(0,-50%)}.wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav{margin-bottom:30px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress{position:relative;display:table;table-layout:fixed;width:100%}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step{display:table-cell;text-align:center;position:relative;width:100%}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title{margin-bottom:12px;white-space:nowrap;font:inherit;letter-spacing:.6px;font-size:14px;color:#6d6d6d}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title{color:inherit}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::after,.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::before{background:var(--wcf-primary-color)}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after{left:0}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after,.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before{height:4px;content:"";background:#e2e2e2;display:block;position:absolute;width:50%;bottom:8px}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before{right:0}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:first-child .wcf-nav-bar-step-line::before,.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:last-child .wcf-nav-bar-step-line::after{background:#000;display:none!important}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active+.wcf-nav-bar-step.active .wcf-nav-bar-step-line::after{background:#e2e2e2!important}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step{background:var(--wcf-primary-color)}.wcf-pre-checkout-offer-wrapper .wcf-progress-nav-step{width:20px;height:20px;border-radius:3px;margin:auto;position:relative;background:#e2e2e2;vertical-align:middle;text-align:center;z-index:2;line-height:17px}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step::before{content:"";margin:0;color:#fff;display:inline-block;font:normal normal 400 13px/20px cartflows-icon;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;border:1px #fff solid;border-radius:1px;width:6px;height:6px;background-color:#fff;line-height:7px}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn{border:1px solid;border-color:#f16334;background:#f16334;border-radius:3px;color:#fff;font-family:inherit;font-weight:600;font-size:16px;line-height:1;margin-top:0;padding:12px 16px;width:100%;outline:0;min-height:48px}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title{margin-bottom:10px;position:relative;text-align:center;right:0;bottom:0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1{color:#333;font-size:1.5em;font-weight:700;margin-top:0;margin-bottom:8px}.wcf-pre-checkout-offer-wrapper .wcf-content-main-head{text-align:center;position:relative;padding:10px;width:100%;margin-bottom:30px}.wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf_first_name{color:var(--wcf-primary-color)}.wcf-pre-checkout-offer-wrapper .wcf-lightbox-content{padding:50px}.wcf-pre-checkout-offer-wrapper.open{visibility:visible;opacity:1;text-align:center;width:100%;height:100%;right:0;top:0;padding:30px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price{padding:5px 0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins{background:0 0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-amount.amount,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins .woocommerce-Price-amount.amount{display:inline-block;font-weight:600;font-size:17px;margin-bottom:3px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price del .woocommerce-Price-amount.amount{font-weight:400;text-decoration:line-through}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info{display:inline-block;width:49.7%;padding:30px;vertical-align:middle;text-align:center}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details{text-align:right;padding-right:10px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions{padding:0 30px 30px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action{font-size:12px;padding-top:0}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{font-family:inherit}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{color:#555;margin-top:5px}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span{color:#555;font-size:18px;font-weight:500;padding:0 5px}@media only screen and (max-width:768px){.wcf-pre-checkout-offer-wrapper .wcf-lightbox-content{padding:25px 15px}.wcf-pre-checkout-offer-wrapper .wcf-content-main-head,.wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav{margin-bottom:20px}.wcf-pre-checkout-offer-wrapper.open{overflow:auto}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info{display:block;width:100%;padding:15px 15px 10px 15px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details{text-align:center}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc{text-align:center}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action{margin-bottom:0}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal{width:100%;top:0}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{font-size:1em}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions{display:inline-block;width:100%}}@media only screen and (max-width:600px){.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow{background:#f16334;height:2px;width:18px;margin:0 10px;position:relative;cursor:pointer;right:auto;vertical-align:middle;text-align:right;top:10px;padding:1px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before{content:"";background:#f16334;position:absolute;height:2px;width:10px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before{left:-1px;bottom:-3px;transform:rotate(45deg)}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after{left:-1px;top:-3px;transform:rotate(-45deg)}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-currencySymbol{float:none;margin-left:6px}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title{white-space:unset}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step .wcf-nav-bar-step-line{display:none}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress{display:block}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title::before{content:"\e901";color:#f16334;font:normal normal 400 13px/1 cartflows-icon}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal{width:100%;top:0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions{display:block;width:100%;overflow:hidden;margin-bottom:10px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-add-cart-btn,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-skip-btn{width:100%}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{font-size:1em}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn{font-size:15px;margin-top:10px}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip{font-size:1.3em;line-height:1.3em}}.wcf-bump-order-grid-wrap{display:flex;width:100%;-js-display:flex;flex-wrap:wrap;margin:20px 0 0;justify-content:space-between}.wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer{width:calc(55% - 40px);float:right}.wcf-ob-column-50{width:calc(50% - 10px)}.wcf-ob-column-100{width:100%}@media only screen and (max-width:768px){.wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer{width:100%}.wcf-ob-column-100,.wcf-ob-column-50{width:100%}}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-customer #your_products_heading,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-order #your_products_heading{margin-top:0;font-weight:500}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap{width:100%;display:inline-block;margin:0;padding:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]{min-width:18px;width:18px;height:18px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::before{margin:1px 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap{padding:0;margin:20px 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap.wcf-after-customer{margin:20px 0 0 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap{width:100%}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options{padding:0;background-color:var(--wcf-yp-bg-color);border:1px solid var(--wcf-yp-box-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{color:var(--wcf-yp-text-color);padding:1em 1.2em;position:relative;border-bottom:1px solid var(--wcf-yp-box-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{margin:-1px -15px 0;color:var(--wcf-yp-hl-text-color);border-bottom:1px solid var(--wcf-yp-hl-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-item-wrap{font-size:14px;font-weight:400}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-header .wcf-field-label{font-weight:500;font-size:15px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-item,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-price,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-qty{padding:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price{font-weight:400}@media only screen and (max-width:768px){.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-grid-wrap{margin:10px 0 0}}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .blockUI.blockOverlay{background:#fff!important;opacity:0!important}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay{opacity:1!important;border:1px solid #d6d7db!important;border-radius:4px!important}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap .blockUI.blockOverlay::before{background:url( "../images/order-bump-skeleton.svg" ) right top;width:100%;height:100%;position:absolute;content:"";top:0;right:0;animation:none;z-index:2;margin:0;transform:scale(.92)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-3 .blockUI.blockOverlay::before,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-4 .blockUI.blockOverlay::before{top:-10px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before{background:0 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before{background-repeat:no-repeat;top:0;right:0;animation:none;height:100%;width:100%;margin:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap .wcf-qty-options{padding:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{padding:15px;border:1px solid var(--wcf-field-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{padding:15px;border-bottom:1px solid var(--wcf-field-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:last-child{border-bottom:0!important}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap:not(.wcf-yp-skin-cards) .wcf-qty-options{border:1px solid var(--wcf-ic-section-border-color);background-color:var(--wcf-payment-section-bg-color);border-radius:5px}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row:has(input[type=radio]:checked){border:1px solid var(--wcf-primary-color);background-color:color-mix(in sRGB,var(--wcf-primary-color) 10%,transparent)}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options:has(input[type=radio]:checked) .wcf-highlight{margin-top:0;background-color:#fff;position:relative}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight:has(input[type=radio]:checked)::before{content:"";width:100%;position:absolute;height:100%;background-color:color-mix(in sRGB,var(--wcf-primary-color) 10%,transparent);right:0;border-radius:4px}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-bump-order-wrap.wcf-after-customer{margin-bottom:2px}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-all-bump-order-wrap.wcf-before-checkout{margin-top:0}assets/min-css/checkout-styles.min.css000064400000233760147600244370014063 0ustar00body .wcf-pre-checkout-offer-wrapper{--wcf-primary-color:#f16334}:root{--wcf-yp-text-color:#404040;--wcf-yp-bg-color:#f3f3f3;--wcf-yp-border-color:#ccc;--wcf-yp-hl-text-color:var( --wcf-yp-text-color );--wcf-yp-hl-bg-color:#fff;--wcf-yp-hl-border-color:var( --wcf-yp-border-color );--wcf-yp-hl-flag-text-color:#fff;--wcf-yp-hl-flag-bg-color:var( --wcf-primary-color )}.wcf-embed-checkout-form-modern-checkout{--wcf-yp-text-color:#555;--wcf-yp-bg-color:#fff;--wcf-yp-box-border-color:#d6d7db;--wcf-yp-hl-text-color:var( --wcf-yp-text-color )}.wcf-embed-checkout-form-instant-checkout{--wcf-yp-hl-flag-bg-color:var( --wcf-primary-color )}.wcf-embed-checkout-form #payment div.payment_box .woocommerce-SavedPaymentMethods{padding:0;margin-top:10px}.wcf-embed-checkout-form-two-step{width:100%;margin:0 auto}.wcf-embed-checkout-form-two-step .woocommerce{border-top:none;border-left-style:solid;border-right-style:solid;border-bottom-style:solid;border-width:2px;border-color:#ddd;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:10px 25px 25px;overflow:hidden;background-color:#fff}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav{border-left-style:solid;border-right-style:solid;border-width:2px;border-top-style:solid;border-color:#ddd;border-top-left-radius:3px;border-top-right-radius:3px;display:block;width:100%;margin:0 auto;padding-bottom:0}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note{border:1px dashed;border-color:#f16334;margin-bottom:20px;padding:10px 15px;border-radius:3px;color:#fff;background-color:#f16334;position:relative}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before{content:"";border:10px solid;border-top-color:#f16334;position:absolute;width:20px;height:20px;bottom:-20px;left:auto;top:auto;border-left:10px transparent solid;border-right:10px transparent solid;border-bottom:10px transparent solid}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns{display:inline-block;width:100%}.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button{border-color:var(--wcf-btn-bg-color);background-color:var(--wcf-btn-bg-color);font-family:inherit;font-weight:inherit;letter-spacing:.5px;width:100%;padding:15px 25px;font-size:16px;line-height:1.5;border-radius:3px;color:var(--wcf-btn-text-color);text-transform:none;text-align:center;display:block}.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns a.wcf-next-button:hover{background-color:var(--wcf-btn-bg-hover-color);border-color:var(--wcf-btn-bg-hover-color);color:var(--wcf-btn-hover-text-color)}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{display:inline-block}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-next-button-icon-wrap,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button-content{display:block}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{font-size:1.15em;font-weight:700;display:inline-block;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-sub-text{font-size:.9em;font-weight:400}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .dashicons-arrow-right-alt{margin-right:5px;display:inline-block;font-weight:700;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note p{margin:0}.wcf-embed-checkout-form-two-step ul.wcf-embed-checkout-form-steps{background-color:#f4f4f4;-js-display:flex;display:flex;list-style:none;margin-left:0;margin-bottom:0;padding:0;width:100%}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps{flex:1;width:100%;text-align:left;vertical-align:middle;position:relative}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a{align-items:center;-js-display:flex;display:flex;padding:15px;width:100%}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-heading{display:inline-block;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number{display:inline-block;font-weight:700;font-size:25px;line-height:1.5;margin-right:10px;vertical-align:middle}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name{font-weight:600;font-size:14px;line-height:1.5}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name{font-size:13px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-one{opacity:1}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.step-two{opacity:1}.wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-one.wcf-current::before{left:0;top:0;width:100%;border-top-left-radius:0}.wcf-embed-checkout-form-two-step .wcf-border-none .wcf-embed-checkout-form-steps .step-two.wcf-current::before{right:0;top:0;width:100%;border-top-right-radius:0}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-one.wcf-current::before{content:"";background-color:#f16334;border-top-left-radius:3px;width:calc(100% + 2px);height:2px;position:absolute;left:-2px;top:-2px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .step-two.wcf-current::before{content:"";background-color:#f16334;border-top-right-radius:3px;width:calc(100% + 2px);height:2px;position:absolute;right:-2px;top:-2px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .steps.wcf-current{background-color:#fff}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current .step-name{color:var(--wcf-heading-color)}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a{text-decoration:none;color:#444}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps .wcf-current a{text-decoration:none;color:#444}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:active,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:focus,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps a:visited{color:#444;border:none;outline:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout{display:block;width:100%}.wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper,.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set,.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap,.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap{display:block;width:100%;float:none;padding:0;border-radius:0;margin-top:10px;margin-bottom:20px}.wcf-embed-checkout-form-two-step .woocommerce form .wcf-shipping-methods-wrapper{margin-top:0;margin-bottom:30px}.wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set .col-1{margin-top:10px}.wcf-embed-checkout-form-two-step #order_review_heading,.wcf-embed-checkout-form-two-step .woocommerce-additional-fields>h3,.wcf-embed-checkout-form-two-step .woocommerce-billing-fields>h3,.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none}.wcf-embed-checkout-form-two-step .woocommerce #ship-to-different-address{font-size:15px;margin-bottom:10px}.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{display:none}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-order-wrap{display:none;margin-top:10px;margin-bottom:0;float:none;width:100%}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment{display:block}.wcf-embed-checkout-form-two-step table.shop_table #shipping_method{min-width:130px;display:inline-block}.wcf-embed-checkout-form-two-step #order_review{padding:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row{padding:.5em 0 0}.wcf-embed-checkout-form-two-step table.shop_table tbody tr td:nth-child(2),.wcf-embed-checkout-form-two-step table.shop_table tfoot tr td:nth-child(2),.wcf-embed-checkout-form-two-step table.shop_table thead tr th:nth-child(2){text-align:right}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-product-option-wrap.mt20{margin-top:0!important}.wcf-embed-checkout-form-two-step .woocommerce-checkout #your_products_heading{margin:20px 0 0;padding:3px 3px 20px}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-item{width:60%}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price,.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty{width:20%}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:50px}.wcf-embed-checkout-form-two-step .woocommerce-checkout .wcf-yp-skin-classic .wcf-qty-options{padding:15px}.wcf-embed-checkout-form-two-step .wcf-bump-order-style-1.wcf-after-customer,.wcf-embed-checkout-form-two-step .wcf-bump-order-style-2.wcf-after-customer,.wcf-embed-checkout-form-two-step .wcf-bump-order-style-3.wcf-after-customer{margin:0 auto 1em}.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-checkout-fields-wrapper,.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-product-option-before-customer,.wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-order-wrap{display:block}.wcf-embed-checkout-form-two-step .woocommerce.step-one .wcf-order-wrap,.wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-checkout-fields-wrapper,.wcf-embed-checkout-form-two-step .woocommerce.step-two .wcf-product-option-before-customer{display:none}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row label.checkbox{margin-bottom:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment div.payment_box{font-size:.8em}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment ul.payment_methods{background-color:#f7f7f7;padding:15px}#tve_editor ol,#tve_editor ul{margin:0}@media only screen and (max-width:768px){.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav{width:100%;min-width:100%;margin:0 auto;padding-bottom:0}.wcf-embed-checkout-form .woocommerce-checkout .col2-set{margin:10px 0 0}.wcf-embed-checkout-form-two-step .woocommerce .woocommerce-NoticeGroup .woocommerce-message,.wcf-embed-checkout-form-two-step .woocommerce .woocommerce-info,.wcf-embed-checkout-form-two-step .woocommerce .woocommerce-notices-wrapper .woocommerce-message{padding:1em 1em 1em 1.5em;margin:0}.wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-1,.wcf-embed-checkout-form-two-step .woocommerce .col2-set .col-2,.wcf-embed-checkout-form-two-step .woocommerce .wcf-order-wrap,.wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-1,.wcf-embed-checkout-form-two-step .woocommerce-page .col2-set .col-2,.wcf-embed-checkout-form-two-step .woocommerce-page .wcf-order-wrap{padding:0}.wcf-embed-checkout-form-two-step .woocommerce-checkout #order_review_heading{margin:0}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps>li::before{content:"";position:relative;background:#f16334;display:block;width:42%;height:2px;top:15px;left:0;z-index:1}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps>li::after{content:"";position:relative;background:#f16334;display:block;width:51%;height:2px;top:-36px;left:52%;z-index:1}.wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-100,.wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-33,.wcf-embed-checkout-form-two-step .woocommerce form .wcf-column-50,.wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-100,.wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-33,.wcf-embed-checkout-form-two-step .woocommerce-page form .wcf-column-50{width:100%}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps{padding:7px 3px 7px 10px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps a{padding:10px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-number{font-size:20px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-name,.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-steps div.steps .step-sub-name{font-size:12px}.wcf-embed-checkout-form-two-step .woocommerce .wcf-embed-checkout-form-nav-btns .wcf-next-button{padding:15px}.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-nav-btns .wcf-next-button .wcf-button-text{font-size:1em}.wcf-embed-checkout-form-two-step .woocommerce-checkout #payment .form-row,.wcf-embed-checkout-form-two-step .woocommercet #payment .form-row{padding:.5em 0 0}.wcf-embed-checkout-form-two-step .woocommerce #payment #place_order{margin-bottom:0}.wcf-embed-checkout-form .woocommerce form .wcf-column-100,.wcf-embed-checkout-form .woocommerce form .wcf-column-33,.wcf-embed-checkout-form .woocommerce form .wcf-column-50{width:100%}}.wcf-embed-checkout-form .woocommerce form .wcf-all-bump-order-wrap:empty{margin:0}.wcf-bump-order-wrap{display:block;float:none;margin:0 0 1.2em;overflow:hidden;word-break:break-word;white-space:normal}.wcf-bump-order-wrap .wcf-bump-order-field-wrap .wcf-pointing-arrow{margin-right:0;vertical-align:middle;transform:scaleX(1)}.wcf-bump-order-wrap del{font-weight:400;color:#7a7a7a;font-size:16px}.wcf-bump-order-wrap span.wcf-discount-price,.wcf-bump-order-wrap span.wcf-normal-price{font-weight:600;color:#444}.wcf-bump-order-wrap.wcf-ob-column-50 .wcf-bump-order-offer-content-left{max-width:30%}.wcf-bump-order-wrap.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:15%}.wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-offer-content-left{max-width:25%}.wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:25%}.wcf-bump-order-wrap.wcf-after-customer.wcf-ob-column-50 .wcf-bump-order-offer-content-left{max-width:40%}.wcf-bump-order-wrap.wcf-after-order.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:30%}.wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-100 .wcf-bump-order-offer-content-left{max-width:30%}.wcf-bump-order-wrap.wcf-after-payment.wcf-ob-column-50 .wcf-bump-order-offer-content-left{max-width:40%}@keyframes wcf-blinker{0%{visibility:hidden}40%{visibility:hidden}}.wcf-blink{animation:wcf-blinker .8s linear infinite;animation-direction:alternate}.wcf-bump-order-wrap .wcf-bump-order-desc p{margin:0 0 .6em;padding:0}.wcf-bump-order-wrap .wcf-bump-order-desc p:last-child{margin:0;padding:0}.wcf-bump-order-wrap .wcf-bump-order-desc li,.wcf-bump-order-wrap .wcf-bump-order-desc ul{margin:0;padding:0;list-style-position:inside}.wcf-bump-order-wrap .wcf-bump-order-desc ol{margin:0;padding:0}.wcf-bump-order-wrap h1,.wcf-bump-order-wrap h2,.wcf-bump-order-wrap h3,.wcf-bump-order-wrap h4,.wcf-bump-order-wrap h5,.wcf-bump-order-wrap h6{margin:0;padding:0;font-weight:500;line-height:1.3em}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce form #payment .wcf-bump-order-wrap .wcf-bump-order-field-wrap label{margin:0!important;vertical-align:middle;font-size:1em;line-height:1.3em;letter-spacing:0;font-family:inherit;font-weight:inherit;text-transform:none}.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]{border-radius:50%;margin-right:4px;line-height:10px}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::before{content:"\e600";margin:0}.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]:checked::before{background-color:#f16334;border-radius:50px;content:"\2022";font-size:24px;height:6px;line-height:16px;margin:4px;text-indent:-9999px;width:6px}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox],.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox],.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox],.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox],.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;box-shadow:inset 0 1px 2px rgba(0,0,0,.1);transition:50ms border-color ease-in-out}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-selection-wrap{-js-display:flex;display:flex;padding:5px 0}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-change-icon{border:1px solid #dcdada;height:30px;width:26px;margin:0;padding:6px 6px;color:#555;text-align:center;font-weight:500;cursor:pointer;font-size:13px;margin-bottom:0;-js-display:flex;display:flex;justify-content:center;align-items:center}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-decrement{border-radius:3px 0 0 3px;border-right:0}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-ob-qty-increment{border-radius:0 3px 3px 0;border-left:0}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater{width:40px;min-width:40px;min-height:30px;padding:2px 5px;color:#666;margin:0;text-align:center;border:1px solid #dcdada;border-left:0;border-right:0;border-radius:0;-webkit-appearance:textfield;appearance:textfield;outline:0;line-height:1}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:active,.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:focus,.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-order-bump-quantity-updater:hover{outline:0}.wcf-order-bump-quantity-updater::-webkit-inner-spin-button,.wcf-order-bump-quantity-updater::-webkit-outer-spin-button{-webkit-appearance:none}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox]:focus,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox]:focus,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox]:focus,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:focus,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=radio]:focus,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=radio]:not(:checked):focus{border-color:#f16334}.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-customer .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-after-order .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-before-checkout .wcf-bump-order-field-wrap input[type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::before,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row input[type=radio]:checked::before{display:inline-block;float:left;font:normal normal 400 15px/1 cartflows-icon;speak:none;vertical-align:middle;width:6px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type=checkbox]:not(:checked)::after,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:not(:checked)::after{opacity:0;transform:scale(0)}.wcf-embed-checkout-form .wcf-bump-order-wrap .wcf-bump-order-field-wrap label [type=checkbox]:checked::after,.wcf-embed-checkout-form .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::after{opacity:1;transform:scale(1)}.wcf-bump-order-style-3{border-width:1px;border-style:dashed;border-color:#e5e7eb;background:#fff;box-shadow:0 4px 16px -8px rgba(0,0,0,.16);border-radius:4px;display:inline-block;padding:20px;width:100%;overflow:unset;position:relative}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{align-self:center;max-width:60px;text-align:center;width:100%}#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox]{height:20px;width:20px;margin:0 15px 0 0;border-radius:3px}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]:checked::before,.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox]:checked::before{font:normal normal 400 16px/1 cartflows-icon;width:20px;top:1px;position:relative;left:0}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{max-width:25%;margin-right:10px;align-self:center;width:100%}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img{width:100%;vertical-align:middle}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label{-js-display:flex;display:flex;font-size:18px;color:#1a1e23;font-weight:600}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{align-self:center;margin-left:10px;max-width:100%;width:100%}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-desc{margin-top:10px}.wcf-bump-order-style-3 .wcf-content-container{padding:25px 0}.wcf-embed-checkout-form .woocommerce #payment #place_order::before{display:inline-block}@media only screen and (max-width:520px){.wcf-bump-order-style-3 .wcf-bump-order-info{display:block}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{max-width:100%;margin:0 0 10px 0}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{max-width:65px}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]{margin:0 10px 0 0}.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{flex:5}}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap{display:block}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-action,.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-info,.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-label,.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text{display:block;text-align:center;width:100%;max-width:100%}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-text{margin:15px 0 0}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap .wcf-bump-order-image{margin:0 auto}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-label{display:block}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text{margin:0 10px 0 0;text-align:right}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow{transform:rotate(180deg)}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image{margin-left:7px}.wcf-bump-order-style-3 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action input[type=checkbox]{margin:0 5px 0 0}.wcf-bump-order-style-4{border-width:1px;border-style:solid;border-color:#e5e7eb;background:#fff;border-radius:4px;box-shadow:0 4px 16px -8px rgba(0,0,0,.16);display:inline-block;padding:20px;position:relative;width:100%;overflow:unset}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{text-align:center;-js-display:flex;display:flex;justify-content:center;width:auto;white-space:nowrap;margin-left:15px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button{margin:0;border-width:1px;border-color:#ccc;border-style:none;color:#333;padding:8px 20px;border-radius:3px;text-decoration:none;text-transform:none}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button:hover{cursor:pointer}.wcf-bump-order-style-4.wcf-after-order .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button{padding:8px 12px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button span{background-color:#333;padding:0 5px;border-radius:50px;color:#fff;margin:0 8px 0 0}#payment .wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]{display:none!important}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]:checked::before{font:normal normal 400 20px/1 cartflows-icon;width:20px;top:2px;position:relative;left:2px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{-webkit-box-flex:0;-moz-box-flex:0;max-width:25%;width:100%;margin-right:15px;align-self:center}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image img{width:100%;vertical-align:middle}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label{color:#1a1e23;font-size:18px;margin-bottom:5px;font-weight:600}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{align-items:center;width:100%}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-info{flex:0 0 calc(100% - 100px);-webkit-flex:0 0 -webkit-calc(100% - 115px)}.wcf-bump-order-style-4 .wcf-bump-order-offer{font-size:18px;color:#f06434}.wcf-bump-order-style-4 .wcf-content-container{padding:25px 0}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action .wcf-bump-order-cb-button .wcf-processing{opacity:.7;background:#fff;pointer-events:none}@media only screen and (max-width:520px){.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action{margin:15px 0 0 0;text-align:left;display:block;line-height:2}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-image{flex:0 0 80px;-webkit-flex:0 0 80px}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap,.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-text{display:block}}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap{display:block;text-align:center}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-image{margin:0 auto;max-width:30%}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-action{text-align:center;margin:10px 0 0 0}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-text{margin:15px 0}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap{text-align:right}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-action{min-width:80px}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-text{margin:0 15px}.wcf-bump-order-style-4 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-image{margin:0}.wcf-bump-order-style-5{background:#fff;border-width:1px;border-style:solid;border-color:#e5e7eb;border-radius:4px;box-shadow:0 4px 16px -8px rgba(0,0,0,.16);display:inline-block;padding:20px;position:relative;width:100%;overflow:unset}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-5 .wcf-bump-order-desc,.wcf-bump-order-style-5 .wcf-bump-order-label{margin:0 0 15px 0}.wcf-bump-order-style-5 .wcf-bump-order-desc{font-weight:400}.wcf-bump-order-style-5 .wcf-bump-order-action{-js-display:flex;display:flex;line-height:1.2;padding:5px 0;width:-moz-fit-content;width:fit-content;vertical-align:middle}#payment .wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]{height:20px;width:20px;margin:0 10px 0 0!important;border-radius:3px}.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox]:checked::before{font:normal normal 400 16px/1 cartflows-icon;width:20px;top:1px;position:relative;left:0}.wcf-bump-order-style-5 .wcf-bump-order-label{font-weight:600;color:#1a1e23;font-size:18px;line-height:1}.wcf-bump-order-style-5 .wcf-bump-order-info{-js-display:flex;display:flex;align-items:center}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-top{display:block;text-align:center;width:100%}.wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-image{margin:0 0 15px 0;display:inline-block;text-align:center;max-width:30%}.wcf-bump-order-style-5 .wcf-bump-order-image-top .wcf-bump-order-action{-js-display:inline-flex;display:inline-flex}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image{margin:0 0 0 15px}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-text{text-align:right}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-action{-js-display:inline-flex;display:inline-flex}.wcf-bump-order-style-5 .wcf-bump-order-image{max-width:30%;margin:0 15px 0 0;width:100%}.wcf-bump-order-style-5 .wcf-bump-order-text{width:100%}.wcf-bump-order-style-5 .wcf-bump-order-image img{width:100%}.wcf-bump-order-style-5 .wcf-bump-order-cb-button{margin:0;border:1px solid #ccc;color:#333;padding:8px 20px;border-radius:3px;text-decoration:none;text-transform:none}.wcf-bump-order-style-5 .wcf-processing{opacity:.7;background:#fff;pointer-events:none}.wcf-bump-order-style-5 .wcf-bump-remove-from-cart:hover{color:#fff;background:#e43b2c}.wcf-bump-order-style-5 .wcf-bump-order-cb-button:hover{cursor:pointer}.wcf-bump-order-style-5 .wcf-bump-order-action.wcf-ob-action-button{border:none;padding:0;line-height:unset}.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action.wcf-ob-action-button input[type=checkbox]{display:none!important}@media only screen and (max-width:520px){.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-info{display:block}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-image{max-width:100%;margin:0 0 15px 0}.wcf-bump-order-style-5 .wcf-bump-order-info.wcf-bump-order-image-right .wcf-bump-order-image{margin:15px 0 0}}.wcf-bump-order-style-2{background:#fff;border:1px #e5e7eb dashed;border-radius:4px;box-shadow:0 4px 16px -8px rgba(0,0,0,.16)}.wcf-bump-order-style-2 .wcf-content-container{-js-display:flex;display:flex}.wcf-bump-order-style-2 .wcf-bump-order-offer{padding:20px 25px;font-size:1.1em;color:#1a1e23;font-weight:600}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-right{width:100%}.wcf-bump-order-style-2 .wcf-bump-order-desc{padding:0 25px 20px}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap{background-color:#f7fafc;border-top:1px #e5e7eb solid;padding:15px 25px;margin:0;font-size:1.1em;display:block}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap,.wcf-bump-order-style-2 .wcf-bump-order-field-wrap *{cursor:pointer}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap .wcf-bump-order-label{margin-left:1px}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left,.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{align-self:center}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left img{padding:0 0 15px 20px}.wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left{width:auto}.wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{width:85%}.wcf-show-coupon-field-toggle{padding-top:1em}@media only screen and (max-width:520px){.wcf-bump-order-style-2 .wcf-content-container{display:block}.wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right,.wcf-embed-checkout-form-one-column .wcf-bump-order-style-2 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{width:100%}}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container{display:block}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer{text-align:center}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right{display:block;width:100%;margin:0 auto;text-align:center}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left{max-width:40%;padding:0 20px}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img{padding:0 0 20px 0}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer{text-align:right}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left,.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right{align-self:center;text-align:right}.wcf-bump-order-style-2 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img{padding:0 20px 20px 0}.wcf-bump-order-style-1{background:#fff;border-style:solid;border-width:1px;border-color:#e5e7eb;border-radius:4px;display:inline-block;box-shadow:0 4px 16px -8px rgba(0,0,0,.16)}.wcf-bump-order-style-1 .wcf-bump-order-offer{padding:0 25px 10px;color:#1a1e23;font-size:18px;font-weight:600}.wcf-bump-order-style-1 .wcf-content-container{padding:25px 0;-js-display:flex;display:flex}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-right{width:100%}.wcf-bump-order-style-1 .wcf-bump-order-desc{padding:0 25px}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap{border-bottom-style:solid;border-width:1px;border-color:#e5e7eb;padding:20px 25px;margin:0;font-size:1.1em;display:block;background:#f7fafc}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap label{cursor:pointer}.wcf-embed-checkout-form .woocommerce #payment .wcf-bump-order-wrap input[type=checkbox]{margin:0 4px 0 0}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap .wcf-bump-order-label{margin-left:1px}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left,.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{align-self:center}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left img{padding:0 0 0 20px}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-content-container{display:block}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-field-wrap{text-align:center}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left,.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-right{display:block;width:100%;margin:0 auto;text-align:center}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left{max-width:38%;padding:0 20px}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-top .wcf-bump-order-offer-content-left img{padding:0 0 20px 0}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-field-wrap{text-align:right}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-right{align-self:center;text-align:right}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left{align-self:center}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-pointing-arrow{transform:rotate(180deg);margin-top:-5px}.wcf-bump-order-style-1 .wcf-bump-order-content.wcf-bump-order-image-right .wcf-bump-order-offer-content-left img{padding:0 20px 0 0}@media only screen and (max-width:520px){.wcf-embed-checkout-form-two-column .wcf-bump-order-style-1.wcf-after-customer,.wcf-embed-checkout-form-two-column .wcf-bump-order-style-2.wcf-after-customer,.wcf-embed-checkout-form-two-column .wcf-bump-order-style-3.wcf-after-customer,.wcf-embed-checkout-form-two-column .wcf-bump-order-style-4.wcf-after-customer{width:100%}.wcf-bump-order-style-1 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right,.wcf-embed-checkout-form-one-column .wcf-bump-order-style-1 .wcf-bump-order-offer-content-left+.wcf-bump-order-offer-content-right{width:100%}}@media only screen and (max-width:520px){.wcf-bump-order-style-1 .wcf-content-container,.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap{display:block}.wcf-bump-order-wrap .wcf-bump-order-offer-content-left{width:100%}.wcf-bump-order-wrap .wcf-bump-order-offer-content-left img{width:100%;padding:25px}#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#order_review .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],#payment .wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-action input[type=checkbox],.wcf-bump-order-style-3 .wcf-bump-order-content .wcf-bump-order-field-wrap .wcf-bump-order-label input[type=checkbox]{height:20px;width:20px;margin:0 15px 15px 0;border-radius:3px}}.wcf-product-option-wrap{padding:3px}.wcf-product-option-wrap h3{font-family:inherit;font-weight:600;font-size:20px;margin:0 0 25px 0;padding:3px}.wcf-product-option-wrap .wcf-qty-options .wcf-qty-row{position:relative}.wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:5px 0 0 0}.wcf-product-option-wrap input[type=number]:focus{outline:0}.wcf-qty-options .wcf-item-selector{display:inline-block;margin-right:8px}.wcf-qty-options .wcf-item-all-text{display:inline-block;vertical-align:middle}.wcf-qty-options .wcf-item-image{width:55px;-js-display:inline-flex;display:inline-flex;margin-right:10px}.wcf-qty-options .wcf-item-wrap{font-size:1em;font-weight:600;line-height:1.5}.wcf-qty-options .wcf-display-attributes,.wcf-qty-options .wcf-display-subscription-details{font-size:.75em;font-weight:400;font-style:italic;opacity:.65}.wcf-display-attributes .wcf-att-inner{margin-right:5px}.wcf-display-attributes .wcf-att-inner:last-child .wcf-att-sep{display:none}.wcf-qty-hidden.wcf-qty{visibility:hidden;pointer-events:none;opacity:0}.wcf-qty-options .wcf-item-wrap{line-height:1.8}.wcf-qty-options ins{background:0 0}.wcf-qty-options .wcf-price del .woocommerce-Price-amount{font-size:inherit;opacity:.45;color:inherit}.wcf-qty-options .wcf-price ins .woocommerce-Price-amount{margin-left:4px}.wcf-qty-options .wcf-item .wcf-item-wrap span.dashicons.dashicons-no-alt{vertical-align:middle}.wcf-embed-checkout-form-one-column .wcf-product-option-wrap{clear:left;margin:15px 0;width:100%}.wcf-embed-checkout-form-two-column .wcf-product-option-wrap{margin:15px 0;width:55%;float:left;padding-right:40px}.wcf-embed-checkout-form-two-column .wcf-order-wrap .wcf-product-option-wrap.wcf-product-option-before-order,.wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-customer,.wcf-embed-checkout-form-two-column .wcf-product-option-wrap.wcf-product-option-before-order{width:100%;padding:0}.wcf-yp-skin-classic .wcf-qty-options{border:none;background-color:var(--wcf-yp-bg-color);border-radius:4px;border-collapse:collapse;font-family:inherit;font-weight:inherit;font-size:1em;margin:0!important;padding:15px;text-align:left;width:100%}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header{border-bottom:1px dashed var(--wcf-yp-border-color)}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-header .wcf-field-label{font-weight:600}.wcf-embed-checkout-form .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not(.wcf-highlight):last-child,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:not(.wcf-highlight):last-child{border:none}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-item,.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-price,.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row .wcf-qty{padding:0;line-height:1.4em;border:none;position:relative}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{color:var(--wcf-yp-text-color);-js-display:flex;display:flex;justify-content:space-between;position:relative;padding:10px 0;border-bottom:1px solid var(--wcf-yp-border-color);align-items:center;font-size:.95em;cursor:pointer}.wcf-yp-skin-classic .wcf-qty-options .wcf-item,.wcf-yp-skin-classic .wcf-qty-options .wcf-price,.wcf-yp-skin-classic .wcf-qty-options .wcf-qty{display:inline-block;vertical-align:middle}.wcf-yp-skin-classic .wcf-qty-options .wcf-item{-js-display:flex;display:flex;align-items:center;width:70%;flex:4;margin-right:10px}.wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-subtext{font-size:.95em;line-height:1.5}.wcf-yp-skin-classic .wcf-qty-options .wcf-item .wcf-item-wrap+.wcf-item-subtext{margin-top:5px}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty{-js-display:flex;display:flex;width:20%;text-align:center;align-items:center;justify-content:center;flex:1}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:40px;min-width:40px;min-height:30px;padding:2px 5px;color:#666;margin:0;text-align:center;border:1px solid #dcdada;border-left:0;border-right:0;border-radius:0;-webkit-appearance:textfield;appearance:textfield;line-height:1}.wcf-yp-skin-classic .wcf-qty-options .wcf-price{-js-display:flex;display:flex;align-items:center;width:10%;text-align:right;justify-content:flex-end;flex:1;margin-left:10px;font-size:.95em;font-weight:400}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{background-color:var(--wcf-yp-hl-bg-color);border:1px solid var(--wcf-yp-hl-border-color);color:var(--wcf-yp-hl-text-color);font-weight:500;padding:18px 28px;margin:-1px -28px 0;font-size:.95em;border-radius:4px;box-shadow:0 5px 10px -5px rgba(150,150,150,.5)}.wcf-yp-skin-classic .wcf-qty-table-titles+.wcf-highlight{margin-top:15px}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight+.wcf-highlight{margin-top:25px}.wcf-yp-skin-classic .wcf-highlight .wcf-highlight-head{position:absolute;top:-10px;right:-10px;background:var(--wcf-yp-hl-flag-bg-color);color:var(--wcf-yp-hl-flag-text-color);border-radius:3px;padding:3px 9px;font-size:.75em;font-weight:400}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-wrap{font-size:.95em;font-weight:600}.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight .wcf-item-subtext{opacity:.75}.wcf-yp-skin-classic .wcf-qty-options .wcf-item-image{margin-right:15px}.wcf-embed-checkout-form-two-step .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{padding:18px;margin-left:-20px;margin-right:-20px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row.wcf-qty-table-titles::before,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before{content:"";position:absolute;background:url( "../images/product-options-classic-loader.svg" ) 15px 15px,#fff;background-repeat:no-repeat;width:100%;height:100%;z-index:1;left:0;top:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options.wcf-loading .wcf-qty-row::before{background-color:#f9f9f9}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::after{content:"";position:absolute;width:100%;height:100%;background-color:#f7f7f7;border-radius:.35em;top:0;left:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options.wcf-loading .wcf-qty-row::before{content:"";position:absolute;background:url( "../images/product-options-card-loader.svg" ) center center;background-repeat:no-repeat;transform:scale(.92);width:100%;height:100%;z-index:1;left:-5px;top:0}.wcf-yp-skin-cards .wcf-qty-options{-js-display:flex;display:flex;flex-wrap:wrap;margin:0 -10px;font-size:1em;width:calc(100% + 20px)}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{background-color:#f7f7f7;border:1px solid #b0b0b0;padding:20px 30px;margin:0 10px 22px;border-radius:.35em;width:calc(50% - 20px);font-size:1em;font-weight:600;cursor:pointer;position:relative}.wcf-yp-skin-cards .wcf-qty-options .wcf-highlight{background-color:#fff;box-shadow:0 5px 10px -5px rgba(150,150,150,.5);overflow:hidden}.wcf-yp-skin-cards .wcf-qty-options .wcf-highlight .wcf-price{font-size:1.08em}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{margin:0 0 3px}.wcf-yp-skin-cards .wcf-highlight .wcf-highlight-head{position:absolute;width:12em;top:1.8em;right:-3em;background:#f16334;color:#fff;padding:.22em 0;text-align:center;font-size:.8em;font-weight:700;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item{-js-display:flex;display:flex;align-items:flex-start}.wcf-yp-skin-cards .wcf-qty-options .wcf-item-image,.wcf-yp-skin-cards .wcf-qty-options .wcf-item-selector{margin-top:5px;position:relative}.wcf-yp-skin-cards .wcf-qty-options .wcf-item-image{margin-right:15px;width:80px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options{margin:0 0 5px 0;width:100%;position:relative}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-wrap,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:1.07em;font-weight:600}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-wrap{margin-bottom:5px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-subtext{font-size:inherit;font-weight:400;opacity:.75;margin-bottom:15px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input{max-width:50px;text-align:center;min-height:30px;padding:2px;margin:0;border:none;border-radius:0}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty input{border:1px solid #dcdada;border-left:0;border-right:0}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{max-width:100px}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-wrap{-js-display:flex;display:flex}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn{line-height:1}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-selection-btn.max-quantity-reached{color:#dcdada;cursor:not-allowed}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon{border:1px solid #dcdada;height:30px;width:26px;margin:0;padding:6px 6px;color:#555;text-align:center;font-weight:500;cursor:pointer;font-size:13px;margin-bottom:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-change-icon:hover{background-color:#f7f7f7}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-decrement{border-radius:3px 0 0 3px;border-right:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty .wcf-qty-increment{border-radius:0 3px 3px 0;border-left:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type=number]::-webkit-inner-spin-button,.wcf-embed-checkout-form .woocommerce-checkout .wcf-qty input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-qty{align-items:center;display:inline-block;margin-top:0;margin-right:10px;vertical-align:middle}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{margin-right:0}.wcf-yp-skin-cards .wcf-qty-hidden.wcf-qty{display:none!important}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{font-size:.95em}.wcf-embed-checkout-form-two-column .wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-row,.wcf-embed-checkout-form-two-column .wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-row,.wcf-embed-checkout-form-two-step .wcf-yp-skin-cards .wcf-qty-row{width:100%}@media (max-width:768px){.wcf-product-option-after-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.wcf-product-option-before-customer.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.wcf-product-option-before-order.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row,.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{width:100%;padding:15px 20px}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row:last-child{margin-bottom:0}.wcf-yp-skin-cards .wcf-qty-options .wcf-item{width:100%}.wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty{width:40%}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-price{width:auto;vertical-align:middle}.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row .wcf-item-content-options .wcf-item-subtext{font-size:.9em}}#wcf-quick-view-content{font-family:Montserrat,sans-serif}#wcf-quick-view-content .summary-content .product_title{display:inline-block;font-size:2rem;font-family:inherit;font-weight:400;width:100%;margin:0 0 .5em 0;padding:0 0 0;border:none;border-bottom:none;line-height:1.3}#wcf-quick-view-content .summary-content .woocommerce-product-rating{margin:0 0 .5em 0}#wcf-quick-view-content .summary-content .woocommerce-product-rating .comment-form-rating .stars a,#wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating,#wcf-quick-view-content .summary-content .woocommerce-product-rating .star-rating::before{color:#f16334}#wcf-quick-view-content .summary-content .price,#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price{margin:0 0 .5em;font-family:inherit;font-weight:400}#wcf-quick-view-content .summary-content .wc-stripe-payment-request-wrapper{padding:0}#wcf-quick-view-content .summary-content .price del,#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-price del{opacity:1;margin-right:10px}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-detail{margin:0}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .ast-stock-avail{display:none}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-availability .stock.in-stock{font-size:.9em}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p,#wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p{font-size:.9em;line-height:1.85714285714286;margin-top:0;margin-bottom:20px}#wcf-quick-view-content .summary-content div.product{padding:0;display:inline-block;vertical-align:middle}#wcf-quick-view-content .summary-content form.cart{margin-bottom:0}#wcf-quick-view-content .summary-content .variations{border-bottom:1px #ddd solid;padding-bottom:1em}#wcf-quick-view-content .summary-content .variations label{font-size:13px;font-weight:400}#wcf-quick-view-content .summary-content .single_variation_wrap .single_variation{margin-bottom:1em}#wcf-quick-view-content .summary-content .single_variation_wrap .single_variation .woocommerce-variation-description{display:none}#wcf-quick-view-content .variations_form .variations td{padding:5px 0}#wcf-quick-view-content .summary-content .variations td.label{padding-right:.4em;vertical-align:middle}#wcf-quick-view-content .summary-content .variations select{background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;border-radius:0;box-shadow:inset 0 -1em .7em 0 rgba(0,0,0,.01);color:#555;display:inline-block;font-family:inherit;font-weight:inherit;font-size:14px;height:auto;line-height:1.42857143!important;min-height:34px;outline:0;padding:7px 12px;width:auto;-webkit-appearance:none}#wcf-quick-view-content .summary-content a{color:#f16334;text-decoration:none}#wcf-quick-view-content .summary-content .reset_variations{text-decoration:none;font-size:11px;color:#b5b5b5;letter-spacing:.5px}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-add-to-cart button{border:1px solid;border-color:#f16334;background:#f16334;border-radius:3px;color:#fff;font-family:inherit;font-weight:inherit;font-size:16px;letter-spacing:.5px;line-height:1;margin-top:15px;padding:10px 30px;width:auto}@media only screen and (max-width:768px){.wcf-embed-checkout-form-one-column .wcf-product-option-wrap{padding:0 18px}.wcf-embed-checkout-form-two-column .wcf-product-option-wrap{width:100%;float:none;padding:0 10px}}.wcf-clear::after,.wcf-clear::before{content:" ";display:table}.wcf-clear::after{clear:both}html.wcf-pre-checkout-offer-open,html.wcf-pre-checkout-offer-open body,html.wcf-quick-view-is-open,html.wcf-quick-view-is-open body{overflow:hidden}.wcf-quick-view-bg{position:fixed;visibility:hidden;overflow:hidden;background:#0b0b0b;opacity:0;transition:opacity .25s;z-index:1042}.wcf-quick-view-loader{z-index:1000;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0;cursor:none;position:absolute}.wcf-quick-view-loader::before{content:"";background:0 0!important;width:48px;height:48px;display:block;position:absolute;top:50%;left:50%;border:3px solid #fff;margin:0 auto;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:wcf-qv-spin 575ms infinite linear}@keyframes wcf-qv-spin{100%{transform:rotate(360deg)}}.wcf-loader-overlay{position:absolute;top:0;left:0;background:rgba(255,255,255,.4);z-index:2;content:"";height:100%;width:100%}.wcf-loader::before{border:3px solid #333;border-left-color:transparent;border-right-color:transparent}.wcf-loader{z-index:3}.wcf-quick-view-bg-ready{top:0;left:0;width:100%;height:100%;opacity:.6;visibility:visible}#wcf-quick-view-modal{position:fixed;visibility:hidden;opacity:0;top:0;left:0;width:100%;height:100%;z-index:1400;text-align:center;transition:all .3s;overflow-x:hidden;overflow-y:auto}#wcf-quick-view-modal.open{visibility:visible;opacity:1}#wcf-quick-view-modal .wcf-content-main-wrapper{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:30px}#wcf-quick-view-modal .wcf-content-main-wrapper::before{content:"";display:inline-block;vertical-align:middle;height:100%}#wcf-quick-view-modal .wcf-content-main{position:relative;pointer-events:none;display:inline-block;vertical-align:middle;max-width:100%;margin:0 auto;text-align:left;z-index:1045;transform:translateY(-30px);opacity:0;transition:transform .5s,opacity .3s}#wcf-quick-view-modal.open .wcf-content-main{transform:translateY(0);opacity:1;width:100%}#wcf-quick-view-modal .wcf-content-main::after,#wcf-quick-view-modal .wcf-content-main::before{content:"";display:table;clear:both}#wcf-quick-view-modal .wcf-lightbox-content{display:table;pointer-events:auto;background-color:#fff;max-width:975px;margin:20px auto;transform:translateZ(0);box-shadow:3px 3px 20px 0 rgba(0,0,0,.15);position:relative}#wcf-quick-view-content{background-color:#fff;padding:15px 0 15px 15px;border-radius:0}#wcf-quick-view-content .wcf-woo-product{overflow:hidden;max-height:480px;overflow-y:auto}#wcf-quick-view-content div.summary{margin:0;padding:20px 30px 30px 30px;width:55%;float:left;box-sizing:border-box}#wcf-quick-view-content div.images{width:45%;float:left;margin-bottom:0}#wcf-quick-view-modal .wcf-qv-image-slider{position:relative}@media (min-width:545px){#wcf-quick-view-content div.summary{content:"544";padding-bottom:-webkit-calc(10px + 1em)}}@media (max-width:544px){#wcf-quick-view-modal .wcf-lightbox-content{display:block}#wcf-quick-view-content div.images,#wcf-quick-view-content div.summary{width:100%;float:none;overflow:hidden;margin-bottom:15px;padding:0}#wcf-quick-view-content .summary-content .product_title{font-size:1.475rem}#wcf-quick-view-content .summary-content .single_variation_wrap .woocommerce-variation-description p,#wcf-quick-view-content .summary-content .woocommerce-product-details__short-description p{font-size:.98em}}body #wcf-quick-view-modal div.product .flex-viewport,body #wcf-quick-view-modal div.product .flex-viewport img{width:100%;float:none;display:block}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav{margin:0;padding:0;list-style:none}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav a{text-decoration:none;display:block;width:32px;height:32px;font-size:32px;line-height:32px;margin:-20px 0 0;position:absolute;top:50%;z-index:10;overflow:hidden;opacity:0;cursor:pointer;color:rgba(0,0,0,.8);text-shadow:1px 1px 0 rgba(255,255,255,.3);transition:all .3s ease-in-out}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next,#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev{display:inline-block;font-family:dashicons;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev::before{content:"\f341"}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next::before{content:"\f345"}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-prev{left:-50px}#wcf-quick-view-modal .wcf-qv-image-slider .flex-direction-nav .flex-next{right:-50px;text-align:right}#wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-prev{opacity:.7;left:10px}#wcf-quick-view-modal .wcf-qv-image-slider:hover .flex-direction-nav .flex-next{opacity:.7;right:10px}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav{margin:0;padding:0;width:100%;position:absolute;bottom:10px;text-align:center}#wcf-quick-view-modal .wcf-qv-image-slider li{list-style:none}#wcf-quick-view-modal .wcf-qv-slides li{float:left;width:100%}#wcf-quick-view-modal .wcf-qv-slides li img{width:100%}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-nav li{margin:0 6px;display:inline-block;zoom:1;vertical-align:middle}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a{width:11px;height:11px;display:block;background:#666;background:rgba(0,0,0,.5);cursor:pointer;text-indent:-9999px;box-shadow:inset 0 0 3px rgba(0,0,0,.3);border-radius:20px}#wcf-quick-view-modal .wcf-qv-image-slider .flex-control-paging li a.flex-active{background:#000;background:rgba(0,0,0,.9);cursor:default}#wcf-quick-view-modal .wcf-content-main-head{background:#fff;border-radius:50%;box-shadow:0 0 3px 0 #444;color:#000;font-size:20px;height:25px;line-height:0;overflow:hidden;opacity:1;position:absolute;padding:3px;right:-10px;top:-15px;text-align:center;text-decoration:none;width:25px;z-index:2}#wcf-quick-view-close{font-size:18px;top:0;right:0;line-height:20px;z-index:2;color:#000;text-decoration:none}#wcf-quick-view-modal .woocommerce-variation-add-to-cart .quantity{display:none!important;opacity:0!important;position:absolute!important}@media only screen and (max-width:480px){.wcf-qty-options .wcf-item-image{display:inline-block}.wcf-qty-options .wcf-item{width:55%}.wcf-qty-options .wcf-qty{width:25%}.wcf-qty-options .wcf-price{width:20%}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-cards .wcf-qty-options .wcf-item-wrap{width:100%}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap.wcf-product-option-before-customer{margin-bottom:0}.wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-selection-wrap{display:inline-block}.wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-decrement{-webkit-border-radius:3px 3px 0 0;border:1px solid #dcdada;border-bottom:0;border-radius:3px 3px 0 0;display:inline-block;height:20px;width:30px;padding:1px 5px}.wcf-embed-checkout-form .woocommerce-checkout .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty .wcf-qty-increment{-webkit-border-radius:0 0 3px 3px;border:1px solid #dcdada;border-top:0;border-radius:0 0 3px 3px;display:inline-block;height:20px;width:30px;padding:1px 5px}.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection{width:30px;min-width:20px;border:1px solid #dcdada;border-top:0;border-bottom:0;border-radius:0;margin-bottom:-2px}.wcf-item-wrap{display:inline-block;width:80%}.wcf-qty-options .wcf-item-selector{display:inline-block;margin-right:0!important;width:15%}#wcf-quick-view-content{padding:0}#wcf-quick-view-content .wcf-woo-product{padding:15px}.wcf-embed-checkout-form-one-column .woocommerce-checkout #your_products_heading{font-size:1em}}.wcf-pre-checkout-offer-wrapper{position:fixed;visibility:hidden;overflow-x:hidden;overflow-y:auto;background:rgba(0,0,0,.8);opacity:0;transition:opacity .25s;z-index:1042}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1{color:#333;font-family:inherit;font-size:1.7em;margin:10px 0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip{color:#555;display:block;font-size:14px;margin:5px auto 0 auto;opacity:.8;width:-moz-fit-content;width:fit-content}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip:hover{opacity:1}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content{background-color:#fff;border:2px #e2e2e2 dashed;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-progress-bar{overflow:hidden;margin-bottom:0}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal{max-width:950px;background-color:#fff;position:relative;border-radius:4px;top:0;transform:translate(0,0);width:100%;min-height:350px;overflow:hidden;font-family:inherit;margin:20px auto;box-shadow:0 0 20px 0 rgba(0,0,0,.1)}.wcf-pre-checkout-screen-size .open #wcf-pre-checkout-offer-modal{top:50%;transform:translate(0,-50%)}.wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav{margin-bottom:30px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress{position:relative;display:table;table-layout:fixed;width:100%}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step{display:table-cell;text-align:center;position:relative;width:100%}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title{margin-bottom:12px;white-space:nowrap;font:inherit;letter-spacing:.6px;font-size:14px;color:#6d6d6d}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title{color:inherit}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::after,.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-step-line::before{background:var(--wcf-primary-color)}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after{right:0}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::after,.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before{height:4px;content:"";background:#e2e2e2;display:block;position:absolute;width:50%;bottom:8px}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step-line::before{left:0}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:first-child .wcf-nav-bar-step-line::before,.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step:last-child .wcf-nav-bar-step-line::after{background:#000;display:none!important}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active+.wcf-nav-bar-step.active .wcf-nav-bar-step-line::after{background:#e2e2e2!important}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step{background:var(--wcf-primary-color)}.wcf-pre-checkout-offer-wrapper .wcf-progress-nav-step{width:20px;height:20px;border-radius:3px;margin:auto;position:relative;background:#e2e2e2;vertical-align:middle;text-align:center;z-index:2;line-height:17px}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-progress-nav-step::before{content:"";margin:0;color:#fff;display:inline-block;font:normal normal 400 13px/20px cartflows-icon;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;border:1px #fff solid;border-radius:1px;width:6px;height:6px;background-color:#fff;line-height:7px}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn{border:1px solid;border-color:#f16334;background:#f16334;border-radius:3px;color:#fff;font-family:inherit;font-weight:600;font-size:16px;line-height:1;margin-top:0;padding:12px 16px;width:100%;outline:0;min-height:48px}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title{margin-bottom:10px;position:relative;text-align:center;left:0;bottom:0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1{color:#333;font-size:1.5em;font-weight:700;margin-top:0;margin-bottom:8px}.wcf-pre-checkout-offer-wrapper .wcf-content-main-head{text-align:center;position:relative;padding:10px;width:100%;margin-bottom:30px}.wcf-pre-checkout-offer-wrapper .wcf-content-main-head .wcf_first_name{color:var(--wcf-primary-color)}.wcf-pre-checkout-offer-wrapper .wcf-lightbox-content{padding:50px}.wcf-pre-checkout-offer-wrapper.open{visibility:visible;opacity:1;text-align:center;width:100%;height:100%;left:0;top:0;padding:30px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price{padding:5px 0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins{background:0 0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-amount.amount,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price ins .woocommerce-Price-amount.amount{display:inline-block;font-weight:600;font-size:17px;margin-bottom:3px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price del .woocommerce-Price-amount.amount{font-weight:400;text-decoration:line-through}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info{display:inline-block;width:49.7%;padding:30px;vertical-align:middle;text-align:center}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details{text-align:left;padding-left:10px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions{padding:0 30px 30px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action{font-size:12px;padding-top:0}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{font-family:inherit}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{color:#555;margin-top:5px}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span{color:#555;font-size:18px;font-weight:500;padding:0 5px}@media only screen and (max-width:768px){.wcf-pre-checkout-offer-wrapper .wcf-lightbox-content{padding:25px 15px}.wcf-pre-checkout-offer-wrapper .wcf-content-main-head,.wcf-pre-checkout-offer-wrapper .wcf-progress-bar-nav{margin-bottom:20px}.wcf-pre-checkout-offer-wrapper.open{overflow:auto}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info{display:block;width:100%;padding:15px 15px 10px 15px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info.wcf-pre-checkout-offer-product-details{text-align:center}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc{text-align:center}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-btn-action{margin-bottom:0}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal{width:100%;top:0}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{font-size:1em}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions{display:inline-block;width:100%}}@media only screen and (max-width:600px){.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow{background:#f16334;height:2px;width:18px;margin:0 10px;position:relative;cursor:pointer;left:auto;vertical-align:middle;text-align:left;top:10px;padding:1px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before{content:"";background:#f16334;position:absolute;height:2px;width:10px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::before{right:-1px;bottom:-3px;transform:rotate(-45deg)}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress .arrow::after{right:-1px;top:-3px;transform:rotate(45deg)}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-price .woocommerce-Price-currencySymbol{float:none;margin-right:6px}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-title{white-space:unset}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step .wcf-nav-bar-step-line{display:none}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-progress{display:block}.wcf-pre-checkout-offer-wrapper .wcf-nav-bar-step.active .wcf-nav-bar-title::before{content:"\e901";color:#f16334;font:normal normal 400 13px/1 cartflows-icon}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-modal{width:100%;top:0}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions{display:block;width:100%;overflow:hidden;margin-bottom:10px}.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-add-cart-btn,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-actions .wcf-pre-checkout-skip-btn{width:100%}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-sub-title span,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-desc span{font-size:1em}.wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content button.wcf-pre-checkout-offer-btn{font-size:15px;margin-top:10px}.wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-offer-product-title h1,.wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-skip{font-size:1.3em;line-height:1.3em}}.wcf-bump-order-grid-wrap{display:flex;width:100%;-js-display:flex;flex-wrap:wrap;margin:20px 0 0;justify-content:space-between}.wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer{width:calc(55% - 40px);float:left}.wcf-ob-column-50{width:calc(50% - 10px)}.wcf-ob-column-100{width:100%}@media only screen and (max-width:768px){.wcf-embed-checkout-form-two-column .wcf-bump-order-grid-wrap.wcf-after-customer{width:100%}.wcf-ob-column-100,.wcf-ob-column-50{width:100%}}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-customer #your_products_heading,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-before-order #your_products_heading{margin-top:0;font-weight:500}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap{width:100%;display:inline-block;margin:0;padding:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]{min-width:18px;width:18px;height:18px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .wcf-qty-row div [type=checkbox]:checked::before{margin:1px 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap{padding:0;margin:20px 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap.wcf-after-customer{margin:20px 0 0 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap{width:100%}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options{padding:0;background-color:var(--wcf-yp-bg-color);border:1px solid var(--wcf-yp-box-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{color:var(--wcf-yp-text-color);padding:1em 1.2em;position:relative;border-bottom:1px solid var(--wcf-yp-box-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-highlight{margin:-1px -15px 0;color:var(--wcf-yp-hl-text-color);border-bottom:1px solid var(--wcf-yp-hl-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-item-wrap{font-size:14px;font-weight:400}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-header .wcf-field-label{font-weight:500;font-size:15px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-item,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-price,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row .wcf-qty{padding:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-yp-skin-classic .wcf-qty-options .wcf-price{font-weight:400}@media only screen and (max-width:768px){.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-grid-wrap{margin:10px 0 0}}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-product-option-wrap .blockUI.blockOverlay{background:#fff!important;opacity:0!important}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .wcf-bump-order-wrap .blockUI.blockOverlay{opacity:1!important;border:1px solid #d6d7db!important;border-radius:4px!important}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap .blockUI.blockOverlay::before{background:url( "../images/order-bump-skeleton.svg" ) left top;width:100%;height:100%;position:absolute;content:"";top:0;left:0;animation:none;z-index:2;margin:0;transform:scale(.92)}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-3 .blockUI.blockOverlay::before,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-bump-order-wrap.wcf-bump-order-style-4 .blockUI.blockOverlay::before{top:-10px}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before{background:0 0}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout .woocommerce .wcf-product-option-wrap .blockUI.blockOverlay::before{background-repeat:no-repeat;top:0;left:0;animation:none;height:100%;width:100%;margin:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap .wcf-qty-options{padding:0}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row{padding:15px;border:1px solid var(--wcf-field-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row{padding:15px;border-bottom:1px solid var(--wcf-field-border-color)}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-yp-skin-classic .wcf-qty-options .wcf-qty-row:last-child{border-bottom:0!important}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-product-option-wrap:not(.wcf-yp-skin-cards) .wcf-qty-options{border:1px solid var(--wcf-ic-section-border-color);background-color:var(--wcf-payment-section-bg-color);border-radius:5px}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row:has(input[type=radio]:checked){border:1px solid var(--wcf-primary-color);background-color:color-mix(in sRGB,var(--wcf-primary-color) 10%,transparent)}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options:has(input[type=radio]:checked) .wcf-highlight{margin-top:0;background-color:#fff;position:relative}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options .wcf-highlight:has(input[type=radio]:checked)::before{content:"";width:100%;position:absolute;height:100%;background-color:color-mix(in sRGB,var(--wcf-primary-color) 10%,transparent);left:0;border-radius:4px}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-bump-order-wrap.wcf-after-customer{margin-bottom:2px}.wcf-embed-checkout-form.wcf-embed-checkout-form-instant-checkout .woocommerce .wcf-instant-checkout-wrapper .wcf-all-bump-order-wrap.wcf-before-checkout{margin-top:0}assets/min-css/flexslider-rtl.min.css000064400000006630147600244370013667 0ustar00.flex-container a:hover,.flex-slider a:hover{outline:0}.flex-control-nav,.flex-direction-nav,.slides,.slides>li{margin:0;padding:0;list-style:none}.flex-pauseplay span{text-transform:capitalize}.flexslider{margin:0;padding:0}.flexslider .slides>li{display:none;-webkit-backface-visibility:hidden}.flexslider .slides img{width:100%;display:block}.flexslider .slides:after{content:"\0020";display:block;clear:both;visibility:hidden;line-height:0;height:0}html[xmlns] .flexslider .slides{display:block}* html .flexslider .slides{height:1%}.no-js .flexslider .slides>li:first-child{display:block}.flexslider{margin:0 0 60px;background:#fff;border:4px solid #fff;position:relative;zoom:1;border-radius:4px;-o-box-shadow:'' 0 1px 4px rgba(0,0,0,.2);box-shadow:'' 0 1px 4px rgba(0,0,0,.2)}.flexslider .slides{zoom:1}.flexslider .slides img{height:auto;-moz-user-select:none}.flex-viewport{max-height:2000px;transition:all 1s ease}.loading .flex-viewport{max-height:300px}@-moz-document url-prefix(){.loading .flex-viewport{max-height:none}}.carousel li{margin-left:5px}.flex-direction-nav a{text-decoration:none;display:block;width:40px;height:60px;margin:0;position:absolute;top:50%;z-index:10;overflow:hidden;opacity:0;cursor:pointer;color:rgba(0,0,0,.8);text-shadow:-1px 1px 0 rgba(255,255,255,.3);transition:all .3s ease-in-out}.flex-direction-nav a:before{font-size:40px;display:inline-block;content:'\f001';color:rgba(0,0,0,.8);text-shadow:-1px 1px 0 rgba(255,255,255,.3)}.flex-direction-nav a.flex-next:before{content:'\f002'}.flex-direction-nav .flex-prev{right:-50px}.flex-direction-nav .flex-next{left:-50px;text-align:left}.flexslider:hover .flex-direction-nav .flex-prev{opacity:.7;right:10px}.flexslider:hover .flex-direction-nav .flex-prev:hover{opacity:1}.flexslider:hover .flex-direction-nav .flex-next{opacity:.7;left:10px}.flexslider:hover .flex-direction-nav .flex-next:hover{opacity:1}.flex-direction-nav .flex-disabled{opacity:0!important;cursor:default;z-index:-1}.flex-pauseplay a{display:block;width:20px;height:20px;position:absolute;bottom:5px;right:10px;opacity:.8;z-index:10;overflow:hidden;cursor:pointer;color:#000}.flex-pauseplay a:before{font-family:flexslider-icon;font-size:20px;display:inline-block;content:'\f004'}.flex-pauseplay a:hover{opacity:1}.flex-pauseplay a.flex-play:before{content:'\f003'}.flex-control-nav{width:100%;position:absolute;bottom:-40px;text-align:center}.flex-control-nav li{margin:0 6px;display:inline-block;zoom:1}.flex-control-paging li a{width:11px;height:11px;display:block;background:#666;background:rgba(0,0,0,.5);cursor:pointer;text-indent:-9999px;-o-box-shadow:inset 0 0 3px rgba(0,0,0,.3);box-shadow:inset 0 0 3px rgba(0,0,0,.3);border-radius:20px}.flex-control-paging li a:hover{background:#333;background:rgba(0,0,0,.7)}.flex-control-paging li a.flex-active{background:#000;background:rgba(0,0,0,.9);cursor:default}.flex-control-thumbs{margin:15px 0 0;position:static;overflow:hidden}.flex-control-thumbs li{width:25%;float:right;width:24%;width:calc(25% - .75em);margin:0;margin-left:1em;margin-bottom:1em}.flex-control-thumbs li:nth-child(4n){margin:0}.flex-control-thumbs img{width:100%;height:auto;display:block;cursor:pointer;-moz-user-select:none;transition:all 1s ease}.flex-control-thumbs img:hover{opacity:1}.flex-control-thumbs .flex-active{opacity:1;cursor:default}@media screen and (max-width:860px){.flex-direction-nav .flex-prev{opacity:1;right:10px}.flex-direction-nav .flex-next{opacity:1;left:10px}}assets/min-css/flexslider.min.css000064400000006627147600244370013076 0ustar00.flex-container a:hover,.flex-slider a:hover{outline:0}.flex-control-nav,.flex-direction-nav,.slides,.slides>li{margin:0;padding:0;list-style:none}.flex-pauseplay span{text-transform:capitalize}.flexslider{margin:0;padding:0}.flexslider .slides>li{display:none;-webkit-backface-visibility:hidden}.flexslider .slides img{width:100%;display:block}.flexslider .slides:after{content:"\0020";display:block;clear:both;visibility:hidden;line-height:0;height:0}html[xmlns] .flexslider .slides{display:block}* html .flexslider .slides{height:1%}.no-js .flexslider .slides>li:first-child{display:block}.flexslider{margin:0 0 60px;background:#fff;border:4px solid #fff;position:relative;zoom:1;border-radius:4px;-o-box-shadow:'' 0 1px 4px rgba(0,0,0,.2);box-shadow:'' 0 1px 4px rgba(0,0,0,.2)}.flexslider .slides{zoom:1}.flexslider .slides img{height:auto;-moz-user-select:none}.flex-viewport{max-height:2000px;transition:all 1s ease}.loading .flex-viewport{max-height:300px}@-moz-document url-prefix(){.loading .flex-viewport{max-height:none}}.carousel li{margin-right:5px}.flex-direction-nav a{text-decoration:none;display:block;width:40px;height:60px;margin:0;position:absolute;top:50%;z-index:10;overflow:hidden;opacity:0;cursor:pointer;color:rgba(0,0,0,.8);text-shadow:1px 1px 0 rgba(255,255,255,.3);transition:all .3s ease-in-out}.flex-direction-nav a:before{font-size:40px;display:inline-block;content:'\f001';color:rgba(0,0,0,.8);text-shadow:1px 1px 0 rgba(255,255,255,.3)}.flex-direction-nav a.flex-next:before{content:'\f002'}.flex-direction-nav .flex-prev{left:-50px}.flex-direction-nav .flex-next{right:-50px;text-align:right}.flexslider:hover .flex-direction-nav .flex-prev{opacity:.7;left:10px}.flexslider:hover .flex-direction-nav .flex-prev:hover{opacity:1}.flexslider:hover .flex-direction-nav .flex-next{opacity:.7;right:10px}.flexslider:hover .flex-direction-nav .flex-next:hover{opacity:1}.flex-direction-nav .flex-disabled{opacity:0!important;cursor:default;z-index:-1}.flex-pauseplay a{display:block;width:20px;height:20px;position:absolute;bottom:5px;left:10px;opacity:.8;z-index:10;overflow:hidden;cursor:pointer;color:#000}.flex-pauseplay a:before{font-family:flexslider-icon;font-size:20px;display:inline-block;content:'\f004'}.flex-pauseplay a:hover{opacity:1}.flex-pauseplay a.flex-play:before{content:'\f003'}.flex-control-nav{width:100%;position:absolute;bottom:-40px;text-align:center}.flex-control-nav li{margin:0 6px;display:inline-block;zoom:1}.flex-control-paging li a{width:11px;height:11px;display:block;background:#666;background:rgba(0,0,0,.5);cursor:pointer;text-indent:-9999px;-o-box-shadow:inset 0 0 3px rgba(0,0,0,.3);box-shadow:inset 0 0 3px rgba(0,0,0,.3);border-radius:20px}.flex-control-paging li a:hover{background:#333;background:rgba(0,0,0,.7)}.flex-control-paging li a.flex-active{background:#000;background:rgba(0,0,0,.9);cursor:default}.flex-control-thumbs{margin:15px 0 0;position:static;overflow:hidden}.flex-control-thumbs li{width:25%;float:left;width:24%;width:calc(25% - .75em);margin:0;margin-right:1em;margin-bottom:1em}.flex-control-thumbs li:nth-child(4n){margin:0}.flex-control-thumbs img{width:100%;height:auto;display:block;cursor:pointer;-moz-user-select:none;transition:all 1s ease}.flex-control-thumbs img:hover{opacity:1}.flex-control-thumbs .flex-active{opacity:1;cursor:default}@media screen and (max-width:860px){.flex-direction-nav .flex-prev{opacity:1;left:10px}.flex-direction-nav .flex-next{opacity:1;right:10px}}assets/min-css/frontend-rtl.min.css000064400000015373147600244370013351 0ustar00.wcf-loader-bg.show{display:block}.wcf-loader-bg{display:none;position:fixed;width:100%;height:100%;right:0;top:0;overflow:hidden;background:rgba(0,0,0,.5);z-index:99999;animation:popup .7s}.wcf-loader-wrap{width:100%;max-width:500px;height:auto;min-height:140px;top:50%;right:50%;position:relative;transform:translate(50%,-50%);overflow:hidden;background:#fff;border-radius:3px;padding:50px}.wcf-order-msg{text-align:center}.wcf-order-msg .wcf-payment-success{color:#28a745}.wcf-order-msg .wcf-payment-failed{color:#dc3545}.wcf-order-msg p{margin:0 0 .7em}.wcf-order-msg .wcf-note{font-size:13px}.wcf-order-msg .wcf-note-no{display:none}p.wcf-process-msg{font-size:1.2em}.wcf-loader,.wcf-loader::after{border-radius:50%;width:8em;height:8em}.wcf-loader{margin:25px auto;font-size:10px;position:relative;text-indent:-9999em;border-top:5px solid #d4d4d4;border-left:5px solid #d4d4d4;border-bottom:5px solid #d4d4d4;border-right:5px solid #f16334;transform:translateZ(0);animation:load8 550ms infinite linear}.wcf-offer-child-order ul.order_details{padding:0}.woocommerce-product-gallery .slides{position:relative;white-space:nowrap;overflow:hidden}.woocommerce-product-gallery .woocommerce-product-gallery__image{width:100%;display:inline-block}.woocommerce-product-gallery .flex-direction-nav a{height:60px}.woocommerce-product-gallery .flex-direction-nav .flex-next,.woocommerce-product-gallery .flex-direction-nav .flex-prev{display:inline-block;font-family:dashicons;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.woocommerce-product-gallery .flex-direction-nav .flex-prev::before{content:"\f341"}.woocommerce-product-gallery .flex-direction-nav .flex-next::before{content:"\f345"}.woocommerce-product-gallery .flex-direction-nav .flex-prev{right:-50px}.woocommerce-product-gallery .flex-direction-nav .flex-next{left:-50px;text-align:left}.woocommerce-product-gallery:hover .flex-direction-nav .flex-prev{opacity:.7;right:10px}.woocommerce-product-gallery:hover .flex-direction-nav .flex-next{opacity:.7;left:10px}.wcf-offer-price{font-size:22px}.wcf-offer-price .del{padding-left:6px;text-decoration:line-through;opacity:.5}.wcf-offer-shipping-fee{display:block;font-size:15px}.wcf-embeded-product-variation-wrap .variations_form .variations{margin:0}.wcf-embeded-product-quantity-wrap .quantity label.screen-reader-text,.wcf-embeded-product-variation-wrap .variations_form .variations td.label{font-weight:600;font-family:inherit;margin-top:10px}.wcf-embeded-product-variation-wrap .variations_form .variations td.label,.wcf-embeded-product-variation-wrap .variations_form .variations td.value{padding:0 0 5px 0;vertical-align:middle}.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap .variations_form .variations select{background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;border-radius:0;box-shadow:inset 0 -1em .7em 0 rgba(0,0,0,.01);color:#a5a5a5;display:inline-block;font-family:inherit;font-weight:inherit;font-size:14px;height:auto;line-height:1.42857143!important;min-height:34px;outline:0;padding:10px 15px;max-width:100%;width:100%;margin-left:0;-webkit-appearance:none}.wcf-embeded-product-quantity-wrap .quantity input[type=number]:focus,.wcf-embeded-product-variation-wrap .variations_form .variations select:focus{background:#fff;transition:.2s}.wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap{float:right;margin-left:40px;vertical-align:middle}.wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .single_variation{overflow:hidden}.wcf-embeded-product-variation-wrap .single_variation_wrap .single_variation .woocommerce-variation-description{display:none}.wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations{text-decoration:none;font-family:inherit;font-weight:500;font-size:10px;float:left;margin-top:10px;color:#a00a00;text-transform:uppercase;letter-spacing:.5px;display:none}.wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations::before{content:"\274C";font-size:8px;margin-left:5px}.wcf-embeded-product-variation-wrap .variations_form .price,.wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .woocommerce-variation-price{margin:0;font-family:inherit;font-weight:400;overflow:hidden;min-height:35px;vertical-align:middle;line-height:2.12}.wcf-embeded-product-variation-wrap .variations .var_not_selected{border:1px solid #e2401c!important}.cartflows-container .single_variation_wrap .woocommerce-variation{display:none!important}.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap table{max-width:250px;max-width:200px}.wcf-embeded-product-variation-wrap table,.wcf-embeded-product-variation-wrap table tbody,.wcf-embeded-product-variation-wrap table tbody tr,.wcf-embeded-product-variation-wrap table tbody tr td,.wcf-embeded-product-variation-wrap table tfoot,.wcf-embeded-product-variation-wrap table tfoot tr,.wcf-embeded-product-variation-wrap table tfoot tr td{width:100%;display:block!important}.wcf-embeded-product-quantity-wrap .quantity{display:block}.wcf-embeded-product-quantity-wrap .quantity .screen-reader-text{clip-path:none;display:inline-block;visibility:visible;opacity:1;position:relative!important;top:0;color:#404040;font-size:15px;min-height:34px;min-height:22px;width:100%;padding-top:0}.wcf-embeded-product-quantity-wrap .quantity label{padding:5px 0;width:100%}.editor-sidebar__panel .wcf-license-restriction-box{font-style:normal;color:#1e1e1e}.wcf-license-restriction-box{padding:0;text-align:center}.wcf-license-restriction-box-icon{width:100px}.wcf-license-restriction-box .wcf-license-restriction-box-title{font-size:16px;font-weight:700;line-height:1.4;margin:20px 0 0 0}.wcf-license-restriction-box .wcf-license-restriction-box-message{font-size:11px;line-height:1.8;margin:5px 0 0 0}.wcf-license-restriction-box .wcf-license-restriction-button{display:inline-block;margin:20px 0 0 0;border:1px dotted transparent;font-weight:500;text-decoration:none;cursor:pointer;background-color:#f16334;padding:8px 16px;color:#fff}@media (min-width:769px){.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap table{max-width:80%}}@media (max-width:768px){.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap table{max-width:100%}}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}@keyframes popup{0%{transform:scale(1.2)}}body[class*=" astra-addon-"] .wcf-offer-product-quantity a#minus_qty,body[class*=" astra-addon-"] .wcf-offer-product-quantity a#plus_qty,body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^=minus_qty],body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^=plus_qty]{display:none!important}assets/min-css/frontend.min.css000064400000015376147600244370012555 0ustar00.wcf-loader-bg.show{display:block}.wcf-loader-bg{display:none;position:fixed;width:100%;height:100%;left:0;top:0;overflow:hidden;background:rgba(0,0,0,.5);z-index:99999;animation:popup .7s}.wcf-loader-wrap{width:100%;max-width:500px;height:auto;min-height:140px;top:50%;left:50%;position:relative;transform:translate(-50%,-50%);overflow:hidden;background:#fff;border-radius:3px;padding:50px}.wcf-order-msg{text-align:center}.wcf-order-msg .wcf-payment-success{color:#28a745}.wcf-order-msg .wcf-payment-failed{color:#dc3545}.wcf-order-msg p{margin:0 0 .7em}.wcf-order-msg .wcf-note{font-size:13px}.wcf-order-msg .wcf-note-no{display:none}p.wcf-process-msg{font-size:1.2em}.wcf-loader,.wcf-loader::after{border-radius:50%;width:8em;height:8em}.wcf-loader{margin:25px auto;font-size:10px;position:relative;text-indent:-9999em;border-top:5px solid #d4d4d4;border-right:5px solid #d4d4d4;border-bottom:5px solid #d4d4d4;border-left:5px solid #f16334;transform:translateZ(0);animation:load8 550ms infinite linear}.wcf-offer-child-order ul.order_details{padding:0}.woocommerce-product-gallery .slides{position:relative;white-space:nowrap;overflow:hidden}.woocommerce-product-gallery .woocommerce-product-gallery__image{width:100%;display:inline-block}.woocommerce-product-gallery .flex-direction-nav a{height:60px}.woocommerce-product-gallery .flex-direction-nav .flex-next,.woocommerce-product-gallery .flex-direction-nav .flex-prev{display:inline-block;font-family:dashicons;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.woocommerce-product-gallery .flex-direction-nav .flex-prev::before{content:"\f341"}.woocommerce-product-gallery .flex-direction-nav .flex-next::before{content:"\f345"}.woocommerce-product-gallery .flex-direction-nav .flex-prev{left:-50px}.woocommerce-product-gallery .flex-direction-nav .flex-next{right:-50px;text-align:right}.woocommerce-product-gallery:hover .flex-direction-nav .flex-prev{opacity:.7;left:10px}.woocommerce-product-gallery:hover .flex-direction-nav .flex-next{opacity:.7;right:10px}.wcf-offer-price{font-size:22px}.wcf-offer-price .del{padding-right:6px;text-decoration:line-through;opacity:.5}.wcf-offer-shipping-fee{display:block;font-size:15px}.wcf-embeded-product-variation-wrap .variations_form .variations{margin:0}.wcf-embeded-product-quantity-wrap .quantity label.screen-reader-text,.wcf-embeded-product-variation-wrap .variations_form .variations td.label{font-weight:600;font-family:inherit;margin-top:10px}.wcf-embeded-product-variation-wrap .variations_form .variations td.label,.wcf-embeded-product-variation-wrap .variations_form .variations td.value{padding:0 0 5px 0;vertical-align:middle}.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap .variations_form .variations select{background-color:#fff;background-image:none;border:1px solid;border-color:#d4d4d4;border-radius:0;box-shadow:inset 0 -1em .7em 0 rgba(0,0,0,.01);color:#a5a5a5;display:inline-block;font-family:inherit;font-weight:inherit;font-size:14px;height:auto;line-height:1.42857143!important;min-height:34px;outline:0;padding:10px 15px;max-width:100%;width:100%;margin-right:0;-webkit-appearance:none}.wcf-embeded-product-quantity-wrap .quantity input[type=number]:focus,.wcf-embeded-product-variation-wrap .variations_form .variations select:focus{background:#fff;transition:.2s}.wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap{float:left;margin-right:40px;vertical-align:middle}.wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .single_variation{overflow:hidden}.wcf-embeded-product-variation-wrap .single_variation_wrap .single_variation .woocommerce-variation-description{display:none}.wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations{text-decoration:none;font-family:inherit;font-weight:500;font-size:10px;float:right;margin-top:10px;color:#a00a00;text-transform:uppercase;letter-spacing:.5px;display:none}.wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations::before{content:"\274C";font-size:8px;margin-right:5px}.wcf-embeded-product-variation-wrap .variations_form .price,.wcf-embeded-product-variation-wrap .variations_form .single_variation_wrap .woocommerce-variation-price{margin:0;font-family:inherit;font-weight:400;overflow:hidden;min-height:35px;vertical-align:middle;line-height:2.12}.wcf-embeded-product-variation-wrap .variations .var_not_selected{border:1px solid #e2401c!important}.cartflows-container .single_variation_wrap .woocommerce-variation{display:none!important}.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap table{max-width:250px;max-width:200px}.wcf-embeded-product-variation-wrap table,.wcf-embeded-product-variation-wrap table tbody,.wcf-embeded-product-variation-wrap table tbody tr,.wcf-embeded-product-variation-wrap table tbody tr td,.wcf-embeded-product-variation-wrap table tfoot,.wcf-embeded-product-variation-wrap table tfoot tr,.wcf-embeded-product-variation-wrap table tfoot tr td{width:100%;display:block!important}.wcf-embeded-product-quantity-wrap .quantity{display:block}.wcf-embeded-product-quantity-wrap .quantity .screen-reader-text{clip-path:none;display:inline-block;visibility:visible;opacity:1;position:relative!important;top:0;color:#404040;font-size:15px;min-height:34px;min-height:22px;width:100%;padding-top:0}.wcf-embeded-product-quantity-wrap .quantity label{padding:5px 0;width:100%}.editor-sidebar__panel .wcf-license-restriction-box{font-style:normal;color:#1e1e1e}.wcf-license-restriction-box{padding:0;text-align:center}.wcf-license-restriction-box-icon{width:100px}.wcf-license-restriction-box .wcf-license-restriction-box-title{font-size:16px;font-weight:700;line-height:1.4;margin:20px 0 0 0}.wcf-license-restriction-box .wcf-license-restriction-box-message{font-size:11px;line-height:1.8;margin:5px 0 0 0}.wcf-license-restriction-box .wcf-license-restriction-button{display:inline-block;margin:20px 0 0 0;border:1px dotted transparent;font-weight:500;text-decoration:none;cursor:pointer;background-color:#f16334;padding:8px 16px;color:#fff}@media (min-width:769px){.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap table{max-width:80%}}@media (max-width:768px){.wcf-embeded-product-quantity-wrap .quantity input[type=number],.wcf-embeded-product-variation-wrap table{max-width:100%}}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes popup{0%{transform:scale(1.2)}}body[class*=" astra-addon-"] .wcf-offer-product-quantity a#minus_qty,body[class*=" astra-addon-"] .wcf-offer-product-quantity a#plus_qty,body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^=minus_qty],body[class*=" astra-addon-"] .wcf-offer-product-quantity label[for^=plus_qty]{display:none!important}assets/min-css/license-popup-rtl.min.css000064400000004051147600244370014304 0ustar00.is-active.cartflows-processing+span{margin-right:5px}.is-active.cartflows-processing{display:inline-block;margin:0;vertical-align:text-top}.cartflows-processing{display:none;-webkit-animation:cssanimation .72s ease infinite;-moz-animation:cssanimation .72s ease infinite;-o-animation:cssanimation .72s ease infinite}#cartflows-license-popup-overlay{background:#000000b3;position:fixed;top:0;left:0;bottom:0;right:0;z-index:100050}#cartflows-license-popup table{border:none!important;box-shadow:none!important}#cartflows-license-popup .inner{transform:translate(50%,-50%);background:#fff;box-sizing:border-box;position:fixed;background-color:#fff;z-index:100059;text-align:right;top:50%;right:50%;box-shadow:0 3px 6px rgba(0,0,0,.3)}#cartflows-license-popup .heading{float:right;font-weight:600;line-height:35px;overflow:hidden;padding:0 20px;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 40px);background:#fcfcfc;font-size:14px;border-bottom:1px solid #e5e5e5}#cartflows-license-popup .contents{clear:both;padding:10px 0 15px 0}#cartflows-license-popup .notice{margin:0 20px 5px 20px}.cartflows-heading{background:#f9f9f9;border-left:1px solid #e1e1e1;padding:13px 15px;width:25%;color:#333;font-weight:700}.cartflows-content{padding:13px 15px;position:relative}.cartflows-row td{border-bottom:1px solid #f0f0f0}.cartflows-license-popup-open-button.inactive{color:#f44336}.cartflows-license-popup-open-button.active{color:#3db634}.cartflows-table-export{width:auto}.cartflows-table-export td,.cartflows-table-export th{border:none!important;box-shadow:none!important;padding:12px 15px}.cartflows-close-popup-button{position:absolute;right:auto;left:3px;width:29px;top:4px;height:29px;border:0;padding:0;background:0 0;cursor:pointer;outline:0;transition:color .1s ease-in-out,background .1s ease-in-out}#cartflows-license-popup td,#cartflows-license-popup th{padding:12px 20px;border:none}#cartflows-license-popup .submit-button-td{text-align:center;padding-top:0}.submit-button-td .description{margin:10px 0 0 0}#cartflows-license-popup .activate-license{padding:10px 20px}assets/min-css/license-popup.min.css000064400000004047147600244370013512 0ustar00.is-active.cartflows-processing+span{margin-left:5px}.is-active.cartflows-processing{display:inline-block;margin:0;vertical-align:text-top}.cartflows-processing{display:none;-webkit-animation:cssanimation .72s ease infinite;-moz-animation:cssanimation .72s ease infinite;-o-animation:cssanimation .72s ease infinite}#cartflows-license-popup-overlay{background:#000000b3;position:fixed;top:0;right:0;bottom:0;left:0;z-index:100050}#cartflows-license-popup table{border:none!important;box-shadow:none!important}#cartflows-license-popup .inner{transform:translate(-50%,-50%);background:#fff;box-sizing:border-box;position:fixed;background-color:#fff;z-index:100059;text-align:left;top:50%;left:50%;box-shadow:0 3px 6px rgba(0,0,0,.3)}#cartflows-license-popup .heading{float:left;font-weight:600;line-height:35px;overflow:hidden;padding:0 20px;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 40px);background:#fcfcfc;font-size:14px;border-bottom:1px solid #e5e5e5}#cartflows-license-popup .contents{clear:both;padding:10px 0 15px 0}#cartflows-license-popup .notice{margin:0 20px 5px 20px}.cartflows-heading{background:#f9f9f9;border-right:1px solid #e1e1e1;padding:13px 15px;width:25%;color:#333;font-weight:700}.cartflows-content{padding:13px 15px;position:relative}.cartflows-row td{border-bottom:1px solid #f0f0f0}.cartflows-license-popup-open-button.inactive{color:#f44336}.cartflows-license-popup-open-button.active{color:#3db634}.cartflows-table-export{width:auto}.cartflows-table-export td,.cartflows-table-export th{border:none!important;box-shadow:none!important;padding:12px 15px}.cartflows-close-popup-button{position:absolute;left:auto;right:3px;width:29px;top:4px;height:29px;border:0;padding:0;background:0 0;cursor:pointer;outline:0;transition:color .1s ease-in-out,background .1s ease-in-out}#cartflows-license-popup td,#cartflows-license-popup th{padding:12px 20px;border:none}#cartflows-license-popup .submit-button-td{text-align:center;padding-top:0}.submit-button-td .description{margin:10px 0 0 0}#cartflows-license-popup .activate-license{padding:10px 20px}assets/min-css/multistep-checkout-rtl.min.css000064400000014607147600244370015362 0ustar00.wcf-multistep-nav-btn-group{-js-display:inline-flex;display:inline-flex;margin:20px 0 20px 0;position:relative;font-size:16px;justify-content:space-between;width:100%}.wcf-multistep-nav-btn-group span{background-color:var(--wcf-btn-bg-color);border:1px solid;border-color:var(--wcf-btn-bg-color);color:var(--wcf-btn-text-color);cursor:pointer;float:right;width:auto;text-align:center;border-radius:4px;font-weight:400;padding:11px 15px}.wcf-multistep-nav-btn-group span:hover{border-color:var(--wcf-btn-bg-hover-color);background-color:var(--wcf-btn-bg-hover-color);color:var(--wcf-btn-hover-text-color)}.wcf-multistep-nav-btn-group a{align-self:center}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-buttons-wrapper{-js-display:flex;display:flex;justify-content:space-between;align-items:center}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-nav-back-btn{display:inline-block;align-self:center;width:50%;font-size:16px}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment #place_order{display:inline-block;padding:11px 15px;width:50%;clear:both;float:none}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-col-2.col-2,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-option-heading,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-step-review-details,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .woocommerce-checkout-payment{display:none}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-multistep-nav-back-btn{visibility:hidden}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-col-1,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-option-heading,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-step-review-details,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .woocommerce-checkout-payment{display:none}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-1,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-2.col-2,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-multistep-nav-btn-group{display:none}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb{width:100%;margin:10px 0 10px 10px}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb{display:inline-block;margin:5px 0 5px 5px}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a{color:var(--wcf-text-color)}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a.wcf-current-step{color:var(--wcf-primary-color)}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb:not(:last-child) ::after{content:"\00bb";height:16px;width:16px;margin-right:10px;color:#000}.wcf-multistep-shipping-table{margin:15px 0 15px 0}.wcf-multistep-shipping-table .woocommerce-shipping-totals.shipping th{display:none}.wcf-multistep-shipping-table table{margin:0}.wcf-multistep-shipping-table ul#shipping_method li{padding:12px;margin:0}.wcf-multistep-shipping-table ul#shipping_method li input{vertical-align:middle;height:18px;width:18px;cursor:pointer;margin:2px 0 0 11px;border:1px solid #d1d5db;border-radius:50%;line-height:0;box-shadow:inset 0 1px 2px rgb(0 0 0 / 10%);transition:50ms border-color ease-in-out;-webkit-appearance:none}.wcf-multistep-shipping-table ul#shipping_method li input:checked::before{background-color:var(--wcf-primary-color);border-radius:50px;content:"\2022";text-indent:-9999px;display:inline-block;font:normal normal 400 15px/1 cartflows-icon;vertical-align:middle;-webkit-font-smoothing:antialiased;margin:5px;width:6px;height:6px}.wcf-multistep-shipping-table ul#shipping_method li label{vertical-align:middle;cursor:pointer}.wcf-multistep-shipping-table ul#shipping_method{border-radius:4px;border:1px solid #d6d7db}.wcf-multistep-shipping-table ul#shipping_method li:not(:last-child){border-bottom:1px solid #d6d7db}.wcf-multistep-shipping-table .wcf-shipping-error-msg{display:block;background-color:#fff5f5;border:solid 1px #f3d5d8;padding:20px;color:#a10000;margin:1rem 0 1rem;font-size:14px;width:100%;border-radius:4px;font-weight:400}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper{border:1px solid #d6d7db;border-radius:4px;padding:0;margin:15px 0 15px 0}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li:not(:last-child){border-bottom:1px solid #d6d7db}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li{-js-display:flex;display:flex;padding:0 .85em}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-details-inner{padding:.85em 0;-js-display:flex;display:flex;flex:1}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-label{flex:0 0 6em;font-weight:400}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-content{color:#404040}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-link{text-align:left;padding:.85em 0;flex:0 0 auto;width:16.66666667%}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details .wcf-review-detail-link .wcf-step-link{color:#b3b3b3;white-space:nowrap;text-decoration:none}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-product-option-wrap.wcf-product-option-after-customer,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-payment .wcf-product-option-wrap.wcf-product-option-after-customer{display:none}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-bump-order-grid-wrap.wcf-after-customer,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-bump-order-grid-wrap.wcf-after-customer{display:none}assets/min-css/multistep-checkout.min.css000064400000014606147600244370014562 0ustar00.wcf-multistep-nav-btn-group{-js-display:inline-flex;display:inline-flex;margin:20px 0 20px 0;position:relative;font-size:16px;justify-content:space-between;width:100%}.wcf-multistep-nav-btn-group span{background-color:var(--wcf-btn-bg-color);border:1px solid;border-color:var(--wcf-btn-bg-color);color:var(--wcf-btn-text-color);cursor:pointer;float:left;width:auto;text-align:center;border-radius:4px;font-weight:400;padding:11px 15px}.wcf-multistep-nav-btn-group span:hover{border-color:var(--wcf-btn-bg-hover-color);background-color:var(--wcf-btn-bg-hover-color);color:var(--wcf-btn-hover-text-color)}.wcf-multistep-nav-btn-group a{align-self:center}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-buttons-wrapper{-js-display:flex;display:flex;justify-content:space-between;align-items:center}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment .wcf-multistep-nav-back-btn{display:inline-block;align-self:center;width:50%;font-size:16px}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep .wcf-customer-info-main-wrapper #payment #place_order{display:inline-block;padding:11px 15px;width:50%;clear:both;float:none}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-col-2.col-2,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-option-heading,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-payment-step-review-details,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .woocommerce-checkout-payment{display:none}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-billing .wcf-multistep-nav-back-btn{visibility:hidden}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-col-1,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-option-heading,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-payment-step-review-details,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .woocommerce-checkout-payment{display:none}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-1,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-col-2.col-2,.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-multistep-nav-btn-group{display:none}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb{width:100%;margin:10px 10px 10px 0}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb{display:inline-block;margin:5px 5px 5px 0}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a{color:var(--wcf-text-color)}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb a.wcf-current-step{color:var(--wcf-primary-color)}.wcf-embed-checkout-form .wcf-multistep-checkout-breadcrumb .wcf-checkout-breadcrumb:not(:last-child) ::after{content:"\00bb";height:16px;width:16px;margin-left:10px;color:#000}.wcf-multistep-shipping-table{margin:15px 0 15px 0}.wcf-multistep-shipping-table .woocommerce-shipping-totals.shipping th{display:none}.wcf-multistep-shipping-table table{margin:0}.wcf-multistep-shipping-table ul#shipping_method li{padding:12px;margin:0}.wcf-multistep-shipping-table ul#shipping_method li input{vertical-align:middle;height:18px;width:18px;cursor:pointer;margin:2px 11px 0 0;border:1px solid #d1d5db;border-radius:50%;line-height:0;box-shadow:inset 0 1px 2px rgb(0 0 0 / 10%);transition:50ms border-color ease-in-out;-webkit-appearance:none}.wcf-multistep-shipping-table ul#shipping_method li input:checked::before{background-color:var(--wcf-primary-color);border-radius:50px;content:"\2022";text-indent:-9999px;display:inline-block;font:normal normal 400 15px/1 cartflows-icon;vertical-align:middle;-webkit-font-smoothing:antialiased;margin:5px;width:6px;height:6px}.wcf-multistep-shipping-table ul#shipping_method li label{vertical-align:middle;cursor:pointer}.wcf-multistep-shipping-table ul#shipping_method{border-radius:4px;border:1px solid #d6d7db}.wcf-multistep-shipping-table ul#shipping_method li:not(:last-child){border-bottom:1px solid #d6d7db}.wcf-multistep-shipping-table .wcf-shipping-error-msg{display:block;background-color:#fff5f5;border:solid 1px #f3d5d8;padding:20px;color:#a10000;margin:1rem 0 1rem;font-size:14px;width:100%;border-radius:4px;font-weight:400}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper{border:1px solid #d6d7db;border-radius:4px;padding:0;margin:15px 0 15px 0}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li:not(:last-child){border-bottom:1px solid #d6d7db}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper li{-js-display:flex;display:flex;padding:0 .85em}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-details-inner{padding:.85em 0;-js-display:flex;display:flex;flex:1}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-label{flex:0 0 6em;font-weight:400}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-content{color:#404040}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details-wrapper .wcf-review-detail-link{text-align:right;padding:.85em 0;flex:0 0 auto;width:16.66666667%}.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep ul.wcf-review-details .wcf-review-detail-link .wcf-step-link{color:#b3b3b3;white-space:nowrap;text-decoration:none}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-product-option-wrap.wcf-product-option-after-customer,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-payment .wcf-product-option-wrap.wcf-product-option-after-customer{display:none}.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-payment .wcf-bump-order-grid-wrap.wcf-after-customer,.wcf-embed-checkout-form.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep.wcf-shipping .wcf-bump-order-grid-wrap.wcf-after-customer{display:none}assets/min-css/optin-styles-divi-rtl.min.css000064400000010206147600244370015123 0ustar00.wcf-clear::after,.wcf-clear::before{content:" ";display:table}.wcf-clear::after{clear:both}.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33{width:33.33%}.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50{width:50%}.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100{width:100%;margin-top:0!important}.et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible{height:0!important;min-height:0!important;width:0!important;margin:0!important}.et_pb_module #wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:26px;min-height:26px;overflow:visible;padding-right:0}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row label:not(.checkbox),.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row label{position:absolute;z-index:999;margin-top:19px;margin-right:15px;transition:all 235ms ease;overflow:hidden;white-space:nowrap}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label{margin-top:8px;font-size:12px}.ast-checkout-labels-as-placeholders .et_pb_module #wcf-optin-form form #customer_details .form-row label{opacity:1;position:relative;padding:0;margin:0 0 8px 0;line-height:1em}.ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row label{position:absolute;margin-top:19px;padding:0 1.02em;opacity:1}.ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row.wcf-anim-label label{margin-top:8px;font-size:12px}.ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox{position:relative;margin:0;padding:0}.wcf-optin-form.wcf-field-floating-labels .select2-container--default .select2-selection--single,.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=email],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=password],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=tel],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=text],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row select,.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row textarea{padding:25px 12px 5px}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label-fix label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label-fix label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label-fix label{position:relative;margin:0}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox{position:relative;margin:0}@media only screen and (max-width:768px){.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100,.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33,.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50{width:100%}}.et_pb_module #wcf-optin-form .wcf-hide-field{-js-display:flex!important;display:flex!important;align-items:center;font-size:13px}.et_pb_module #wcf-optin-form .wcf-hide-field label,.et_pb_module #wcf-optin-form .wcf-hide-field span{display:none!important}.et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20{margin-top:0}assets/min-css/optin-styles-divi.min.css000064400000010204147600244370014322 0ustar00.wcf-clear::after,.wcf-clear::before{content:" ";display:table}.wcf-clear::after{clear:both}.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33{width:33.33%}.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50{width:50%}.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100{width:100%;margin-top:0!important}.et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible{height:0!important;min-height:0!important;width:0!important;margin:0!important}.et_pb_module #wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:26px;min-height:26px;overflow:visible;padding-left:0}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row label:not(.checkbox),.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row label{position:absolute;z-index:999;margin-top:19px;margin-left:15px;transition:all 235ms ease;overflow:hidden;white-space:nowrap}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-additional-fields .form-row.wcf-anim-label label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label label{margin-top:8px;font-size:12px}.ast-checkout-labels-as-placeholders .et_pb_module #wcf-optin-form form #customer_details .form-row label{opacity:1;position:relative;padding:0;margin:0 0 8px 0;line-height:1em}.ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row label{position:absolute;margin-top:19px;padding:0 1.02em;opacity:1}.ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .form-row.wcf-anim-label label{margin-top:8px;font-size:12px}.ast-checkout-labels-as-placeholders .wcf-optin-form.wcf-field-floating-labels form #customer_details .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox{position:relative;margin:0;padding:0}.wcf-optin-form.wcf-field-floating-labels .select2-container--default .select2-selection--single,.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=email],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=password],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=tel],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row input[type=text],.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row select,.wcf-optin-form.wcf-field-floating-labels .woocommerce .form-row textarea{padding:25px 12px 5px}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row.wcf-anim-label-fix label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-billing-fields .form-row.wcf-anim-label-fix label,.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-shipping-fields .form-row.wcf-anim-label-fix label{position:relative;margin:0}.wcf-optin-form.wcf-field-floating-labels .woocommerce .woocommerce-account-fields .form-row label.woocommerce-form__label-for-checkbox{position:relative;margin:0}@media only screen and (max-width:768px){.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-100,.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-33,.et_pb_module #wcf-optin-form .woocommerce form .wcf-column-50{width:100%}}.et_pb_module #wcf-optin-form .wcf-hide-field{-js-display:flex!important;display:flex!important;align-items:center;font-size:13px}.et_pb_module #wcf-optin-form .wcf-hide-field label,.et_pb_module #wcf-optin-form .wcf-hide-field span{display:none!important}.et_pb_module #wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20{margin-top:0}assets/min-css/optin-styles-rtl.min.css000064400000001351147600244370014173 0ustar00.wcf-clear::after,.wcf-clear::before{content:" ";display:table}.wcf-clear::after{clear:both}.wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible{height:0!important;min-height:0!important;width:0!important;margin:0!important}.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:26px;min-height:26px;overflow:visible;padding-right:0}.wcf-optin-form .wcf-hide-field{-js-display:flex!important;display:flex!important;align-items:center;font-size:13px}.wcf-optin-form .wcf-hide-field label,.wcf-optin-form .wcf-hide-field span{display:none!important}.wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20{margin-top:0}assets/min-css/optin-styles.min.css000064400000001350147600244370013373 0ustar00.wcf-clear::after,.wcf-clear::before{content:" ";display:table}.wcf-clear::after{clear:both}.wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row .select2-hidden-accessible{height:0!important;min-height:0!important;width:0!important;margin:0!important}.wcf-optin-form .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:26px;min-height:26px;overflow:visible;padding-left:0}.wcf-optin-form .wcf-hide-field{-js-display:flex!important;display:flex!important;align-items:center;font-size:13px}.wcf-optin-form .wcf-hide-field label,.wcf-optin-form .wcf-hide-field span{display:none!important}.wcf-optin-form .woocommerce .woocommerce-billing-fields .form-row.wcf-hide-field.mt20{margin-top:0}assets/min-js/admin-notice.min.js000064400000000664147600244370012747 0ustar00!function(n){const i={init(){this._bind()},_bind(){n(document).on("click",".cartflows-dismissible-notice .notice-dismiss",i.disable_license_admin_notice)},disable_license_admin_notice(i){i.preventDefault(),n.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_disable_activate_license_notice",security:CartFlowsProAdminNoticeVars._nonce}}).done(function(){}).fail(function(){}).always(function(){})}};n(function(){i.init()})}(jQuery);assets/min-js/analytics.min.js000064400000003433147600244370012364 0ustar00!function(){function w(e,o,t){const n=new Date;n.setTime(n.getTime()+24*t*60*60*1e3);t="expires="+n.toUTCString();document.cookie=e+"="+o+"; "+t+"; path=/"}function _(e){const o=e+"=",t=decodeURIComponent(document.cookie),n=t.split("; ");let r=[];return n.forEach(e=>{0===e.indexOf(o)&&(r=e.substring(o.length))}),r}jQuery(function(){!async function(){if(cartflows&&""!==cartflows.current_step){const c=cartflows.current_flow,i=cartflows.current_step,s=cartflows.flow_cookie+c,a=cartflows.step_cookie+c;let e=_(s);var n=(e=0e.json()).then(e=>{var o;e.success&&(t=_(a),o=e.prev_control_id,t=0o)t.val(o);else{const a=c.data("options"),r=p("._wcf_checkout_id").val();a.input_quantity=e,a.checkout_id=r;o=p("form.checkout").serialize();"undefined"!=typeof data&&(a.cart_item_key=data.cart_item_key),w(),p(".wcf-qty-options").addClass("wcf-loading"),p.ajax({url:cartflows.ajax_url,data:{action:"wcf_quantity_update",option:a,post_data:o,security:cartflows.wcf_quantity_update_nonce},dataType:"json",type:"POST",success(e){e.hasOwnProperty("cartflows_data")&&(c.find(".wcf-display-quantity").html(e.cartflows_data.display_quantity),c.find(".wcf-display-price").html(e.cartflows_data.display_price),c.find(".wcf-display-discount-value").html(e.cartflows_data.display_discount_value),c.find(".wcf-display-discount-percent").html(e.cartflows_data.display_discount_percent),c.find(".wcf_subscription_price").html(e.cartflows_data.subscription_price),c.find(".wcf_subscription_fee").html(e.cartflows_data.sign_up_fee)),_(e),p(".wcf-qty-options").removeClass("wcf-loading"),h()},error(){p(".woocommerce-checkout-review-order-table").unblock()}})}}}),p("form.woocommerce-checkout").on("checkout_place_order",function(e){var t=p(".wcf-select-variation-attribute.wcf-invalid-variation");if(0
    ');p("body").append(e);var t=p("div",e).innerWidth(),c=(e.css("overflow-y","scroll"),p("div",e).innerWidth());return p(e).remove(),t-c},f=(t(),window.addEventListener("resize",function(){d()}),function(){u.off("click","#wcf-quick-view-content .single_add_to_cart_button").off("wcf_added_to_cart").on("click","#wcf-quick-view-content .single_add_to_cart_button",this.onAddToCart).on("wcf_added_to_cart",this.updateButton)});f.prototype.onAddToCart=function(e){e.preventDefault();const t=p(this).closest("form");if(!t[0].checkValidity())return t[0].reportValidity(),!1;const o=p(this),c=t.find('input[name="product_id"]').val()||"",i=t.find('input[name="variation_id"]').val()||"",a=p(".wcf-variation-popup-open"),r=a.closest(".wcf-qty-row"),s=r.find(".wcf-qty-selection"),n=s.val()||1,d=r.data("options"),l=p("._wcf_checkout_id").val(),f=r.find(".wcf-item-wrap");d.input_quantity=n,d.checkout_id=l,o.is(".single_add_to_cart_button")&&(o.removeClass("added"),o.addClass("loading"),""!==i&&jQuery.ajax({url:cartflows.ajax_url,type:"POST",data:{action:"wcf_add_cart_single_product",form_data:t.serialize(),product_id:c,variation_id:i,quantity:n,option:d,security:cartflows.wcf_quick_view_add_cart_nonce},dataType:"json",success(e){if(e.hasOwnProperty("cartflows_data")&&"yes"===e.cartflows_data.added_to_cart){var e=e.cartflows_data,t=(a.closest(".wcf-item").find(".wcf-display-attributes").html(e.display_attr),a.closest(".wcf-item").find(".wcf-item-image").html(e.variation_image),a.attr("data-variation",e.variation_id),d.variation_id=e.variation_id,d.original_price=e.original_price,d.discounted_price=e.discounted_price,d.subscription_price=e.subscription_price,d.sign_up_fee=e.signup_fee,r.attr("data-options",JSON.stringify(d)),r.find(".wcf-item-selector"));if(0=a?p(e.target).addClass("max-quantity-reached"):p(e.target).removeClass("max-quantity-reached")):(p(".wcf-qty-increment").removeClass("max-quantity-reached"),t.val(o<=i?i:o-1)),p(".wcf-qty-selection").trigger("change")}),i();{let o="billing",i="billing";function c(){const e=p(".wcf-multistep-nav-next-btn"),t=p(".wcf-multistep-nav-back-btn");"shipping"===o&&p(".wcf-embed-checkout-form").removeClass("wcf-shipping"),"payment"===o&&p(".wcf-embed-checkout-form").removeClass("wcf-payment"),p(".wcf-embed-checkout-form").addClass("wcf-billing"),cartflows.is_hide_shipping_tab?e.attr("data-target","payment"):e.attr("data-target","shipping"),t.attr("data-target",""),p(".wcf-checkout-breadcrumb.information-step a").addClass("wcf-current-step"),e.text(cartflows.multistep_buttons_strings.billing)}function a(){const e=p(".wcf-multistep-nav-next-btn"),t=p(".wcf-multistep-nav-back-btn");"billing"===o&&p(".wcf-embed-checkout-form").removeClass("wcf-billing"),"payment"===o&&p(".wcf-embed-checkout-form").removeClass("wcf-payment"),p(".wcf-embed-checkout-form").addClass("wcf-shipping"),e.attr("data-target","payment"),t.attr("data-target","billing"),p(".wcf-checkout-breadcrumb.shipping-step a").addClass("wcf-current-step"),s(),e.text(cartflows.multistep_buttons_strings.shipping)}function r(){const e=p(".wcf-multistep-nav-back-btn");"shipping"===o&&p(".wcf-embed-checkout-form").removeClass("wcf-shipping"),"billing"===o&&p(".wcf-embed-checkout-form").removeClass("wcf-billing"),cartflows.is_hide_shipping_tab?e.attr("data-target","billing"):e.attr("data-target","shipping"),p(".wcf-embed-checkout-form").addClass("wcf-payment"),p(".wcf-checkout-breadcrumb.payment-step a").addClass("wcf-current-step"),s()}function s(){p(".wcf-review-detail-content.contact-details").text(p(".wcf-embed-checkout-form form.woocommerce-checkout").find('input[type="email"]').val())}function n(e="wcf-embed-checkout-form",t=1e3){p("html, body").animate({scrollTop:p("#"+e).offset().top},t)}function d(){p(".wcf-current-step").length&&p(".wcf-current-step").removeClass("wcf-current-step")}p(document).on("click",".wcf-multistep-nav-next-btn",function(e){e.preventDefault();const t=p(".wcf-multistep-nav-next-btn"),c=t.attr("data-target");i!==c&&f()&&(d(),o=i,"shipping"===(i=c)?a():"payment"===c&&r(),n())}),p(document).on("click",".wcf-multistep-nav-back-btn",function(e){e.preventDefault();const t=p(".wcf-multistep-nav-back-btn");previous_step_element_target=t.attr("data-target"),i!==previous_step_element_target&&f()&&(d(),o=i,""===(i=previous_step_element_target)?t.css("visibility","hidden"):"shipping"===previous_step_element_target?a():"billing"===previous_step_element_target&&c(),n())}),p(document).on("click",".wcf-checkout-breadcrumb a",function(e){e.preventDefault();e=p(e.target).attr("data-tab");i!==e&&f()&&(o=i,i=e,d(),"billing"===e?c():"shipping"===e?a():"payment"===e&&r(),n())}),p(document).on("click",".wcf-step-link",function(e){e.preventDefault();e=p(e.target).attr("data-target");i!==e&&f()&&(o=i,i=e,d(),"billing"===e?c():"shipping"===e&&a())});const f=function(){let s=!0,n="";var e,t,c;return"billing"===i&&(e=p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields-custom, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-account-fields").find('input[type="text"], input[type="tel"], input[type="email"], input[type="password"]'),t=p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-account-fields").find('input[type="checkbox"]'),c=p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields").find(".select2"),Array.from(e).forEach(function(e){const t=e.type,c=e.name,o=e.closest(".form-row"),i=p.trim(e.value);let a=o.classList.contains("validate-required");var r;"billing_password"===c&&(a=!(!p(".wcf-email-validation-block").hasClass("success")||cartflows?.multistep_buttons_strings?.is_guest_checkout)),"account_password"!==c&&"account_username"!==c||(r=document.getElementById("createaccount"),a=!r||!!p(r).is(":checked")),a&&""===i?(e.classList.add("field-required"),s=!1,""===n&&(n=e)):("email"===t&&!1===/^([a-zA-Z0-9_\+\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,14})$/.test(i)&&(e.classList.add("field-required"),s=!1,""===n&&(n=e)),e.classList.remove("field-required"))}),Array.from(t).forEach(function(e){const t=e.closest(".form-row"),c=t.classList.contains("validate-required");let o=!1;p(e).is(":checked")&&(o=!0),c&&!1===o?(e.classList.add("field-required"),s=!1,""===n&&(n=e)):e.classList.remove("field-required")}),Array.from(c).forEach(function(e){const t=e.closest(".form-row"),c=t.classList.contains("validate-required"),o=p.trim(t.querySelector(".select2-selection__rendered[title]"));name=t.querySelector("select").name,c&&""===o?(e.classList.add("field-required"),s=!1,""===n&&(n=e)):e.classList.remove("field-required")})),"shipping"===i&&(e=p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields").find('input[type="text"], input[type="tel"], input[type="email"], input[type="password"]'),t=p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper").find('input[type="checkbox"]'),c=p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields").find(".select2"),"1"===p(".wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout").find('h3#ship-to-different-address input[type="checkbox"]:checked').val()&&(Array.from(e).forEach(function(e){const t=e.type,c=e.closest(".form-row"),o=c.classList.contains("validate-required"),i=p.trim(e.value);o&&""===i?(e.classList.add("field-required"),s=!1,""===n&&(n=e)):("email"===t&&!1===/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(i)&&(e.classList.add("field-required"),s=!1,""===n&&(n=e)),e.classList.remove("field-required"))}),Array.from(c).forEach(function(e){const t=e.closest(".form-row"),c=t.classList.contains("validate-required"),o=p.trim(t.querySelector(".select2-selection__rendered[title]"));name=t.querySelector("select").name,c&&""===o?(e.classList.add("field-required"),s=!1,""===n&&(n=e)):e.classList.remove("field-required")}),Array.from(t).forEach(function(e){const t=e.closest(".form-row"),c=t.classList.contains("validate-required");let o=!1;p(e).is(":checked")&&(o=!0),c&&!1===o?(e.classList.add("field-required"),s=!1,""===n&&(n=e)):e.classList.remove("field-required")}))),""!==n&&n.focus(),s};return}})}(jQuery);assets/min-js/flexslider.min.js000064400000054251147600244370012542 0ustar00!function(u){var a=!0;u.flexslider=function(p,e){var t,m=u(p),s=(void 0===e.rtl&&"rtl"==u("html").attr("dir")&&(e.rtl=!0),m.vars=u.extend({},u.flexslider.defaults,e),m.vars.namespace),f=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,o=("ontouchstart"in window||f||window.DocumentTouch&&document instanceof DocumentTouch)&&m.vars.touch,r="click touchend MSPointerUp keyup",l="",g="vertical"===m.vars.direction,h=m.vars.reverse,x=0'),1").attr("href","#").text(a),"thumbnails"===m.vars.controlNav&&(e=u("").attr("src",i.attr("data-thumb"))),""!==i.attr("data-thumb-alt")&&e.attr("alt",i.attr("data-thumb-alt")),"thumbnails"!==m.vars.controlNav||!0!==m.vars.thumbCaptions||""!==(i=i.attr("data-thumbcaption"))&&void 0!==i&&(i=u("").addClass(s+"caption").text(i),e.append(i));var i=u("
  5. ");e.appendTo(i),i.append("
  6. "),m.controlNavScaffold.append(i),a++}(m.controlsContainer?u(m.controlsContainer):m).append(m.controlNavScaffold),d.controlNav.set(),d.controlNav.active(),m.controlNavScaffold.delegate("a, img",r,function(e){var t,a;e.preventDefault(),""!==l&&l!==e.type||(t=u(this),a=m.controlNav.index(t),t.hasClass(s+"active")||(m.direction=a>m.currentSlide?"next":"prev",m.flexAnimate(a,m.vars.pauseOnAction))),""===l&&(l=e.type),d.setToClearWatchedEvent()})},setupManual:function(){m.controlNav=m.manualControls,d.controlNav.active(),m.controlNav.bind(r,function(e){var t,a;e.preventDefault(),""!==l&&l!==e.type||(t=u(this),a=m.controlNav.index(t),t.hasClass(s+"active")||(a>m.currentSlide?m.direction="next":m.direction="prev",m.flexAnimate(a,m.vars.pauseOnAction))),""===l&&(l=e.type),d.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===m.vars.controlNav?"img":"a";m.controlNav=u("."+s+"control-nav li "+e,m.controlsContainer||m)},active:function(){m.controlNav.removeClass(s+"active").eq(m.animatingTo).addClass(s+"active")},update:function(e,t){1'+m.count+"")):(1===m.pagingCount?m.controlNavScaffold.find("li"):m.controlNav.eq(t).closest("li")).remove(),d.controlNav.set(),1
  7. '+m.vars.prevText+'
  8. '+m.vars.nextText+"
  9. ");m.customDirectionNav?m.directionNav=m.customDirectionNav:m.controlsContainer?(u(m.controlsContainer).append(e),m.directionNav=u("."+s+"direction-nav li a",m.controlsContainer)):(m.append(e),m.directionNav=u("."+s+"direction-nav li a",m)),d.directionNav.update(),m.directionNav.bind(r,function(e){var t;e.preventDefault(),""!==l&&l!==e.type||(t=u(this).hasClass(s+"next")?m.getTarget("next"):m.getTarget("prev"),m.flexAnimate(t,m.vars.pauseOnAction)),""===l&&(l=e.type),d.setToClearWatchedEvent()})},update:function(){var e=s+"disabled";1===m.pagingCount?m.directionNav.addClass(e).attr("tabindex","-1"):m.vars.animationLoop?m.directionNav.removeClass(e).removeAttr("tabindex"):0===m.animatingTo?m.directionNav.removeClass(e).filter("."+s+"prev").addClass(e).attr("tabindex","-1"):m.animatingTo===m.last?m.directionNav.removeClass(e).filter("."+s+"next").addClass(e).attr("tabindex","-1"):m.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=u('
    ');m.controlsContainer?(m.controlsContainer.append(e),m.pausePlay=u("."+s+"pauseplay a",m.controlsContainer)):(m.append(e),m.pausePlay=u("."+s+"pauseplay a",m)),d.pausePlay.update(m.vars.slideshow?s+"pause":s+"play"),m.pausePlay.bind(r,function(e){e.preventDefault(),""!==l&&l!==e.type||(u(this).hasClass(s+"pause")?(m.manualPause=!0,m.manualPlay=!1,m.pause()):(m.manualPause=!1,m.manualPlay=!0,m.play())),""===l&&(l=e.type),d.setToClearWatchedEvent()})},update:function(e){"play"===e?m.pausePlay.removeClass(s+"pause").addClass(s+"play").html(m.vars.playText):m.pausePlay.removeClass(s+"play").addClass(s+"pause").html(m.vars.pauseText)}},touch:function(){var n,i,r,s,o,l,c,d,u=!1,t=0,a=0,v=0;f?(p.style.msTouchAction="none",p._gesture=new MSGesture,(p._gesture.target=p).addEventListener("MSPointerDown",function(e){e.stopPropagation(),m.animating?e.preventDefault():(m.pause(),p._gesture.addPointer(e.pointerId),v=0,s=g?m.h:m.w,l=Number(new Date),r=x&&h&&m.animatingTo===m.last?0:x&&h?m.limit-(m.itemW+m.vars.itemMargin)*m.move*m.animatingTo:x&&m.currentSlide===m.last?m.limit:x?(m.itemW+m.vars.itemMargin)*m.move*m.currentSlide:h?(m.last-m.currentSlide+m.cloneOffset)*s:(m.currentSlide+m.cloneOffset)*s)},!1),p._slider=m,p.addEventListener("MSGestureChange",function(e){e.stopPropagation();var t,a,n=e.target._slider;n&&(t=-e.translationX,a=-e.translationY,v+=g?a:t,o=(n.vars.rtl?-1:1)*v,u=g?Math.abs(v)s/2)?e.flexAnimate(a,e.vars.pauseOnAction):S||e.flexAnimate(e.currentSlide,e.vars.pauseOnAction,!0)),r=o=i=n=null,v=0)},!1)):(c=function(e){t=e.touches[0].pageX,a=e.touches[0].pageY,o=g?n-a:(m.vars.rtl?-1:1)*(n-t);(!(u=g?Math.abs(o)s/2)?m.flexAnimate(a,m.vars.pauseOnAction):S||m.flexAnimate(m.currentSlide,m.vars.pauseOnAction,!0)),p.removeEventListener("touchend",d,!1),r=o=i=n=null},p.addEventListener("touchstart",function(e){m.animating?e.preventDefault():!window.navigator.msPointerEnabled&&1!==e.touches.length||(m.pause(),s=g?m.h:m.w,l=Number(new Date),t=e.touches[0].pageX,a=e.touches[0].pageY,r=x&&h&&m.animatingTo===m.last?0:x&&h?m.limit-(m.itemW+m.vars.itemMargin)*m.move*m.animatingTo:x&&m.currentSlide===m.last?m.limit:x?(m.itemW+m.vars.itemMargin)*m.move*m.currentSlide:h?(m.last-m.currentSlide+m.cloneOffset)*s:(m.currentSlide+m.cloneOffset)*s,n=g?a:t,i=g?t:a,p.addEventListener("touchmove",c,!1),p.addEventListener("touchend",d,!1))},!1))},resize:function(){!m.animating&&m.is(":visible")&&(x||m.doMath(),S?d.smoothHeight():x?(m.slides.width(m.computedW),m.update(m.pagingCount),m.setProps()):g?(m.viewport.height(m.h),m.setProps(m.h,"setTotal")):(m.vars.smoothHeight&&d.smoothHeight(),m.newSlides.width(m.computedW),m.setProps(m.computedW,"setTotal")))},smoothHeight:function(e){var t;g&&!S||(t=S?m:m.viewport,e?t.animate({height:m.slides.eq(m.animatingTo).innerHeight()},e):t.innerHeight(m.slides.eq(m.animatingTo).innerHeight()))},sync:function(e){var t=u(m.vars.sync).data("flexslider"),a=m.animatingTo;switch(e){case"animate":t.flexAnimate(a,m.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=u(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=d.pauseInvisible.getHiddenProp();e&&(e=e.replace(/[H|h]idden/,"")+"visibilitychange",document.addEventListener(e,function(){d.pauseInvisible.isHidden()?m.startTimeout?clearTimeout(m.startTimeout):m.pause():!m.started&&0m.currentSlide?"next":"prev"),c&&1===m.pagingCount&&(m.direction=m.currentItemm.limit&&1!==m.visible?m.limit:a):0===m.currentSlide&&e===m.count-1&&m.vars.animationLoop&&"next"!==m.direction?h?(m.count+m.cloneOffset)*r:0:m.currentSlide===m.last&&0===e&&m.vars.animationLoop&&"prev"!==m.direction?h?0:(m.count+1)*r:h?(m.count-1-e+m.cloneOffset)*r:(e+m.cloneOffset)*r,m.setProps(t,"",m.vars.animationSpeed),m.transitions?(m.vars.animationLoop&&m.atEnd||(m.animating=!1,m.currentSlide=m.animatingTo),m.container.unbind("webkitTransitionEnd transitionend"),m.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(m.ensureAnimationEnd),m.wrapup(r)}),clearTimeout(m.ensureAnimationEnd),m.ensureAnimationEnd=setTimeout(function(){m.wrapup(r)},m.vars.animationSpeed+100)):m.container.animate(m.args,m.vars.animationSpeed,m.vars.easing,function(){m.wrapup(r)})),m.vars.smoothHeight&&d.smoothHeight(m.vars.animationSpeed)}},m.wrapup=function(e){S||x||(0===m.currentSlide&&m.animatingTo===m.last&&m.vars.animationLoop?m.setProps(e,"jumpEnd"):m.currentSlide===m.last&&0===m.animatingTo&&m.vars.animationLoop&&m.setProps(e,"jumpStart")),m.animating=!1,m.currentSlide=m.animatingTo,m.vars.after(m)},m.animateSlides=function(){!m.animating&&a&&m.flexAnimate(m.getTarget("next"))},m.pause=function(){clearInterval(m.animatedSlides),m.animatedSlides=null,m.playing=!1,m.vars.pausePlay&&d.pausePlay.update("play"),m.syncExists&&d.sync("pause")},m.play=function(){m.playing&&clearInterval(m.animatedSlides),m.animatedSlides=m.animatedSlides||setInterval(m.animateSlides,m.vars.slideshowSpeed),m.started=m.playing=!0,m.vars.pausePlay&&d.pausePlay.update("pause"),m.syncExists&&d.sync("play")},m.stop=function(){m.pause(),m.stopped=!0},m.canAdvance=function(e,t){var a=c?m.pagingCount-1:m.last;return!!t||(c&&m.currentItem===m.count-1&&0===e&&"prev"===m.direction||(!c||0!==m.currentItem||e!==m.pagingCount-1||"next"===m.direction)&&((e!==m.currentSlide||c)&&(!!m.vars.animationLoop||(!m.atEnd||0!==m.currentSlide||e!==a||"next"===m.direction)&&(!m.atEnd||m.currentSlide!==a||0!==e||"next"!==m.direction))))},m.getTarget=function(e){return"next"===(m.direction=e)?m.currentSlide===m.last?0:m.currentSlide+1:0===m.currentSlide?m.last:m.currentSlide-1},m.setProps=function(e,t,a){n=e||(m.itemW+m.vars.itemMargin)*m.move*m.animatingTo;var n,i=function(){if(x)return"setTouch"===t?e:h&&m.animatingTo===m.last?0:h?m.limit-(m.itemW+m.vars.itemMargin)*m.move*m.animatingTo:m.animatingTo===m.last?m.limit:n;switch(t){case"setTotal":return h?(m.count-1-m.currentSlide+m.cloneOffset)*e:(m.currentSlide+m.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return h?e:m.count*e;case"jumpStart":return h?m.count*e:e;default:return e}}()*(m.vars.rtl?1:-1)+"px";m.transitions&&(i=m.isFirefox?g?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)":g?"translate3d(0,"+i+",0)":"translate3d("+(m.vars.rtl?-1:1)*parseInt(i)+"px,0,0)",m.container.css("-"+m.pfx+"-transition-duration",a=void 0!==a?a/1e3+"s":"0s"),m.container.css("transition-duration",a)),m.args[m.prop]=i,!m.transitions&&void 0!==a||m.container.css(m.args),m.container.css("transform",i)},m.setup=function(e){var t,a;S?(m.vars.rtl?m.slides.css({width:"100%",float:"right",marginLeft:"-100%",position:"relative"}):m.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===e&&(o?m.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+m.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(m.currentSlide).css({opacity:1,zIndex:2}):0==m.vars.fadeFirstSlide?m.slides.css({opacity:0,display:"block",zIndex:1}).eq(m.currentSlide).css({zIndex:2}).css({opacity:1}):m.slides.css({opacity:0,display:"block",zIndex:1}).eq(m.currentSlide).css({zIndex:2}).animate({opacity:1},m.vars.animationSpeed,m.vars.easing)),m.vars.smoothHeight&&d.smoothHeight()):("init"===e&&(m.viewport=u('
    ').css({overflow:"hidden",position:"relative"}).appendTo(m).append(m.container),m.cloneCount=0,m.cloneOffset=0,h&&(a=u.makeArray(m.slides).reverse(),m.slides=u(a),m.container.empty().append(m.slides))),m.vars.animationLoop&&!x&&(m.cloneCount=2,m.cloneOffset=1,"init"!==e&&m.container.find(".clone").remove(),m.container.append(d.uniqueID(m.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(d.uniqueID(m.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),m.newSlides=u(m.vars.selector,m),t=h?m.count-1-m.currentSlide+m.cloneOffset:m.currentSlide+m.cloneOffset,g&&!x?(m.container.height(200*(m.count+m.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){m.newSlides.css({display:"block"}),m.doMath(),m.viewport.height(m.h),m.setProps(t*m.h,"init")},"init"===e?100:0)):(m.container.width(200*(m.count+m.cloneCount)+"%"),m.setProps(t*m.computedW,"init"),setTimeout(function(){m.doMath(),m.vars.rtl&&m.isFirefox?m.newSlides.css({width:m.computedW,marginRight:m.computedM,float:"right",display:"block"}):m.newSlides.css({width:m.computedW,marginRight:m.computedM,float:"left",display:"block"}),m.vars.smoothHeight&&d.smoothHeight()},"init"===e?100:0))),x||m.slides.removeClass(s+"active-slide").eq(m.currentSlide).addClass(s+"active-slide"),m.vars.init(m)},m.doMath=function(){var e=m.slides.first(),t=m.vars.itemMargin,a=m.vars.minItems,n=m.vars.maxItems;m.w=(void 0===m.viewport?m:m.viewport).width(),m.isFirefox&&(m.w=m.width()),m.h=e.height(),m.boxPadding=e.outerWidth()-e.width(),x?(m.itemT=m.vars.itemWidth+t,m.itemM=t,m.minW=a?a*m.itemT:m.w,m.maxW=n?n*m.itemT-t:m.w,m.itemW=m.minW>m.w?(m.w-t*(a-1))/a:m.maxWm.w?m.w:m.vars.itemWidth,m.visible=Math.floor(m.w/m.itemW),m.move=0m.w?m.itemW*(m.count-1)+t*(m.count-1):(m.itemW+t)*m.count-m.w-t):(m.itemW=m.w,m.itemM=t,m.pagingCount=m.count,m.last=m.count-1),m.computedW=m.itemW-m.boxPadding,m.computedM=m.itemM},m.update=function(e,t){m.doMath(),x||(em.controlNav.length?d.controlNav.update("add"):("remove"===t&&!x||m.pagingCountm.last&&(--m.currentSlide,--m.animatingTo),d.controlNav.update("remove",m.last))),m.vars.directionNav&&d.directionNav.update()},m.addSlide=function(e,t){e=u(e);m.count+=1,m.last=m.count-1,g&&h?void 0!==t?m.slides.eq(m.count-t).after(e):m.container.prepend(e):void 0!==t?m.slides.eq(t).before(e):m.container.append(e),m.update(t,"add"),m.slides=u(m.vars.selector+":not(.clone)",m),m.setup(),m.vars.added(m)},m.removeSlide=function(e){var t=isNaN(e)?m.slides.index(u(e)):e;--m.count,m.last=m.count-1,(isNaN(e)?u(e,m.slides):g&&h?m.slides.eq(m.last):m.slides.eq(e)).remove(),m.doMath(),m.update(t,"remove"),m.slides=u(m.vars.selector+":not(.clone)",m),m.setup(),m.vars.removed(m)},d.init()},u(window).blur(function(e){a=!1}).focus(function(e){a=!0}),u.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},u.fn.flexslider=function(a){if("object"==typeof(a=void 0===a?{}:a))return this.each(function(){var e=u(this),t=a.selector||".slides > li",t=e.find(t);1===t.length&&!1===a.allowOneSlide||0===t.length?(t.fadeIn(400),a.start&&a.start(e)):void 0===e.data("flexslider")&&new u.flexslider(this,a)});var e=u(this).data("flexslider");switch(a){case"play":e.play();break;case"pause":e.pause();break;case"stop":e.stop();break;case"next":e.flexAnimate(e.getTarget("next"),!0);break;case"prev":case"previous":e.flexAnimate(e.getTarget("prev"),!0);break;default:"number"==typeof a&&e.flexAnimate(a,!0)}}}(jQuery);assets/min-js/frontend.min.js000064400000037735147600244370012230 0ustar00!function(b){function e(){const a=cartflows.default_page_builder;b('a[href*="wcf-up-offer-yes"]').each(function(e){const t=b(this);0===e?"bricks-builder"===a?t.attr("class","wcf-upsell-offer"):t.attr("id","wcf-upsell-offer"):"bricks-builder"===a?t.attr("class","wcf-upsell-offer-"+e):t.attr("id","wcf-upsell-offer-"+e)}),b('a[href*="wcf-down-offer-yes"]').each(function(e){const t=b(this);0===e?"bricks-builder"===a?t.attr("class","wcf-downsell-offer"):t.attr("id","wcf-downsell-offer"):"bricks-builder"===a?t.attr("class","wcf-downsell-offer"):t.attr("id","wcf-downsell-offer-"+e)}),b(document).on("click",'a[href*="wcf-up-offer"], a[href*="wcf-down-offer"]',function(e){e.preventDefault();let t=window.location.search;if((t=t.substring(1))&&t.includes("bricks=run"))return!1;const a=b(this),r=!!a.attr("disabled");if(r)return!1;a.attr("disabled",!0);const o=a.attr("href"),n=cartflows_offer.step_id,c=cartflows_offer.product_id,_=cartflows_offer.order_id,i=cartflows_offer.order_key,s=cartflows.current_flow;let f="yes",d="upsell",l=0,p=0;if(-1!==o.indexOf("wcf-up-offer")&&(d="upsell",f=-1!==o.indexOf("wcf-up-offer-yes")?"yes":"no"),-1!==o.indexOf("wcf-down-offer")&&(d="downsell",f=-1!==o.indexOf("wcf-down-offer-yes")?"yes":"no"),"yes"===f){const u=b(".wcf-offer-product-variation");if(0');_=n!==c?(_=(_=(_+='')+(o+n.toFixed(2)))+'')+(o+c.toFixed(2))+"":(_+='')+(o+n.toFixed(2))+"",_+="",b(".wcf-offer-price").html(_)})):(b(".wcf-variable-price-range").remove(),b(".wcf-offer-price-inner").show()),t()}const o={getUrlParameter(e){const t=decodeURIComponent(window.location.search.substring(1)),a=t.split("&");let r,o;for(o=0;o

    '+e+"

    "),n.find(".text").text("Failed!")}}).fail(function(){}).always(function(){})}}},_deactivate_license(e){e.preventDefault();const t=s(this),a=s(".cartflows-license-popup-open-button"),i=s("#cartflows-license-popup"),n=i.find(".contents");e=i.find(".deactivate_license_nonce").val()||"";i.addClass("validating"),t.find(".text").text("Deactivating.."),n.find(".notice").length&&n.find(".notice").remove(),t.find(".cartflows-processing").addClass("is-active"),s.ajax({url:ajaxurl,type:"POST",data:{action:"cartflows_deactivate_license",security:e}}).done(function(e){i.removeClass("validating"),t.find(".cartflows-processing").removeClass("is-active"),e.success?(a.removeClass("inactive").addClass("active").text("Activate License"),t.find(".text").text("Successfully Deactivated! Reloading.."),i.attr("data-license-key",""),setTimeout(function(){location.reload()},2500)):((e=e.data.message||e.data||e.response||"")&&n.append('

    '+e+"

    "),t.find(".text").text("Failed!"))}).fail(function(){}).always(function(){})},_getUrlParameter(e){const t=decodeURIComponent(window.location.search.substring(1)),a=t.split("&");let i,n;for(n=0;n'):a.replace(/{(.*?)}/,""),n(".wcf-pre-checkout-offer-wrapper .wcf-content-modal-title h1").html(e),n(".wcf_first_name").text(t)}n(".wcf-pre-checkout-offer-wrapper").addClass("open"),n("html").addClass("wcf-pre-checkout-offer-open"),n(".wcf-pre-checkout-offer-action").val(""),setTimeout(function(){s()},100)}}catch(e){if(c.messages){jQuery("form.checkout").prepend('
    '+c.messages+"
    "),jQuery("form.checkout").removeClass("processing").unblock(),jQuery("form.checkout").find(".input-text, select, input:checkbox").trigger("validate").blur();let e=n(".wcf_validation_error");e.length||(e=n(".form.checkout")),n.scroll_to_notices(e)}}}})}},100),!1}),n("body").on("click",".wcf-pre-checkout-offer-btn",function(e){e.preventDefault();e=n("._wcf_checkout_id").val();""!==e&&(n(".wcf-pre-checkout-offer-btn").html(cartflows.add_to_cart_text),n.ajax({url:cartflows.ajax_url,data:{action:"wcf_add_to_cart",product_quantity:1,checkout_id:e,security:cartflows.wcf_pre_checkout_offer_nonce},dataType:"json",type:"POST",success(c){jQuery("form.checkout").off("checkout_place_order.wcf_pre_checkout"),"authorize_net_cim_credit_card"===o?(n("body").trigger("update_checkout",{update_shipping_method:!1}),n(document.body).on("updated_checkout.wcf_pre_checkout",function(e){n(".wcf-pre-checkout-offer-action").val(""),n(".wcf-pre-checkout-offer-btn").html(c.message),n(".wcf-pre-checkout-offer-wrapper").removeClass("open"),n("html").removeClass("wcf-pre-checkout-offer-open"),n("form.checkout").submit(),n(document.body).off("updated_checkout.wcf_pre_checkout")})):(n(".wcf-pre-checkout-offer-action").val(""),n(".wcf-pre-checkout-offer-btn").html(c.message),setTimeout(function(){n(".wcf-pre-checkout-offer-wrapper").removeClass("open"),n("html").removeClass("wcf-pre-checkout-offer-open"),n("form.checkout").submit()},600))}}))}),n("body").on("click",".wcf-pre-checkout-skip",function(){jQuery("form.checkout").off("checkout_place_order.wcf_pre_checkout"),n(".wcf-pre-checkout-offer-action").val(""),n(".wcf-pre-checkout-offer-wrapper").removeClass("open"),n("html").removeClass("wcf-pre-checkout-offer-open"),n("form.checkout").submit()}),n(window).on("resize",function(){s()});const s=function(){n(window).height()elementor_find_element_recursive( $element['elements'] ); if ( $element ) { return $element; } } } return false; } /** * Get the block data. * * @param array $elements elements data. * @param string $slug widget name. */ public function gutenberg_find_block_recursive( $elements, $slug = 'wcfb/checkout-form' ) { foreach ( $elements as $element ) { if ( 'wcfb/checkout-form' === $element['blockName'] ) { return $element; } if ( ! empty( $element['innerBlocks'] ) ) { $element = $this->gutenberg_find_block_recursive( $element['innerBlocks'] ); if ( $element ) { return $element; } } } return false; } /** * Get checkout steps & migrate the pre checkout offer styles. */ public function pre_checkout_offer_style_migration() { wcf()->logger->migration_log( '===============================================================' ); wcf()->logger->migration_log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); $count = 0; $batch_size = 10; // Get checkout steps where order bump is enabled & not migrated to new order bump. $checkout_steps = get_posts( array( 'post_type' => CARTFLOWS_STEP_POST_TYPE, 'post_status' => array( 'publish', 'pending', 'draft', 'private' ), 'numberposts' => $batch_size, 'meta_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query array( 'key' => 'wcf-step-type', 'value' => 'checkout', 'compare' => '===', ), array( 'key' => 'wcf-pre-checkout-offer', 'compare' => '===', 'value' => 'yes', ), array( 'key' => 'wcf-pre-checkout-offer-migrated', 'compare' => 'NOT EXISTS', 'value' => '', ), ), ) ); wcf()->logger->migration_log( 'Checkout pages count: ' . count( $checkout_steps ) ); if ( ! empty( $checkout_steps ) ) { foreach ( $checkout_steps as $index => $checkout ) { $checkout_id = intval( $checkout->ID ); $this->migrate_pre_checkout_offer_styles( $checkout_id ); $count++; } } // If batch size is equal to count means there might be some post remaing to process so schedule the action again. if ( $batch_size === $count ) { if ( function_exists( 'as_enqueue_async_action' ) ) { as_enqueue_async_action( 'cartflows_migrate_pre_checkout_offer_styles' ); wcf()->logger->migration_log( 'New action is scheduled for processing remaining checkout pages.' ); } } else { delete_option( 'wcf_pre_checkout_offer_styles_migrated' ); update_option( 'wcf_pre_checkout_offer_styles_migration_complete_status', 'done' ); update_option( 'cartflows-assets-version', time() ); if ( class_exists( '\Elementor\Plugin' ) ) { \Elementor\Plugin::$instance->files_manager->clear_cache(); } wcf()->logger->migration_log( 'CartFlows pre checkout styles migration is completed.' ); } wcf()->logger->migration_log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->migration_log( '===============================================================' ); } /** * Update pre checkout offer process. * * @param int $checkout_id checkout id. */ public function migrate_pre_checkout_offer_styles( $checkout_id ) { if ( ! empty( $checkout_id ) ) { wcf()->logger->migration_log( 'Checkout ID: ' . $checkout_id ); if ( class_exists( '\Elementor\Plugin' ) && 'builder' === get_post_meta( $checkout_id, '_elementor_edit_mode', true ) ) { wcf()->logger->migration_log( 'Page Builder: Elementor ' ); $elementor_data = \Elementor\Plugin::$instance->documents->get( $checkout_id )->get_elements_data(); if ( is_array( $elementor_data ) && ! empty( $elementor_data ) ) { $element = $this->elementor_find_element_recursive( $elementor_data ); if ( ! empty( $element ) ) { $settings = $element['settings']; $page_builder_data = array( 'wcf-pre-checkout-offer-bg-color' => isset( $settings['pre_checkout_overlay_bg_color'] ) ? $settings['pre_checkout_overlay_bg_color'] : '', 'wcf-pre-checkout-offer-model-bg-color' => isset( $settings['pre_checkout_bg_color'] ) ? $settings['pre_checkout_bg_color'] : '', 'wcf-pre-checkout-offer-title-color' => isset( $settings['pre_checkout_title_color'] ) ? $settings['pre_checkout_title_color'] : '', 'wcf-pre-checkout-offer-subtitle-color' => isset( $settings['pre_checkout_sub_title_color'] ) ? $settings['pre_checkout_sub_title_color'] : '', 'wcf-pre-checkout-offer-desc-color' => isset( $settings['pre_checkout_desc_color'] ) ? $settings['pre_checkout_desc_color'] : '', 'wcf-pre-checkout-offer-navbar-color' => isset( $settings['global_primary_color'] ) ? $settings['global_primary_color'] : '', 'wcf-pre-checkout-offer-button-color' => isset( $settings['global_primary_color'] ) ? $settings['global_primary_color'] : '', ); wcf()->logger->migration_log( 'Data Received.' ); wcf()->logger->migration_log( wcf_print_r( $page_builder_data, true ) ); } } } elseif ( class_exists( 'FLBuilderModel' ) && '1' === get_post_meta( $checkout_id, '_fl_builder_enabled', true ) ) { wcf()->logger->migration_log( 'Page Builder: Beaver Builder ' ); $layout_data = FLBuilderModel::get_layout_data( 'published', $checkout_id ); if ( ! empty( $layout_data ) ) { $css_prefix = '#'; foreach ( $layout_data as $node => $data ) { if ( ! empty( $data->type ) && 'module' === $data->type && ! empty( $data->settings->type ) && 'cartflows-bb-checkout-form' === $data->settings->type ) { $settings = $data->settings; break; } } if ( ! empty( $settings ) ) { $page_builder_data = array( 'wcf-pre-checkout-offer-bg-color' => ! empty( $settings->pre_checkout_overlay_bg_color ) ? $css_prefix . $settings->pre_checkout_overlay_bg_color : '', 'wcf-pre-checkout-offer-model-bg-color' => ! empty( $settings->pre_checkout_bg_color ) ? $css_prefix . $settings->pre_checkout_bg_color : '', 'wcf-pre-checkout-offer-title-color' => ! empty( $settings->pre_checkout_title_color ) ? $css_prefix . $settings->pre_checkout_title_color : '', 'wcf-pre-checkout-offer-subtitle-color' => ! empty( $settings->pre_checkout_sub_title_color ) ? $css_prefix . $settings->pre_checkout_sub_title_color : '', 'wcf-pre-checkout-offer-desc-color' => ! empty( $settings->pre_checkout_desc_color ) ? $css_prefix . $settings->pre_checkout_desc_color : '', 'wcf-pre-checkout-offer-navbar-color' => ! empty( $settings->global_primary_color ) ? $settings->global_primary_color : '', 'wcf-pre-checkout-offer-button-color' => ! empty( $settings->global_primary_color ) ? $settings->global_primary_color : '', ); wcf()->logger->migration_log( 'Data Received.' ); wcf()->logger->migration_log( wcf_print_r( $page_builder_data, true ) ); } } } else { wcf()->logger->migration_log( 'Page Builder: Gutenberg ' ); $current_post = get_post( $checkout_id ); $blocks = parse_blocks( $current_post->post_content ); if ( is_array( $blocks ) && ! empty( $blocks ) ) { $data = $this->gutenberg_find_block_recursive( $blocks ); if ( ! empty( $data ) ) { $settings = $data['attrs']; $page_builder_data = array( 'wcf-pre-checkout-offer-bg-color' => isset( $settings['OverlayBackgroundColor'] ) ? $settings['OverlayBackgroundColor'] : '', 'wcf-pre-checkout-offer-model-bg-color' => isset( $settings['ModalBackgroundColor'] ) ? $settings['ModalBackgroundColor'] : '', 'wcf-pre-checkout-offer-title-color' => isset( $settings['TitleColor'] ) ? $settings['TitleColor'] : '', 'wcf-pre-checkout-offer-subtitle-color' => isset( $settings['SubtitleColor'] ) ? $settings['SubtitleColor'] : '', 'wcf-pre-checkout-offer-desc-color' => isset( $settings['DescriptionColor'] ) ? $settings['DescriptionColor'] : '', 'wcf-pre-checkout-offer-navbar-color' => isset( $settings['globalbgColor'] ) ? $settings['globalbgColor'] : '', 'wcf-pre-checkout-offer-button-color' => isset( $settings['globalbgColor'] ) ? $settings['globalbgColor'] : '', ); wcf()->logger->migration_log( 'Data Received.' ); wcf()->logger->migration_log( wcf_print_r( $page_builder_data, true ) ); } } } // Remove empty, null, undefined values. $page_builder_data = array_filter( $page_builder_data, 'strlen' ); foreach ( $page_builder_data as $key => $value ) { update_post_meta( $checkout_id, $key, $value ); } update_post_meta( $checkout_id, 'wcf-pre-checkout-offer-migrated', 'yes' ); } } } /** * Prepare if class 'Cartflows_Pro_Action_Schedular' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Action_Schedular::get_instance(); classes/class-cartflows-pro-admin-helper.php000064400000020467147600244370015202 0ustar00 esc_html__( 'Upsell ( Woo )', 'cartflows-pro' ), 'downsell' => esc_html__( 'Downsell ( Woo )', 'cartflows-pro' ), 'thankyou' => esc_html__( 'Thankyou ( Woo )', 'cartflows-pro' ), ); $steps = array(); if ( is_array( $flow_steps ) ) { foreach ( $flow_steps as $f_index => $f_data ) { $control_steps[] = intval( $f_data['id'] ); } } $cartflows_steps_args = array( 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'cartflows_step', 'post_status' => 'publish', 'post__not_in' => array( $exclude_id ), /** 'fields' => 'ids', */ ); array_push( $steps, array( 'value' => '', 'label' => 'Default', ) ); foreach ( $optgroup as $optgroup_key => $optgroup_value ) { $cartflows_steps_args['tax_query'] = array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query 'relation' => 'AND', array( 'taxonomy' => 'cartflows_step_type', 'field' => 'slug', 'terms' => $optgroup_key, ), array( 'taxonomy' => 'cartflows_step_flow', 'field' => 'slug', 'terms' => 'flow-' . $flow_id, ), ); $cartflows_steps_query = new WP_Query( $cartflows_steps_args ); $cartflows_steps = $cartflows_steps_query->posts; if ( ! empty( $cartflows_steps ) ) { $steps_found = array(); foreach ( $cartflows_steps as $key => $cf_step ) { if ( ! in_array( $cf_step->ID, $control_steps, true ) ) { continue; } array_push( $steps_found, array( 'value' => $cf_step->ID, 'label' => esc_attr( $cf_step->post_title ), ) ); } array_push( $steps, array( 'isopt' => true, 'title' => $optgroup_value, 'options' => $steps_found, ) ); } } return $steps; } /** * Get product price. * * @param object $product product data. */ public static function get_product_original_price( $product ) { $custom_price = ''; if ( $product->is_type( 'variable' ) ) { $default_attributes = $product->get_default_attributes(); if ( ! empty( $default_attributes ) ) { foreach ( $product->get_children() as $c_in => $variation_id ) { if ( 0 === $c_in ) { $product_id = $variation_id; } $single_variation = new WC_Product_Variation( $variation_id ); if ( $default_attributes == $single_variation->get_attributes() ) { $product_id = $variation_id; break; } } } else { $product_childrens = $product->get_children(); if ( is_array( $product_childrens ) ) { foreach ( $product_childrens as $c_in => $c_id ) { $_child_product = wc_get_product( $c_id ); if ( $_child_product->is_in_stock() && 'publish' === $_child_product->get_status() ) { $product_id = $c_id; break; } } } } if ( ! empty( $product_id ) ) { $product = wc_get_product( $product_id ); } } if ( $product ) { $custom_price = $product->get_price( 'edit' ); } return $custom_price; } /** * Loop through the input and sanitize each of the values. * * @param array $input_settings input settings. * @return array */ public static function sanitize_form_inputs( $input_settings = array() ) { $new_settings = array(); foreach ( $input_settings as $key => $val ) { if ( is_array( $val ) ) { foreach ( $val as $k => $v ) { $new_settings[ $key ][ $k ] = ( isset( $val[ $k ] ) ) ? sanitize_text_field( $v ) : ''; } } else { $new_settings[ $key ] = ( isset( $input_settings[ $key ] ) ) ? sanitize_text_field( $val ) : ''; } } return $new_settings; } /** * Update admin settings. * * @param string $key key. * @param bool $value key. * @param bool $network network. */ public static function update_admin_settings_option( $key, $value, $network = false ) { // Update the site-wide option since we're in the network admin. if ( $network && is_multisite() ) { update_site_option( $key, $value ); } else { update_option( $key, $value ); } } /** * Get productss labels. * * @param array $product_ids values. */ public static function get_products_label( $product_ids ) { $products_label = array(); foreach ( $product_ids as $key => $product_id ) { $product_obj = wc_get_product( $product_id ); if ( $product_obj ) { $product_name = $product_obj->get_name(); $products_label[] = array( 'value' => $product_id, 'label' => $product_name, 'product_name' => $product_name, 'product_desc' => $product_obj->get_short_description(), 'original_price' => self::get_product_original_price( $product_obj ), 'product_image' => get_the_post_thumbnail_url( $product_obj->get_id() ), ); } } return $products_label; } /** * Get coupons labels. * * @param array $coupons_ids id. */ public static function get_coupons_label( $coupons_ids ) { $coupons_label = array(); foreach ( $coupons_ids as $key => $coupon_code ) { $coupon_code = is_array( $coupon_code ) ? $coupon_code[0] : $coupon_code; $coupon_data = new WC_Coupon( $coupon_code ); if ( $coupon_data ) { $coupon_id = $coupon_data->get_id(); $coupons_label[] = array( 'value' => $coupon_code, 'label' => get_the_title( $coupon_id ), ); } } return $coupons_label; } /** * Get labels. * * @param array $payment_gateways values. */ public static function get_payment_methods_label( $payment_gateways ) { $gateway_labels = array(); $selected_payment_method = WC()->payment_gateways->payment_gateways(); foreach ( $payment_gateways as $index => $gateway_key ) { $gateway_labels[] = array( 'value' => $gateway_key, 'label' => $selected_payment_method[ $gateway_key ]->method_title, ); } return $gateway_labels; } /** * Get terms labels. * * @param array $terms values. */ public static function get_products_tag_label( $terms ) { $labels = array(); foreach ( $terms as $index => $term ) { $term_data = get_term_by( 'id', $term, 'product_tag', 'ARRAY_A' ); $labels[] = array( 'value' => $term_data['term_id'], 'label' => $term_data['name'], ); } return $labels; } /** * Get category labels. * * @param array $categories values. */ public static function get_products_cat_label( $categories ) { $labels = array(); foreach ( $categories as $index => $category ) { $category_data = get_term_by( 'id', $category, 'product_cat', 'ARRAY_A' ); $labels[] = array( 'value' => $category_data['term_id'], 'label' => $category_data['name'], ); } return $labels; } /** * Get labels. * * @param array $data_array values. */ public static function get_labels( $data_array ) { $labels = array(); foreach ( $data_array as $key => $data_name ) { $labels[] = array( 'value' => $data_name, 'label' => ucfirst( preg_replace( '/[._-]+/', ' ', $data_name ) ), ); } return $labels; } /** * Get country labels. * * @param array $countries_ids values. */ public static function get_country_label( $countries_ids ) { $country_label = array(); $countries = WC()->countries->get_allowed_countries(); foreach ( $countries_ids as $key => $country ) { $country_label[] = array( 'value' => $country, 'label' => $countries[ $country ], ); } return $country_label; } } /** * Prepare if class 'Cartflows_Pro_Admin' exist. * Kicking this off by calling 'get_instance()' method * Cartflows_Pro_Admin_Helper::get_instance(); */ classes/class-cartflows-pro-admin.php000064400000047277147600244370013735 0ustar00include_refund_order_section(); } add_filter( 'get_user_option_meta-box-order_' . CARTFLOWS_STEP_POST_TYPE, array( $this, 'metabox_order' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'load_notice_script' ) ); add_action( 'wp_ajax_cartflows_migrate_order_bump', array( $this, 'migrate_order_bump' ) ); add_action( 'wp_ajax_cartflows_migrate_pre_checkout_offer_styles', array( $this, 'migrate_pre_checkout_styles' ) ); add_action( 'admin_notices', array( $this, 'migration_conditional_notices' ) ); add_filter( 'install_plugin_overwrite_comparison', array( $this, 'update_override_comparison_html' ), 10, 3 ); add_filter( 'cartflows_admin_exclude_import_meta_keys', array( $this, 'add_meta_keys_to_exclude_from_import' ) ); // Let WooCommerce know, CartFlows Pro is compatible with HPOS. add_action( 'before_woocommerce_init', array( $this, 'declare_woo_hpos_compatibility' ) ); add_action( 'wp_ajax_cartflows_dismiss_flow_analytics_notice', array( $this, 'dismiss_flow_analytics_notice' ) ); add_filter( 'cartflows_step_importer_args', array( $this, 'update_meta_before_import_json' ), 10, 1 ); add_filter( 'cartflows_template_import_meta_data', array( $this, 'update_meta_before_import_template' ), 10, 1 ); } /** * Remove ob product id from meta data. * * @param array $pre_post_data step data. * * @return array */ public function update_meta_before_import_json( $pre_post_data ) { if ( isset( $pre_post_data['meta_input'] ) ) { $step_meta_data = $pre_post_data['meta_input']; if ( isset( $step_meta_data['wcf-order-bumps'] ) && is_array( $step_meta_data['wcf-order-bumps'] ) ) { $order_bumps = $step_meta_data['wcf-order-bumps']; foreach ( $order_bumps as $key => $ob_data ) { if ( isset( $ob_data['product'] ) ) { unset( $order_bumps[ $key ]['product'] ); } } $pre_post_data['meta_input']['wcf-order-bumps'] = $order_bumps; } } return $pre_post_data; } /** * Remove ob product id from meta data. * * @param array $step_meta_data step meta data. * * @return array. */ public function update_meta_before_import_template( $step_meta_data ) { if ( ! empty( $step_meta_data ) && isset( $step_meta_data['wcf-order-bumps'] ) ) { $order_bumps = $step_meta_data['wcf-order-bumps'][0]; $is_serialize = is_serialized( $order_bumps, true ); if ( ! empty( $order_bumps ) ) { if ( $is_serialize ) { $order_bumps = maybe_unserialize( stripslashes( $order_bumps ) ); } elseif ( ! is_array( $order_bumps ) ) { $order_bumps = json_decode( stripslashes( $order_bumps ), true ); } if ( is_array( $order_bumps ) ) { foreach ( $order_bumps as $key => $ob_data ) { if ( isset( $ob_data['product'] ) ) { unset( $order_bumps[ $key ]['product'] ); } } } $step_meta_data['wcf-order-bumps'][0] = $is_serialize && is_array( $order_bumps ) ? maybe_serialize( $order_bumps ) : $order_bumps; } } return $step_meta_data; } /** * Declare the woo HPOS compatibility. */ public function declare_woo_hpos_compatibility() { if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', CARTFLOWS_PRO_FILE, true ); } } /** * Exclude meta keys for pro. * * @param array $meta_keys meta keys. */ public function add_meta_keys_to_exclude_from_import( $meta_keys ) { $pro_meta_keys = array( 'wcf-ab-test', 'wcf-yes-next-step', 'wcf-no-next-step', 'wcf-offer-product', 'wcf-order-bump-product', 'wcf-pre-checkout-offer-product', 'wcf-product-options-data', 'wcf-yes-next-step', 'wcf-no-next-step', 'wcf-checkout-rules', ); $meta_keys = array_merge( $meta_keys, $pro_meta_keys ); return $meta_keys; } /** * Show notice before downgrading to lower plan. * * @param string $table_html table html. * @param array $current_plugin current plugin data. * @param array $new_plugin new plugin data. * * @since x.x.x */ public function update_override_comparison_html( $table_html, $current_plugin, $new_plugin ) { if ( isset( $current_plugin['Name'] ) ) { if ( $current_plugin['Name'] === $new_plugin['Name'] ) { return $table_html; } if ( 'CartFlows Pro' === $current_plugin['Name'] ) { $table_html .= sprintf( /* translators: %1$s: HTML, %2$s: HTML */ __( '%1$sYou are installing the lower plan of the CartFlows compared to what currently you have, it will disable some pro features that you might be using. %2$s', 'cartflows-pro' ), '', '' ); } elseif ( 'CartFlows Plus' === $current_plugin['Name'] && 'CartFlows Starter' === $new_plugin['Name'] ) { $table_html .= sprintf( /* translators: %1$s: HTML, %2$s: HTML */ __( '%1$sYou are installing the lower plan of the CartFlows compared to what currently you have, it will disable some plus features that you might be using. %2$s', 'cartflows-pro' ), '', '' ); } } return $table_html; } /** * Show migration in process notice. * * @since 1.7.0 */ public function order_bump_migration_processing_notice() { $action_schedular_page_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=cartflows' ); ?> is_woo_active ) { return; } if ( ! $this->allowed_screen_for_notices() ) { return; } if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } if ( 'no' === get_option( 'wcf_order_bump_migrated', false ) ) { $this->migrate_order_bump_notice(); } elseif ( 'processing' === get_option( 'wcf_order_bump_migrated', false ) ) { $this->order_bump_migration_processing_notice(); } elseif ( 'done' === get_option( 'wcf_migration_complete_status', false ) ) { $this->migration_complete_notice(); } if ( 'no' === get_option( 'wcf_pre_checkout_offer_styles_migrated', false ) ) { $this->migrate_pre_checkout_styles_notice(); } elseif ( 'processing' === get_option( 'wcf_pre_checkout_offer_styles_migrated', false ) ) { $this->pre_checkout_offer_style_migration_processing_notice(); } elseif ( 'done' === get_option( 'wcf_pre_checkout_offer_styles_migration_complete_status', false ) ) { $this->pre_checkout_offer_migration_complete_notice(); } } /** * Show migration complete notice. * * @since 1.7.0 */ public function migration_complete_notice() { ?>
    logger->migration_log( 'Initiating Order Bump migration process.' ); $response_data = array( 'success' => false, 'messsage' => __( 'Cannot schedule a migration. Action scheduler function not found.', 'cartflows-pro' ), ); if ( function_exists( 'as_enqueue_async_action' ) ) { as_enqueue_async_action( 'cartflows_migrate_order_bumps' ); update_option( 'wcf_order_bump_migrated', 'processing' ); $response_data = array( 'success' => true, 'messsage' => __( 'Order Bump 1st migration action scheduled successfully.', 'cartflows-pro' ), ); } wcf()->logger->migration_log( $response_data['messsage'] ); wp_send_json_success( $response_data ); } /** * New UI notice. * * @since 1.7.0 */ public function load_notice_script() { if ( ! $this->allowed_screen_for_notices() || ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } // Loading Script file. wp_enqueue_script( 'cartflows-pro-notice', CARTFLOWS_PRO_URL . 'admin/assets/js/notices.js', array( 'jquery' ), CARTFLOWS_PRO_VER, false ); $action_schedular_page_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=cartflows' ); $vars = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'ob_migration_nonce' => wp_create_nonce( 'cartflows-migrate-order-bump' ), 'pre_checkout_offer_migration_nonce' => wp_create_nonce( 'cartflows-migrate-pre-checkout-offer-styles' ), /* translators: %1$1s: link html start, %2$12: link html end*/ 'ob_notice_text' => sprintf( __( 'CartFlows is migrating the old order bump to the new one in the background. The migration process may take a little while, so please be patient. %1$1s View Progress >> %2$2s', 'cartflows-pro' ), '', '' ), /* translators: %1$1s: link html start, %2$12: link html end*/ 'pre_checkout_offer_migration_notice' => sprintf( __( 'CartFlows is migrating the pre checkout offer styles in the background. The migration process may take a little while, so please be patient. %1$1s View Progress >> %2$2s', 'cartflows-pro' ), '', '' ), 'flow_analytics_dismiss_notice_nonce' => wp_create_nonce( 'cartflows-dismiss-flow-analytics-notice' ), ); wp_localize_script( 'cartflows-pro-notice', 'CartFlows_Pro_Common_Vars', $vars ); } /** * Migrate Order Bump notice. * * @since 1.7.0 */ public function migrate_order_bump_notice() { ?>
    logger->migration_log( 'Initiating pre checkout offer migration process.' ); $response_data = array( 'success' => false, 'messsage' => __( 'Cannot schedule a migration. Action scheduler function not found.', 'cartflows-pro' ), ); if ( function_exists( 'as_enqueue_async_action' ) ) { as_enqueue_async_action( 'cartflows_migrate_pre_checkout_offer_styles' ); update_option( 'wcf_pre_checkout_offer_styles_migrated', 'processing' ); $response_data = array( 'success' => true, 'messsage' => __( '1st migration action scheduled successfully.', 'cartflows-pro' ), ); } wcf()->logger->migration_log( $response_data['messsage'] ); wp_send_json_success( $response_data ); } /** * Check allowed screen for notices. * * @since 1.7.0 * @return bool */ public function allowed_screen_for_notices() { $screen = get_current_screen(); $screen_id = $screen ? $screen->id : ''; $allowed_screens = array( 'toplevel_page_cartflows', 'dashboard', 'plugins', ); if ( in_array( $screen_id, $allowed_screens, true ) ) { return true; } return false; } /** * Metabox fixed orders. * * @param array $pro_metabox_order Metabox orders. * @return array */ public function metabox_order( $pro_metabox_order ) { if ( isset( $pro_metabox_order['side'] ) ) { $pro_metabox_order['side'] = str_replace( array( 'wcf-offer-settings', ), '', $pro_metabox_order['side'] ); } return $pro_metabox_order; } /** * License arguments for Rest API Request. * * @param array $defaults License arguments. * @return array License arguments. */ public function licence_args( $defaults ) { if ( ! class_exists( 'CartFlows_Pro_Licence' ) ) { return $defaults; } // Get license class instance. $cartflows_license_instance = cartflows_pro_license_instance(); $data = get_option( 'wc_am_client_' . $cartflows_license_instance->product_id . '_api_key', array() ); $licence_key = isset( $data['api_key'] ) ? esc_attr( $data['api_key'] ) : ''; $args = array( 'request' => 'status', 'product_id' => CARTFLOWS_PRO_PRODUCT_ID, 'instance' => $cartflows_license_instance->wc_am_instance_id, 'object' => $cartflows_license_instance->wc_am_domain, 'licence_key' => $licence_key, ); return apply_filters( 'cartflows_pro_licence_args', wp_parse_args( $args, $defaults ) ); } /** * Set default options for settings. * * @param array $settings settings data. * @since 1.0.0 */ public function set_default_settings( $settings ) { $settings['paypal_reference_transactions'] = 'disable'; $settings['pre_checkout_offer'] = 'disable'; return $settings; } /** * Hide order meta-data from order list backend. * * @param array $arr order meta data. * @return array * @since 1.0.0 */ public function custom_woocommerce_hidden_order_itemmeta( $arr ) { $arr[] = '_cartflows_step_id'; return $arr; } /** * Changing a meta title * * @param string $key The meta key. * @param WC_Meta_Data $meta The meta object. * @param WC_Order_Item $item The order item object. * @return string The title. */ public function change_order_item_meta_title( $key, $meta, $item ) { if ( '_cartflows_upsell' === $meta->key ) { $key = __( 'Upsell Offer', 'cartflows-pro' ); } elseif ( '_cartflows_downsell' === $meta->key ) { $key = __( 'Downsell Offer', 'cartflows-pro' ); } return $key; } /** * Admin body classes. * * Body classes to be added to tag in admin page * * @param String $classes body classes returned from the filter. * @return String body classes to be added to tag in admin page */ public static function add_admin_pro_body_class( $classes ) { $classes .= ' cartflows-pro-' . CARTFLOWS_PRO_VER; return $classes; } /** * Google analytics settings. * * @param array $google_analytics_settings_data settings. * * @return array $google_analytics_settings_data Modified settings. */ public function add_google_analytics_pro_events( $google_analytics_settings_data ) { $google_analytics_settings_data['enable_bump_order_add_to_cart'] = 'disable'; return $google_analytics_settings_data; } /** * Offer refund. */ public function include_refund_order_section() { /* Refund */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-refund.php'; } } /** * Prepare if class 'Cartflows_Pro_Admin' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Admin::get_instance(); classes/class-cartflows-pro-default-meta.php000064400000017513147600244370015203 0ustar00 'yes', 'sanitize' => 'FILTER_SANITIZE_STRING', ); return $flow_meta; } /** * Get checkout editor meta data. * * @param string $meta_value defaulkt meta value. * @param integer $post_id post id. * @param string $key meta key. * @param string $filter_type filter type. * @param string $action action name to verify nonce. * @return array */ public function fetch_meta_value( $meta_value, $post_id, $key, $filter_type, $action ) { if ( ! check_ajax_referer( $action, 'security', false ) ) { $response_data = array( 'message' => __( 'Nonce validation failed.', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } switch ( $filter_type ) { case 'FILTER_CARTFLOWS_PRO_CHECKOUT_PRODUCT_OPTIONS': if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { $product_opt_data = wc_clean( $_POST[ $key ] ); foreach ( $product_opt_data as $unique_id => $po_data ) { if ( is_array( $po_data ) ) { $meta_value[ $unique_id ] = array_map( 'sanitize_text_field', $po_data ); } else { $po_data = array(); $meta_value[ $unique_id ] = $po_data; } } } break; case 'FILTER_SANITIZE_NUMBER_FLOAT': $meta_value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ); break; case 'FILTER_CARTFLOWS_PRO_CHECKOUT_RULES': $sanitized_data = array(); if ( isset( $_POST[ $key ] ) && is_array( $_POST[ $key ] ) ) { $dynamic_rules = wc_clean( $_POST[ $key ] ); foreach ( $dynamic_rules as $group_index => $group_data ) { if ( is_array( $group_data ) && is_array( $group_data['rules'] ) ) { $rules = $this->sanitize_rules( $group_data['rules'] ); $sanitized_data[ $group_index ]['group_id'] = sanitize_text_field( $group_data['group_id'] ); $sanitized_data[ $group_index ]['step_id'] = sanitize_text_field( $group_data['step_id'] ); $sanitized_data[ $group_index ]['rules'] = $rules; } } $meta_value = $sanitized_data; } break; } return $meta_value; } /** * Sanitize rules. * * @param array $rules rules. */ public function sanitize_rules( $rules ) { $sanitized_rules = array(); foreach ( $rules as $index => $rule_data ) { /** * The reason for changing this condition to allow the zero values to be passed. * Use-case: If the condition is set to cart_total === 0 then that rule was not getting saved in the database and rule was not getting created. */ if ( '' !== $rule_data['value'] ) { $sanitized_rules[] = $this->sanitize_rule_data( $rule_data ); } } return $sanitized_rules; } /** * Sanitize rule data. * * @param array $rule_data rule data. */ public static function sanitize_rule_data( $rule_data ) { $sanitized_input = ''; if ( is_array( $rule_data ) ) { $sanitized_input = array(); foreach ( $rule_data as $key => $value ) { $sanitized_key = sanitize_text_field( $key ); $sanitized_input[ $sanitized_key ] = self::sanitize_rule_data( $value ); } } else { $sanitized_input = sanitize_text_field( $rule_data ); } return $sanitized_input; } /** * Offer Default fields. * * @param int $post_id post id. * @return array */ public function get_offer_fields( $post_id ) { if ( null === self::$offer_fields ) { self::$offer_fields = array( 'wcf-offer-product' => array( 'default' => array(), 'sanitize' => 'FILTER_CARTFLOWS_ARRAY', ), 'wcf-offer-quantity' => array( 'default' => 1, 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'wcf-offer-discount' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-offer-discount-value' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_FLOAT', ), 'wcf-offer-flat-shipping-value' => array( 'default' => 0, 'sanitize' => 'FILTER_SANITIZE_NUMBER_FLOAT', ), 'wcf-enable-offer-product-variation' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-offer-product-variation-options' => array( 'default' => 'inline', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-enable-offer-product-quantity' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-custom-script' => array( 'default' => '', 'sanitize' => 'FILTER_SCRIPT', ), 'wcf-offer-accept-script' => array( 'default' => '', 'sanitize' => 'FILTER_SCRIPT', ), 'wcf-offer-reject-script' => array( 'default' => '', 'sanitize' => 'FILTER_SCRIPT', ), 'wcf-no-next-step' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'wcf-yes-next-step' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'wcf-replace-main-order' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-step-note' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-skip-offer' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-offer-order-process-text' => array( 'default' => __( 'Processing Order...', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-offer-order-success-text' => array( 'default' => __( 'Product Added Successfully.', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-offer-order-failure-text' => array( 'default' => __( 'Oooops! Your Payment Failed.', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'wcf-offer-order-success-note' => array( 'default' => __( 'Please wait while we process your payment...', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ), ); } return apply_filters( 'cartflows_offer_meta_options', self::$offer_fields ); } /** * Get checkout meta. * * @param int $post_id post id. * @param string $key options key. * @param mix $default options default value. * @return string */ public function get_offers_meta_value( $post_id, $key, $default = false ) { $value = wcf()->options->get_save_meta( $post_id, $key ); if ( ! $value ) { if ( $default ) { $value = $default; } else { $fields = $this->get_offer_fields( $post_id ); if ( isset( $fields[ $key ]['default'] ) ) { $value = $fields[ $key ]['default']; } } } return $value; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Default_Meta::get_instance(); classes/class-cartflows-pro-flow-frontend.php000064400000033040147600244370015410 0ustar00options->get_offers_meta_value( $post->ID, 'wcf-offer-order-process-text' ); $offer_success_note = wcf_pro()->options->get_offers_meta_value( $post->ID, 'wcf-offer-order-success-note' ); // @codingStandardsIgnoreStart ?>

    get_flow_id(); $flow_steps = $wcf_step_obj->get_flow_steps(); $control_step = $wcf_step_obj->get_control_step(); $link = '#'; $next_step_id = false; $order_id = $data['order_id']; $order_key = $data['order_key']; $template_type = isset( $data['template_type'] ) ? $data['template_type'] : ''; $session_key = wcf_pro()->session->get_session_key( $flow_id ); if ( ! $flow_id ) { return $link; } if ( 'upsell' === $template_type ) { if ( 'offer_accepted' === $data['action'] ) { $next_step_id = $this->get_next_step_id_for_upsell_accepted( $wcf_step_obj, $flow_steps, $step_id, $control_step ); } else { $next_step_id = $this->get_next_step_id_for_upsell_rejected( $wcf_step_obj, $flow_steps, $step_id, $control_step ); } } elseif ( 'downsell' === $template_type ) { if ( 'offer_accepted' === $data['action'] ) { $next_step_id = $this->get_next_step_id_for_downsell_accepted( $wcf_step_obj, $flow_steps, $step_id, $control_step ); } else { $next_step_id = $this->get_next_step_id_for_downsell_rejected( $wcf_step_obj, $flow_steps, $step_id, $control_step ); } } else { /* This is normal next step of flow */ $next_step_id = $wcf_step_obj->get_next_step_id(); } $order = wc_get_order( $order_id ); if ( $order ) { $next_step_id = Cartflows_Pro_Base_Offer_Markup::get_instance()->maybe_skip_offer( $next_step_id, $order ); } if ( $next_step_id ) { $this->may_be_complete_order( $next_step_id, $order_id ); $query_args = array( 'wcf-order' => $order_id, 'wcf-key' => $order_key, ); if ( $session_key ) { $query_args['wcf-sk'] = $session_key; } // Add extra query strings of URL to the next step URL, if exists. $query_args = wcf_pro()->utils->may_be_append_query_string( $query_args ); $link = add_query_arg( $query_args, get_permalink( $next_step_id ) ); } return $link; } /** * Normalize status if template is of type thank you page. * * @since 1.0.0 * @param int $next_step_id next step ID. * @param int $order_id order id. * * @return void */ public function may_be_complete_order( $next_step_id, $order_id ) { wcf()->logger->log( 'Entering: ' . __CLASS__ . '::' . __FUNCTION__ ); $template_type = get_post_meta( $next_step_id, 'wcf-step-type', true ); if ( 'thankyou' === $template_type ) { $order = wc_get_order( $order_id ); wcf_pro()->order->may_be_normalize_status( $order ); } } /** * Get next step id for upsell. * * @since 1.0.0 * @param object $wcf_step_obj step object. * @param array $steps flow steps. * @param int $step_id step ID. * @param int $control_step control step ID. * * @return int */ public function get_next_step_id_for_upsell_accepted( $wcf_step_obj, $steps, $step_id, $control_step ) { $next_step_id = false; $next_step_index = false; if ( empty( $steps ) ) { return $next_step_id; } else { $next_yes_step = get_post_meta( $step_id, 'wcf-yes-next-step', true ); if ( ! empty( $next_yes_step ) ) { $next_step_id = $next_yes_step; } else { foreach ( $steps as $i => $step ) { if ( intval( $step['id'] ) === $control_step ) { $next_step_index = $i + 1; break; } } while ( $next_step_index && isset( $steps[ $next_step_index ] ) ) { $temp_next_step_id = $steps[ $next_step_index ]['id']; $temp_next_step_template = get_post_meta( $temp_next_step_id, 'wcf-step-type', true ); if ( 'downsell' === $temp_next_step_template ) { $next_step_index++; } else { $next_step_id = $temp_next_step_id; break; } } } } return $next_step_id; } /** * Get next step id for upsell rejected. * * @since 1.0.0 * @param object $wcf_step_obj step object. * @param array $steps flow steps. * @param int $step_id step ID. * @param int $control_step control step ID. * * @return int */ public function get_next_step_id_for_upsell_rejected( $wcf_step_obj, $steps, $step_id, $control_step ) { $next_step_id = false; if ( empty( $steps ) ) { return $next_step_id; } else { $next_no_step = get_post_meta( $step_id, 'wcf-no-next-step', true ); if ( ! empty( $next_no_step ) ) { $next_step_id = $next_no_step; } else { $next_step_id = $wcf_step_obj->get_next_step_id(); } } return $next_step_id; } /** * Get next step id for downsell accepted. * * @since 1.0.0 * @param object $wcf_step_obj step object. * @param array $steps flow steps. * @param int $step_id step ID. * @param int $control_step control step ID. * * @return int */ public function get_next_step_id_for_downsell_accepted( $wcf_step_obj, $steps, $step_id, $control_step ) { $next_step_id = false; if ( empty( $steps ) ) { return $next_step_id; } else { $next_yes_step = get_post_meta( $step_id, 'wcf-yes-next-step', true ); if ( ! empty( $next_yes_step ) ) { $next_step_id = $next_yes_step; } else { $next_step_id = $wcf_step_obj->get_next_step_id(); } } return $next_step_id; } /** * Get next step id for downsell rejected. * * @since 1.0.0 * @param object $wcf_step_obj step object. * @param array $steps flow steps. * @param int $step_id step ID. * @param int $control_step control step ID. * * @return int */ public function get_next_step_id_for_downsell_rejected( $wcf_step_obj, $steps, $step_id, $control_step ) { $next_step_id = false; if ( empty( $steps ) ) { return $next_step_id; } else { $next_no_step = get_post_meta( $step_id, 'wcf-no-next-step', true ); if ( ! empty( $next_no_step ) ) { $next_step_id = $next_no_step; } else { $next_step_id = $wcf_step_obj->get_next_step_id(); } } return $next_step_id; } /** * Get thank you page URL. * * @since 1.0.0 * @param int $step_id step ID. * @param array $data order data. * * @return string */ public function get_thankyou_page_url( $step_id, $data ) { $wcf_step_obj = wcf_pro_get_step( $step_id ); $step_id = intval( $step_id ); $flow_id = $wcf_step_obj->get_flow_id(); $link = '#'; $order_id = $data['order_id']; $order_key = $data['order_key']; if ( ! $flow_id ) { return $link; } $thankyou_id = $wcf_step_obj->get_thankyou_page_id(); if ( $thankyou_id ) { $this->may_be_complete_order( $thankyou_id, $order_id ); $link = add_query_arg( array( 'wcf-order' => $order_id, 'wcf-key' => $order_key, ), get_permalink( $thankyou_id ) ); } return $link; } /** * Check if upsell exists. * * @since 1.0.0 * @param object $order order data. * @param int $flow_id Flow Id. * @param int $step_id Step Id. * * @return bool */ public function check_if_next_step_is_offer( $order, $flow_id = 0, $step_id = 0 ) { $offer_step_exist = false; if ( $order ) { $step_id = wcf()->utils->get_checkout_id_from_order( $order ); } if ( ! $flow_id ) { $flow_id = wcf()->utils->get_flow_id_from_order( $order ); } $is_offer_exist_in_flow = $this->is_upsell_exist_in_flow( $flow_id, $step_id ); if ( ! $is_offer_exist_in_flow ) { return $offer_step_exist; } $wcf_step_obj = wcf_pro_get_step( $step_id ); $next_step_id = $wcf_step_obj->get_next_step_id(); // Check if is next step upsell. $is_dynamic_rules = wcf()->options->get_checkout_meta_value( $step_id, 'wcf-checkout-rules-option' ); if ( 'no' === $is_dynamic_rules ) { $wcf_next_step_obj = wcf_pro_get_step( $next_step_id ); $offer_step_exist = $wcf_next_step_obj->is_offer_page(); } else { $next_step_id = apply_filters( 'cartflows_checkout_next_step_id', $next_step_id, $order, $step_id ); $wcf_next_step_obj = wcf_pro_get_step( $next_step_id ); $offer_step_exist = $wcf_next_step_obj->is_offer_page(); } return $offer_step_exist; } /** * Check if upsell exists in flow. * * @since x.x.x * @param int $flow_id Flow Id. * @param int $step_id Step Id. * * @return bool */ public function is_upsell_exist_in_flow( $flow_id, $step_id ) { $offer_step_exist = false; if ( $flow_id && $step_id ) { $wcf_step_obj = wcf_pro_get_step( $step_id ); $flow_steps = $wcf_step_obj->get_flow_steps(); $control_step_id = $wcf_step_obj->get_control_step(); if ( is_array( $flow_steps ) ) { $current_step_found = false; foreach ( $flow_steps as $index => $data ) { if ( $current_step_found ) { if ( in_array( $data['type'], array( 'upsell', 'downsell' ), true ) ) { $offer_step_exist = true; break; } elseif ( 'thankyou' === $data['type'] ) { break; } } else { // Check for the control step. if ( intval( $data['id'] ) === intval( $control_step_id ) ) { $current_step_found = true; } } } } } return $offer_step_exist; } /** * Actions after offer charge completes. * * @since 1.0.0 * @param array $step_id step id. * @param array $order_id order id. * @param array $order_key order key. * @param array $is_charge_success is charge successful. * @param int $variation_id variation id. * @param int $input_qty input qty. * * @return array */ public function after_offer_charge( $step_id, $order_id, $order_key, $is_charge_success = false, $variation_id = '', $input_qty = '' ) { $result = array(); $step_type = wcf()->utils->get_step_type( $step_id ); if ( $is_charge_success ) { $order = wc_get_order( $order_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( 'upsell' === $step_type ) { /* Add Product To Main Order */ wcf_pro()->order->add_upsell_product( $order, $offer_product ); } else { wcf_pro()->order->add_downsell_product( $order, $offer_product ); } do_action( 'cartflows_offer_accepted', $order, $offer_product ); do_action( 'cartflows_' . $step_type . '_offer_accepted', $order, $offer_product ); /** * We need to reduce stock here. * * @todo * reduce_stock(); */ $data = array( 'action' => 'offer_accepted', 'order_id' => $order_id, 'order_key' => $order_key, 'template_type' => $step_type, ); /* Get Redirect URL */ $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, $data ); $result = array( 'status' => 'success', 'redirect' => $next_step_url, 'message' => wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-order-success-text' ), ); wcf()->logger->log( 'Redirect URL : ' . $next_step_url ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer accepted for step ID : ' . $step_id ); } else { /* @todo if payment failed redirect to last page or not */ $data = array( 'order_id' => $order_id, 'order_key' => $order_key, ); $thank_you_page_url = wcf_pro()->flow->get_thankyou_page_url( $step_id, $data ); $result = array( 'status' => 'failed', 'redirect' => $thank_you_page_url, 'message' => wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-order-failure-text' ), ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer Payment Failed. Redirected to thankyou step.' ); } return $result; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Flow_Frontend::get_instance(); classes/class-cartflows-pro-frontend.php000064400000042507147600244370014453 0ustar00logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); if ( $order && $order->get_status() !== 'failed' ) { if ( _is_wcf_doing_checkout_ajax() ) { $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); if ( ! $checkout_id ) { $checkout_id = wcf()->utils->get_checkout_id_from_order( $order ); } } else { $checkout_id = wcf()->utils->get_checkout_id_from_order( $order ); } wcf()->logger->log( 'Checkout ID: ' . $checkout_id ); if ( $checkout_id ) { $wcf_step_obj = wcf_pro_get_step( $checkout_id ); $next_step_id = $wcf_step_obj->get_next_step_id(); $flow_id = $wcf_step_obj->get_flow_id(); $next_step_id = apply_filters( 'cartflows_checkout_next_step_id', $next_step_id, $order, $checkout_id ); if ( $next_step_id ) { $order_receive_url = get_permalink( $next_step_id ); $session_key = wcf_pro()->session->get_session_key( $flow_id ); $query_args = array( 'wcf-order' => $order->get_id(), 'wcf-key' => $order->get_order_key(), ); if ( $session_key ) { $query_args['wcf-sk'] = $session_key; } // Add extra query strings of URL to the next step URL, if exists. $query_args = wcf_pro()->utils->may_be_append_query_string( $query_args ); $order_receive_url = add_query_arg( $query_args, $order_receive_url ); } } } wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); return $order_receive_url; } /** * Register Cron. * * @param string $new_status new status. * @param string $normal_status normal status. * @param object $order order object. * @since 1.0.0 */ public function register_cron_for_order_success( $new_status, $normal_status, $order ) { if ( false === is_a( $order, 'WC_Order' ) ) { /* Not Valid Order */ wcf()->logger->log( 'Not a valid order' ); return; } wcf()->logger->log( 'register_cron_for_order_success' ); wcf()->logger->log( 'new-status - ' . $new_status ); if ( wcf_pro()->order->get_order_status_slug() !== $new_status ) { /* Not Valid Order Status */ wcf()->logger->log( 'Not a valid order status' ); return; } $args = array( 'order_id' => $order->get_id(), 'before_normal' => $order->get_status(), // Pending. 'normal_status' => $normal_status, // On Hold/Processing etc. ); if ( false === wp_next_scheduled( 'carflows_schedule_normalize_order_status', $args ) ) { /* Filter to change the cron time */ $cron_time = apply_filters( 'cartflows_order_status_cron_time', 30 ); /* Setup Schedule */ wp_schedule_single_event( time() + ( $cron_time * MINUTE_IN_SECONDS ), 'carflows_schedule_normalize_order_status', $args ); wcf()->logger->log( 'Order-' . $order->get_id() . ' Cron Scheduled for Normalize Order Status' ); } } /** * Update main order data in transient. * * @param string $new_status new status. * @param string $normal_status normal status. * @param object $order order object. * @since 1.0.0 */ public function update_main_order_data_in_transient( $new_status, $normal_status, $order ) { if ( false === is_a( $order, 'WC_Order' ) ) { /* Not Valid Order */ wcf()->logger->log( 'Not a valid order' ); return; } wcf()->logger->log( 'new-status - ' . $new_status ); if ( wcf_pro()->order->get_order_status_slug() !== $new_status ) { /* Not Valid Order Status */ wcf()->logger->log( 'Not a valid order status' ); return; } $flow_id = $order->get_meta( '_wcf_flow_id' ); $data = array( 'order_id' => $order->get_id(), 'before_normal' => $order->get_status(), // Pending. 'normal_status' => $normal_status, // On Hold/Processing etc. ); wcf()->logger->log( 'Gateway status change - Flow-' . $flow_id . ' Order-' . $order->get_id() . wp_json_encode( $data ) ); wcf_pro()->session->update_data( $flow_id, $data ); /* Add status change key order */ $order->update_meta_data( '_cartflows_order_status_change', $data ); $order->save(); } /** * Init Actions. * * @since 1.0.0 */ public function init_actions() { $this->set_flow_session(); } /** * Set flow session. * * @since 1.0.0 */ public function set_flow_session() { if ( wcf()->utils->is_step_post_type() ) { wcf()->utils->do_not_cache(); $flow_id = wcf()->utils->get_flow_id(); if ( ! $flow_id ) { return; } if ( _is_wcf_thankyou_type() ) { // Destroy Session On Thank You Page. wcf_pro()->session->destroy_session( $flow_id ); } elseif ( _is_wcf_landing_type() || _is_wcf_checkout_type() ) { $data = array( 'flow_id' => $flow_id, 'steps' => get_post_meta( $flow_id, 'wcf-steps', true ), ); wcf_pro()->session->set_session( $flow_id, $data ); } elseif ( _is_wcf_upsell_type() || _is_wcf_downsell_type() ) { if ( wcf()->flow->is_flow_testmode( $flow_id ) ) { return; } if ( ! ( is_user_logged_in() && current_user_can( 'cartflows_manage_flows_steps' ) ) ) { if ( ! wcf_pro()->session->is_active_session( $flow_id ) ) { wp_die( esc_html__( 'Your session is expired', 'cartflows-pro' ) ); } } } } } /** * Setup upsell common. Used for paypal standard. * * @param int $order_id Order id. * @since 1.0.0 * * @return void */ public function setup_upsell( $order_id = '' ) { wcf()->logger->log( 'Force setup upsell' ); if ( '' == $order_id ) { return; } $order = wc_get_order( $order_id ); $this->start_the_upsell_flow( $order ); } /** * Maybe setup upsell. * * @param int $order_id Order id. * @since 1.0.0 * * @return void */ public function maybe_setup_upsell( $order_id = '' ) { wcf()->logger->log( ' woocommerce_pre_payment_complete ' ); if ( '' == $order_id ) { return; } $order = wc_get_order( $order_id ); $this->start_the_upsell_flow( $order ); } /** * Ignore Gateways checkout processed. * * @param int $order_id order id. * @param array $posted_data post data. * @param object $order order object. * @since 1.0.0 */ public function maybe_setup_upsell_ignore_gateways( $order_id, $posted_data, $order ) { wcf()->logger->log( ' woocommerce_checkout_order_processed ' ); if ( '' == $order_id ) { return; } // Added here again to solve the issue: Some times checkout was redirecting to default thank you page instead of upsell/downsell. $order_gateway = $order->get_payment_method(); $gateways = array( 'cod', 'bacs', 'stripe', 'ppec_paypal', 'ppcp-gateway', 'mollie_wc_gateway_ideal', 'mollie_wc_gateway_creditcard', 'cpsw_stripe', 'square_credit_card', 'cppw_paypal' ); $gateways = apply_filters( 'cartflows_offer_supported_payment_gateway_slugs', $gateways ); if ( in_array( $order_gateway, $gateways, true ) ) { $this->start_the_upsell_flow( $order ); } else { wcf()->logger->log( 'The payment gateway "' . $order_gateway . '" is not in the supported list' ); } // Added here again to solve the issue: Some times checkout was redirecting to default thank you page instead of upsell/downsell. } /** * Start the upsell flow. * * @param object $order Order object. * @since 1.0.0 * * @return void */ public function start_the_upsell_flow( $order ) { if ( ! is_object( $order ) ) { wcf()->logger->log( 'Not valid order' ); } if ( ! wcf_pro()->flow->check_if_next_step_is_offer( $order ) ) { wcf()->logger->log( 'Order-' . $order->get_id() . ' Upsell not exists' ); return; } if ( ! class_exists( 'Cartflows_Pro_Gateways' ) ) { return; } $order_gateway = $order->get_payment_method(); $gateway_obj = wcf_pro()->gateways->load_gateway( $order_gateway ); if ( $gateway_obj ) { wcf()->logger->log( 'Order-' . $order->get_id() . ' Flow Started' ); /* Checkout recive url filter */ do_action( 'cartflows_order_started', $order ); } else { wcf()->logger->log( 'Order-' . $order->get_id() . ' Gateway object not found' ); } } /** * Set upsell and return new status based on condition. * * @since 1.5.5 * @param string $order_status order status. * @param object $order order data. * @return string */ public function set_upsell_return_new_order_status( $order_status, $order ) { if ( false === is_a( $order, 'WC_Order' ) ) { // Create Log. wcf()->logger->log( 'Not a valid order' ); return $order_status; } $flow_id = $order->get_meta( '_wcf_flow_id' ); if ( ! wcf_pro()->flow->check_if_next_step_is_offer( $order ) ) { wcf()->logger->log( 'Flow-' . $flow_id . ' Order-' . $order->get_id() . ' Upsell not exists' ); return $order_status; } do_action( 'cartflows_order_started', $order ); /* If offer order is separate then don't change main order status */ if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $new_status = wcf_pro()->order->get_order_status_slug(); $data = array( 'flow_id' => $flow_id, 'order_id' => $order->get_id(), ); wcf_pro()->session->set_session( $flow_id, $data ); /** * $new_status = our new status * $order_status = default status change */ do_action( 'cartflows_order_status_change_to_main_order', $new_status, $order_status, $order ); wcf()->logger->log( 'Flow-' . $flow_id . ' Order-' . $order->get_id() . ' Status changed to Main Order' ); return $new_status; } else { wcf()->logger->log( 'Flow-' . $flow_id . ' Order-' . $order->get_id() . ' No need to change Status. Separate order option is set' ); } return $order_status; } /** * Render offer accepted/rejected script on upsell/downsell pages. */ public function render_offer_accept_reject_scripts() { global $post; if ( $post && wcf()->utils->is_step_post_type() ) { /** * Reason for PHPCS ignore: Printing the JS script in the head part of the page. * Used only to confirm the order is placed and the user is on CartFlows offer page. * */ $order_id = isset( $_GET['wcf-order'] ) ? sanitize_text_field( wp_unslash( $_GET['wcf-order'] ) ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( 0 === $order_id ) { return; } $offer_accept_script = ''; $offer_reject_script = ''; $offer_accept_script_html = ''; $offer_reject_script_html = ''; $step_id = $post->ID; $step_type = wcf_get_step_type( $step_id ); $offer_accept_script = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-accept-script' ); $offer_reject_script = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-reject-script' ); if ( '' !== $offer_accept_script ) { if ( false === strpos( $offer_accept_script, htmlentities( 'may_be_replace_shortcodes( $offer_accept_script ); $offer_accept_script_html .= '}, false );'; } echo ''; echo html_entity_decode( $offer_accept_script_html ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo ''; } if ( '' !== $offer_reject_script ) { if ( false === strpos( $offer_reject_script, htmlentities( 'may_be_replace_shortcodes( $offer_reject_script ); $offer_reject_script_html .= '}, false );'; } echo ''; echo html_entity_decode( $offer_reject_script_html ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo ''; } } } /** * WP Actions. * * @since 1.0.0 */ public function wp_actions() { if ( wcf()->utils->is_step_post_type() ) { add_action( 'wp_enqueue_scripts', array( $this, 'global_flow_scripts' ), 20 ); /* Add pro version class to body frontend */ add_filter( 'body_class', array( $this, 'pro_body_class' ) ); } } /** * Global flow scripts. * * @since 1.0.0 */ public function global_flow_scripts() { if ( wcf()->utils->is_step_post_type() ) { wp_enqueue_style( 'wcf-pro-frontend-global', wcf_pro()->utils->get_css_url( 'frontend' ), array(), CARTFLOWS_PRO_VER ); wp_enqueue_script( 'wcf-pro-frontend-global', wcf_pro()->utils->get_js_url( 'frontend' ), array( 'jquery' ), CARTFLOWS_PRO_VER, false ); wp_enqueue_script( 'wcf-pro-analytics-global', wcf_pro()->utils->get_js_url( 'analytics' ), array( 'jquery' ), CARTFLOWS_PRO_VER, false ); } } /** * Replace JS vars for offer pages. * * @param string $script custom script. * @return string $script modified custom script. * * @since x.x.x */ public function maybe_replace_pro_vars( $script ) { if ( _is_wcf_base_offer_type() ) { global $post; $post_id = false; if ( $post ) { $post_id = $post->ID; } if ( ! $post_id ) { return $script; } $offer_product = wcf_pro()->utils->get_offer_data( $post_id ); if ( empty( $offer_product ) || ! is_array( $offer_product ) ) { return $script; } $script = str_replace( '{{offer_product_name}}', $offer_product['name'], $script ); $script = str_replace( '{{offer_product_qty}}', $offer_product['qty'], $script ); $script = str_replace( '{{offer_product_price}}', $offer_product['price'], $script ); } return $script; } /** * Add pro version class to body in frontend. * * @since 1.1.5 * @param array $classes classes. * @return array $classes classes. */ public function pro_body_class( $classes ) { $classes[] = ' cartflows-pro-' . CARTFLOWS_PRO_VER; return $classes; } /** * Function to replace the shortcode available in the offer accept/reject script. * * @param string $script Offer accept/reject script. * * @return string $script Modified string of script. */ public function may_be_replace_shortcodes( $script ) { // List of shortcodes to be used in the offer scripts. $shortcodes_to_replace = array( '{{order_id}}', '{{flow_id}}', '{{step_id}}', '{{product_id}}', '{{variation_id}}', '{{quantity}}', '{{offer_type}}', ); // Array of JS variables to replace in the script. $array_map = array( 'event_data.order_id', 'event_data.flow_id', 'event_data.step_id', 'event_data.product_id', 'event_data.variation_id', 'event_data.input_qty', 'event_data.offer_type', ); // Replace the shortcodes available in the script. $script = str_replace( $shortcodes_to_replace, $array_map, $script ); // Return the modified script. return $script; } } /** * Prepare if class 'Cartflows_Pro_Frontend' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Frontend::get_instance(); classes/class-cartflows-pro-functions.php000064400000017130147600244370014636 0ustar00options->get_optin_meta_value( $checkout_id, 'wcf-optin-enable-custom-fields' ); if ( 'yes' === $is_custom ) { return true; } return false; } /** * Get get step object. * * @param int $step_id current step ID. * @since 1.5.9 */ function wcf_pro_get_step( $step_id ) { if ( ! isset( wcf_pro()->wcf_step_objs[ $step_id ] ) ) { wcf_pro()->wcf_step_objs[ $step_id ] = new Cartflows_Pro_Step_Factory( $step_id ); } return wcf_pro()->wcf_step_objs[ $step_id ]; } /** * Get ab test * * @param int $step_id current step ID. * @since 1.0.0 */ function wcf_get_ab_test( $step_id ) { return new Cartflows_Pro_Ab_Test_Factory( $step_id ); } /** * Get Current Step */ function wcf_get_current_step_type() { $current_step = '-'; if ( wcf()->utils->is_step_post_type() ) { global $wcf_step; $current_step = $wcf_step->get_step_type(); } return $current_step; } if ( ! function_exists( 'wcf_update_the_checkout_transient' ) ) { /** * Update the transient. * * @param int $checkout_id checkout id. */ function wcf_update_the_checkout_transient( $checkout_id ) { $user_key = null !== WC()->session ? WC()->session->get_customer_id() : ''; $cart_data = null !== WC()->cart ? WC()->cart->get_cart() : ''; $expiration_time = 30; if ( ! empty( $user_key ) && ! empty( $checkout_id ) ) { set_transient( 'wcf_user_' . $user_key . '_checkout_' . $checkout_id, $cart_data, $expiration_time * MINUTE_IN_SECONDS ); } } } if ( ! function_exists( 'wcf_clean' ) ) { /** * Clean variables using sanitize_text_field. * * @param string|array $var Data to sanitize. * @return string|array */ function wcf_clean( $var ) { if ( is_array( $var ) ) { return array_map( 'wcf_clean', $var ); } else { return is_scalar( $var ) ? sanitize_text_field( $var ) : $var; } } } if ( ! function_exists( 'wcf_pro_filter_price' ) ) { /** * Filter the price. * * @param int|float|string $price price. * @param int $product_id current product ID. * @param string $context context of action. Context can be view, edit, convert, original. * * @access public * @return float */ function wcf_pro_filter_price( $price, $product_id = 0, $context = 'convert' ) { if ( $price ) { $price = apply_filters( 'cartflows_filter_display_price', floatval( $price ), $product_id, $context ); } return $price; } } if ( ! function_exists( 'wcf_pro_filter_currency_code' ) ) { /** * Filter the currency code. * * @param string $currency_code The currency code. * @param string $context The context of action. Context can be view or edit. * * @access public * @return string $currency_code The converted or original currency code. */ function wcf_pro_filter_currency_code( $currency_code = '', $context = 'convert' ) { if ( $currency_code ) { $currency_code = apply_filters( 'cartflows_filter_currency_code', $currency_code, $context ); } return $currency_code; } } if ( ! function_exists( 'wcf_float_to_string' ) ) { /** * Covert the given price into string. * * @param int $price price. * * @access public * @return float */ function wcf_float_to_string( $price ) { if ( $price ) { $price = number_format( (string) $price, 2, '.', '' ); } return $price; } } if ( ! function_exists( 'cartflows_woocommerce_order_review' ) ) { /** * Wrapper for update order review. Always use this instead of woocommerce_order_review(). */ function cartflows_woocommerce_order_review() { // Get the checkout id. $checkout_id = _get_wcf_checkout_id(); if ( ! $checkout_id ) { $checkout_id = isset( $_GET['wcf_checkout_id'] ) && ! empty( $_GET['wcf_checkout_id'] ) ? intval( wp_unslash( $_GET['wcf_checkout_id'] ) ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended } if ( empty( $checkout_id ) ) { return; } $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' ); $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id ); if ( 'multistep-checkout' === $checkout_layout ) { ob_start(); Cartflows_Pro_Multistep_Checkout::get_instance()->custom_order_review_template(); return ob_get_clean(); } if ( Cartflows_Pro_Helper::is_instant_layout_enabled( intval( $flow_id ) ) && method_exists( Cartflows_Instant_Checkout::get_instance(), 'custom_order_review_template' ) ) { ob_start(); Cartflows_Instant_Checkout::get_instance()->custom_order_review_template(); return ob_get_clean(); } /** Get the WooCommerce order review template */ ob_start(); woocommerce_order_review(); return ob_get_clean(); } } if ( ! function_exists( 'wcf_print_r' ) ) { /** * Prints human-readable information about a variable. * * Some server environments block some debugging functions. This function provides a safe way to * turn an expression into a printable, readable form without calling blocked functions. * * @param mixed $expression The expression to be printed. * @param bool $return Optional. Default false. Set to true to return the human-readable string. * @return string|bool False if expression could not be printed. True if the expression was printed. * If $return is true, a string representation will be returned. */ function wcf_print_r( $expression, $return = false ) { $alternatives = array( array( 'func' => 'print_r', 'args' => array( $expression, true ), ), array( 'func' => 'var_export', 'args' => array( $expression, true ), ), array( 'func' => 'json_encode', 'args' => array( $expression ), ), array( 'func' => 'serialize', 'args' => array( $expression ), ), ); $alternatives = apply_filters( 'cartflows_print_r_alternatives', $alternatives, $expression ); foreach ( $alternatives as $alternative ) { if ( function_exists( $alternative['func'] ) ) { $res = $alternative['func']( ...$alternative['args'] ); if ( $return ) { return $res; } echo $res; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped return true; } } return false; } } if ( ! function_exists( 'wcf_pro_show_deprecated_step_notes' ) ) { /** * Checks if deprecated step notes should be shown in the Cartflows Pro plugin. * * This function applies a filter to determine if deprecated step notes should be displayed. * * @return bool Returns true if deprecated step notes should be shown, false otherwise. */ function wcf_pro_show_deprecated_step_notes() { return function_exists( 'wcf_show_deprecated_step_notes' ) ? wcf_show_deprecated_step_notes() : apply_filters( 'cartflows_pro_show_deprecated_step_notes', false ); } } classes/class-cartflows-pro-gateways.php000064400000025260147600244370014455 0ustar00load_payment_gateway_notices(); /** * Add actions and filters for Angelleye. */ do_action( 'cartflows_add_offer_payment_gateway_actions' ); } /** * Function to register any notices which are related to payment gateways. * * @since x.x.x * * @return void */ public function load_payment_gateway_notices() { add_filter( 'cartflows_admin_notices', array( $this, 'add_payment_gateways_not_supported_notice' ) ); } /** * Load required gateways. * * @since 1.0.0 * @return array. */ public function load_required_integrations() { $gateways = $this->get_supported_gateways(); /* @TODO Get the active payment gateways from DB or from any other function as below function is making issue with Mollie Bank Transfer Gateway. $available_payment_methods = array_keys( WC()->payment_gateways->get_available_payment_gateways() ); */ if ( is_array( $gateways ) ) { foreach ( $gateways as $key => $gateway ) { /** Condition commented out for loading gateways files. * if ( in_array( $key, $available_payment_methods, true ) ) { * $this->load_gateway( $key ); */ $this->load_gateway( $key ); } } return $gateways; } /** * Load Gateway. * * @param string $type gateway type. * @since 1.0.0 * @return array. */ public function load_gateway( $type ) { $gateways = $this->get_supported_gateways(); if ( isset( $gateways[ $type ] ) ) { $temp_gateway = $gateways[ $type ]; $gateway_path = isset( $temp_gateway['path'] ) ? $temp_gateway['path'] : CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-gateway-' . $temp_gateway['file']; if ( ! file_exists( $gateway_path ) ) { return false; } include_once $gateway_path; $class_name = $temp_gateway['class']; $this->gateway_obj[ $class_name ] = call_user_func( array( $class_name, 'get_instance' ) ); return $this->gateway_obj[ $class_name ]; } return false; } /** * Generates express checkout token * * @since 1.0.0 * @return void. */ public function generate_express_checkout_token() { $this->load_gateway( 'paypal' )->generate_express_checkout_token(); } /** * Generates express checkout token * * @since 1.0.0 * @return void. */ public function generate_ppec_paypal_checkout_token() { $this->load_gateway( 'ppec_paypal' )->generate_express_checkout_token(); } /** * Get Supported Gateways. * * @since 1.0.0 * @return array $supported_gateways Updated Supported payment gateways. */ public function get_supported_gateways() { // Default square version that we require for the CartFlows. $wc_square_version = '2.9.1'; if ( function_exists( 'wc_square' ) ) { $wc_square_version = wc_square()->get_version(); } // Return true if greater than 3.0.0 else retur false. $is_latest_square = version_compare( $wc_square_version, '3.0.0', '>=' ); $supported_gateways = array( 'bacs' => array( 'file' => 'bacs.php', 'class' => 'Cartflows_Pro_Gateway_Bacs', ), 'cod' => array( 'file' => 'cod.php', 'class' => 'Cartflows_Pro_Gateway_Cod', ), 'stripe' => array( 'file' => 'stripe.php', 'class' => 'Cartflows_Pro_Gateway_Stripe', ), 'cpsw_stripe' => array( 'file' => 'cpsw-stripe.php', 'class' => 'Cartflows_Pro_Gateway_Cpsw_Stripe', ), 'paypal' => array( 'file' => 'paypal-standard.php', 'class' => 'Cartflows_Pro_Gateway_Paypal_Standard', ), 'ppec_paypal' => array( 'file' => 'paypal-express.php', 'class' => 'Cartflows_Pro_Gateway_Paypal_Express', ), 'ppcp-gateway' => array( 'file' => 'paypal-payments.php', 'class' => 'Cartflows_Pro_Gateway_Paypal_Payments', ), 'authorize_net_cim_credit_card' => array( 'file' => 'authorize-net.php', 'class' => 'Cartflows_Pro_Gateway_Authorize_Net', ), 'mollie_wc_gateway_creditcard' => array( 'file' => 'mollie-credit-card.php', 'class' => 'Cartflows_Pro_Gateway_Mollie_Credit_Card', ), 'mollie_wc_gateway_ideal' => array( 'file' => 'mollie-ideal.php', 'class' => 'Cartflows_Pro_Gateway_Mollie_Ideal', ), 'square_credit_card' => array( 'file' => $is_latest_square ? 'square.php' : 'square-old.php', 'class' => $is_latest_square ? 'Cartflows_Pro_Gateway_Square' : 'Cartflows_Pro_Gateway_Square_old', ), 'woocommerce_payments' => array( 'file' => 'woocommerce-payments.php', 'class' => 'Cartflows_Pro_Gateway_Woocommerce_Payments', ), 'cppw_paypal' => array( 'file' => 'cppw-paypal.php', 'class' => 'Cartflows_Pro_Gateway_Cppw_Paypal', ), 'cpsw_stripe_element' => array( 'file' => 'cpsw-stripe-element.php', 'class' => 'Cartflows_Pro_Gateway_Cpsw_Stripe_Element', ), ); return apply_filters( 'cartflows_offer_supported_payment_gateways', $supported_gateways ); } /** * Handles paypal API call * * @since 1.0.0 * @return void. */ public function maybe_handle_paypal_api_call() { $this->load_gateway( 'paypal' )->create_billing_agreement(); $this->load_gateway( 'paypal' )->process_api_calls(); } /** * Handles ppec_paypal API call * * @since 1.0.0 * @return void. */ public function maybe_handle_ppec_paypal_api_call() { $this->load_gateway( 'ppec_paypal' )->create_billing_agreement(); $this->load_gateway( 'ppec_paypal' )->process_api_calls(); } /** * Add Payment Gateway not supported notices. * * @since x.x.x * @param array $notices Notices array. * @return array $notices The modified array of notices for the non-supported gateways. */ public function add_payment_gateways_not_supported_notice( $notices = array() ) { $payment_gateway_notice = $this->prepare_gateway_not_supported_notices(); if ( ! empty( $payment_gateway_notice ) ) { $notices[] = $payment_gateway_notice; } return $notices; } /** * Prepare the gateway not supported notices to display in-plugin notice. * * @since x.x.x * * @return string $notice The modified and prepared notice for the non supported gateways. */ public function prepare_gateway_not_supported_notices() { $notice = ''; $current_flow_steps = array(); $available_gateways = array(); $not_supported_gateways = array(); // Get current funnel ID. $flow_id = isset( $_GET['flow_id'] ) ? intval( $_GET['flow_id'] ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended // Return if flow ID is not set. if ( empty( $flow_id ) ) { return $notice; } // Get steps of currently selected/opened flow. $current_flow_steps = wcf()->flow->get_steps( $flow_id ); $cartflows_plugin_type = defined( 'CARTFLOWS_PRO_PLUGIN_TYPE' ) ? CARTFLOWS_PRO_PLUGIN_TYPE : 'free'; if ( is_plugin_active( 'woocommerce/woocommerce.php' ) && 'plus' === $cartflows_plugin_type && ! empty( $current_flow_steps ) ) { $show_notice = false; // Display the notice only for the offer steps such as upsell/downsell. foreach ( $current_flow_steps as $step ) { if ( 'upsell' === $step['type'] || 'downsell' === $step['type'] ) { $show_notice = true; } } // Get supported gateways of CartFlows. $supported_gateways = $this->get_supported_gateways(); // Get the available gateways installed and activated on the website. $woo_available_gateways = WC()->payment_gateways->get_available_payment_gateways(); if ( ! empty( $woo_available_gateways ) && is_array( $woo_available_gateways ) ) { foreach ( $woo_available_gateways as $key => $value ) { $available_gateways[ $key ]['method_title'] = ! empty( $value->method_title ) ? $value->method_title : ''; } } if ( $show_notice && $supported_gateways && ! empty( $available_gateways ) && is_array( $available_gateways ) ) { foreach ( $available_gateways as $gateway => $gateway_details ) { if ( ! array_key_exists( $gateway, $supported_gateways ) ) { $not_supported_gateways[] = $gateway_details['method_title']; } } if ( ! empty( $not_supported_gateways ) && is_array( $not_supported_gateways ) ) { $not_supported_gateways = implode( ', ', $not_supported_gateways ); $notice = '

    ' . wp_kses_post( sprintf( /* translators: %1$s: payment gateway names, %2$s: link start, %3$s: link end */ __( 'CartFlows Upsell/Downsell offer does not support the %1$s payment gateway. Please find the supported payment gateways %2$shere%3$s.', 'cartflows-pro' ), '' . esc_html( $not_supported_gateways ) . '', '', '' ) ); } } } // Return the notice string. return $notice; } } /** * Prepare if class 'Cartflows_Pro_Gateways' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateways::get_instance(); classes/class-cartflows-pro-helper.php000064400000014504147600244370014107 0ustar00 'separate', ) ); $offer_settings = Cartflows_Helper::get_admin_settings_option( '_cartflows_offer_global_settings', false, false ); $offer_settings = wp_parse_args( $offer_settings, $settings_default ); if ( ! did_action( 'wp' ) ) { return $offer_settings; } else { self::$offer_settings = $offer_settings; } } return self::$offer_settings; } /** * Get AB Test settings. * * @return array. */ public static function get_abtest_settings() { if ( null === self::$abtest_settings ) { $settings_default = apply_filters( 'cartflows_abtest_settings', array( 'override_permalink' => 'disable', ) ); $abtest_settings = Cartflows_Helper::get_admin_settings_option( '_cartflows_abtest_settings', false, false ); $abtest_settings = wp_parse_args( $abtest_settings, $settings_default ); if ( ! did_action( 'wp' ) ) { return $abtest_settings; } else { self::$abtest_settings = $abtest_settings; } } return self::$abtest_settings; } /** * Create Edit page link for the widgets. * * @since 1.6.13 * @modified 2.0.2 The $tab variable is kept for future usage. * @param string $tab The Tab which has to display. * @access public */ public static function get_current_page_edit_url( $tab = '' ) { global $post; $url = ''; if ( $post ) { $step_id = $post->ID; $flow_id = wcf()->utils->get_flow_id_from_step_id( $step_id ); $url = add_query_arg( array( 'flow_id' => $flow_id, 'step_id' => $step_id, ), admin_url( 'admin.php?page=cartflows&path=flows&action=wcf-edit-flow' ) ); } return $url; } /** * Create setting page URL. * * @since 1.6.13 * @access public */ public static function get_setting_page_url() { $admin_url = add_query_arg( array( 'page' => 'cartflows_settings', ), admin_url( 'admin.php' ) ); return $admin_url; } /** * Add Checkout field. * * @param string $type Field type. * @param string $field_key Field key. * @param int $post_id Post id. * @param array $field_data Field data. * @return boolean. */ public static function add_checkout_field( $type, $field_key, $post_id, $field_data = array() ) { $fields = Cartflows_Helper::get_checkout_fields( $type, $post_id ); $fields[ $field_key ] = $field_data; if ( CARTFLOWS_STEP_POST_TYPE === get_post_type( $post_id ) ) { update_post_meta( $post_id, 'wcf_fields_' . $type, $fields ); } return true; } /** * Delete checkout field. * * @param string $type Field type. * @param string $field_key Field key. * @param int $post_id Post id. * @return array. */ public static function delete_checkout_field( $type, $field_key, $post_id ) { $fields = Cartflows_Helper::get_checkout_fields( $type, $post_id ); if ( isset( $fields[ $field_key ] ) ) { unset( $fields[ $field_key ] ); } if ( CARTFLOWS_STEP_POST_TYPE === get_post_type( $post_id ) ) { update_post_meta( $post_id, 'wcf_fields_' . $type, $fields ); } return true; } /** * Check is error in the received response. * * @param object $response Received API Response. * @return array $result Error result. * @since x.x.x */ public static function is_api_errors( $response ) { $result = array( 'is_error' => false, 'error_message' => __( 'No error found.', 'cartflows-pro' ), 'error_code' => 0, ); if ( is_wp_error( $response ) ) { $msg = $response->get_error_message(); $error_code = $response->get_error_code(); if ( 'http_request_failed' === $error_code ) { $msg = $msg . '
    ' . __( 'API call to create a purchase failed.', 'cartflows-pro' ); } $result['is_error'] = true; $result['error_message'] = $msg; $result['error_code'] = $error_code; } elseif ( ! $response->isSuccess() ) { $error_body = $response->getErrors(); $result['is_error'] = true; $result['error_message'] = $error_body; $result['error_code'] = $response->getStatusCode(); } else { $result['error_code'] = $response->getStatusCode(); } return $result; } /** * Show product option settings based on consitions. * * @param int $checkout_id checkout id. */ public static function is_show_product_options_settings( $checkout_id ) { $store_checkout = (int) Cartflows_Helper::get_global_setting( '_cartflows_store_checkout' ); $flow_id = (int) wcf()->utils->get_flow_id_from_step_id( $checkout_id ); if ( $flow_id !== $store_checkout ) { return true; } if ( $flow_id === $store_checkout && apply_filters( 'cartflows_show_store_checkout_product_tab', false ) ) { return true; } return false; } /** * Confirm if custom price is valid. * * @param int $custom_price custom price. */ public static function is_valid_custom_price( $custom_price ) { if ( $custom_price >= 0 && '' !== $custom_price ) { return true; } return false; } /** * Check the Instant layout is enabled or not. * * @param int $flow_id Current flow id. * @return boolean Returns true if instant layout is enabled, false otherwise. */ public static function is_instant_layout_enabled( $flow_id = 0 ) { // Get the flow ID if not set. if ( empty( $flow_id ) ) { $flow_id = wcf()->utils->get_flow_id(); } // Return false if flow ID is not set. if ( empty( $flow_id ) ) { return false; } // Return false if wcf()->options is not set. if ( ! isset( wcf()->options ) || ! is_object( wcf()->options ) || ! is_callable( array( wcf()->options, 'get_flow_meta_value' ) ) ) { return false; } // Return true or false based on the instant layout style. return 'yes' === wcf()->options->get_flow_meta_value( $flow_id, 'instant-layout-style', 'no' ); } } classes/class-cartflows-pro-licence.php000064400000044571147600244370014241 0ustar00product_id = $this->get_clean_product_id(); $this->wc_am_domain = str_ireplace( array( 'http://', 'https://' ), '', home_url() ); // blog domain name. $this->wc_am_software_version = CARTFLOWS_PRO_VER; $this->wc_am_instance_id = get_option( 'wc_am_client_' . $this->product_id . '_instance' ); // A unique password generated for each installation. $this->activate_status = get_option( 'wc_am_client_' . $this->product_id . '_activated', 'Deactivated' ); add_action( 'plugin_action_links_' . CARTFLOWS_PRO_BASE, array( $this, 'license_popup_link' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); add_action( 'wp_ajax_cartflows_activate_license', array( $this, 'activate_license' ) ); add_action( 'wp_ajax_cartflows_deactivate_license', array( $this, 'deactivate_license' ) ); /** * Commenting this action as we have moved this part to Global settings. Remove this code after 1 update. * * Add_action( 'admin_footer', array( $this, 'export_popup' ) ); */ add_filter( 'wc_am_client_inactive_notice_override', '__return_false' ); add_action( 'admin_notices', array( $this, 'inactive_notice' ) ); add_action( 'wp_ajax_cartflows_disable_activate_license_notice', array( $this, 'disable_activate_licence_notice' ) ); // Disabled un-install hook. add_filter( 'wc_am_uninstall_disable', '__return_true' ); // Disabled un-install hook. remove_action( 'admin_menu', array( $wcam_lib, 'register_menu' ) ); remove_action( 'admin_init', array( $wcam_lib, 'load_settings' ) ); } /** * Disable the Activate License Notice * * @return void */ public function disable_activate_licence_notice() { /** * Check permission */ if ( ! current_user_can( 'cartflows_manage_settings' ) ) { $response['data'] = array( 'error' => __( 'Permission denied!', 'cartflows-pro' ), ); wp_send_json_error( $response ); } check_ajax_referer( 'cartflows-admin-notice-nonce', 'security' ); // Saving the `true` for 10 minutes into transient `my_transient`. set_transient( 'cartflows-activate-licence', true, 10 * MINUTE_IN_SECONDS ); wp_send_json_success(); } /** * License Inactive Notice * * @since 1.0.0 */ public function inactive_notice() { if ( 'Activated' === $this->activate_status ) { return; } $expired = get_transient( 'cartflows-activate-licence' ); // Is transient expired? if ( false != $expired && ! empty( $expired ) ) { return; } wp_enqueue_script( 'cartflows-admin-notice' ); /* translators: %1$s Software Title, %2$s Plugin, %3$s Anchor opening tag, %4$s Anchor closing tag, %5$s Software Title. */ $message = sprintf( __( 'The %1$s License Key has not been activated, so the %2$s is inactive! %3$sClick here%4$s to activate %5$s.', 'cartflows-pro' ), esc_attr( CARTFLOWS_PRO_DISPLAY_TITLE ), 'plugin', '', '', esc_attr( CARTFLOWS_PRO_DISPLAY_TITLE ) ); $output = '

    '; $output .= '

    ' . $message . '

    '; $output .= '
    '; echo wp_kses_post( $output ); } /** * Export popup. * * @since 1.0.0 * * @return void */ public function export_popup() { if ( 'plugins' !== get_current_screen()->base ) { return; } $data = get_option( 'wc_am_client_' . $this->product_id . '_api_key', array() ); $license_key = isset( $data['api_key'] ) ? $data['api_key'] : ''; $desc = sprintf( /* translators: %1$s,%2$s: Find API key article link */ __( 'If you don\'t have License key, you can get it from %1$s here%2$s.', 'cartflows-pro' ), '', '' ); ?> activate_status ) { $links['license_key'] = '' . esc_html__( 'Activate License', 'cartflows-pro' ) . ''; } else { $links['license_key'] = '' . esc_html__( 'Deactivate License', 'cartflows-pro' ) . ''; } return $links; } /** * Enqueues the needed CSS/JS for Backend. * * @param string $hook Current hook. * * @since 1.0.0 */ public function admin_scripts( $hook = '' ) { wp_register_script( 'cartflows-admin-notice', CARTFLOWS_PRO_URL . 'assets/js/admin-notice.js', array( 'jquery' ), CARTFLOWS_PRO_VER, true ); $vars = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), '_nonce' => wp_create_nonce( 'cartflows-admin-notice-nonce' ), ); wp_localize_script( 'cartflows-admin-notice', 'CartFlowsProAdminNoticeVars', $vars ); if ( 'plugins.php' == $hook ) { wp_enqueue_style( 'cartflows-license', CARTFLOWS_PRO_URL . 'assets/css/license-popup.css', null, CARTFLOWS_PRO_VER, 'all' ); wp_enqueue_script( 'cartflows-license', CARTFLOWS_PRO_URL . 'assets/js/license-popup.js', array( 'wp-util', 'jquery' ), CARTFLOWS_PRO_VER, true ); $defaults = array( 'activation_status' => get_option( 'wc_am_client_' . $this->product_id . '_activated', 'Deactivated' ), ); $args = get_option( 'wc_am_client_' . $this->product_id . '_api_key', array() ); $localize_vars = wp_parse_args( $args, $defaults ); wp_localize_script( 'cartflows-license', 'CartFlowsProLicenseVars', $localize_vars ); } } /** * Deactivate license. * * @since 1.0.0 */ public function deactivate_license() { /** * Check permission */ if ( ! current_user_can( 'cartflows_manage_settings' ) ) { $response['data'] = array( 'error' => __( 'Permission denied!', 'cartflows-pro' ), ); wp_send_json_error( $response ); } $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'cartflows_license_deactivation_nonce' ) ) { $response['data'] = array( 'error' => __( 'Oops! Security nonce is invalid.', 'cartflows-pro' ), ); return wp_send_json( $response ); } $default_args = array( 'api_key' => '', ); wp_cache_flush(); $args = get_option( 'wc_am_client_' . $this->product_id . '_api_key', $default_args ); $response = $this->deactivate_request( $args ); update_option( 'wc_am_client_' . $this->product_id . '_activated', 'Deactivated' ); update_option( 'wc_am_client_' . $this->product_id . '_api_key', $default_args ); // Store the API key which used for plugin update. $new_data = array( 'wc_am_client_' . $this->product_id . '_api_key' => $default_args['api_key'], ); update_option( 'wc_am_client_' . $this->product_id, $new_data ); wp_send_json_success( $response ); } /** * Sends the request to deactivate to the API Manager. * * @param array $args args. * * @return bool|string */ public function deactivate_request( $args ) { $defaults = array( 'request' => 'deactivate', 'product_id' => CARTFLOWS_PRO_PRODUCT_ID, 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain, ); $args = wp_parse_args( $defaults, $args ); $target_url = add_query_arg( 'wc-api', 'am-software-api', CARTFLOWS_SERVER_URL ) . '&' . http_build_query( $args ); /** $target_url = esc_url_raw( $this->create_software_api_url( $args ) ); */ $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); //phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { // Request failed. return false; } $response = wp_remote_retrieve_body( $request ); return $response; } /** * Save All admin settings here * * @hook cartflows_activate_license */ public function activate_license() { /** * Check permission */ if ( ! current_user_can( 'cartflows_manage_settings' ) ) { $response['data'] = array( 'error' => __( 'Permission denied!', 'cartflows-pro' ), ); wp_send_json_error( $response ); } $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'cartflows_license_activation_nonce' ) ) { $response['data'] = array( 'error' => __( 'Oops! Security nonce is invalid.', 'cartflows-pro' ), ); return wp_send_json( $response ); } $license_key = isset( $_REQUEST['license_key'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['license_key'] ) ) : ''; $args = array( 'api_key' => $license_key, ); wp_cache_flush(); // $response = json_decode( $this->activation_request( $args ), true ); //$response = json_decode( $this->activation_request( $args ), true ); $response['success'] = $response['activated'] = true; /** $response = $this->request( 'activation', $license_key, $license_email ); */ if ( true === $response['success'] && true === $response['activated'] ) { $data = array( 'api_key' => $license_key, ); // Store the API key. update_option( 'wc_am_client_' . $this->product_id . '_api_key', $data ); // Activate. update_option( 'wc_am_client_' . $this->product_id . '_activated', 'Activated' ); // Store the API key which used for plugin update. $new_data = array( 'wc_am_client_' . $this->product_id . '_api_key' => $data['api_key'], ); update_option( 'wc_am_client_' . $this->product_id, $new_data ); wp_send_json_success( $response ); } wp_send_json_error( $response ); } /** * Sends the request to activate to the API Manager. * * @param array $args args. * * @return bool|string */ public function activation_request( $args ) { // If instance ID is not set, generate it. if ( empty( $this->wc_am_instance_id ) ) { $this->wc_am_instance_id = wp_generate_password( 12, false ); update_option( 'wc_am_client_' . $this->product_id . '_instance', $this->wc_am_instance_id ); } $defaults = array( 'request' => 'activate', 'product_id' => CARTFLOWS_PRO_PRODUCT_ID, 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain, 'software_version' => $this->wc_am_software_version, ); $args = wp_parse_args( $defaults, $args ); $target_url = add_query_arg( 'wc-api', 'am-software-api', CARTFLOWS_SERVER_URL ) . '&' . http_build_query( $args ); $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); //phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout $is_error = $this->has_activation_api_error( $request ); if ( $is_error['error'] ) { return wp_json_encode( array( 'success' => false, 'error_code' => $is_error['error_code'], 'error' => $is_error['error_message'], 'data' => array( 'error_code' => $is_error['error_code'], 'error' => $is_error['error_message'], ), ), true ); } $response = wp_remote_retrieve_body( $request ); return $response; } /** * Check is error in the received response. * * @param object $response Received API Response. * @return array $result Error result. * @since x.x.x */ public function has_activation_api_error( $response ) { $result = array( 'error' => false, 'error_message' => __( 'No error found.', 'cartflows-pro' ), 'error_code' => 0, ); if ( is_wp_error( $response ) ) { $msg = $response->get_error_message(); $error_code = $response->get_error_code(); if ( 'http_request_failed' === $error_code ) { /* translators: %1$s: HTML, %2$s: HTML */ $msg = $msg . '
    ' . sprintf( __( 'For more information, please check this %1$sarticle%2$s.', 'cartflows-pro' ), "", '' ); } $result['error'] = true; $result['error_message'] = $msg; $result['error_code'] = $error_code; } elseif ( ! empty( wp_remote_retrieve_response_code( $response ) ) && ! in_array( wp_remote_retrieve_response_code( $response ), array( 200, 201, 204 ), true ) ) { $error_message = ! empty( wp_remote_retrieve_response_message( $response ) ) ? wp_remote_retrieve_response_message( $response ) : ''; $error_body = ! empty( wp_remote_retrieve_body( $response ) ) ? wp_kses( wp_remote_retrieve_body( $response ), '

    ' ) : ''; /* translators: %1$s: HTML, %2$s: HTML, %3$s: HTML */ $blocked_message = strpos( $error_body, 'MalCare' ) ? sprintf( __( 'Sorry for the inconvenience, but your website seems to be having trouble connecting to our licensing system. %1$s Please open a technical %2$ssupport ticket%3$s and share the server\'s outgoing IP address.', 'cartflows-pro' ), '

    ', '', '' ) : ''; $result['error'] = true; $result['error_message'] = $error_message . '
    ' . $blocked_message; $result['error_code'] = wp_remote_retrieve_response_code( $response ); } else { $result['response_code'] = wp_remote_retrieve_response_code( $response ); } return $result; } /** * Prepare product id in lower case. Database Keys should be in lowercase. * * @since 1.11.1 */ public function get_clean_product_id() { return strtolower( str_ireplace( array( ' ', '_', '&', '?', '-' ), '_', CARTFLOWS_PRO_PRODUCT_ID ) ); } } /** * Initialize class object with 'get_instance()' method */ CartFlows_Pro_Licence::get_instance(); endif; classes/class-cartflows-pro-license-helper.php000064400000011321147600244370015521 0ustar00 $license_key, 'object' => $wc_am_domain, ); $product_id = cartflows_pro_license_instance()->product_id; $request_type = 'activate'; if ( 'activate' === $request_type ) { /*$request = CartFlows_Pro_Licence::get_instance()->activation_request( $args ); $response = json_decode( $request, true );*/ $response['success'] = $response['activated'] = true; if ( $response && true === $response['success'] && true === $response['activated'] ) { $data = array( 'api_key' => $license_key, ); // Store the API key. update_option( 'wc_am_client_' . $product_id . '_api_key', $data ); // Activate. update_option( 'wc_am_client_' . $product_id . '_activated', 'Activated' ); // Store the API key which used for plugin update. $new_data = array( 'wc_am_client_' . $product_id . '_api_key' => $data['api_key'], ); update_option( 'wc_am_client_' . $product_id, $new_data ); } } elseif ( 'deactivate' === $request_type ) { $request = cartflows_pro_license_instance()->deactivate_request( $args ); $response = json_decode( $request, true ); if ( $response && true === $response['success'] && true === $response['deactivated'] ) { $default_args = array( 'api_key' => '', ); update_option( 'wc_am_client_' . $product_id . '_activated', 'Deactivated' ); update_option( 'wc_am_client_' . $product_id . '_api_key', $default_args ); // Store the API key which used for plugin update. $new_data = array( 'wc_am_client_' . $product_id . '_api_key' => $default_args['api_key'], ); update_option( 'wc_am_client_' . $product_id, $new_data ); } } return json_decode( $request, true ); } endif; if ( ! function_exists( 'cartflows_pro_activate' ) ) : /** * Activate License Request for Site * * @since 1.6.13 * * @param string $license_key License key. * @param integer $site_id Site ID. * @return mixed */ function cartflows_pro_activate( $license_key = '', $site_id = 1 ) { return cartflows_pro_license_request( $license_key, $site_id, 'activate' ); } endif; if ( ! function_exists( 'cartflows_pro_deactivate' ) ) : /** * Deactivate License Request for Site * * @since 1.6.13 * * @param string $license_key License key. * @param integer $site_id Site ID. * @return mixed */ function cartflows_pro_deactivate( $license_key = '', $site_id = 1 ) { return cartflows_pro_license_request( $license_key, $site_id, 'deactivate' ); } endif; if ( ! function_exists( 'cartflows_pro_is_active_license' ) ) : /** * Activate Status * * @since 1.6.13 * * @return bool */ function cartflows_pro_is_active_license() { // is_object added to avoid Trying to get property 'activate_status' of non-object error in some cases. $status = is_object( cartflows_pro_license_instance() ) ? cartflows_pro_license_instance()->activate_status : ''; if ( 'Activated' === $status ) { return true; } return false; } endif; if ( ! function_exists( 'cartflows_pro_get_product_id' ) ) : /** * Get CartFlows Product ID * * @since x.x.x * @return bool */ function cartflows_pro_get_product_id() { return class_exists( 'CartFlows_Pro_Licence' ) ? cartflows_pro_license_instance()->product_id : ''; } endif; classes/class-cartflows-pro-loader.php000064400000050670147600244370014102 0ustar00define_constants(); /* Start-Pro-Woo-Feature */ $this->licence_setup(); /* End-Pro-Woo-Feature */ // Activation hook. register_activation_hook( CARTFLOWS_PRO_FILE, array( $this, 'activation_reset' ) ); // deActivation hook. register_deactivation_hook( CARTFLOWS_PRO_FILE, array( $this, 'deactivation_reset' ) ); add_action( 'init', array( $this, 'load_textdomain' ) ); add_action( 'plugins_loaded', array( $this, 'load_plugin' ), 100 ); } /** * Defines all constants * * @since 1.0.0 */ public function define_constants() { define( 'CARTFLOWS_PRO_DISPLAY_TITLE', 'CartFlows Pro' ); define( 'CARTFLOWS_PRO_PRODUCT_TITLE', 'CartFlows' ); // Don't change `CartFlows`. It is used as product title on server side. define( 'CARTFLOWS_PRO_PRODUCT_ID', 'CartFlows' ); define( 'CARTFLOWS_PRO_BASE', plugin_basename( CARTFLOWS_PRO_FILE ) ); define( 'CARTFLOWS_PRO_DIR', plugin_dir_path( CARTFLOWS_PRO_FILE ) ); define( 'CARTFLOWS_PRO_URL', plugins_url( '/', CARTFLOWS_PRO_FILE ) ); define( 'CARTFLOWS_PRO_VER', '2.1.4' ); define( 'CARTFLOWS_PRO_SLUG', 'cartflows-pro' ); define( 'CARTFLOWS_PRO_PLUGIN_TYPE', 'pro' ); define( 'CARTFLOWS_PRO_VISITS_TABLE', 'cartflows_visits' ); define( 'CARTFLOWS_PRO_VISITS_META_TABLE', 'cartflows_visits_meta' ); define( 'CARTFLOWS_PRO_REQ_CF_VER', '2.1.0' ); if ( ! defined( 'CARTFLOWS_SERVER_URL' ) ) { define( 'CARTFLOWS_SERVER_URL', 'https://my.cartflows.com/' ); } $cookie_prefix = ''; if ( defined( 'CARTFLOWS_COOKIE_PREFIX' ) ) { $cookie_prefix = CARTFLOWS_COOKIE_PREFIX; } define( 'CARTFLOWS_SESSION_COOKIE', $cookie_prefix . 'cartflows_session_' ); define( 'CARTFLOWS_ANALYTICS_COOKIE_EXPIRE_TIME', 365 ); define( 'CARTFLOWS_VISITED_FLOW_COOKIE', $cookie_prefix . 'wcf-visited-flow-' ); define( 'CARTFLOWS_VISITED_STEP_COOKIE', $cookie_prefix . 'wcf-step-visited-' ); define( 'CARTFLOWS_AB_TEST_COOKIE', $cookie_prefix . 'cartflows-ab-test-' ); if ( ! defined( 'CARTFLOWS_HTTPS' ) ) { define( 'CARTFLOWS_HTTPS', is_ssl() ? true : false ); } } /** * Loads plugin files. * * @since 1.0.0 * * @return void */ public function load_plugin() { if ( ! did_action( 'cartflows_init' ) ) { add_action( 'admin_notices', array( $this, 'fails_to_load' ) ); return; } /* Required version of CartFlow */ if ( ! version_compare( CARTFLOWS_VER, CARTFLOWS_PRO_REQ_CF_VER, '>=' ) ) { add_action( 'admin_notices', array( $this, 'fail_load_out_of_date' ) ); return; } $this->load_helper_files_components(); $this->load_core_files(); $this->load_core_components(); add_action( 'wp_loaded', array( $this, 'initialize' ) ); /** * Cartflows Init. * * Fires when Cartflows is instantiated. * * @since 1.0.0 */ do_action( 'cartflows_pro_init' ); } /** * Load Helper Files and Components. * * @since 1.0.0 * * @return void */ public function load_helper_files_components() { $this->is_woo_active = function_exists( 'WC' ); $this->is_wcs_active = class_exists( 'WC_Subscription' ); /* Public Utils */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-utils.php'; /* Helper File */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-helper.php'; /* Admin Helper File */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-admin-helper.php'; /* Public Global Name spaces */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-functions.php'; /* Include License Helper functions */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-license-helper.php'; /* WC Common Public */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-wc-common.php'; /* Meta Default Values */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-default-meta.php'; /* Public Session */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-session.php'; include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-action-schedular.php'; $this->utils = Cartflows_Pro_Utils::get_instance(); $this->wc_common = Cartflows_Pro_Wc_Common::get_instance(); $this->options = Cartflows_Pro_Default_Meta::get_instance(); $this->session = Cartflows_Pro_Session::get_instance(); } /** * Init hooked function. * * @since 1.0.0 * * @return void */ public function initialize() { $this->assets_vars = $this->utils->get_assets_path(); } /** * Load Core Files. * * @since 1.0.0 * * @return void */ public function load_core_files() { /* Update compatibility. */ require_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-update.php'; } /** * Load Core Components. * * @since 1.0.0 * * @return void */ public function load_core_components() { /* Admin */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-admin.php'; /* Start-Pro-Woo-Feature */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-licence.php'; include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-wp-cli.php'; /* End-Pro-Woo-Feature */ /* Frontend Global */ include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-step-factory.php'; include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-frontend.php'; include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-flow-frontend.php'; $this->front = Cartflows_Pro_Frontend::get_instance(); $this->flow = Cartflows_Pro_Flow_Frontend::get_instance(); require_once CARTFLOWS_PRO_DIR . 'pro-admin-loader.php'; /* Start-Pro-Feature */ if ( file_exists( CARTFLOWS_PRO_DIR . 'modules/ab-test/class-cartflows-pro-ab-test.php' ) ) { // A/B Split Testing loader. include_once CARTFLOWS_PRO_DIR . 'modules/ab-test/class-cartflows-pro-ab-test.php'; } /* End-Pro-Feature */ if ( $this->is_woo_active ) { /* Modules */ include_once CARTFLOWS_PRO_DIR . 'modules/shortcodes/class-cartflows-pro-shortcodes.php'; include_once CARTFLOWS_PRO_DIR . 'modules/optin/class-cartflows-pro-optin.php'; include_once CARTFLOWS_PRO_DIR . 'modules/checkout/class-cartflows-pro-checkout.php'; include_once CARTFLOWS_PRO_DIR . 'modules/thankyou/class-cartflows-pro-thankyou.php'; /* Start-Plus-Feature */ include_once CARTFLOWS_PRO_DIR . 'modules/offer/class-cartflows-pro-base-offer.php'; $this->offer = Cartflows_Pro_Base_Offer::get_instance(); include_once CARTFLOWS_PRO_DIR . 'modules/upsell/class-cartflows-pro-upsell.php'; include_once CARTFLOWS_PRO_DIR . 'modules/downsell/class-cartflows-pro-downsell.php'; include_once CARTFLOWS_PRO_DIR . 'modules/orders/class-cartflows-pro-orders.php'; $this->order = Cartflows_Pro_Orders::get_instance(); /* Payment Gateways */ include_once CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-gateway-admin.php'; include_once CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-api-base.php'; include_once CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-gateway.php'; include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-gateways.php'; $this->gateways = Cartflows_Pro_Gateways::get_instance(); /* End-Plus-Feature */ // Feature of Social media tracking loader for steps for users. include_once CARTFLOWS_PRO_DIR . 'classes/class-cartflows-pro-tracking.php'; } include_once CARTFLOWS_PRO_DIR . 'modules/gutenberg/classes/class-cartflows-pro-block-loader.php'; if ( class_exists( '\Elementor\Plugin' ) ) { // Load the widgets. include_once CARTFLOWS_PRO_DIR . 'modules/elementor/class-cartflows-pro-el-widgets-loader.php'; } if ( class_exists( 'FLBuilder' ) ) { include_once CARTFLOWS_PRO_DIR . 'modules/beaver-builder/class-cartflows-pro-bb-modules-loader.php'; } $page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' ); if ( 'bricks-builder' === $page_builder ) { if ( Cartflows_Compatibility::is_bricks_enabled() ) { include_once CARTFLOWS_PRO_DIR . 'modules/bricks/class-cartflows-pro-bricks-elements-loader.php'; } } $this->load_compatibility_classes(); include_once CARTFLOWS_PRO_DIR . 'modules/tracking/class-cartflows-pro-analytics-tracking.php'; include_once CARTFLOWS_PRO_DIR . 'modules/tracking/class-cartflows-pro-analytics-db.php'; // Tracking files. // Removed is_admin condition before including file as to get the pro analytics for weekly emails. include_once CARTFLOWS_PRO_DIR . 'modules/tracking/class-cartflows-pro-analytics-reports.php'; } /** * Local the third-party compatibility classes. * * @return void * @since x.x.x */ public function load_compatibility_classes() { if ( class_exists( 'Affiliate_WP' ) ) { include_once CARTFLOWS_PRO_DIR . 'compatibilities/class-cartflows-pro-affiliate-wp.php'; } if ( class_exists( 'WOOMC\API' ) ) { include_once CARTFLOWS_PRO_DIR . 'compatibilities/class-cartflows-pro-woo-multicurrency.php'; } if ( defined( 'ASTRA_EXT_VER' ) ) { require_once CARTFLOWS_PRO_DIR . 'compatibilities/class-cartflows-astra-pro-compatibility.php'; } // Compatibility file for adding a custom support of MultiCurrency Feature of WooPayments plugin. if ( class_exists( 'WC_Payments' ) ) { include_once CARTFLOWS_PRO_DIR . 'compatibilities/class-cartflows-pro-woo-payments.php'; } } /* Start-Pro-Woo-Feature */ /** * License Setup * * @since 1.1.16 Updated API manager library. * * @return void */ public function licence_setup() { // Load WC_AM_Client class if it exists. if ( ! class_exists( 'WC_AM_Client_2_9_3' ) ) { include_once CARTFLOWS_PRO_DIR . 'classes/class-wc-am-client.php'; } // Instantiate WC_AM_Client class object if the WC_AM_Client class is loaded. if ( class_exists( 'WC_AM_Client_2_9_3' ) ) { /** * This file is only an example that includes a plugin header, and this code used to instantiate the client object. The variable $wcam_lib * can be used to access the public properties from the WC_AM_Client class, but $wcam_lib must have a unique name. To find data saved by * the WC_AM_Client in the options table, search for wc_am_client_{product_id}, so in this example it would be wc_am_client_132967. * * All data here is sent to the WooCommerce API Manager API, except for the $software_title, which is used as a title, and menu label, for * the API Key activation form the client will see. * * **** * NOTE * **** * If $product_id is empty, the customer can manually enter the product_id into a form field on the activation screen. * * @param string $file Must be __FILE__ from the root plugin file, or theme functions, file locations. * @param int $product_id (Optional, can be an empty string) Must match the Product ID number (integer) in the product if set. * @param string $software_version This product's current software version. * @param string $plugin_or_theme 'plugin' or 'theme' * @param string $api_url The URL to the site that is running the API Manager. Example: https://www.toddlahman.com/ Must be the root URL. * @param string $software_title The name, or title, of the product. The title is not sent to the API Manager APIs, but is used for menu titles. * * Example: * * $wcam_lib = new WC_AM_Client_2_9_3( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title ); */ /* * Default Menu Plugin example. * * Second argument must be the Product ID number if used. If left empty the client will need to enter it in the activation form. * The $wcam_lib is optional, and must have a unique name if used to check if the API Key has been activated before allowing use of the plugin/theme. * Remember if the $wcam_lib variable is set it will be globally visible. * * In the two examples below, one has the Product ID set, and the other does not, so it will be an empter string. If the Product ID is not set * the customer will see a form field when activating the API Key that requires the Product ID along with a form field for the API Key. * Setting the Product ID below will eliminate the required form field for the customer to enter the Product ID, so the customer will only * be required to enter the API Key. If you offer the product as a variable product where the customer can switch to another product * with a different Product ID, then do not set the Product ID here. */ global $wcam_lib; $wcam_lib = new WC_AM_Client_2_9_3( CARTFLOWS_PRO_FILE, CARTFLOWS_PRO_PRODUCT_ID, CARTFLOWS_PRO_VER, 'plugin', CARTFLOWS_SERVER_URL, 'cartflows' ); } } /* End-Pro-Woo-Feature */ /** * Fires admin notice when CartFlows is not installed and activated. * * @since 1.0.0 * * @return void */ public function fails_to_load() { $screen = get_current_screen(); $error_wrapper_class = ''; if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) { return; } $plugin = 'cartflows/cartflows.php'; if ( _is_cartflows_installed() ) { if ( ! current_user_can( 'activate_plugins' ) ) { return; } $activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin ); $error_wrapper_class = 'error'; /* translators: %s: html tags */ $message = '

    ' . sprintf( __( 'The %1$s CartFlows Pro %2$s plugin requires %1$s CartFlows %2$s plugin to be activated.', 'cartflows-pro' ), '', '' ) . '

    '; $message .= '

    ' . sprintf( '%s', esc_url( $activation_url ), __( 'Activate CartFlows Now', 'cartflows-pro' ) ) . '

    '; } else { if ( ! current_user_can( 'install_plugins' ) ) { return; } $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=cartflows' ), 'install-plugin_cartflows' ); $error_wrapper_class = 'notice notice-info'; /* translators: %s: html tags */ $message = '

    ' . sprintf( __( 'The %1$s CartFlows Pro %2$s plugin requires %1$s CartFlows %2$s plugin to be installed.', 'cartflows-pro' ), '', '' ) . '

    '; $message .= '

    ' . sprintf( '%s', esc_url( $install_url ), __( 'Install CartFlows Now', 'cartflows-pro' ) ) . '

    '; } echo '

    ' . wp_kses_post( $message ) . '

    '; } /** * Fires admin notice when CartFlows version is not up to data. * * @since 1.0.0 * * @return void */ public function fail_load_out_of_date() { if ( ! current_user_can( 'update_plugins' ) ) { return; } $file_path = 'cartflows/cartflows.php'; $upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path ); /* translators: %%1$s: Plugin name, %2$s: required cartflows version */ $message = '

    ' . sprintf( __( 'You are using an older version of CartFlows. To keep things running smoothly with %1$s, please update CartFlows version %2$s or greater.', 'cartflows-pro' ), CARTFLOWS_PRO_DISPLAY_TITLE, CARTFLOWS_PRO_REQ_CF_VER ) . '

    '; $message .= '

    ' . sprintf( '%s', esc_url( $upgrade_link ), __( 'Update CartFlows Now', 'cartflows-pro' ) ) . '

    '; echo '
    ' . wp_kses_post( $message ) . '
    '; } /** * Load CartFlows Pro Text Domain. * This will load the translation textdomain depending on the file priorities. * 1. Global Languages /wp-content/languages/cartflows-pro/ folder * 2. Local dorectory /wp-content/plugins/cartflows-pro/languages/ folder * * @since 1.0.0 * @return void */ public function load_textdomain() { // Default languages directory for CartFlows Pro. $lang_dir = CARTFLOWS_PRO_DIR . 'languages/'; /** * Filters the languages directory path to use for CartFlows Pro. * * @param string $lang_dir The languages directory path. */ $lang_dir = apply_filters( 'cartflows_pro_languages_directory', $lang_dir ); // Traditional WordPress plugin locale filter. global $wp_version; $get_locale = get_locale(); if ( $wp_version >= 4.7 ) { $get_locale = get_user_locale(); } /** * Language Locale for CartFlows Pro * * @var string $get_locale The locale to use. * Uses get_user_locale()` in WordPress 4.7 or greater, * otherwise uses `get_locale()`. */ $locale = apply_filters( 'plugin_locale', $get_locale, 'cartflows-pro' ); $mofile = sprintf( '%1$s-%2$s.mo', 'cartflows-pro', $locale ); // Setup paths to current locale file. $mofile_local = $lang_dir . $mofile; $mofile_global = WP_LANG_DIR . '/plugins/' . $mofile; if ( file_exists( $mofile_global ) ) { // Look in global /wp-content/languages/cartflows-pro/ folder. load_textdomain( 'cartflows-pro', $mofile_global ); } elseif ( file_exists( $mofile_local ) ) { // Look in local /wp-content/plugins/cartflows-pro/languages/ folder. load_textdomain( 'cartflows-pro', $mofile_local ); } else { // Load the default language files. load_plugin_textdomain( 'cartflows-pro', false, $lang_dir ); } } /** * Activation Reset */ public function activation_reset() { // Load analytics DB class. include_once CARTFLOWS_PRO_DIR . 'modules/tracking/class-cartflows-pro-analytics-db.php'; $cartflows_db = Cartflows_Pro_Analytics_Db::get_instance(); $cartflows_db->create_db_tables(); } /** * Deactivation Reset */ public function deactivation_reset() { } } /** * Prepare if class 'Cartflows_Pro_Loader' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Loader::get_instance(); } if ( ! function_exists( 'wcf_pro' ) ) { /** * Get global class. * * @return Cartflows_Pro_Loader Instance */ function wcf_pro() { return Cartflows_Pro_Loader::get_instance(); } } if ( ! function_exists( '_is_woo_installed' ) ) { /** * Is woocommerce plugin installed. * * @since 1.0.0 * * @access public */ function _is_woo_installed() { $path = 'woocommerce/woocommerce.php'; $plugins = get_plugins(); return isset( $plugins[ $path ] ); } } if ( ! function_exists( '_is_cartflows_installed' ) ) { /** * Is woocommerce plugin installed. * * @since 1.0.0 * * @access public */ function _is_cartflows_installed() { $path = 'cartflows/cartflows.php'; $plugins = get_plugins(); return isset( $plugins[ $path ] ); } } classes/class-cartflows-pro-refund.php000064400000023437147600244370014120 0ustar00 __( 'Permission denied!', 'cartflows-pro' ), ); wp_send_json_error( $result ); } $result = array( 'success' => false, 'msg' => __( 'Unexpected error occoured', 'cartflows-pro' ), ); if ( ! class_exists( 'Cartflows_Pro_Gateways' ) ) { wp_send_json( $result ); } if ( isset( $_POST['security'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['security'] ) ), 'wcf_admin_refund_offer_nonce' ) ) { $order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $offer_id = isset( $_POST['offer_id'] ) ? intval( $_POST['offer_id'] ) : 0; $offer_amount = isset( $_POST['offer_amt'] ) ? floatval( $_POST['offer_amt'] ) : 0; $transaction_id = isset( $_POST['transaction_id'] ) ? sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ) : ''; $refund_amount = $offer_amount; $refund_reason = isset( $_POST['refund_reason'] ) ? sanitize_text_field( wp_unslash( $_POST['refund_reason'] ) ) : ''; $api_refund = filter_input( INPUT_POST, 'api_refund', FILTER_VALIDATE_BOOLEAN ); $restock_refunded_items = filter_input( INPUT_POST, 'restock_refunded_items', FILTER_VALIDATE_BOOLEAN ); $offer_data = array( 'order_id' => $order_id, 'offer_id' => $offer_id, 'transaction_id' => $transaction_id, 'refund_amount' => $refund_amount, 'refund_reason' => $refund_reason, ); $result = array( 'success' => false, 'msg' => __( 'Refund unsuccessful', 'cartflows-pro' ), ); // Get order object. $order = wc_get_order( $order_id ); $payment_method = $order->get_payment_method(); $gateway = wcf_pro()->gateways->load_gateway( $payment_method ); if ( $gateway->is_api_refund() ) { $refund_txn_id = $gateway->process_offer_refund( $order, $offer_data ); } if ( false !== $refund_txn_id ) { // Get Line items. $cartflows_offers = $order->get_items( 'line_item' ); $offer_item = WC_Order_Factory::get_order_item( $offer_id ); $offer_item = WC_Order_Factory::get_order_item( $offer_id ); // Prepare the line items. $line_items[ $offer_id ] = array( 'qty' => max( $offer_item->get_quantity(), 0 ), 'refund_total' => wc_format_decimal( $offer_item->get_total() ), 'refund_tax' => array(), ); $order_taxes = $order->get_taxes(); $tax_data = $offer_item->get_taxes(); $tax_item_total = array(); foreach ( $order_taxes as $tax_item ) { $tax_item_id = $tax_item->get_rate_id(); $tax_item_total[ $tax_item_id ] = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : 0; } $line_items[ $offer_id ]['refund_tax'] = array_filter( array_map( 'wc_format_decimal', $tax_item_total ) ); $refund = wc_create_refund( array( 'amount' => $refund_amount, 'reason' => $refund_reason, 'order_id' => $order_id, 'refund_payment' => false, 'line_items' => $line_items, 'restock_items' => true, ) ); if ( is_wp_error( $refund ) ) { $order->add_order_note( 'Refund of amount - ' . wc_format_decimal( $offer_item->get_total() ) . ' - CartFlows Offer ID - ' . $offer_id . ' - failed for order - ' . $order_id . '. Reason - ' . $refund_reason ); $result['success'] = true; $result['msg'] = __( 'Refund Unsuccessful', 'cartflows-pro' ); } else { wc_update_order_item_meta( $offer_id, '_cartflows_refunded', 'yes' ); $order->add_order_note( 'Refund of amount - ' . wc_format_decimal( $offer_item->get_total() ) . ' - CartFlows Offer ID - ' . $offer_id . ' - completed for order - ' . $order_id . '. Reason - ' . $refund_reason . ' & Refund ID : ' . $refund_txn_id ); $result['success'] = true; $result['msg'] = __( 'Refund Successful', 'cartflows-pro' ); } } } wp_send_json( $result ); } /** * Metabox to display the Upsell Offer refund settings. * * @return void */ public function add_offer_refund_meta_box() { if ( ! class_exists( 'Cartflows_Pro_Gateways' ) ) { return; } if ( ! $this->is_show_refund_metabox() ) { return; } $order_screen_id = $this->is_custom_order_table_controller_available() ? wc_get_page_screen_id( 'shop-order' ) : 'shop_order'; // It will decide whether to show meta box on old order page or new one based on Woo Settings. // Add the refund offer order metabox. add_meta_box( 'wcf-offer-refund-metabox', __( 'CartFlows Refund Offers', 'cartflows-pro' ), array( $this, 'refund_offer_metabox_callback' ), $order_screen_id, 'normal' ); } /** * Check if required class and custom order is enabled. * * @return bool */ public function is_custom_order_table_controller_available() { return class_exists( 'Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' ) && wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() ? true : false; } /** * Maybe show refund meta box. * * @return bool */ public function is_show_refund_metabox() { global $post; $current_screen_id = get_current_screen()->id; if ( in_array( $current_screen_id, array( 'shop_order', 'woocommerce_page_wc-orders' ), true ) ) { // 'woocommerce_page_wc-orders' is screen id of the new order page. $order_id = $post ? $post->ID : 0; /** * Reason for PHPCS ignore: Retrieving the order ID from the URL to check the current page is order page, * and has the flow ID and a valid order placed via CartFlows. */ if ( ! $order_id && isset( $_GET['id'] ) && ! empty( $_GET['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( wp_unslash( $_GET['id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended } if ( ! $order_id ) { return false; } $order = wc_get_order( $order_id ); if ( ! $order ) { return false; } $flow_id = $order->get_meta( '_wcf_flow_id' ); if ( $flow_id < 1 ) { return false; } $is_valid_order = $this->is_valid_order_for_refund( $order ); if ( ! $is_valid_order ) { return false; } return true; } return false; } /** * Include HTML view of the refund metabox. * * @return void */ public function refund_offer_metabox_callback() { include CARTFLOWS_PRO_DIR . 'admin/views/html-refund-offer.php'; } /** * Include HTML view of the refund metabox. * * @return void */ public function add_refund_offer_script() { if ( ! is_admin() ) { return; } if ( ! $this->is_show_refund_metabox() ) { return; } // Enqueue meta-box css. wp_enqueue_style( 'cartflows-refund-offer-metabox', CARTFLOWS_PRO_URL . 'admin/meta-assets/css/refund-offer-meta-box.css', array(), CARTFLOWS_PRO_VER ); // Enqueue meta-box js. wp_enqueue_script( 'cartflows-refund-offer-metabox', CARTFLOWS_PRO_URL . 'admin/meta-assets/js/refund-offer-meta-box.js', array( 'jquery' ), CARTFLOWS_PRO_VER, true ); } /** * Show refund box only for valid orders. * * @param WC_Order $order The order object. * @return bool $show true/false. */ public function is_valid_order_for_refund( $order ) { $is_valid = false; $is_offer = $this->is_offer_present_in_order( $order ); if ( $is_offer ) { $payment_method = $order->get_payment_method(); $gateway_obj = wcf_pro()->gateways->load_gateway( $payment_method ); $main_txn_id = $order->get_transaction_id(); // If gateway supported and main transaction id not empty. if ( $gateway_obj->is_api_refund() && ! empty( $main_txn_id ) ) { $is_valid = true; } } return $is_valid; } /** * Check for the offer is present. * * @param WC_Order $order The order object. * @return bool $offer_exists true/false. */ public function is_offer_present_in_order( $order ) { $offer_exists = false; foreach ( $order->get_items() as $item_id => $item_data ) { $is_upsell = wc_get_order_item_meta( $item_id, '_cartflows_upsell', true ); $is_downsell = wc_get_order_item_meta( $item_id, '_cartflows_downsell', true ); $is_txn_id = wc_get_order_item_meta( $item_id, '_cartflows_offer_txn_id', true ); if ( 'yes' == $is_upsell || 'yes' == $is_downsell && ! empty( $is_txn_id ) ) { $offer_exists = true; break; } } return $offer_exists; } } /** * Prepare if class 'Cartflows_Pro_Refund' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Refund::get_instance(); classes/class-cartflows-pro-session.php000064400000020617147600244370014315 0ustar00get_session_expire_time(); $cookiepath = $this->get_cookiepath(); // Set the browser cookie to expire in 30 minutes. setcookie( CARTFLOWS_SESSION_COOKIE . $flow_id, $key, time() + $expiration_time * MINUTE_IN_SECONDS, $cookiepath, COOKIE_DOMAIN, CARTFLOWS_HTTPS ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie // Try to grab the transient from the database, if it exists. $transient = $data; // Store the transient, but expire in 30 minutes. set_transient( 'cartflows_data_' . $key, $transient, $expiration_time * MINUTE_IN_SECONDS ); wp_cache_set( 'cartflows_data_' . $key, $transient ); wcf()->logger->log( '==== Session Set Info ====' . PHP_EOL . 'Flow-' . $flow_id . ' Session Set : ' . $key . PHP_EOL . 'Flow Info: ' . wp_json_encode( $transient ) . PHP_EOL . ' Current Step-' . wcf_get_current_step_type() . PHP_EOL . '==== Session Set Info ====' . PHP_EOL ); } /** * Get session expiry time ( in minutes ) * * @return int */ public function get_session_expire_time() { return apply_filters( 'cartflows_session_data_expire_time', CARTFLOWS_SESSION_EXPIRE_TIME ); } /** * Update session * * @param int $flow_id flow ID. * @param array $data trasient data. */ public function update_session( $flow_id, $data = array() ) { if ( ! isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { $this->set_session( $flow_id, $data ); } $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); // Try to grab the transient from the database, if it exists. $transient = get_transient( 'cartflows_data_' . $key ); $expiration_time = $this->get_session_expire_time(); $cookiepath = $this->get_cookiepath(); // Set the browser cookie to expire in 30 minutes. setcookie( CARTFLOWS_SESSION_COOKIE . $flow_id, $key, time() + $expiration_time * MINUTE_IN_SECONDS, $cookiepath, COOKIE_DOMAIN, CARTFLOWS_HTTPS ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie // Store the transient, but expire in 30 minutes. set_transient( 'cartflows_data_' . $key, $transient, $expiration_time * MINUTE_IN_SECONDS ); wp_cache_set( 'cartflows_data_' . $key, $transient ); } /** * Destroy session * * @param int $flow_id flow ID. */ public function destroy_session( $flow_id ) { if ( isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); $cookiepath = $this->get_cookiepath(); // Delete Transient. delete_transient( 'cartflows_data_' . $key ); wp_cache_delete( 'cartflows_data_' . $key ); unset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ); // empty value and expiration one hour before. setcookie( CARTFLOWS_SESSION_COOKIE . $flow_id, $key, time() - 3600, $cookiepath, COOKIE_DOMAIN, CARTFLOWS_HTTPS ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie wcf()->logger->log( '==== Start ====' . PHP_EOL . 'Flow-' . $flow_id . ' Session Destroyed : ' . $key . PHP_EOL . ' Current Step-' . wcf_get_current_step_type() . PHP_EOL . '==== Start ====' . PHP_EOL ); } } /** * Get session */ public function get_session() { if ( isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); $data = get_transient( 'cartflows_data_' . $key ); } } /** * Update transient data for cart flows. * * @param int $flow_id flow ID. * @param array $data data. */ public function update_data( $flow_id, $data = array() ) { if ( isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); // Try to grab the transient from the database, if it exists. $transient = get_transient( 'cartflows_data_' . $key ); if ( ! is_array( $transient ) ) { $transient = array(); } $transient = array_merge( $transient, $data ); $expiration_time = $this->get_session_expire_time(); // Store the transient, but expire in 30 minutes. set_transient( 'cartflows_data_' . $key, $transient, $expiration_time * MINUTE_IN_SECONDS ); wp_cache_set( 'cartflows_data_' . $key, $transient ); } } /** * Update transient data for cart flows. * * @param int $flow_id flow ID. * @return bool */ public function get_data( $flow_id ) { if ( isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); // Try to grab the transient from the database, if it exists. $transient = get_transient( 'cartflows_data_' . $key ); if ( is_array( $transient ) ) { return $transient; } } return false; } /** * Check if session is active. * * @param int $flow_id flow ID. * @return bool */ public function is_active_session( $flow_id ) { $is_active = false; wcf()->logger->log( 'Active session : Entering' ); // Reason for PHPCS ignore: Used to check the session key is available in the Cookie & the URL to identify the state of the page/order. //phpcs:disable WordPress.Security.NonceVerification.Recommended if ( isset( $_GET['wcf-sk'] ) && isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { global $post; $step_id = $post && $post->ID ? $post->ID : 0; wcf()->logger->log( 'Session key and cookie found' ); $sk = sanitize_text_field( wp_unslash( $_GET['wcf-sk'] ) ); $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); if ( $sk === $key ) { wcf()->logger->log( 'Session key and cookie matched' ); if ( isset( $_GET['wcf-order'] ) && isset( $_GET['wcf-key'] ) ) { wcf()->logger->log( 'Order and order key found' ); // Get the order. $order_id = empty( $_GET['wcf-order'] ) ? 0 : absint( $_GET['wcf-order'] ); $order_key = empty( $_GET['wcf-key'] ) ? '' : sanitize_text_field( wp_unslash( $_GET['wcf-key'] ) ); if ( $order_id > 0 ) { $order = wc_get_order( $order_id ); wcf()->logger->log( 'Order object found' ); if ( $order && $order->get_order_key() === $order_key ) { $is_active = true; wcf()->logger->log( 'Order verified. Current Page : ' . wcf_get_current_step_type() . ' ID : ' . $step_id ); } } } } } //phpcs:enable WordPress.Security.NonceVerification.Recommended wcf()->logger->log( 'Active session : Exit' ); return apply_filters( 'cartflows_is_active_session', $is_active ); } /** * Get session key for flow * * @param int $flow_id flow ID. * @return bool */ public function get_session_key( $flow_id ) { if ( isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) { $key = sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ); return $key; } return false; } } //phpcs:enable WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Session::get_instance(); classes/class-cartflows-pro-step-factory.php000064400000011415147600244370015246 0ustar00get_step_type(); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { return true; } return false; } /** * Get next step id according to condition. * * @since 1.6.13 * * @return bool|int */ public function get_next_step_id() { $next_step_id = false; $flow_id = $this->get_flow_id(); if ( $flow_id ) { $flow_steps = $this->get_flow_steps(); $control_step = $this->get_control_step(); if ( is_array( $flow_steps ) ) { foreach ( $flow_steps as $index => $data ) { if ( intval( $data['id'] ) === $control_step ) { $next_step_index = $index + 1; if ( isset( $flow_steps[ $next_step_index ] ) ) { $next_step_id = intval( $flow_steps[ $next_step_index ]['id'] ); } break; } } } } return $next_step_id; } /** * Get thank you page ID. * * @since 1.0.0 * * @return bool|int */ public function get_thankyou_page_id() { $steps = $this->get_flow_steps(); $thankyou_step_id = false; $thankyou_step_index = false; if ( empty( $steps ) ) { return $thankyou_step_id; } foreach ( $steps as $i => $step ) { if ( 'thankyou' === $step['type'] ) { $thankyou_step_id = intval( $step['id'] ); break; } } return $thankyou_step_id; } /** * Get prev control id according to condition. * * @since 1.6.13 * * @return bool|int */ public function get_prev_control_id() { $prev_step_id = false; $flow_id = $this->get_flow_id(); if ( $flow_id ) { $flow_steps = $this->get_flow_steps(); $control_step = $this->get_control_step(); if ( is_array( $flow_steps ) ) { foreach ( $flow_steps as $index => $data ) { if ( intval( $data['id'] ) === $control_step ) { $prev_step_index = $index - 1; if ( isset( $flow_steps[ $prev_step_index ] ) ) { $prev_step_id = intval( $flow_steps[ $prev_step_index ]['id'] ); } break; } } } } return $prev_step_id; } /** * Get prev control id according to condition. * * @param int $current_flow flow id. * @param array $flow_cookie_data cookie data. * @since x.x.x * * @return bool|int */ public function get_prev_control_id_for_analytics( $current_flow, $flow_cookie_data ) { $prev_step_id = false; if ( $current_flow ) { $flow_steps = $this->get_flow_steps(); $control_step = $this->get_control_step(); if ( is_array( $flow_steps ) && ! empty( $flow_cookie_data ) ) { foreach ( $flow_steps as $index => $data ) { if ( intval( $data['id'] ) === $control_step ) { $prev_step_id = $this->find_step_id_recursively( $index, $flow_steps, $flow_cookie_data ); } } } } return $prev_step_id; } /** * Get prev control id according to condition. * * @param int $index flow id. * @param array $flow_steps flow steps. * @param array $flow_cookie_data cookie data. * @since x.x.x * */ public function find_step_id_recursively( $index, $flow_steps, $flow_cookie_data ) { $prev_step_index = $index - 1; $prev_step_id = false; if ( $prev_step_index < 0 ) { return $prev_step_id; } if ( isset( $flow_steps[ $prev_step_index ] ) && in_array( $flow_steps[ $prev_step_index ]['id'], $flow_cookie_data, true ) ) { return intval( $flow_steps[ $prev_step_index ]['id'] ); } else { $prev_step_id = $this->find_step_id_recursively( $prev_step_index, $flow_steps, $flow_cookie_data ); } return $prev_step_id; } /** * Get next step if for the given step ID. * * @param int $current_step_id The current step ID. * @param int $step_to_redirect The step to which needs to be redirected by default. * @return int $step_to_redirect the step to which needs to be redirected after found the next step. * @since x.x.x */ public function get_next_step_from_given_step( $current_step_id, $step_to_redirect ) { $flow_id = wcf()->utils->get_flow_id_from_step_id( $current_step_id ); $steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( ! empty( $steps ) && is_array( $steps ) ) { $current_step_found = false; foreach ( $steps as $index => $step ) { if ( $current_step_found ) { if ( in_array( $step['type'], array( 'upsell', 'thankyou' ), true ) ) { $step_to_redirect = $step['id']; break; } } else { if ( intval( $step['id'] ) === $current_step_id ) { $current_step_found = true; } } } } return $step_to_redirect; } } classes/class-cartflows-pro-tracking.php000064400000147542147600244370014443 0ustar00prepare_cart_data_fb_response( 'add_payment_info' ) ); } return $data; } ); } /** * Update the cart data for add payment info event when order bump product is removed from cart. * * @return void */ public function update_cart_data_for_tiktok_event() { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) { if ( 'enable' === self::$tiktok_pixel_settings['enable_tiktok_add_payment_info'] ) { $data['tiktok_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_tiktok_response( 'add_payment_info' ) ); } return $data; } ); } /** * Update the cart data for add payment info event when order bump product is removed from cart. * * @return void */ public function update_cart_data_for_pinterest_event() { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) { if ( 'enable' === self::$pinterest_tag_settings['enable_pinterest_add_payment_info'] ) { $data['pinterest_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_pinterest_response() ); } return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. */ public function trigger_fb_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['added_to_cart_data'] = $this->prepare_fb_response( $product_id ); if ( 'enable' === self::$fb_pixel_settings['facebook_pixel_add_payment_info'] ) { $data['fb_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_fb_response( 'add_payment_info' ) ); } return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. * @return void. */ public function trigger_tiktok_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['tiktok_added_to_cart_data'] = $this->prepare_tiktok_response( $product_id ); if ( 'enable' === self::$tiktok_pixel_settings['enable_tiktok_add_payment_info'] ) { $data['tiktok_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_tiktok_response( 'add_payment_info' ) ); } return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. * @return void. */ public function trigger_snapchat_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['snapchat_added_to_cart_data'] = $this->prepare_snapchat_response( $product_id ); return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. * @return void. */ public function trigger_pinterest_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['pinterest_added_to_cart_data'] = $this->prepare_pinterest_response( $product_id ); if ( 'enable' === self::$pinterest_tag_settings['enable_pinterest_add_payment_info'] ) { $data['pinterest_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_pinterest_response() ); } return $data; } ); } /** * Save the offer details in transient to use for facebook pixel. * * @param object $parent_order parent order id. * @param array $offer_data offer product data. * @param object $child_order child order. */ public function save_offer_data_for_fb( $parent_order, $offer_data, $child_order = null ) { $order_id = null; $user_key = WC()->session->get_customer_id(); if ( $child_order ) { $order_id = $child_order->get_id(); } else { $order_id = $parent_order->get_id(); } $data = array( 'order_id' => $order_id, 'offer_product' => $offer_data, ); set_transient( 'wcf-offer-details-for-fbp-' . $user_key, $data ); } /** * Save the offer details in transient to use for tiktok pixel. * * @param object $parent_order parent order id. * @param array $offer_data offer product data. * @param object $child_order child order. * @return void. */ public function save_offer_data_for_tiktok( $parent_order, $offer_data, $child_order = null ) { $order_id = null; $user_key = WC()->session->get_customer_id(); if ( $child_order ) { $order_id = $child_order->get_id(); } else { $order_id = $parent_order->get_id(); } $data = array( 'order_id' => $order_id, 'offer_product' => $offer_data, ); set_transient( 'wcf-offer-details-for-tiktok-' . $user_key, $data ); } /** * Save the offer details in transient to use for pinterest tag. * * @param object $parent_order parent order id. * @param array $offer_data offer product data. * @param object $child_order child order. * @return void. */ public function save_offer_data_for_pinterest( $parent_order, $offer_data, $child_order = null ) { $order_id = null; $user_key = WC()->session->get_customer_id(); if ( $child_order ) { $order_id = $child_order->get_id(); } else { $order_id = $parent_order->get_id(); } $data = array( 'order_id' => $order_id, 'offer_product' => $offer_data, ); set_transient( 'wcf-offer-details-for-pinterest-' . $user_key, $data ); } /** * Save the offer details in transient to use for Google Analytics. * * @param object $parent_order parent order id. * @param array $offer_data offer product data. * @param object $child_order child order. */ public function save_offer_data_for_ga( $parent_order, $offer_data, $child_order = null ) { $order_id = null; $user_key = WC()->session->get_customer_id(); if ( $child_order ) { $order_id = $child_order->get_id(); } else { $order_id = $parent_order->get_id(); } $data = array( 'order_id' => $order_id, 'offer_product' => $offer_data, ); set_transient( 'wcf-offer-details-for-ga-' . $user_key, $data ); } /** * Save the offer details in transient to use for Google Analytics. * * @since x.x.x * @param object $parent_order parent order id. * @param array $offer_data offer product data. * @param object $child_order child order. * @return void. */ public function save_offer_data_for_gads( $parent_order, $offer_data, $child_order = null ) { $order_id = null; $user_key = WC()->session->get_customer_id(); if ( $child_order ) { $order_id = $child_order->get_id(); } else { $order_id = $parent_order->get_id(); } $data = array( 'order_id' => $order_id, 'offer_product' => $offer_data, ); set_transient( 'wcf-offer-details-for-gads-' . $user_key, $data ); } /** * Save the offer details in transient to use for snapchat pixel. * * @param object $parent_order parent order id. * @param array $offer_data offer product data. * @param object $child_order child order. * @return void. */ public function save_offer_data_for_snapchat( $parent_order, $offer_data, $child_order = null ) { $order_id = null; $user_key = WC()->session->get_customer_id(); if ( $child_order ) { $order_id = $child_order->get_id(); } else { $order_id = $parent_order->get_id(); } $data = array( 'order_id' => $order_id, 'offer_product' => $offer_data, ); set_transient( 'wcf-offer-details-for-snapchat-' . $user_key, $data ); } /** * Trigger the purchase event for the upsell/downsell offer. */ public function trigger_offer_purchase_event() { if ( isset( $_GET['wcf-order'] ) && 'enable' === self::$fb_pixel_settings['facebook_pixel_purchase_complete'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( $_GET['wcf-order'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $user_key = WC()->session->get_customer_id(); $offer_data = get_transient( 'wcf-offer-details-for-fbp-' . $user_key ); if ( empty( $offer_data ) ) { return; } $purchase_details = $this->prepare_offer_purchase_data_fb_response( $order_id, $offer_data ); delete_transient( 'wcf-offer-details-for-fbp-' . $user_key ); if ( ! empty( $purchase_details ) ) { $purchase_details = wp_json_encode( $purchase_details ); $event_script = " "; // Reason for PHPCS ignore: Printing Google Analytics script. No input taken from the user except GA ID. echo html_entity_decode( $event_script ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } /** * Trigger the tiktok purchase event for the upsell/downsell offer. * * @return void. */ public function trigger_offer_purchase_event_for_tiktok() { if ( isset( $_GET['wcf-order'] ) && 'enable' === self::$tiktok_pixel_settings['enable_tiktok_purchase_event'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( $_GET['wcf-order'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $user_key = WC()->session->get_customer_id(); $offer_data = get_transient( 'wcf-offer-details-for-tiktok-' . $user_key ); $event_script = ''; if ( empty( $offer_data ) ) { return; } $purchase_details = $this->prepare_offer_purchase_data_tiktok_response( $order_id, $offer_data ); $cart_details = $this->prepare_offer_accepted_data_tiktok_response( $offer_data ); delete_transient( 'wcf-offer-details-for-tiktok-' . $user_key ); // Apply the filter to check if the 'AddToCart' tracking should be triggered for offer steps. $enable_add_to_cart_tracking = apply_filters( 'cartflows_pro_enable_addtocart_for_offer_steps', true, $order_id ); if ( $enable_add_to_cart_tracking && ! empty( $cart_details ) ) { $cart_details = wp_json_encode( $cart_details ); $event_script .= " "; } if ( ! empty( $purchase_details ) ) { $purchase_details = wp_json_encode( $purchase_details ); $event_script .= " "; } echo html_entity_decode( $event_script ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Trigger the pinterest checkout event for the upsell/downsell offer. * * @return void. */ public function trigger_offer_purchase_event_for_pinterest() { if ( isset( $_GET['wcf-order'] ) && 'enable' === self::$pinterest_tag_settings['enable_pinterest_purchase_event'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( $_GET['wcf-order'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $user_key = WC()->session->get_customer_id(); $offer_data = get_transient( 'wcf-offer-details-for-pinterest-' . $user_key ); $event_script = ''; if ( empty( $offer_data ) ) { return; } $purchase_details = $this->prepare_offer_purchase_data_pinterest_response( $order_id, $offer_data ); $cart_details = $this->prepare_offer_accepted_data_pinterest_response( $offer_data ); delete_transient( 'wcf-offer-details-for-pinterest-' . $user_key ); // Apply the filter to check if the 'AddToCart' tracking should be triggered for offer steps. $enable_add_to_cart_tracking = apply_filters( 'cartflows_pro_enable_addtocart_for_offer_steps', true, $order_id ); if ( $enable_add_to_cart_tracking && ! empty( $cart_details ) ) { $cart_details = wp_json_encode( $cart_details ); $event_script .= " "; } if ( ! empty( $purchase_details ) ) { $purchase_details = wp_json_encode( $purchase_details ); $event_script .= " "; } echo html_entity_decode( $event_script ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Trigger the Snapchat purchase event for the upsell/downsell offer. * * @return void. */ public function trigger_offer_purchase_event_for_snapchat() { if ( isset( $_GET['wcf-order'] ) && 'enable' === self::$snapchat_pixel_settings['enable_snapchat_purchase_event'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( $_GET['wcf-order'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $user_key = WC()->session->get_customer_id(); $offer_data = get_transient( 'wcf-offer-details-for-snapchat-' . $user_key ); $event_script = ''; if ( empty( $offer_data ) ) { return; } $purchase_details = $this->prepare_offer_purchase_data_snapchat_response( $order_id, $offer_data ); $cart_details = $this->prepare_offer_accepted_data_snapchat_response( $offer_data ); delete_transient( 'wcf-offer-details-for-snapchat-' . $user_key ); if ( ! empty( $cart_details ) ) { $cart_details = wp_json_encode( $cart_details ); $event_script .= " "; } if ( ! empty( $purchase_details ) ) { $purchase_details = wp_json_encode( $purchase_details ); $event_script .= " "; } echo html_entity_decode( $event_script ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Trigger the view content event for the upsell/downsell offer. * * @param array $params Facebook event parameters array. * @param int $step_id current step ID. * * @return array */ public function trigger_offer_viewcontent_event( $params, $step_id ) { // Upsell/Downsell Page. if ( isset( $step_id ) && wcf()->utils->check_is_offer_page( $step_id ) ) { return $this->prepare_viewcontent_data_fb_response( $params, $step_id ); } return $params; } /** * Prepare view content data for fb response. * * @param array $params Facebook event parameters array. * @param int $step_id current step id. * * @return array */ public function prepare_viewcontent_data_fb_response( $params, $step_id ) { $product_data = array(); $content_ids = array(); $category_names = ''; $product_names = ''; // Get offer page data. $offer_product = wcf_pro()->utils->get_offer_data( $step_id ); // Add offer data only if the offer data is array and set. if ( ! empty( $offer_product ) && is_array( $offer_product ) ) { $content_ids[] = $offer_product['id']; $category_names = wp_strip_all_tags( wc_get_product_category_list( $offer_product['id'] ) ); $product_data = array( 'cart_contents' => array( 'id' => $offer_product['id'], 'name' => $offer_product['name'], 'price' => $offer_product['price'], 'quantity' => $offer_product['qty'], ), 'content_ids' => $offer_product['id'], 'product_names' => $offer_product['name'], 'category_names' => $category_names, ); $params['content_ids'] = $product_data['content_ids']; $params['currency'] = get_woocommerce_currency(); $params['value'] = $offer_product['total']; $params['content_type'] = 'product'; $params['contents'] = wp_json_encode( $product_data['cart_contents'] ); } return $params; } /** * Trigger the view content event for the upsell/downsell offer. * * @param array $params Tiktok event parameters array. * @param int $step_id current step ID. * * @return array */ public function trigger_offer_viewcontent_event_for_tiktok( $params, $step_id ) { // Upsell/Downsell Page. if ( isset( $step_id ) && wcf()->utils->check_is_offer_page( $step_id ) ) { return $this->prepare_viewcontent_data_tiktok_response( $params, $step_id ); } return $params; } /** * Trigger the view content event for the upsell/downsell offer. * * @param array $params Snapchat event parameters array. * @param int $step_id current step ID. * * @return array */ public function trigger_offer_viewcontent_event_for_snapchat( $params, $step_id ) { // Upsell/Downsell Page. if ( isset( $step_id ) && wcf()->utils->check_is_offer_page( $step_id ) ) { return $this->prepare_viewcontent_data_snapchat_response( $params, $step_id ); } return $params; } /** * Prepare view content data for tiktok response. * * @param array $params Tiktok event parameters array. * @param int $step_id current step id. * * @return array */ public function prepare_viewcontent_data_tiktok_response( $params, $step_id ) { $product_data = array(); $product_names = ''; // Get offer page data. $offer_product = wcf_pro()->utils->get_offer_data( $step_id ); // Add offer data only if the offer data is array and set. if ( ! empty( $offer_product ) && is_array( $offer_product ) ) { $product_data[] = array( 'content_id' => (string) $offer_product['id'], 'content_name' => $offer_product['name'], 'content_type' => 'product', ); // Assign TikTok Pixel fields. $params['currency'] = get_woocommerce_currency(); $params['value'] = $offer_product['total']; $params['contents'] = $product_data; } return $params; } /** * Prepare view content data for Snapchat response. * * @param array $params Snapchat event parameters array. * @param int $step_id current step id. * * @return array */ public function prepare_viewcontent_data_snapchat_response( $params, $step_id ) { // Get offer page data. $offer_product = wcf_pro()->utils->get_offer_data( $step_id ); if ( ! empty( $offer_product ) && is_array( $offer_product ) ) { // Assign snapchat Pixel fields. $params['currency'] = get_woocommerce_currency(); $params['item_ids'] = array_column( $offer_product, 'id' ); $params['item_category'] = implode( ',', array_column( $offer_product, 'category' ) ); $params['number_items'] = count( $offer_product ); $params['price'] = $offer_product['total']; } return $params; } /** * Trigger the purchase event for the upsell/downsell offer. */ public function trigger_offer_purchase_event_for_ga() { if ( isset( $_GET['wcf-order'] ) && 'enable' === self::$ga_settings['enable_add_payment_info'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( $_GET['wcf-order'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $user_key = WC()->session->get_customer_id(); $offer_data = get_transient( 'wcf-offer-details-for-ga-' . $user_key ); if ( empty( $offer_data ) ) { return; } $purchase_details = $this->prepare_offer_purchase_data_ga_response( $order_id, $offer_data ); delete_transient( 'wcf-offer-details-for-ga-' . $user_key ); if ( ! empty( $purchase_details ) ) { $purchase_data = wp_json_encode( $purchase_details ); $event_script = " "; // Reason for PHPCS ignore: Printing Google Analytics script. No input taken from the user except GA ID. echo html_entity_decode( $event_script ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } /** * Trigger the purchase event for the upsell/downsell offer. * * @since x.x.x * @return void. */ public function trigger_offer_purchase_event_for_gads() { if ( isset( $_GET['wcf-order'] ) && isset( self::$gads_settings['google_ads_tracking'] ) && 'enable' === self::$gads_settings['google_ads_tracking'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_id = intval( $_GET['wcf-order'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $user_key = WC()->session->get_customer_id(); $offer_data = get_transient( 'wcf-offer-details-for-gads-' . $user_key ); if ( empty( $offer_data ) ) { return; } $purchase_details = $this->prepare_offer_purchase_data_gads_response( $order_id, (array) $offer_data ); delete_transient( 'wcf-offer-details-for-gads-' . $user_key ); if ( ! empty( $purchase_details ) ) { $purchase_data = wp_json_encode( $purchase_details ); $event_script = " "; // Reason for PHPCS ignore: Printing Google Analytics script. No input taken from the user except GA ID. echo html_entity_decode( $event_script ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } /** * Prepare the purchase event data for the facebook pixel. * * @param integer $order_id order id. * @param array $offer_data offer data. */ public function prepare_offer_purchase_data_fb_response( $order_id, $offer_data ) { $purchase_data = array(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $purchase_data['content_type'] = 'product'; $purchase_data['currency'] = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ); $purchase_data['userAgent'] = wcf()->options->get_checkout_meta_value( $order_id, '_customer_user_agent' ); $purchase_data['plugin'] = 'CartFlows-Offer'; $purchase_data['content_ids'][] = (string) $product_data['id']; $purchase_data['content_names'][] = $product_data['name']; $purchase_data['content_category'][] = wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ); $purchase_data['value'] = $product_data['total']; $purchase_data['transaction_id'] = $offer_data['order_id']; if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $purchase_data['transaction_id'] = $offer_data['order_id'] . '_' . $product_data['step_id']; } return $purchase_data; } /** * Prepare the purchase event data for the tiktok pixel. * * @param integer $order_id order id. * @param array $offer_data offer data. * @return array */ public function prepare_offer_purchase_data_tiktok_response( $order_id, $offer_data ) { $purchase_data = array(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $currency = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ); $purchase_data['currency'] = $currency ? $currency : get_woocommerce_currency(); $purchase_data['userAgent'] = wcf()->options->get_checkout_meta_value( $order_id, '_customer_user_agent' ); $purchase_data['plugin'] = 'CartFlows-Offer'; // Setting up the contents array for TikTok. $purchase_data['contents'][] = array( 'content_id' => (string) $product_data['id'], 'content_name' => $product_data['name'], 'content_type' => 'product', 'content_category' => wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ), ); $purchase_data['value'] = $product_data['total']; $purchase_data['transaction_id'] = $offer_data['order_id']; if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $purchase_data['transaction_id'] = $offer_data['order_id'] . '_' . $product_data['step_id']; } return $purchase_data; } /** * Prepare the checkout event data for the pinterest tag. * * @param integer $order_id order id. * @param array $offer_data offer data. * @return array */ public function prepare_offer_purchase_data_pinterest_response( $order_id, $offer_data ) { $purchase_data = array(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $currency = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ); $purchase_data['currency'] = $currency ? $currency : get_woocommerce_currency(); $purchase_data['value'] = $product_data['total']; $purchase_data['order_quantity'] = $product_data['qty']; $purchase_data['event_id'] = 'eventId' . $order_id; $purchase_data['event_name'] = 'checkout'; $purchase_data['line_items'][] = array( 'product_name' => $product_data['name'], 'product_id' => (string) $product_data['id'], 'product_price' => $product_data['price'], 'product_quantity' => $product_data['qty'], 'product_category' => wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ), ); $purchase_data['transaction_id'] = $offer_data['order_id']; if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $purchase_data['transaction_id'] = $offer_data['order_id'] . '_' . $product_data['step_id']; } return $purchase_data; } /** * Prepare the purchase event data for the snapchat pixel. * * @param integer $order_id order id. * @param array $offer_data offer data. * @return array */ public function prepare_offer_purchase_data_snapchat_response( $order_id, $offer_data ) { $purchase_data = Cartflows_Tracking::get_instance()->prepare_common_data_snapchat_response(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $currency = wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ); $purchase_data['currency'] = $currency ? $currency : get_woocommerce_currency(); $purchase_data['price'] = $product_data['total']; $purchase_data['item_ids'] = array( (string) $product_data['id'] ); $purchase_data['item_category'] = wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ); $purchase_data['number_items'] = WC()->cart->get_cart_contents_count(); $purchase_data['transaction_id'] = $offer_data['order_id']; if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $purchase_data['transaction_id'] = $offer_data['order_id'] . '_' . $product_data['step_id']; } return $purchase_data; } /** * Prepare the addtocart event data for the pinterest tag. * * @param array $offer_data offer data. * @return array */ public function prepare_offer_accepted_data_pinterest_response( $offer_data ) { $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return array(); } $purchase_data = array( 'value' => floatval( $product_data['total'] ), 'order_quantity' => intval( $product_data['qty'] ), 'currency' => get_woocommerce_currency(), 'event_id' => 'eventId' . gmdate( 'YmdHis' ), 'line_items' => array( array( 'product_name' => $product_data['name'], 'product_id' => (string) $product_data['id'], 'product_price' => floatval( $product_data['price'] ), 'product_quantity' => intval( $product_data['qty'] ), 'product_category' => wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ), ), ), ); return $purchase_data; } /** * Prepare the addtocart event data for the tiktok pixel. * * @param array $offer_data offer data. * @return array */ public function prepare_offer_accepted_data_tiktok_response( $offer_data ) { $purchase_data = array(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $purchase_data['currency'] = get_woocommerce_currency(); $purchase_data['plugin'] = 'CartFlows-Offer'; // Setting up the contents array for TikTok. $purchase_data['contents'][] = array( 'content_id' => (string) $product_data['id'], 'content_name' => $product_data['name'], 'content_type' => 'product', 'content_category' => wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ), ); $purchase_data['value'] = $product_data['total']; return $purchase_data; } /** * Prepare the addtocart event data for the tiktok pixel. * * @param array $offer_data offer data. * @return array */ public function prepare_offer_accepted_data_snapchat_response( $offer_data ) { $cart_data = Cartflows_Tracking::get_instance()->prepare_common_data_snapchat_response(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $cart_data; } $cart_data['item_ids'] = array( (string) $product_data['id'] ); $cart_data['item_category'] = wp_strip_all_tags( wc_get_product_category_list( $product_data['id'] ) ); $cart_data['number_items'] = $product_data['qty']; $cart_data['price'] = $product_data['total']; return $cart_data; } /** * Prepare the purchase event data for the google analytics. * * @param integer $order_id order id. * @param array $offer_data offer data. */ public function prepare_offer_purchase_data_ga_response( $order_id, $offer_data ) { $purchase_data = array(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $ga_tracking_id = esc_attr( self::$ga_settings['google_analytics_id'] ); $shipping_tax = $product_data['shipping_fee_tax'] - $product_data['shipping_fee']; $products_tax = $product_data['qty'] * ( $product_data['unit_price_tax'] - intval( $product_data['unit_price'] ) ); $purchase_data = array( 'send_to' => $ga_tracking_id, 'event_category' => 'Enhanced-Ecommerce', 'transaction_id' => $offer_data['order_id'], 'affiliation' => get_bloginfo( 'name' ), 'value' => $this->format_number( $product_data['total'] ), 'currency' => wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ), 'shipping' => $product_data['shipping_fee_tax'], 'tax' => $this->format_number( $shipping_tax + $products_tax ), 'items' => array( array( 'id' => $product_data['id'], 'name' => $product_data['name'], 'quantity' => $product_data['qty'], 'price' => $this->format_number( $product_data['unit_price_tax'] ), ), ), 'non_interaction' => true, ); if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $purchase_data['transaction_id'] = $offer_data['order_id'] . '_' . $product_data['step_id']; } return $purchase_data; } /** * Prepare the purchase event data for the google ads. * * @since x.x.x * @param integer $order_id order id. * @param array $offer_data offer data. * @return array */ public function prepare_offer_purchase_data_gads_response( $order_id, $offer_data ) { $purchase_data = array(); $product_data = $offer_data['offer_product']; if ( empty( $product_data ) ) { return $purchase_data; } $gads_tracking_id = sanitize_text_field( self::$gads_settings['google_ads_id'] ); $gads_conversion_label = sanitize_text_field( self::$gads_settings['google_ads_label'] ); $shipping_tax = $product_data['shipping_fee_tax'] - $product_data['shipping_fee']; $products_tax = $product_data['qty'] * ( $product_data['unit_price_tax'] - floatval( $product_data['unit_price'] ) ); $purchase_data = array( 'send_to' => $gads_tracking_id . '/' . $gads_conversion_label, 'event_category' => 'Enhanced-Ecommerce', 'transaction_id' => $offer_data['order_id'], 'affiliation' => get_bloginfo( 'name' ), 'value' => $this->format_number( $product_data['total'] ), 'currency' => wcf()->options->get_checkout_meta_value( $order_id, '_order_currency' ), 'shipping' => $product_data['shipping_fee_tax'], 'tax' => $this->format_number( $shipping_tax + $products_tax ), 'items' => array( array( 'id' => $product_data['id'], 'name' => $product_data['name'], 'quantity' => $product_data['qty'], 'price' => $this->format_number( $product_data['unit_price_tax'] ), ), ), 'non_interaction' => true, ); if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $purchase_data['transaction_id'] = $offer_data['order_id'] . '_' . $product_data['step_id']; } return $purchase_data; } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. */ public function trigger_ga_add_to_cart_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['ga_added_to_cart_data'] = $this->prepare_ga_response( $product_id ); if ( 'enable' === self::$ga_settings['enable_add_payment_info'] ) { $data['ga_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_ga_response() ); } return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. * @return void */ public function trigger_gads_add_to_cart_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['gads_added_to_cart_data'] = $this->prepare_gads_response( $product_id ); if ( isset( self::$gads_settings['google_ads_tracking'] ) && 'enable' === self::$gads_settings['google_ads_tracking'] ) { $data['gads_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_gads_response() ); } return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. */ public function trigger_ga_remove_from_cart_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $product_data = array(); if ( isset( $data['removed_order_bump_data'] ) ) { $product_data = $data['removed_order_bump_data']; } $data['ga_remove_to_cart_data'] = $this->prepare_ga_response( $product_id, $product_data ); if ( 'enable' === self::$ga_settings['enable_add_payment_info'] ) { $data['ga_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_ga_response() ); } return $data; } ); } /** * Add updated cart and product in Ajax response. * * @param integer $product_id product id. * @return void */ public function update_cart_data_for_gads_event( $product_id ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $product_id ) { $data['gads_remove_to_cart_data'] = $this->prepare_gads_response( $product_id ); if ( isset( self::$gads_settings['google_ads_tracking'] ) && 'enable' === self::$gads_settings['google_ads_tracking'] ) { $data['gads_add_payment_info_data'] = wp_json_encode( Cartflows_Tracking::get_instance()->prepare_cart_data_gads_response() ); } return $data; } ); } /** * Prepare response for facebook. * * @param integer $product_id product id. * @return array */ public function prepare_fb_response( $product_id ) { $response = array(); $product_data = array(); $product = wc_get_product( $product_id ); $items = WC()->cart->get_cart(); foreach ( $items as $index => $item ) { if ( $item['product_id'] === $product_id ) { $product_data = $item; break; } } if ( ! empty( $product_data ) ) { $add_to_cart['content_type'] = 'product'; $add_to_cart['plugin'] = 'CartFlows-OrderBump'; $add_to_cart['user_roles'] = implode( ', ', wp_get_current_user()->roles ); $add_to_cart['content_category'][] = wp_strip_all_tags( wc_get_product_category_list( $product->get_id() ) ); $add_to_cart['currency'] = get_woocommerce_currency(); $add_to_cart['value'] = $this->format_number( $product_data['line_subtotal'] + $product_data['line_subtotal_tax'] ); $add_to_cart['content_name'] = $product->get_title(); $add_to_cart['content_ids'][] = (string) $item['product_id']; $add_to_cart['contents'] = wp_json_encode( array( array( 'id' => $product_data['product_id'], 'name' => $product->get_title(), 'quantity' => $product_data['quantity'], 'item_price' => $this->format_number( $product_data['line_subtotal'] + $product_data['line_subtotal_tax'] ), ), ) ); // Put it in single variable. $response['added_to_cart'] = $add_to_cart; } return $response; } /** * Prepare response for tiktok. * * @param integer $product_id product id. * @return array */ public function prepare_tiktok_response( $product_id ) { $response = array(); $product_data = array(); $product = wc_get_product( $product_id ); $items = WC()->cart->get_cart(); foreach ( $items as $index => $item ) { if ( $item['product_id'] === $product_id ) { $product_data = $item; break; } } if ( ! empty( $product_data ) ) { $add_to_cart['content_type'] = 'product'; $add_to_cart['currency'] = get_woocommerce_currency(); $add_to_cart['value'] = $this->format_number( $product_data['line_subtotal'] + $product_data['line_subtotal_tax'] ); // Building the contents array for TikTok. $add_to_cart['contents'] = array( array( 'content_id' => (string) $item['product_id'], 'content_name' => $product->get_title(), 'quantity' => $product_data['quantity'], 'price' => $this->format_number( $product_data['line_subtotal'] + $product_data['line_subtotal_tax'] ), 'content_type' => 'product', ), ); // Add other required properties. $add_to_cart['plugin'] = 'CartFlows-OrderBump'; $add_to_cart['user_roles'] = implode( ', ', wp_get_current_user()->roles ); // Put it in a single variable. $response['added_to_cart'] = $add_to_cart; } return $response; } /** * Prepare response for pinterest. * * @param integer $product_id product id. * @return array */ public function prepare_pinterest_response( $product_id ) { $response = array(); $product_data = array(); $product = wc_get_product( $product_id ); $items = WC()->cart->get_cart(); foreach ( $items as $index => $item ) { if ( $item['product_id'] === $product_id ) { $product_data = $item; break; } } if ( ! empty( $product_data ) ) { $add_to_cart = array( 'product_name' => $product->get_title(), 'product_id' => (string) $product_id, 'product_price' => $this->format_number( $product_data['line_subtotal'] + $product_data['line_subtotal_tax'] ), 'product_quantity' => $product_data['quantity'], ); // Put it in a single variable. $response['added_to_cart'] = $add_to_cart; } return $response; } /** * Prepare response for tiktok. * * @param integer $product_id product id. * @return array */ public function prepare_snapchat_response( $product_id ) { $response = Cartflows_Tracking::get_instance()->prepare_common_data_snapchat_response(); $product_data = array(); $product = wc_get_product( $product_id ); $items = WC()->cart->get_cart(); foreach ( $items as $index => $item ) { if ( $item['product_id'] === $product_id ) { $product_data = $item; break; } } if ( ! empty( $product_data ) ) { $add_to_cart['currency'] = get_woocommerce_currency(); $add_to_cart['price'] = $this->format_number( $product_data['line_subtotal'] + $product_data['line_subtotal_tax'] ); $add_to_cart['description'] = 'CartFlows-OrderBump'; $add_to_cart['item_ids'] = array( (string) $item['product_id'] ); $add_to_cart['item_category'] = wp_strip_all_tags( wc_get_product_category_list( $item['product_id'] ) ); $add_to_cart['number_items'] = '1'; // Put it in a single variable. $response['added_to_cart'] = $add_to_cart; } return $response; } /** * Prepare response for Google Analytics for Bump Order. * * @param integer $product_id product id. * @param array $product_data product data. */ public function prepare_ga_response( $product_id, $product_data = array() ) { $response = array(); $data = array( 'quantity' => 1, 'price' => 0, ); $product = wc_get_product( $product_id ); if ( $product ) { $items = WC()->cart->get_cart(); foreach ( $items as $index => $item ) { if ( $item['product_id'] === $product_id ) { $data['quantity'] = $item['quantity']; $data['price'] = $item['line_subtotal'] + $item['line_subtotal_tax']; break; } } // For remove from cart event of the order bump. if ( ! empty( $product_data ) ) { $data['quantity'] = $product_data['quantity']; $data['price'] = $product_data['line_subtotal'] + $product_data['line_subtotal_tax']; } $add_to_cart_ob = array( 'send_to' => self::$ga_settings['google_analytics_id'], 'event_category' => 'Enhanced-Ecommerce', 'currency' => get_woocommerce_currency(), 'value' => $this->format_number( $data['price'] ), 'items' => array( array( 'id' => $product_id, 'name' => $product->get_title(), 'sku' => $product->get_sku(), 'category' => wp_strip_all_tags( wc_get_product_category_list( $product->get_id() ) ), 'price' => $this->format_number( $data['price'] ), 'quantity' => $data['quantity'], ), ), 'non_interaction' => true, ); $response['add_to_cart'] = wp_json_encode( $add_to_cart_ob ); $response['remove_from_cart'] = wp_json_encode( $add_to_cart_ob ); } return $response; } /** * Prepare response for Google Ads. * * @since x.x.x * @param integer $product_id product id. * @param array $product_data product data. * @return array */ public function prepare_gads_response( $product_id, $product_data = array() ) { $response = array(); $data = array( 'quantity' => 1, 'price' => 0, ); $product = wc_get_product( $product_id ); if ( $product ) { $items = WC()->cart->get_cart(); foreach ( $items as $index => $item ) { if ( intval( $item['product_id'] ) === intval( $product_id ) ) { $data['quantity'] = $item['quantity']; $data['price'] = $item['line_subtotal'] + $item['line_subtotal_tax']; break; } } // For remove from cart event of the order bump. if ( ! empty( $product_data ) ) { $data['quantity'] = $product_data['quantity']; $data['price'] = $product_data['line_subtotal'] + $product_data['line_subtotal_tax']; } $gads_tracking_id = sanitize_text_field( self::$gads_settings['google_ads_id'] ); $gads_conversion_label = sanitize_text_field( self::$gads_settings['google_ads_label'] ); $add_to_cart_ob = array( 'send_to' => $gads_tracking_id . '/' . $gads_conversion_label, 'event_category' => 'Enhanced-Ecommerce', 'currency' => get_woocommerce_currency(), 'value' => $this->format_number( $data['price'] ), 'items' => array( array( 'id' => $product_id, 'name' => $product->get_title(), 'sku' => $product->get_sku(), 'category' => wp_strip_all_tags( wc_get_product_category_list( $product->get_id() ) ), 'price' => $this->format_number( $data['price'] ), 'quantity' => $data['quantity'], ), ), 'non_interaction' => true, ); $response['add_to_cart'] = wp_json_encode( $add_to_cart_ob ); $response['remove_from_cart'] = wp_json_encode( $add_to_cart_ob ); } return $response; } /** * Get decimal of price. * * @param integer|float $price price. */ public function format_number( $price ) { return number_format( floatval( $price ), wc_get_price_decimals(), '.', '' ); } } /** * Prepare if class 'Cartflows_Pro_Frontend' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Tracking::get_instance(); classes/class-cartflows-pro-update.php000064400000010212147600244370014102 0ustar00 $api_key, 'wc_am_client_cartflows' => $api_key_data, ) ); delete_option( 'wc_am_client_CartFlows_api_key' ); delete_option( 'wc_am_client_CartFlows' ); // Delete the cached value for old user ( before v1.11.0 and after v1.11.0 ) so WP can add new value. wp_cache_flush(); if ( $api_key_data ) { $new_data = array( 'wc_am_client_cartflows_api_key' => isset( $api_key_data['wc_am_client_CartFlows_api_key'] ) ? $api_key_data['wc_am_client_CartFlows_api_key'] : $api_key_data['wc_am_client_cartflows_api_key'], ); update_option( 'wc_am_client_cartflows', $new_data ); } if ( $api_key ) { update_option( 'wc_am_client_cartflows_api_key', $api_key ); } } if ( version_compare( $saved_version, '1.11.7', '<' ) ) { update_option( 'wcf_show_flow_analytics_notice', 'yes' ); } // Update auto saved version number. update_option( 'cartflows-pro-version', CARTFLOWS_PRO_VER ); do_action( 'cartflows_pro_update_after' ); } /** * Offer orders option. * * @since 1.5.5 * @return void */ public static function v_1_5_5() { /* Backward compatible option */ $old_data = array( 'separate_offer_orders' => 'merge', ); Cartflows_Helper::update_admin_settings_option( '_cartflows_offer_global_settings', $old_data, false ); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Update::get_instance(); endif; classes/class-cartflows-pro-utils.php000064400000053627147600244370014001 0ustar00ID; /** * New post data array */ $args = array( 'comment_status' => $post->comment_status, 'ping_status' => $post->ping_status, 'post_author' => $new_post_author, 'post_content' => $post->post_content, 'post_excerpt' => $post->post_excerpt, 'post_name' => $post->post_name, 'post_parent' => $post->post_parent, 'post_password' => $post->post_password, 'post_status' => $post->post_status, 'post_title' => $post->post_title . ' Clone', 'post_type' => $post->post_type, 'to_ping' => $post->to_ping, 'menu_order' => $post->menu_order, ); /** * Insert the post */ $new_step_id = wp_insert_post( $args ); /** * Get all current post terms ad set them to the new post */ // returns array of taxonomy names for post type, ex array("category", "post_tag");. $taxonomies = get_object_taxonomies( $post->post_type ); foreach ( $taxonomies as $taxonomy ) { $post_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'slugs' ) ); wp_set_object_terms( $new_step_id, $post_terms, $taxonomy, false ); } /** * Duplicate all post meta just in two SQL queries */ // @codingStandardsIgnoreStart $post_meta_infos = $wpdb->get_results( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id" ); // @codingStandardsIgnoreEnd if ( ! empty( $post_meta_infos ) ) { $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) VALUES "; $sql_query_sel = array(); foreach ( $post_meta_infos as $meta_info ) { $meta_key = $meta_info->meta_key; if ( '_wp_old_slug' === $meta_key ) { continue; } $meta_value = addslashes( $meta_info->meta_value ); $sql_query_sel[] = "($new_step_id, '$meta_key', '$meta_value')"; } $sql_query .= implode( ',', $sql_query_sel ); // @codingStandardsIgnoreStart $wpdb->query( $sql_query ); // @codingStandardsIgnoreEnd } /* Clear Page Builder Cache */ wcf()->utils->clear_cache(); /** * Return new step id */ return $new_step_id; } return false; } /** * We are using this function mostly in ajax on checkout page * * @param array $post_data post data. * @return bool */ public function get_checkout_id_from_data( $post_data ) { if ( isset( $post_data['_wcf_checkout_id'] ) ) { $checkout_id = filter_var( wp_unslash( $post_data['_wcf_checkout_id'] ), FILTER_SANITIZE_NUMBER_INT ); return intval( $checkout_id ); } return false; } /** * We are using this function mostly in ajax on checkout page * * @param array $post_data post data. * @return bool */ public function get_flow_id_from_data( $post_data ) { if ( isset( $post_data['_wcf_flow_id'] ) ) { $flow_id = filter_var( wp_unslash( $post_data['_wcf_flow_id'] ), FILTER_SANITIZE_NUMBER_INT ); return intval( $flow_id ); } return false; } /** * Fetch updated fragments after cart update. * * @param string $new_key product key. * @param array $data extra data. * @return array. */ public function get_fragments( $new_key, $data = array() ) { $woocommerce_order_review = cartflows_woocommerce_order_review(); if ( isset( $data['checkout_id'] ) ) { $flow_id = wcf()->utils->get_flow_id_from_step_id( $data['checkout_id'] ); // Check if instant layout is enabled. if ( Cartflows_Pro_Helper::is_instant_layout_enabled( intval( $flow_id ) ) ) { // Set force_update_fragment to true. $data['force_update_fragment'] = true; } } ob_start(); $this->woocommerce_checkout_place_order_button(); $woocommerce_checkout_place_order_button = ob_get_clean(); $response = array( 'cart_total' => WC()->cart->total, 'cart_item_key' => $new_key, 'force_update' => isset( $data['force_update_fragment'] ) ? $data['force_update_fragment'] : false, 'fragments' => apply_filters( 'woocommerce_update_order_review_fragments', array( '.woocommerce-checkout-review-order-table' => $woocommerce_order_review, '#place_order' => $woocommerce_checkout_place_order_button, ) ), ); if ( ! empty( $data ) ) { $response['cartflows_data'] = $data; } return $response; } /** * Output the place order button on the checkout. */ public function woocommerce_checkout_place_order_button() { $order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'cartflows-pro' ) ); include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/checkout-button/checkout-button.php'; } /** * Get offer data * * @param int $step_id step ID. * @param int $selected_product_id product ID. * @param int $input_qty qty. * @param int $order_id parent order id. * @return array */ public function get_offer_data( $step_id, $selected_product_id = '', $input_qty = '', $order_id = 0 ) { $data = array(); $subscription_types = array( 'subscription', 'variable-subscription', 'subscription_variation' ); $amount_diff = 0; $cancel_main_order = false; $order = ''; $product_id = 0; if ( empty( $selected_product_id ) ) { $offer_product = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-product' ); if ( isset( $offer_product[0] ) ) { $product_id = $offer_product[0]; } } else { $product_id = $selected_product_id; } $product_id = $this->get_variable_variation_product_id( $product_id ); $product = wc_get_product( $product_id ); if ( $product ) { $product_type = $product->get_type(); $original_price = wcf_pro_filter_price( $product->get_price( 'edit' ), $product_id, 'product' ); $custom_price = $original_price; if ( ! empty( $input_qty ) ) { /* Product Quantity */ $product_qty = intval( $input_qty ); } else { $product_qty = intval( wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-quantity' ) ); } /* Offer Discount */ $discount_type = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-discount' ); if ( ! empty( $discount_type ) ) { $discount_value = floatval( wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-discount-value' ) ); if ( 'discount_percent' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $custom_price - ( ( $custom_price * $discount_value ) / 100 ); } } elseif ( 'discount_price' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $custom_price - $discount_value; } } } /* Set unit discount price */ $unit_price = $custom_price; $unit_price_tax = $custom_price; $display_price = $unit_price; $display_original_price = $original_price; /* Set Product Price */ $product_price = $custom_price; $tax_enabled = get_option( 'woocommerce_calc_taxes' ); $shipping_fee = wcf_pro_filter_price( floatval( wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-flat-shipping-value' ) ) ); // If tax rates are enabled. if ( 'yes' === $tax_enabled ) { // Price excluding tax. if ( wc_prices_include_tax() ) { $product_price = wc_get_price_excluding_tax( $product, array( 'price' => $custom_price ) ); $shipping_excl_tax = wc_get_price_excluding_tax( $product, array( 'price' => $shipping_fee ) ); } else { $custom_price = wc_get_price_including_tax( $product, array( 'price' => $custom_price ) ); $shipping_incl_tax = wc_get_price_including_tax( $product, array( 'price' => $shipping_fee ) ); } /* Set unit price with tax */ $unit_price_tax = $custom_price; // Display the product price including/excluding tax settings. $display_price = $this->get_taxable_offer_product_price( $product, $display_price, $unit_price )['display_price']; // Need to update the display original price in case if upsell has the discount. $display_original_price = $this->get_taxable_offer_product_price( $product, $display_price, $original_price )['original_price']; } $shipping_incl_tax = isset( $shipping_incl_tax ) ? $shipping_incl_tax : $shipping_fee; $shipping_excl_tax = isset( $shipping_excl_tax ) ? $shipping_excl_tax : $shipping_fee; if ( wcf_pro()->is_wcs_active && class_exists( 'WC_Subscriptions_Product' ) && in_array( $product_type, $subscription_types, true ) ) { $subscription_signup_fees = WC_Subscriptions_Product::get_sign_up_fee( $product ); $subscription_signup_fees_new = 0; if ( 0 !== $subscription_signup_fees ) { if ( wc_prices_include_tax() ) { $subscription_signup_fees_new = wc_get_price_excluding_tax( $product, array( 'price' => $subscription_signup_fees ) ); $product_price += $subscription_signup_fees_new; $custom_price += $subscription_signup_fees; } else { $subscription_signup_fees_new = wc_get_price_including_tax( $product, array( 'price' => $subscription_signup_fees ) ); $product_price += $subscription_signup_fees; $custom_price += $subscription_signup_fees_new; } } if ( WC_Subscriptions_Product::get_trial_length( $product ) > 0 ) { if ( wc_prices_include_tax() ) { $product_price = $subscription_signup_fees_new; $custom_price = $subscription_signup_fees; } else { $product_price = $subscription_signup_fees; $custom_price = $subscription_signup_fees_new; } $original_price = $product_price; $unit_price = $product_price; $unit_price_tax = $custom_price; } } if ( $product_qty > 1 ) { $custom_price = $custom_price * $product_qty; $product_price = $product_price * $product_qty; } // add shipping fee to the custom price. $custom_price += $shipping_incl_tax; $is_cancal_main_order = get_post_meta( $step_id, 'wcf-replace-main-order', true ); if ( 'yes' === $is_cancal_main_order && $this->is_separate_offer_order() && 0 !== $order_id ) { $order = wc_get_order( $order_id ); if ( is_object( $order ) && ! $order->has_status( 'cancelled' ) ) { $order_total = $order->get_total(); if ( $custom_price >= $order_total ) { $amount_diff = $custom_price - $order_total; $custom_price = $amount_diff; $cancel_main_order = true; } } } $data = array( 'step_id' => $step_id, 'id' => $product_id, 'name' => $product->get_title(), 'desc' => $product->get_description(), 'short_desc' => $product->get_short_description(), 'qty' => $product_qty, 'original_price' => $original_price, 'unit_price' => $unit_price, 'unit_price_tax' => $unit_price_tax, // This is the single product price with tax required for paypal. 'args' => array( // This is the original product prices required while adding the product in cart, excluding tax. 'subtotal' => $product_price, 'total' => $product_price, ), 'shipping_fee' => $shipping_excl_tax, 'shipping_fee_tax' => $shipping_incl_tax, 'price' => $custom_price, 'url' => $product->get_permalink(), 'total_unit_price_amount' => $unit_price_tax * $product_qty, // This is the order subtotal required for the paypal standard. 'total' => $custom_price, 'cancal_main_order' => $cancel_main_order, 'amount_diff' => $amount_diff, 'display_price' => $display_price, 'display_original_price' => $display_original_price, ); } return $data; } /** * Get product price with tax. * * @param array $product product data. * @param int $display_price product price. * @param int $original_price original product price. */ public function get_taxable_offer_product_price( $product, $display_price, $original_price ) { $display_type = get_option( 'woocommerce_tax_display_cart' ); if ( 'excl' === $display_type ) { $display_price = wc_get_price_excluding_tax( $product, array( 'price' => $display_price ) ); $original_price = wc_get_price_excluding_tax( $product, array( 'price' => $original_price ) ); } else { $display_price = wc_get_price_including_tax( $product, array( 'price' => $display_price ) ); $original_price = wc_get_price_including_tax( $product, array( 'price' => $original_price ) ); } $data = array( 'display_price' => $display_price, 'original_price' => $original_price, ); return $data; } /** * Check if reference transaction for paypal is enabled. * * @return bool */ public function is_reference_transaction() { $settings = Cartflows_Helper::get_common_settings(); if ( isset( $settings['paypal_reference_transactions'] ) && 'enable' == $settings['paypal_reference_transactions'] ) { return true; } return false; } /** * Check if offered product has zero value. * * @return bool */ public function is_zero_value_offered_product() { global $post; $step_id = $post->ID; $offer_product = $this->get_offer_data( $step_id ); if ( array_key_exists( 'total', $offer_product ) && 0 != $offer_product['total'] ) { return false; } return true; } /** * Check if separate order. * * @return bool */ public function is_separate_offer_order() { $settings = Cartflows_Pro_Helper::get_offer_global_settings(); if ( isset( $settings['separate_offer_orders'] ) && 'separate' === $settings['separate_offer_orders'] ) { return true; } return false; } /** * Get assets urls * * @return array * @since 1.1.6 */ public function get_assets_path() { $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } $file_prefix = ''; $dir_name = ''; $is_min = apply_filters( 'cartflows_load_min_assets', false ); if ( $is_min ) { $file_prefix = '.min'; $dir_name = 'min-'; } $js_gen_path = CARTFLOWS_PRO_URL . 'assets/' . $dir_name . 'js/'; $css_gen_path = CARTFLOWS_PRO_URL . 'assets/' . $dir_name . 'css/'; return array( 'css' => $css_gen_path, 'js' => $js_gen_path, 'file_prefix' => $file_prefix, 'rtl' => $rtl, ); } /** * Get assets css url * * @param string $file file name. * @return string * @since 1.1.6 */ public function get_css_url( $file ) { $assets_vars = wcf_pro()->assets_vars; $url = $assets_vars['css'] . $file . $assets_vars['rtl'] . $assets_vars['file_prefix'] . '.css'; return $url; } /** * Get assets js url * * @param string $file file name. * @return string * @since 1.1.6 */ public function get_js_url( $file ) { $assets_vars = wcf_pro()->assets_vars; $url = $assets_vars['js'] . $file . $assets_vars['file_prefix'] . '.js'; return $url; } /** * Apply coupon. * * @param string $discount_type discount type. * @param string $discount_coupon discount coupon. * @return int * @since 1.1.5 */ public function apply_discount_coupon( $discount_type, $discount_coupon ) { $coupon_applied = false; if ( 'coupon' === $discount_type && ! empty( $discount_coupon ) ) { WC()->cart->add_discount( $discount_coupon ); $coupon_applied = true; } return $coupon_applied; } /** * Calculate discount for product. * * @param string $discount_type discount type. * @param int $discount_value discount value. * @param int $product_price product price. * @return float|int|string $custom_price The modified custom price. * @since 1.1.5 */ public function get_calculated_discount( $discount_type, $discount_value, $product_price ) { $custom_price = ''; if ( ! empty( $discount_type ) ) { if ( 'discount_percent' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $product_price - ( ( $product_price * $discount_value ) / 100 ); } } elseif ( 'discount_price' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $product_price - $discount_value; } } } return $custom_price; } /** * Get selected product options. * * @param int $checkout_id Checkout id.. * @param array $saved_product_options Saved product options. * * @return array */ public function get_selected_product_options_data( $checkout_id = '', $saved_product_options = array() ) { if ( empty( $checkout_id ) ) { global $post; $checkout_id = $post->ID; } $checkout_products = wcf()->utils->get_selected_checkout_products( $checkout_id ); if ( ! is_array( $saved_product_options ) ) { $saved_product_options = array(); } if ( is_array( $checkout_products ) ) { foreach ( $checkout_products as $key => $value ) { if ( empty( $value['product'] ) ) { unset( $checkout_products[ $key ] ); continue; } $unique_id = isset( $value['unique_id'] ) ? $value['unique_id'] : ''; if ( isset( $saved_product_options[ $unique_id ] ) ) { $checkout_products[ $key ] = wp_parse_args( $saved_product_options[ $unique_id ], $checkout_products[ $key ] ); } else { $default_data = array( 'product_name' => '', 'product_subtext' => '', 'enable_highlight' => 'no', 'highlight_text' => '', 'add_to_cart' => 'yes', ); $checkout_products[ $key ] = wp_parse_args( $default_data, $checkout_products[ $key ] ); } } } return $checkout_products; } /** * Get selected options, here get default variable variation product id based on default logic. * * @param int $product_id product id. * * @return array */ public function get_variable_variation_product_id( $product_id ) { $product = wc_get_product( $product_id ); if ( $product && $product->is_type( 'variable' ) ) { $default_attributes = $product->get_default_attributes(); if ( ! empty( $default_attributes ) ) { foreach ( $product->get_children() as $c_in => $variation_id ) { if ( 0 === $c_in ) { $product_id = $variation_id; } $single_variation = new WC_Product_Variation( $variation_id ); if ( $default_attributes == $single_variation->get_attributes() ) { $product_id = $variation_id; break; } } } else { $product_childrens = $product->get_children(); if ( is_array( $product_childrens ) ) { foreach ( $product_childrens as $c_in => $c_id ) { $_child_product = wc_get_product( $c_id ); if ( $_child_product->is_in_stock() && 'publish' === $_child_product->get_status() ) { $product_id = $c_id; break; } } } } } return $product_id; } /** * Append the query strings present in the URL to pass it to the next step URL. * This will carry-forward the passed query strings to the next step URL. * * @param array $original_query_strings Default query strings of CartFlows. * @return array $original_query_strings Modified query strings. */ public function may_be_append_query_string( $original_query_strings ) { /** * Backward compatibility. * * Use-case: If the `may_be_append_query_string` is available i:e in the free version then call this function. * * Remove this whole function in the next major update. Possibility in 2.0 */ if ( method_exists( wcf()->utils, 'may_be_append_query_string' ) ) { return wcf()->utils->may_be_append_query_string( $original_query_strings ); } // Check if HTTP_REFERER is set and fetch its query strings. if ( empty( $_SERVER['HTTP_REFERER'] ) ) { return $original_query_strings; } // Get the current page URL and parse it to explode the URL in different URL components. $url_params_components = wp_parse_url( esc_url_raw( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) ); // Process only if the URL components is not empty and query i:e query strings are not empty. if ( is_array( $url_params_components ) && ! empty( $url_params_components['query'] ) ) { // Convert the string query from string to array format. parse_str( $url_params_components['query'], $parsed_query_string ); // Merge the new and already existing query strings. $original_query_strings = array_merge( $original_query_strings, $parsed_query_string ); } // Return the query strings. return $original_query_strings; } /** * Generates a template for displaying license restriction messages. * * This function generates a template for displaying messages related to license restrictions. * * @param array $texts An array containing the template data. * @return string|false The generated template HTML. */ public function get_license_restriction_template( $texts ) { ob_start(); ?> get_currency() : get_woocommerce_currency(); } /** * Get Order ID * * @param obj $order Order. * @return string */ public function get_order_id( $order ) { return $order->get_id(); } } classes/class-cartflows-pro-wp-cli.php000064400000004257147600244370014027 0ustar00 * * @since x.x.x * @param array $args Arguments. * @param array $assoc_args Associated Arguments. * @return void */ public function license( $args = array(), $assoc_args = array() ) { $action = isset( $args[0] ) ? $args[0] : ''; $license_key = isset( $args[1] ) ? $args[1] : ''; if ( empty( $action ) ) { WP_CLI::error( 'Error: Empty file' ); } if ( 'activate' !== $action && 'deactivate' !== $action ) { WP_CLI::error( 'Error: Invalid action' ); } if ( empty( $license_key ) ) { WP_CLI::error( 'Error: Empty license key' ); } /* translators: %s license_key */ $message = sprintf( __( 'Invalid License Key : %s', 'cartflows-pro' ), $license_key ); if ( 'activate' === $action ) { $result = cartflows_pro_activate( $license_key ); if ( isset( $result['success'] ) && true === $result['success'] ) { /* translators: %s license_key */ $message = sprintf( __( 'License Activated : %s', 'cartflows-pro' ), $license_key ); } } else { $result = cartflows_pro_deactivate( $license_key ); if ( isset( $result['success'] ) && true === $result['success'] ) { /* translators: %s license_key */ $message = sprintf( __( 'License Deactivated : %s', 'cartflows-pro' ), $license_key ); } } if ( isset( $result['success'] ) && true === $result['success'] ) { WP_CLI::success( 'License Action : \'' . $action . '\'' ); WP_CLI::success( $message ); } else { WP_CLI::error( $message ); // Added for debugging purpose. WP_CLI::log( print_r( $result ) ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r } } } /** * Add Command */ WP_CLI::add_command( 'cartflows', 'Cartflows_Pro_WP_CLI' ); endif; classes/class-wc-am-client.php000064400000136047147600244370012317 0ustar00menu = $this->clean( $custom_menu ); $this->inactive_notice = $inactive_notice; $this->no_product_id = empty( $product_id ); $this->plugin_or_theme = esc_attr( strtolower( $plugin_or_theme ) ); if ( $this->no_product_id ) { $this->identifier = $this->plugin_or_theme == 'plugin' ? dirname( untrailingslashit( plugin_basename( $file ) ) ) : basename( dirname( plugin_basename( $file ) ) ); $product_id = strtolower( str_ireplace( array( ' ', '_', '&', '?', '-' ), '_', $this->identifier ) ); $this->wc_am_product_id = 'wc_am_product_id_' . $product_id; $this->product_id_chosen = get_option( $this->wc_am_product_id ); } else { /** * Preserve the value of $product_id to use for API requests. Pre 2.0 product_id is a string, and >= 2.0 is an integer. */ if ( is_int( $product_id ) ) { $this->product_id = absint( $product_id ); } else { $this->product_id = esc_attr( $product_id ); } } // If the product_id was not provided, but was saved by the customer, used the saved product_id. if ( empty( $this->product_id ) && ! empty( $this->product_id_chosen ) ) { $this->product_id = $this->product_id_chosen; } $this->file = $file; $this->software_title = esc_attr( $software_title ); $this->software_version = esc_attr( $software_version ); $this->api_url = esc_url( $api_url ); $this->text_domain = esc_attr( $text_domain ); /** * If the product_id is a pre 2.0 string, format it to be used as an option key, otherwise it will be an integer if >= 2.0. */ $this->data_key = 'wc_am_client_' . strtolower( str_ireplace( array( ' ', '_', '&', '?', '-' ), '_', $product_id ) ); $this->wc_am_activated_key = $this->data_key . '_activated'; if ( is_admin() ) { if ( ! empty( $this->plugin_or_theme ) && $this->plugin_or_theme == 'theme' ) { add_action( 'admin_init', array( $this, 'activation' ) ); } if ( ! empty( $this->plugin_or_theme ) && $this->plugin_or_theme == 'plugin' ) { register_activation_hook( $this->file, array( $this, 'activation' ) ); } add_action( 'admin_menu', array( $this, 'register_menu' ) ); add_action( 'admin_init', array( $this, 'load_settings' ) ); // Check for external connection blocking add_action( 'admin_notices', array( $this, 'check_external_blocking' ) ); /** * Set all data defaults here */ $this->wc_am_api_key_key = $this->data_key . '_api_key'; $this->wc_am_instance_key = $this->data_key . '_instance'; /** * Set all admin menu data */ $this->wc_am_deactivate_checkbox_key = $this->data_key . '_deactivate_checkbox'; $this->wc_am_activation_tab_key = $this->data_key . '_dashboard'; $this->wc_am_deactivation_tab_key = $this->data_key . '_deactivation'; $this->wc_am_auto_update_key = $this->data_key . '_auto_update'; $this->wc_am_settings_title = sprintf( __( '%s', $this->text_domain ), ! empty( $this->menu[ 'page_title' ] ) ? $this->menu[ 'page_title' ] : $this->software_title . ' API Key Activation', $this->text_domain ); $this->wc_am_settings_menu_title = sprintf( __( '%s', $this->text_domain ), ! empty( $this->menu[ 'menu_title' ] ) ? $this->menu[ 'menu_title' ] : $this->software_title . ' Activation', $this->text_domain ); $this->wc_am_menu_tab_activation_title = esc_html__( 'API Key Activation', $this->text_domain ); $this->wc_am_menu_tab_deactivation_title = esc_html__( 'API Key Deactivation', $this->text_domain ); /** * Set all software update data here */ $this->data = get_option( $this->data_key ); $this->wc_am_plugin_name = $this->plugin_or_theme == 'plugin' ? untrailingslashit( plugin_basename( $this->file ) ) : basename( dirname( plugin_basename( $file ) ) ); // same as plugin slug. if a theme use a theme name like 'twentyeleven' $this->wc_am_renew_license_url = $this->api_url . 'my-account'; // URL to renew an API Key. Trailing slash in the upgrade_url is required. $this->wc_am_instance_id = get_option( $this->wc_am_instance_key ); // Instance ID (unique to each blog activation) /** * Some web hosts have security policies that block the : (colon) and // (slashes) in http://, * so only the host portion of the URL can be sent. For example the host portion might be * www.example.com or example.com. http://www.example.com includes the scheme http, * and the host www.example.com. * Sending only the host also eliminates issues when a client site changes from http to https, * but their activation still uses the original scheme. * To send only the host, use a line like the one below: * * $this->wc_am_domain = str_ireplace( array( 'http://', 'https://' ), '', home_url() ); // blog domain name */ $this->wc_am_domain = str_ireplace( array( 'http://', 'https://' ), '', home_url() ); // blog domain name $this->wc_am_software_version = $this->software_version; // The software version /** * Check for software updates */ $this->check_for_update(); if ( $this->inactive_notice ) { if ( ! empty( $this->wc_am_activated_key ) && get_option( $this->wc_am_activated_key ) != 'Activated' ) { add_action( 'admin_notices', array( $this, 'inactive_notice' ) ); } } /** * Makes auto updates available if WP >= 5.5. * * @since 2.8 */ $this->try_automatic_updates(); if ( $this->plugin_or_theme == 'plugin' ) { //add_action( 'wp_ajax_update_auto_update_setting', array( $this, 'update_auto_update_setting' ) ); add_filter( 'plugin_auto_update_setting_html', array( $this, 'auto_update_message' ), 10, 3 ); } } /** * Deletes all data if plugin deactivated */ //if ( $this->plugin_or_theme == 'plugin' ) { // register_deactivation_hook( $this->file, array( $this, 'uninstall' ) ); //} // //if ( $this->plugin_or_theme == 'theme' ) { // add_action( 'switch_theme', array( $this, 'uninstall' ) ); //} } /** * Clean variables using sanitize_text_field. Arrays are cleaned recursively. * Non-scalar values are ignored. * * @since 2.9 * * @param string|array $var Data to sanitize. * * @return string|array */ private function clean( $var ) { if ( is_array( $var ) ) { return array_map( array( $this, 'clean' ), $var ); } else { return is_scalar( $var ) ? sanitize_text_field( $var ) : $var; } } /** * Register a menu or submenu specific to this product. * * @updated 2.9 */ public function register_menu() { $page_title = $this->wc_am_settings_title; $menu_title = $this->wc_am_settings_menu_title; $capability = ! empty( $this->menu[ 'capability' ] ) ? $this->menu[ 'capability' ] : 'manage_options'; $menu_slug = ! empty( $this->menu[ 'menu_slug' ] ) ? $this->menu[ 'menu_slug' ] : $this->wc_am_activation_tab_key; $callback = ! empty( $this->menu[ 'callback' ] ) ? $this->menu[ 'callback' ] : array( $this, 'config_page' ); $icon_url = ! empty( $this->menu[ 'icon_url' ] ) ? $this->menu[ 'icon_url' ] : ''; $position = ! empty( $this->menu[ 'position' ] ) ? $this->menu[ 'position' ] : null; if ( is_array( $this->menu ) && ! empty( $this->menu[ 'menu_type' ] ) ) { if ( $this->menu[ 'menu_type' ] == 'add_submenu_page' ) { // add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null ) add_submenu_page( $this->menu[ 'parent_slug' ], $page_title, $menu_title, $capability, $menu_slug, $callback, $position ); } elseif ( $this->menu[ 'menu_type' ] == 'add_options_page' ) { // add_options_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null ) add_options_page( $page_title, $menu_title, $capability, $menu_slug, $callback, $position ); } elseif ( $this->menu[ 'menu_type' ] == 'add_menu_page' ) { // add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '', $position = null ) add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $position ); } } else { // add_options_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = null ) add_options_page( sprintf( __( '%s', $this->text_domain ), $this->wc_am_settings_menu_title ), sprintf( __( '%s', $this->text_domain ), $this->wc_am_settings_menu_title ), 'manage_options', $this->wc_am_activation_tab_key, array( $this, 'config_page' ) ); } } /** * Tries auto updates. * * @since 2.8 */ public function try_automatic_updates() { global $wp_version; if ( version_compare( $wp_version, '5.5', '>=' ) ) { //if ( empty( get_option( $this->wc_am_auto_update_key ) ) ) { // update_option( $this->wc_am_auto_update_key, 'on' ); //} if ( $this->plugin_or_theme == 'plugin' ) { add_filter( 'auto_update_plugin', array( $this, 'maybe_auto_update' ), 10, 2 ); } elseif ( $this->plugin_or_theme == 'theme' ) { add_filter( 'auto_update_theme', array( $this, 'maybe_auto_update' ), 10, 2 ); } } } /** * Tries to set auto updates. * * @since 2.8 * * @param bool|null $update * @param object $item * * @return bool */ public function maybe_auto_update( $update, $item ) { if ( strpos( $this->wc_am_plugin_name, '.php' ) !== 0 ) { $slug = dirname( $this->wc_am_plugin_name ); } else { $slug = $this->wc_am_plugin_name; } if ( isset( $item->slug ) && $item->slug == $slug ) { if ( $this->is_auto_update_disabled() ) { return false; } if ( ! $this->get_api_key_status() || ! $this->get_api_key_status( true ) ) { return false; } return true; } return $update; } /** * Checks if auto updates are disabled. * * @since 2.8 * * @return bool */ public function is_auto_update_disabled() { /* * WordPress will not offer to update if background updates are disabled. * WordPress background updates are disabled if file changes are not allowed. */ if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) { return true; } if ( defined( 'WP_INSTALLING' ) ) { return true; } $wp_updates_disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED; /** * Overrides the WordPress AUTOMATIC_UPDATER_DISABLED constant. * * @param bool $wp_updates_disabled true if disables. false otherwise. */ $wp_updates_disabled = apply_filters( 'automatic_updater_disabled', $wp_updates_disabled ); if ( $wp_updates_disabled ) { return true; } // Return true if this plugin or theme background update is disabled. // return get_option( $this->wc_am_auto_update_key ) !== 'on'; return false; } /** * Filter the auto-update message on the plugins page. * * Plugin updates stored in 'auto_update_plugins' array. * * @see 'wp-admin/includes/class-wp-plugins-list-table.php' * * @since 2.8 * * @param string $html HTML of the auto-update message. * @param string $plugin_file Plugin file. * @param array $plugin_data Plugin details. * * @return mixed|string */ public function auto_update_message( $html, $plugin_file, $plugin_data ) { if ( $this->wc_am_plugin_name == $plugin_file ) { global $status, $page; // if ( ! $this->get_api_key_status( true ) || get_option( $this->wc_am_auto_update_key ) !== 'on' ) { if ( ! $this->get_api_key_status() || ! $this->get_api_key_status( true ) ) { return esc_html__( 'Auto-updates unavailable.', $this->text_domain ); } $auto_updates = (array) get_site_option( 'auto_update_plugins', array() ); $html = array(); if ( ! empty( $plugin_data[ 'auto-update-forced' ] ) ) { if ( $plugin_data[ 'auto-update-forced' ] ) { // Forced on. $text = __( 'Auto-updates enabled' ); } else { $text = __( 'Auto-updates disabled' ); } $action = 'unavailable'; $time_class = ' hidden'; } elseif ( in_array( $plugin_file, $auto_updates, true ) ) { $text = __( 'Disable auto-updates' ); $action = 'disable'; $time_class = ''; } else { $text = __( 'Enable auto-updates' ); $action = 'enable'; $time_class = ' hidden'; } $query_args = array( 'action' => "{$action}-auto-update", 'plugin' => $plugin_file, 'paged' => $page, 'plugin_status' => $status, ); $url = add_query_arg( $query_args, 'plugins.php' ); if ( 'unavailable' === $action ) { $html[] = '' . $text . ''; } else { $html[] = sprintf( '', wp_nonce_url( $url, 'updates' ), $action ); $html[] = ''; $html[] = '' . $text . ''; $html[] = ''; } if ( ! empty( $plugin_data[ 'update' ] ) ) { $html[] = sprintf( '
    %s
    ', $time_class, wp_get_auto_update_message() ); } $html = implode( '', $html ); } return $html; } /** * Generate the default data. */ public function activation() { $instance_exists = get_option( $this->wc_am_instance_key ); if ( get_option( $this->data_key ) === false || $instance_exists === false ) { if ( $instance_exists === false ) { $this->wc_am_instance_id = wp_generate_password( 12, false ); update_option( $this->wc_am_instance_key, $this->wc_am_instance_id ); } update_option( $this->wc_am_deactivate_checkbox_key, 'on' ); update_option( $this->wc_am_activated_key, 'Deactivated' ); } } /** * Deletes all data if plugin deactivated */ public function uninstall() { /** * @since 2.5.1 * * Filter wc_am_client_uninstall_disable * If set to false uninstall() method will be disabled. */ if ( apply_filters( 'wc_am_client_uninstall_disable', true ) ) { global $blog_id; $this->license_key_deactivation(); // Remove options pre API Manager 2.0 if ( is_multisite() ) { switch_to_blog( $blog_id ); foreach ( array( $this->wc_am_instance_key, $this->wc_am_deactivate_checkbox_key, $this->wc_am_activated_key, ) as $option ) { delete_option( $option ); } restore_current_blog(); } else { foreach ( array( $this->wc_am_instance_key, $this->wc_am_deactivate_checkbox_key, $this->wc_am_activated_key ) as $option ) { delete_option( $option ); } } } } /** * Deactivates the license on the API server */ public function license_key_deactivation() { $activation_status = get_option( $this->wc_am_activated_key ); $api_key = ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : ''; $args = array( 'api_key' => $api_key, ); if ( ! empty( $api_key ) && $activation_status == 'Activated' ) { if ( empty( $this->deactivate( $args ) ) ) { add_settings_error( 'not_deactivated_text', 'not_deactivated_error', esc_html__( 'The API Key could not be deactivated. Use the API Key Deactivation tab to manually deactivate the API Key before activating a new API Key. If all else fails, go to Plugins, then deactivate and reactivate this plugin, or if a theme change themes, then change back to this theme, then go to the Settings for this plugin/theme and enter the API Key information again to activate it. Also check the My Account dashboard to see if the API Key for this site was still active before the error message was displayed.', $this->text_domain ), 'updated' ); } } } /** * Displays an inactive notice when the software is inactive. */ public function inactive_notice() { ?> wc_am_activation_tab_key == $_GET[ 'page' ] ) { return; } ?>

    %s API Key has not been activated, so the %s is inactive! %sClick here%s to activate %s.', $this->text_domain ), esc_attr( $this->software_title ), esc_attr( $this->plugin_or_theme ), '', '', esc_attr( $this->software_title ) ); ?>

    api_url, PHP_URL_HOST ); if ( ! defined( 'WP_ACCESSIBLE_HOSTS' ) || stristr( WP_ACCESSIBLE_HOSTS, $host ) === false ) { ?>

    Warning! You\'re blocking external requests which means you won\'t be able to get %s updates. Please add %s to %s.', $this->text_domain ), $this->software_title, '' . $host . '', 'WP_ACCESSIBLE_HOSTS' ); ?>

    wc_am_activation_tab_key => esc_html__( $this->wc_am_menu_tab_activation_title, $this->text_domain ), $this->wc_am_deactivation_tab_key => esc_html__( $this->wc_am_menu_tab_deactivation_title, $this->text_domain ) ); $current_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : $this->wc_am_activation_tab_key; $tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : $this->wc_am_activation_tab_key; ?>

    wc_am_settings_title, $this->text_domain ); ?>

    wc_am_activation_tab_key ) { settings_fields( $this->data_key ); do_settings_sections( $this->wc_am_activation_tab_key ); submit_button( esc_html__( 'Save Changes', $this->text_domain ) ); } else { settings_fields( $this->wc_am_deactivate_checkbox_key ); do_settings_sections( $this->wc_am_deactivation_tab_key ); submit_button( esc_html__( 'Save Changes', $this->text_domain ) ); } ?>
    data_key, $this->data_key, array( $this, 'validate_options' ) ); // API Key add_settings_section( $this->wc_am_api_key_key, esc_html__( 'API Key Activation', $this->text_domain ), array( $this, 'wc_am_api_key_text' ), $this->wc_am_activation_tab_key ); add_settings_field( $this->wc_am_api_key_key, esc_html__( 'API Key', $this->text_domain ), array( $this, 'wc_am_api_key_field' ), $this->wc_am_activation_tab_key, $this->wc_am_api_key_key ); /** * @since 2.3 */ if ( $this->no_product_id ) { add_settings_field( 'product_id', esc_html__( 'Product ID', $this->text_domain ), array( $this, 'wc_am_product_id_field' ), $this->wc_am_activation_tab_key, $this->wc_am_api_key_key ); } /** * @since 2.8 */ //if ( version_compare( $wp_version, '5.5', '>=' ) ) { // add_settings_field( $this->wc_am_auto_update_key, esc_html__( 'Auto Plugin Updates', $this->text_domain ), array( // $this, // 'wc_am_auto_update_radio' // ), $this->wc_am_activation_tab_key, $this->wc_am_api_key_key ); //} add_settings_field( 'status', esc_html__( 'API Key Status', $this->text_domain ), array( $this, 'wc_am_api_key_status' ), $this->wc_am_activation_tab_key, $this->wc_am_api_key_key ); add_settings_field( 'info', esc_html__( 'Activation Info', $this->text_domain ), array( $this, 'wc_am_activation_info' ), $this->wc_am_activation_tab_key, $this->wc_am_api_key_key ); // Activation settings register_setting( $this->wc_am_deactivate_checkbox_key, $this->wc_am_deactivate_checkbox_key, array( $this, 'wc_am_license_key_deactivation' ) ); add_settings_section( 'deactivate_button', esc_html__( 'API Deactivation', $this->text_domain ), array( $this, 'wc_am_deactivate_text' ), $this->wc_am_deactivation_tab_key ); add_settings_field( 'deactivate_button', esc_html__( 'Deactivate API Key', $this->text_domain ), array( $this, 'wc_am_deactivate_textarea' ), $this->wc_am_deactivation_tab_key, 'deactivate_button' ); } // Provides text for api key section public function wc_am_api_key_text() {} // Returns the API Key status from the WooCommerce API Manager on the server public function wc_am_api_key_status() { if ( $this->get_api_key_status( true ) ) { $license_status_check = esc_html__( 'Activated', $this->text_domain ); update_option( $this->wc_am_activated_key, 'Activated' ); update_option( $this->wc_am_deactivate_checkbox_key, 'off' ); } else { $license_status_check = esc_html__( 'Deactivated', $this->text_domain ); } echo esc_attr( $license_status_check ); } /** * Returns the API Key status by querying the Status API function from the WooCommerce API Manager on the server. * * @return array|mixed|object */ public function license_key_status() { $status = $this->status(); return ! empty( $status ) ? json_decode( $this->status(), true ) : $status; } /** * Returns true if the API Key status is Activated. * * @since 2.1 * * @param bool $live Do not set to true if using to activate software. True is for live status checks after activation. * * @return bool */ public function get_api_key_status( $live = false ) { /** * Real-time result. * * @since 2.5.1 */ if ( $live ) { $license_status = $this->license_key_status(); return ! empty( $license_status ) && ! empty( $license_status[ 'data' ][ 'activated' ] ) && $license_status[ 'data' ][ 'activated' ]; } /** * If $live === false. * * Stored result when first activating software. */ return get_option( $this->wc_am_activated_key ) == 'Activated'; } /** * Display activation error returned by shop or local server. * * @since 2.9 */ public function wc_am_activation_info() { $result_error = get_option( 'wc_am_' . $this->product_id . '_activate_error' ); $live_status = json_decode( $this->status(), true ); $line_break = wp_kses_post( '
    ' ); if ( ! empty( $live_status ) && isset( $live_status['success'] ) && $live_status[ 'success' ] == false ) { echo esc_html( 'Error: ' . $live_status[ 'data' ][ 'error' ] ); } if ( $this->get_api_key_status() ) { $result_success = get_option( 'wc_am_' . $this->product_id . '_activate_success' ); if ( ! empty( $live_status ) && isset( $live_status['status_check'] ) && $live_status[ 'success' ] == 'active' ) { echo esc_html( 'Activations purchased: ' . $live_status[ 'data' ][ 'total_activations_purchased' ] ); echo $line_break; echo esc_html( 'Total Activations: ' . $live_status[ 'data' ][ 'total_activations' ] ); echo $line_break; echo esc_html( 'Activations Remaining: ' . $live_status[ 'data' ][ 'activations_remaining' ] ); } elseif ( ! empty( $result_success ) ) { echo esc_html( $result_success ); } else { echo ''; } } elseif ( ! $this->get_api_key_status() && ! empty( $live_status ) && isset( $live_status['status_check'] ) && $live_status[ 'status_check' ] == 'inactive' ) { echo esc_html( 'Activations purchased: ' . $live_status[ 'data' ][ 'total_activations_purchased' ] ); echo $line_break; echo esc_html( 'Total Activations: ' . $live_status[ 'data' ][ 'total_activations' ] ); echo $line_break; echo esc_html( 'Activations Remaining: ' . $live_status[ 'data' ][ 'activations_remaining' ] ); } elseif ( ! $this->get_api_key_status() && ! empty( $result_error ) ) { echo esc_html__( 'Previous activation attempt errors:', $this->text_domain ); echo $line_break; wp_kses_post( print_r( $result_error ) ); } else { echo ''; } } // Returns API Key text field public function wc_am_api_key_field() { $value = ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : ''; // filter @since 2.9.2 $value = apply_filters( 'wc_am_api_key_field_value', $value, $this->data_key, $this->data ); if ( $value ) { echo ""; } else { echo ""; } } /** * @since 2.3 */ public function wc_am_product_id_field() { $product_id = get_option( $this->wc_am_product_id ); if ( ! empty( $product_id ) ) { $this->product_id = $product_id; } if ( ! empty( $product_id ) ) { echo ""; } else { echo ""; } } /** * Radio buttons to toggle auto-updates on or off. * * @since 2.8 */ //public function wc_am_auto_update_radio() { // echo 'wc_am_auto_update_key ), 'on', false ) . '>' . esc_html__( 'On', $this->text_domain ) . '

    '; // echo 'wc_am_auto_update_key ), 'off', false ) . '>' . esc_html__( 'Off', $this->text_domain ); //} /** * Sanitizes and validates all input and output for Dashboard * * @since 2.0 * * @param $input * * @return mixed|string */ public function validate_options( $input ) { // Load existing options, validate, and update with changes from input before returning $options = $this->data; $options[ $this->wc_am_api_key_key ] = trim( $input[ $this->wc_am_api_key_key ] ); $api_key = trim( $input[ $this->wc_am_api_key_key ] ); $activation_status = get_option( $this->wc_am_activated_key ); $checkbox_status = get_option( $this->wc_am_deactivate_checkbox_key ); $current_api_key = ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : ''; /** * @since 2.3 */ if ( $this->no_product_id ) { $new_product_id = absint( $_REQUEST[ $this->wc_am_product_id ] ); if ( ! empty( $new_product_id ) ) { update_option( $this->wc_am_product_id, $new_product_id ); $this->product_id = $new_product_id; } } /** * Toggle auto-updates. * * @since 2.8 */ //if ( ! empty( $_REQUEST[ $this->wc_am_auto_update_key ] ) && $_REQUEST[ $this->wc_am_auto_update_key ] == 'on' ) { // update_option( $this->wc_am_auto_update_key, 'on' ); //} else { // update_option( $this->wc_am_auto_update_key, 'off' ); //} // Should match the settings_fields() value if ( ! empty( $_REQUEST[ 'option_page' ] ) && $_REQUEST[ 'option_page' ] != $this->wc_am_deactivate_checkbox_key ) { //if ( stripos( add_query_arg( null ), $this->wc_am_deactivation_tab_key ) === false ) { if ( $activation_status == 'Deactivated' || $activation_status == '' || $api_key == '' || $checkbox_status == 'on' || $current_api_key != $api_key ) { /** * If this is a new key, and an existing key already exists in the database, * try to deactivate the existing key before activating the new key. */ if ( ! empty( $current_api_key ) && $current_api_key != $api_key ) { $this->replace_license_key( $current_api_key ); } $args = array( 'api_key' => $api_key, ); $activation_result = $this->activate( $args ); if ( ! empty( $activation_result ) ) { $activate_results = json_decode( $activation_result, true ); if ( $activate_results[ 'success' ] === true && $activate_results[ 'activated' ] === true ) { add_settings_error( 'activate_text', 'activate_msg', sprintf( __( '%s activated. ', $this->text_domain ), esc_attr( $this->software_title ) ) . esc_attr( "{$activate_results['message']}." ), 'updated' ); update_option( 'wc_am_' . $this->product_id . '_activate_success', $activate_results[ 'message' ] ); update_option( $this->wc_am_activated_key, 'Activated' ); update_option( $this->wc_am_deactivate_checkbox_key, 'off' ); } if ( $activate_results == false && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { add_settings_error( 'api_key_check_text', 'api_key_check_error', esc_html__( 'Connection failed to the License Key API server. See the Activation Error section below for details. There may be a problem on your server preventing outgoing requests, or the store is blocking your request to activate the plugin/theme.', $this->text_domain ), 'error' ); update_option( $this->wc_am_activated_key, 'Deactivated' ); } if ( isset( $activate_results[ 'data' ][ 'error_code' ] ) && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', esc_attr( "{$activate_results['data']['error']}" ), 'error' ); update_option( $this->wc_am_activated_key, 'Deactivated' ); } } else { add_settings_error( 'not_activated_empty_response_text', 'not_activated_empty_response_error', esc_html__( 'The API Key activation could not be completed due to an error on the store server or your server. See the Activation Error section below for details. The activation results were empty.', $this->text_domain ), 'updated' ); } } // End Plugin Activation } return $options; } /** * Allow other actors to activate a new key programmatically * * @param $api_key * * @return void * @since 2.9.2 */ public function activate_new_key( $api_key ) { $result = $this->activate( [ 'api_key' => $api_key ] ); if ( ! empty( $result ) ) { $result = json_decode( $result, true ); if ( $result['success'] === true && $result['activated'] === true ) { update_option( 'wc_am_' . $this->product_id . '_activate_success', $result['message'] ); update_option( $this->wc_am_activated_key, 'Activated' ); update_option( $this->wc_am_deactivate_checkbox_key, 'off' ); update_option( $this->data_key, [ "{$this->data_key}_api_key" => $api_key ] ); } else { wc_get_logger()->error( print_r( $result, true ), array( 'source' => 'wc_product_sample' ) ); } } } // Deactivates the API Key to allow key to be used on another blog public function wc_am_license_key_deactivation( $input ) { $activation_status = get_option( $this->wc_am_activated_key ); $options = ( $input == 'on' ? 'on' : 'off' ); $args = array( 'api_key' => ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : '', ); if ( ! empty( $this->data[ $this->wc_am_api_key_key ] ) && $options == 'on' && $activation_status == 'Activated' ) { // deactivates API Key key activation $deactivation_result = $this->deactivate( $args ); if ( ! empty( $deactivation_result ) ) { $activate_results = json_decode( $deactivation_result, true ); if ( $activate_results[ 'success' ] === true && $activate_results[ 'deactivated' ] === true ) { if ( ! empty( $this->wc_am_activated_key ) ) { update_option( $this->wc_am_activated_key, 'Deactivated' ); add_settings_error( 'wc_am_deactivate_text', 'deactivate_msg', esc_html__( 'API Key deactivated. ', $this->text_domain ) . esc_attr( "{$activate_results['activations_remaining']}." ), 'updated' ); } return $options; } if ( isset( $activate_results[ 'data' ][ 'error_code' ] ) && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', esc_attr( "{$activate_results['data']['error']}" ), 'error' ); update_option( $this->wc_am_activated_key, 'Deactivated' ); } } else { add_settings_error( 'not_deactivated_empty_response_text', 'not_deactivated_empty_response_error', esc_html__( 'The API Key activation could not be completed due to an unknown error possibly on the store server The activation results were empty.', $this->text_domain ), 'updated' ); } } return $options; } /** * Deactivate the current API Key before activating the new API Key * * @param string $current_api_key */ public function replace_license_key( $current_api_key ) { $args = array( 'api_key' => $current_api_key, ); $this->deactivate( $args ); } public function wc_am_deactivate_text() {} public function wc_am_deactivate_textarea() { echo 'wc_am_deactivate_checkbox_key ), 'on' ); echo '/>'; ?> text_domain ); ?> api_url ) . '&' . http_build_query( $args ); } /** * Sends the request to activate to the API Manager. * * @param array $args * * @return string */ public function activate( $args ) { if ( empty( $args ) ) { add_settings_error( 'not_activated_text', 'not_activated_error', esc_html__( 'The API Key is missing from the deactivation request.', $this->text_domain ), 'updated' ); return ''; } $defaults = array( 'wc_am_action' => 'activate', 'product_id' => $this->product_id, 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain, 'software_version' => $this->wc_am_software_version ); $args = wp_parse_args( $defaults, $args ); $target_url = esc_url_raw( $this->create_software_api_url( $args ) ); $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); // Request failed if ( ! is_wp_error( $request ) && wp_remote_retrieve_response_code( $request ) != 200 ) { update_option( 'wc_am_' . $this->product_id . '_activate_error', $request ); return ''; } elseif ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { update_option( 'wc_am_' . $this->product_id . '_activate_error', 'Error code: ' . $request->get_error_code() . '.
    Error message: ' . $request->get_error_message() . '.
    Error data: ' . $request->get_error_data() ); return ''; } delete_option( 'wc_am_' . $this->product_id . '_activate_error' ); return wp_remote_retrieve_body( $request ); } /** * Sends the request to deactivate to the API Manager. * * @param array $args * * @return string */ public function deactivate( $args ) { if ( empty( $args ) ) { add_settings_error( 'not_deactivated_text', 'not_deactivated_error', esc_html__( 'The API Key is missing from the deactivation request.', $this->text_domain ), 'updated' ); return ''; } $defaults = array( 'wc_am_action' => 'deactivate', 'product_id' => $this->product_id, 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain ); $args = wp_parse_args( $defaults, $args ); $target_url = esc_url_raw( $this->create_software_api_url( $args ) ); $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { // Request failed return ''; } return wp_remote_retrieve_body( $request ); } /** * Sends the status check request to the API Manager. * * @return bool|string */ public function status() { if ( empty( $this->data[ $this->wc_am_api_key_key ] ) ) { return ''; } $defaults = array( 'wc_am_action' => 'status', 'api_key' => $this->data[ $this->wc_am_api_key_key ], 'product_id' => $this->product_id, 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain ); $target_url = esc_url_raw( $this->create_software_api_url( $defaults ) ); $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { // Request failed return ''; } return wp_remote_retrieve_body( $request ); } /** * Check for software updates. */ public function check_for_update() { $this->plugin_name = $this->wc_am_plugin_name; // Slug should be the same as the plugin/theme directory name if ( strpos( $this->plugin_name, '.php' ) !== 0 ) { $this->slug = dirname( $this->plugin_name ); } else { $this->slug = $this->plugin_name; } /********************************************************************* * The plugin and theme filters should not be active at the same time *********************************************************************/ /** * More info: * function set_site_transient moved from wp-includes/functions.php * to wp-includes/option.php in WordPress 3.4 * * set_site_transient() contains the pre_set_site_transient_{$transient} filter * {$transient} is either update_plugins or update_themes * * Transient data for plugins and themes exist in the Options table: * _site_transient_update_themes * _site_transient_update_plugins */ // uses the flag above to determine if this is a plugin or a theme update request if ( $this->plugin_or_theme == 'plugin' ) { /** * Plugin Updates */ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'update_check' ) ); // Check For Plugin Information to display on the update details page add_filter( 'plugins_api', array( $this, 'information_request' ), 10, 3 ); } elseif ( $this->plugin_or_theme == 'theme' ) { /** * Theme Updates */ add_filter( 'pre_set_site_transient_update_themes', array( $this, 'update_check' ) ); // Check For Theme Information to display on the update details page //add_filter( 'themes_api', array( $this, 'information_request' ), 10, 3 ); } } /** * Sends and receives data to and from the server API * * @since 2.0 * * @param array $args * * @return bool|string $response */ public function send_query( $args ) { $target_url = esc_url_raw( add_query_arg( 'wc-api', 'wc-am-api', $this->api_url ) . '&' . http_build_query( $args ) ); $request = wp_safe_remote_post( $target_url, array( 'timeout' => 15 ) ); if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { return false; } $response = wp_remote_retrieve_body( $request ); return ! empty( $response ) ? $response : false; } /** * Check for updates against the remote server. * * @since 2.0 * * @param object $transient * * @return object $transient */ public function update_check( $transient ) { if ( empty( $transient->checked ) ) { return $transient; } $args = array( 'wc_am_action' => 'update', 'slug' => $this->slug, 'plugin_name' => $this->plugin_name, 'version' => $this->wc_am_software_version, 'product_id' => $this->product_id, 'api_key' => ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : '', 'instance' => $this->wc_am_instance_id, ); // Check for a plugin update $response = json_decode( $this->send_query( $args ), true ); // Displays an admin error message in the WordPress dashboard //$this->check_response_for_errors( $response ); if ( isset( $response[ 'data' ][ 'error_code' ] ) ) { add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', "{$response['data']['error']}", 'error' ); } if ( $response !== false && isset( $response['success'] ) && $response['success'] === true ) { // New plugin version from the API $new_ver = (string) $response[ 'data' ][ 'package' ][ 'new_version' ]; // Current installed plugin version $curr_ver = (string) $this->wc_am_software_version; $package = array( 'id' => $response[ 'data' ][ 'package' ][ 'id' ], 'slug' => $response[ 'data' ][ 'package' ][ 'slug' ], 'plugin' => $response[ 'data' ][ 'package' ][ 'plugin' ], 'new_version' => $response[ 'data' ][ 'package' ][ 'new_version' ], 'url' => $response[ 'data' ][ 'package' ][ 'url' ], 'tested' => $response[ 'data' ][ 'package' ][ 'tested' ], 'package' => $response[ 'data' ][ 'package' ][ 'package' ], 'upgrade_notice' => $response[ 'data' ][ 'package' ][ 'upgrade_notice' ], ); if ( isset( $new_ver ) && isset( $curr_ver ) ) { if ( version_compare( $new_ver, $curr_ver, '>' ) ) { if ( $this->plugin_or_theme == 'plugin' ) { $transient->response[ $this->plugin_name ] = (object) $package; unset( $transient->no_update[ $this->plugin_name ] ); } elseif ( $this->plugin_or_theme == 'theme' ) { $transient->response[ $this->plugin_name ][ 'new_version' ] = $response[ 'data' ][ 'package' ][ 'new_version' ]; $transient->response[ $this->plugin_name ][ 'url' ] = $response[ 'data' ][ 'package' ][ 'url' ]; $transient->response[ $this->plugin_name ][ 'package' ] = $response[ 'data' ][ 'package' ][ 'package' ]; } } } } return $transient; } /** * API request for information. * * If `$action` is 'query_plugins' or 'plugin_information', an object MUST be passed. * If `$action` is 'hot_tags` or 'hot_categories', an array should be passed. * * @param false|object|array $result The result object or array. Default false. * @param string $action The type of information being requested from the Plugin Install API. * @param object $args * * @return object */ public function information_request( $result, $action, $args ) { // Check if this plugins API is about this plugin if ( isset( $args->slug ) ) { if ( $args->slug != $this->slug ) { return $result; } } else { return $result; } $args = array( 'wc_am_action' => 'plugininformation', 'plugin_name' => $this->plugin_name, 'version' => $this->wc_am_software_version, 'product_id' => $this->product_id, 'api_key' => ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : '', 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain, ); $response = unserialize( $this->send_query( $args ) ); if ( isset( $response ) && is_object( $response ) && $response !== false ) { return $response; } return $result; } } } classes/index.php000064400000000167147600244370010034 0ustar00utils->is_separate_offer_order() ) { $order_id = $order->get_id(); } else { // Get last placed child order ID. $order_id = end( array_keys( $order->get_meta( '_cartflows_offer_child_orders' ) ) ); } $afw_woo->add_pending_referral( $order_id ); } } } } /** * Prepare if class 'Cartflows_Pro_Affiliate_Wp' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Affiliate_Wp::get_instance(); compatibilities/class-cartflows-pro-woo-multicurrency.php000064400000005242147600244370020062 0ustar00convert( $product_price, Detector::currency_from_cookie(), get_option( 'woocommerce_currency' ) ); if ( 'product' === $context ) { // Fetches selected currency price if set from multi currency plugin in product setting. $converted_price = $this->get_converted_fixed_product_prices( $product_id, $converted_price ); } // Return the converted value. return $converted_price; } /** * Fetches selected currency price if set from multi currency plugin product setting. * * @param int $product_id current product ID. * @param int $converted_price already converted price. * @return int */ public function get_converted_fixed_product_prices( $product_id, $converted_price ) { $product = wc_get_product( $product_id ); $product_info = new Info( $product ); $price_key = 'price'; if ( defined( 'WOOCOMMERCE_MULTICURRENCY_VERSION' ) ) { $price_key = version_compare( WOOCOMMERCE_MULTICURRENCY_VERSION, '2.11.0', '>=' ) ? '_price' : $price_key; } // Return already converted sale or regular price of product. return $product_info->is_custom_priced() ? $product_info->get_custom_price( $price_key ) : $converted_price; } } /** * Prepare if class 'Cartflows_Pro_Frontend' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Woo_Multicurrency::get_instance(); compatibilities/class-cartflows-pro-woo-payments.php000064400000005673147600244370017025 0ustar00get_price( $product_price, 'product' ); } return $product_price; } /** * Convert The currency code according to the selected currency on the page. * * @param string $currency_code The currency code. * @param string $context The context of the action. * * @return string $currency_code The converted currency code. */ public function display_converted_price_currency_code( $currency_code, $context ) { if ( self::$is_multicurrency_enabled && function_exists( 'WC_Payments_Multi_Currency' ) ) { $selected_currency = WC_Payments_Multi_Currency()->get_selected_currency(); $currency_code = $selected_currency->get_code(); } return $currency_code; } /** * Trigger update order review. * * @param bool $bool Trigger update order review. * * @return boolean $bool **/ public function trigger_update_order_review( $bool ) { if ( class_exists( 'WC_Payments' ) ) { $bool = true; } return $bool; } } /** * Prepare if class 'Cartflows_Pro_Woo_Payments' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Woo_Payments::get_instance(); languages/cartflows-pro.pot000064400000410240147600244370012050 0ustar00# Copyright (C) 2025 CartFlows Inc # This file is distributed under the same license as the CartFlows Pro plugin. msgid "" msgstr "" "Project-Id-Version: CartFlows Pro 2.1.4\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cartflows-pro\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "POT-Creation-Date: 2025-01-23T06:00:38+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.5.0\n" "X-Domain: cartflows-pro\n" #. Plugin Name of the plugin msgid "CartFlows Pro" msgstr "" #. Plugin URI of the plugin #. Author URI of the plugin msgid "https://cartflows.com/" msgstr "" #. Description of the plugin msgid "eCommerce on steroid with Order Bump, One Click Upsells and much more!" msgstr "" #. Author of the plugin msgid "CartFlows Inc" msgstr "" #: admin-core/ajax/ajax-errors.php:58 msgid "Sorry, you are not allowed to do this operation." msgstr "" #: admin-core/ajax/ajax-errors.php:59 #: modules/gateways/class-cartflows-pro-gateway-woocommerce-payments.php:141 msgid "Nonce validation failed" msgstr "" #: admin-core/ajax/ajax-errors.php:60 msgid "Sorry, something went wrong." msgstr "" #: admin-core/ajax/flow-analytics.php:154 msgid "Invalid Flow ID has been provided." msgstr "" #: admin-core/ajax/form-fields.php:74 #: admin-core/ajax/form-fields.php:193 #: admin-core/ajax/multiple-order-bump.php:74 #: admin-core/ajax/multiple-order-bump.php:311 #: admin-core/ajax/multiple-order-bump.php:547 #: admin-core/ajax/multiple-order-bump.php:619 #: admin-core/ajax/multiple-order-bump.php:689 #: admin-core/ajax/multiple-order-bump.php:753 #: admin-core/ajax/multiple-order-bump.php:831 #: admin-core/ajax/multiple-order-bump.php:898 msgid "No post data found!" msgstr "" #: admin-core/ajax/form-fields.php:164 msgid "Custom field prepared." msgstr "" #: admin-core/ajax/form-fields.php:172 msgid "Name field is empty!" msgstr "" #: admin-core/ajax/multiple-order-bump.php:88 msgid "Order Bump data not saved." msgstr "" #: admin-core/ajax/multiple-order-bump.php:135 msgid "Order bump settings saved successfully!" msgstr "" #: admin-core/ajax/multiple-order-bump.php:335 msgid "Order Bump Data Retrieved" msgstr "" #: admin-core/ajax/multiple-order-bump.php:342 msgid "No data." msgstr "" #: admin-core/ajax/multiple-order-bump.php:561 msgid "Cant update order bump status!" msgstr "" #: admin-core/ajax/multiple-order-bump.php:593 msgid "Order Bump Status Updated Succesfully" msgstr "" #: admin-core/ajax/multiple-order-bump.php:633 msgid "Cant delete order bump!" msgstr "" #: admin-core/ajax/multiple-order-bump.php:664 msgid "Order Bump Deleted Succesfully" msgstr "" #: admin-core/ajax/multiple-order-bump.php:726 msgid "Order Bump Added Succesfully" msgstr "" #: admin-core/ajax/multiple-order-bump.php:733 msgid "Cant add order bump!" msgstr "" #: admin-core/ajax/multiple-order-bump.php:767 msgid "Can't clone the order bump! Order Bump ID or Page ID not found." msgstr "" #: admin-core/ajax/multiple-order-bump.php:796 msgid " Clone" msgstr "" #: admin-core/ajax/multiple-order-bump.php:808 msgid "Order Bump Cloned Succesfully" msgstr "" #: admin-core/ajax/multiple-order-bump.php:871 msgid "Order Bump Title Updated Succesfully" msgstr "" #: admin-core/ajax/multiple-order-bump.php:879 msgid "Order Bump Title Not Updated." msgstr "" #: admin-core/ajax/multiple-order-bump.php:916 msgid "Order Bumps not sorted." msgstr "" #. translators: %s step id #: admin-core/ajax/multiple-order-bump.php:943 msgid "Order Bump sorted for step - %s" msgstr "" #: admin-core/api/ob-product-data.php:67 msgid "Step ID." msgstr "" #: admin-core/api/ob-product-data.php:97 msgid "Sorry, WooCommerce need to be installed & activated to call API." msgstr "" #: admin-core/api/ob-product-data.php:142 msgid "Sorry, you cannot list resources." msgstr "" #: admin-core/inc/admin-hooks.php:226 msgid "YES : " msgstr "" #: admin-core/inc/admin-hooks.php:228 msgid "YES : Step not Found" msgstr "" #: admin-core/inc/admin-hooks.php:233 msgid "No : " msgstr "" #: admin-core/inc/admin-hooks.php:235 msgid "No : Step not Found" msgstr "" #: admin-core/inc/global-settings-pro.php:79 #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:97 #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:161 msgid "Nonce verification failed." msgstr "" #: admin-core/inc/global-settings-pro.php:194 msgid "Enable Pre Checkout Offers" msgstr "" #: admin-core/inc/global-settings-pro.php:195 msgid "If enable, it will add the Pre Checkout Offer settings in checkout step settings." msgstr "" #: admin-core/inc/global-settings-pro.php:207 msgid "Enable PayPal Reference Transactions." msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: admin-core/inc/global-settings-pro.php:209 msgid "This option will work with %1$1s PayPal Standard%2$2s & %3$3s PayPal Checkout%4$4s Gateways only. To know more about PayPal reference transactions %5$5s click here. %6$6s" msgstr "" #: admin-core/inc/global-settings-pro.php:222 msgid "Create a new child order (Recommended)" msgstr "" #: admin-core/inc/global-settings-pro.php:223 msgid "This option create a new order for all accepted upsell/downsell offers. Main order will be parent order for them." msgstr "" #: admin-core/inc/global-settings-pro.php:227 msgid "Add to main order" msgstr "" #: admin-core/inc/global-settings-pro.php:228 msgid "This option will merge all accepted upsell/downsell offers into main order." msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: admin-core/inc/global-settings-pro.php:235 msgid "For more information about the offer settings please %1$1s Click here. %2$2s" msgstr "" #: admin-core/inc/global-settings-pro.php:248 msgid "Enter License Key" msgstr "" #: admin-core/inc/global-settings-pro.php:249 msgid "Enter your license key" msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: admin-core/inc/global-settings-pro.php:255 msgid "If you don't have License key, you can get it from %1$shere%2$s" msgstr "" #: admin-core/inc/global-settings-pro.php:269 msgid "A/B test Pemalink" msgstr "" #: admin-core/inc/global-settings-pro.php:275 msgid "Override Permalink for A/B test" msgstr "" #: admin-core/inc/global-settings-pro.php:276 msgid "If enable, it will use same permalink for all variants." msgstr "" #: admin-core/views/license-log.php:27 msgid "License debug log" msgstr "" #: admin-core/views/license-log.php:34 msgid "License Arguments:" msgstr "" #: admin-core/views/license-log.php:46 msgid "License Call:" msgstr "" #: admin-core/views/license-log.php:53 msgid "License API Response:" msgstr "" #: admin/views/html-refund-offer.php:86 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:138 msgid "Product Name" msgstr "" #: admin/views/html-refund-offer.php:87 msgid "Offer Type" msgstr "" #: admin/views/html-refund-offer.php:88 #: modules/checkout/templates/your-product/product-table-titles.php:23 msgid "Quantity" msgstr "" #: admin/views/html-refund-offer.php:89 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:173 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:397 #: modules/checkout/templates/checkout/multistep-review-order.php:115 #: modules/thankyou/template/child-order-details.php:59 msgid "Total" msgstr "" #: admin/views/html-refund-offer.php:90 msgid "Action" msgstr "" #. translators: %1$s: item total, %2$s: tax, %3$s: product total #: admin/views/html-refund-offer.php:136 msgid "
    Item Prices: %1$s
    Tax & Other: %2$s
    Total: %3$s
    " msgstr "" #: admin/views/html-refund-offer.php:155 msgid "Refund" msgstr "" #: admin/views/html-refund-offer.php:158 msgid "Refunded" msgstr "" #: admin/views/html-refund-offer.php:176 msgid "Use WooCommerce's refund feature to refund the main order. You can refund upsell/downsell offers from this section. Always refund upsell/downsell offers first & then refund the main order." msgstr "" #: admin/views/html-refund-offer.php:181 msgid "Refunds are not available for any offer(s) against this order." msgstr "" #: classes/class-cartflows-pro-admin-helper.php:48 msgid "Upsell ( Woo )" msgstr "" #: classes/class-cartflows-pro-admin-helper.php:49 msgid "Downsell ( Woo )" msgstr "" #: classes/class-cartflows-pro-admin-helper.php:50 msgid "Thankyou ( Woo )" msgstr "" #. translators: %1$s: HTML, %2$s: HTML #: classes/class-cartflows-pro-admin.php:202 msgid "%1$sYou are installing the lower plan of the CartFlows compared to what currently you have, it will disable some pro features that you might be using. %2$s" msgstr "" #. translators: %1$s: HTML, %2$s: HTML #: classes/class-cartflows-pro-admin.php:208 msgid "%1$sYou are installing the lower plan of the CartFlows compared to what currently you have, it will disable some plus features that you might be using. %2$s" msgstr "" #: classes/class-cartflows-pro-admin.php:230 msgid "CartFlows is migrating the old order bump to the new one in the background. The migration process may take a little while, so please be patient." msgstr "" #: classes/class-cartflows-pro-admin.php:231 #: classes/class-cartflows-pro-admin.php:440 msgid "View Progress >>" msgstr "" #: classes/class-cartflows-pro-admin.php:285 msgid "Hurray! CartFlows Multiple Order Bump migration process is completed successfully." msgstr "" #: classes/class-cartflows-pro-admin.php:316 #: classes/class-cartflows-pro-admin.php:470 msgid "Cannot schedule a migration. Action scheduler function not found." msgstr "" #: classes/class-cartflows-pro-admin.php:326 msgid "Order Bump 1st migration action scheduled successfully." msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: classes/class-cartflows-pro-admin.php:356 msgid "CartFlows is migrating the old order bump to the new one in the background. The migration process may take a little while, so please be patient. %1$1s View Progress >> %2$2s" msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: classes/class-cartflows-pro-admin.php:358 msgid "CartFlows is migrating the pre checkout offer styles in the background. The migration process may take a little while, so please be patient. %1$1s View Progress >> %2$2s" msgstr "" #: classes/class-cartflows-pro-admin.php:376 msgid "We have introduced the multiple order bump feature. If your checkout page has the order bump feature enabled, you need to migrate an old order bump settings to the new multiple order bump settings." msgstr "" #: classes/class-cartflows-pro-admin.php:378 msgid "Migrate Order Bump" msgstr "" #: classes/class-cartflows-pro-admin.php:397 msgid "We have moved the pre-checkout offer styling option from the page builder settings and added it to the checkout offer tab. If your checkout page has the pre-checkout feature enabled, then you need to migrate those settings." msgstr "" #: classes/class-cartflows-pro-admin.php:399 msgid "Migrate pre-checkout offer styles" msgstr "" #: classes/class-cartflows-pro-admin.php:417 msgid "Hurray! CartFlows pre checkout offer styles migration process is completed successfully." msgstr "" #: classes/class-cartflows-pro-admin.php:439 msgid "CartFlows is migrating the pre checkout offer styles in the background. The migration process may take a little while, so please be patient." msgstr "" #: classes/class-cartflows-pro-admin.php:480 msgid "1st migration action scheduled successfully." msgstr "" #: classes/class-cartflows-pro-admin.php:603 msgid "Upsell Offer" msgstr "" #: classes/class-cartflows-pro-admin.php:605 msgid "Downsell Offer" msgstr "" #: classes/class-cartflows-pro-default-meta.php:81 msgid "Nonce validation failed." msgstr "" #: classes/class-cartflows-pro-default-meta.php:258 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:247 msgid "Processing Order..." msgstr "" #: classes/class-cartflows-pro-default-meta.php:262 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:254 msgid "Product Added Successfully." msgstr "" #: classes/class-cartflows-pro-default-meta.php:266 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:261 msgid "Oooops! Your Payment Failed." msgstr "" #: classes/class-cartflows-pro-default-meta.php:270 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:268 msgid "Please wait while we process your payment..." msgstr "" #: classes/class-cartflows-pro-flow-frontend.php:69 msgid "Loading..." msgstr "" #: classes/class-cartflows-pro-flow-frontend.php:73 msgid "Please wait while we redirect you..." msgstr "" #: classes/class-cartflows-pro-frontend.php:283 msgid "Your session is expired" msgstr "" #. translators: %1$s: payment gateway names, %2$s: link start, %3$s: link end #: classes/class-cartflows-pro-gateways.php:349 msgid "CartFlows Upsell/Downsell offer does not support the %1$s payment gateway. Please find the supported payment gateways %2$shere%3$s." msgstr "" #: classes/class-cartflows-pro-helper.php:192 #: classes/class-cartflows-pro-licence.php:533 msgid "No error found." msgstr "" #: classes/class-cartflows-pro-helper.php:202 msgid "API call to create a purchase failed." msgstr "" #: classes/class-cartflows-pro-licence.php:139 #: classes/class-cartflows-pro-licence.php:334 #: classes/class-cartflows-pro-licence.php:417 #: classes/class-cartflows-pro-refund.php:63 msgid "Permission denied!" msgstr "" #. translators: %1$s Software Title, %2$s Plugin, %3$s Anchor opening tag, %4$s Anchor closing tag, %5$s Software Title. #: classes/class-cartflows-pro-licence.php:175 msgid "The %1$s License Key has not been activated, so the %2$s is inactive! %3$sClick here%4$s to activate %5$s." msgstr "" #. translators: %1$s,%2$s: Find API key article link #: classes/class-cartflows-pro-licence.php:203 msgid "If you don't have License key, you can get it from %1$s here%2$s." msgstr "" #: classes/class-cartflows-pro-licence.php:213 #: classes/class-cartflows-pro-licence.php:278 #: classes/class-cartflows-pro-utils.php:783 msgid "Activate License" msgstr "" #: classes/class-cartflows-pro-licence.php:223 #: classes/class-cartflows-pro-licence.php:253 msgid "License Key" msgstr "" #: classes/class-cartflows-pro-licence.php:225 msgid "Enter your License Key" msgstr "" #: classes/class-cartflows-pro-licence.php:245 msgid "Activate" msgstr "" #: classes/class-cartflows-pro-licence.php:261 msgid "Deactivate" msgstr "" #: classes/class-cartflows-pro-licence.php:278 #: classes/class-cartflows-pro-licence.php:280 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:118 msgid "Settings" msgstr "" #: classes/class-cartflows-pro-licence.php:280 msgid "Deactivate License" msgstr "" #: classes/class-cartflows-pro-licence.php:345 #: classes/class-cartflows-pro-licence.php:428 msgid "Oops! Security nonce is invalid." msgstr "" #. translators: %1$s: HTML, %2$s: HTML #: classes/class-cartflows-pro-licence.php:544 msgid "For more information, please check this %1$sarticle%2$s." msgstr "" #. translators: %1$s: HTML, %2$s: HTML, %3$s: HTML #: classes/class-cartflows-pro-licence.php:557 msgid "Sorry for the inconvenience, but your website seems to be having trouble connecting to our licensing system. %1$s Please open a technical %2$ssupport ticket%3$s and share the server's outgoing IP address." msgstr "" #: classes/class-cartflows-pro-license-helper.php:42 msgid "Provide a license key to process license request!" msgstr "" #: classes/class-cartflows-pro-license-helper.php:46 msgid "Provide a license request!" msgstr "" #: classes/class-cartflows-pro-license-helper.php:52 msgid "Invalid license request!" msgstr "" #. translators: %s: html tags #: classes/class-cartflows-pro-loader.php:522 msgid "The %1$s CartFlows Pro %2$s plugin requires %1$s CartFlows %2$s plugin to be activated." msgstr "" #: classes/class-cartflows-pro-loader.php:523 msgid "Activate CartFlows Now" msgstr "" #. translators: %s: html tags #: classes/class-cartflows-pro-loader.php:531 msgid "The %1$s CartFlows Pro %2$s plugin requires %1$s CartFlows %2$s plugin to be installed." msgstr "" #: classes/class-cartflows-pro-loader.php:532 msgid "Install CartFlows Now" msgstr "" #. translators: %%1$s: Plugin name, %2$s: required cartflows version #: classes/class-cartflows-pro-loader.php:555 msgid "You are using an older version of CartFlows. To keep things running smoothly with %1$s, please update CartFlows version %2$s or greater." msgstr "" #: classes/class-cartflows-pro-loader.php:556 msgid "Update CartFlows Now" msgstr "" #: classes/class-cartflows-pro-refund.php:71 msgid "Unexpected error occoured" msgstr "" #: classes/class-cartflows-pro-refund.php:100 msgid "Refund unsuccessful" msgstr "" #: classes/class-cartflows-pro-refund.php:155 msgid "Refund Unsuccessful" msgstr "" #: classes/class-cartflows-pro-refund.php:163 msgid "Refund Successful" msgstr "" #: classes/class-cartflows-pro-refund.php:193 msgid "CartFlows Refund Offers" msgstr "" #: classes/class-cartflows-pro-utils.php:231 msgid "Place order" msgstr "" #. translators: %s license_key #: classes/class-cartflows-pro-wp-cli.php:52 msgid "Invalid License Key : %s" msgstr "" #. translators: %s license_key #: classes/class-cartflows-pro-wp-cli.php:58 msgid "License Activated : %s" msgstr "" #. translators: %s license_key #: classes/class-cartflows-pro-wp-cli.php:65 msgid "License Deactivated : %s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:233 msgid "Step not deleted for flow - %s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:250 msgid "Step deleted for flow - %s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:278 msgid "Can't archive this step - %1$s. Funnel - %2$s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:291 #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:651 msgid "Step - %1$s archived. Funnel - %2$s" msgstr "" #. translators: %s step id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:318 msgid "Can't create a variation for this step - %s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:378 msgid "Variation created for step - %s" msgstr "" #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:406 msgid "Can't start a split test" msgstr "" #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:417 msgid "Stop Split Test" msgstr "" #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:431 msgid "Start Split Test" msgstr "" #. translators: %s step id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:476 msgid "Can't update the winner for this step - %s" msgstr "" #. translators: %s step id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:572 msgid "Winner updated for this step - %s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:603 msgid "Can't clone this step - %1$s. Funnel - %2$s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:683 msgid "Can't restore this variation - %1$s. Funnel - %2$s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:744 msgid "Variation - %1$s restored. Funnel - %2$s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:773 msgid "Can't delete this variation - %1$s. Funnel - %2$s" msgstr "" #. translators: %s flow id #: modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php:819 msgid "Variation - %1$s deleted. Funnel - %2$s" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:214 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:369 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:629 msgid "Explore Product Options" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:216 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:371 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:631 msgid "Easily customize and select multiple products during checkout to match your preferences and needs." msgstr "" #. translators: %1$1s, %2$2s Link to meta #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:224 msgid "Please enable \"Product-Options\" from %1$1shere%2$2s to edit options." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:236 msgid "Select Position" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:239 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1121 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:321 msgid "Before Checkout" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:240 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1125 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2540 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:322 msgid "After Customer Details" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:241 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2544 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:323 msgid "Before Order Review" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:247 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:331 msgid "Skin" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:250 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2556 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:335 msgid "Classic" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:251 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2560 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:336 msgid "Cards" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:256 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2566 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:344 msgid "Show Product Images" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:259 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:527 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:79 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:348 msgid "Yes" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:260 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:528 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:80 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:349 msgid "No" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:265 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:357 msgid "Section Title Text" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:266 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:67 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2524 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:359 msgid "Your Products" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:273 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2516 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:308 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:423 msgid "Product Options" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:277 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:429 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:150 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:85 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:92 #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:75 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2420 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:433 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:536 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:364 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:183 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:192 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:192 msgid "Text Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:291 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:460 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2325 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:444 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:525 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:377 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:222 msgid "Background Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:306 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:106 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:456 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:547 msgid "Border Style" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:308 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:415 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:108 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:196 msgid "The type of border to use. Double borders must have a width of at least 3px to render properly." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:310 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:417 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:268 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:110 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:198 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1393 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1504 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1660 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2485 msgid "None" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:311 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:418 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:111 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:199 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1389 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1500 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1656 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2489 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:462 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:553 msgid "Solid" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:312 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:419 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:112 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:200 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1381 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1492 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1648 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:465 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:556 msgid "Dashed" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:313 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:420 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:113 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:201 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1385 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1496 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1652 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:464 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:555 msgid "Dotted" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:314 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:421 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:114 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:202 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:463 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:554 msgid "Double" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:339 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:445 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:138 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:226 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:477 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:567 msgid "Border Width" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:355 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:460 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:153 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:241 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:490 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:579 msgid "Border Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:369 #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:473 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:166 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:254 msgid "Border Radius" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:385 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2590 msgid "Highlight Product Background Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:399 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2585 msgid "Highlight Product Text Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:413 msgid "Highlight Product Border Style" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:488 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2600 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:603 msgid "Highlight Flag Text Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:502 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2605 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:614 msgid "Highlight Flag Background Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:524 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:98 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2400 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:107 msgid "Enable Checkout Note" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:538 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:106 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2405 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:119 msgid "Note Text" msgstr "" #. translators: abbreviation for units #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:539 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:255 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:121 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:122 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:339 #: modules/gutenberg/build/blocks.js:3 msgid "Get Your FREE copy of CartFlows in just few steps." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:544 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:120 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2449 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:142 msgid "Step One Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:545 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:122 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:270 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:341 #: modules/checkout/templates/checkout/multistep-review-order.php:83 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:143 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:145 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:346 #: modules/gutenberg/build/blocks.js:3 msgid "Shipping" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:550 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:127 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2455 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:152 msgid "Step One Sub Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:551 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:129 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:274 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:153 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:155 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:350 #: modules/gutenberg/build/blocks.js:3 msgid "Where to ship it?" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:556 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:134 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2461 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:162 msgid "Step Two Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:557 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:136 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:279 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:353 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:362 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:582 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:163 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:165 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:354 #: modules/gutenberg/build/blocks.js:3 msgid "Payment" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:562 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:141 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2467 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:172 msgid "Step Two Sub Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:563 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:143 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:283 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:173 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:175 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:358 #: modules/gutenberg/build/blocks.js:3 msgid "Of your order" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:568 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:155 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2496 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:191 msgid "Offer Button Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:569 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:157 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:287 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:192 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:195 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:362 #: modules/gutenberg/build/blocks.js:3 msgid "For Special Offer Click Here" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:574 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:162 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2502 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:202 msgid "Offer Button Sub Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:575 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:164 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:291 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:203 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:206 #: modules/gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php:366 #: modules/gutenberg/build/blocks.js:3 msgid "Yes! I want this offer!" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:583 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:74 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:79 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:97 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:227 msgid "Two Step" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:587 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:169 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:239 msgid "Note Text Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:601 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:183 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:255 msgid "Note Background Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php:615 #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:204 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:274 msgid "Note Typography" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:31 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:69 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:105 msgid "Offer Yes/No Button" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:32 msgid "Offer Yes/No Button." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:34 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:34 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:34 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:34 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:35 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:34 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:32 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:34 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:33 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:34 msgid "Cartflows Modules" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:137 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:86 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:155 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:297 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:138 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:244 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:348 msgid "General" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:144 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:154 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:93 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:103 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:162 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:177 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:145 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:160 #: modules/gutenberg/build/blocks.js:11 msgid "Offer Action" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:147 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:96 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:108 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:166 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:149 #: modules/gutenberg/build/blocks.js:11 msgid "Accept Offer" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:148 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:97 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:114 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:167 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:150 #: modules/gutenberg/build/blocks.js:11 msgid "Reject Offer" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:153 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1881 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:175 msgid "Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:163 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:184 msgid "Sub Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:172 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:112 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:192 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:167 msgid "Icon" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:180 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:120 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:200 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:175 msgid "Icon Position" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:183 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:123 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:204 msgid "Before Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:184 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:124 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:205 msgid "After Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:185 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:206 msgid "Before Title & Sub Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:186 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:207 msgid "After Title & Sub Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:202 msgid "Vertical Alignment" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:205 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1958 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:224 msgid "Top" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:206 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:228 msgid "Middle" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:214 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:132 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:245 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:191 msgid "Icon Spacing" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:225 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:228 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:143 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:146 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:69 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:72 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:70 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:69 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:72 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:67 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:70 #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:68 #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:71 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:69 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:72 msgid "Style" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:232 msgid "Type" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:236 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1377 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1488 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1644 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:461 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:552 msgid "Default" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:237 msgid "Flat" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:238 msgid "Gradient" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:239 msgid "Transparent" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:240 msgid "3D" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:250 msgid "Border Size" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:265 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:281 msgid "Hover Styles" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:269 msgid "Fade Background" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:270 msgid "Fill Background From Top" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:271 msgid "Fill Background From Bottom" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:272 msgid "Fill Background From Left" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:273 msgid "Fill Background From Right" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:274 msgid "Fill Background Vertical" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:275 msgid "Fill Background Diagonal" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:276 msgid "Fill Background Horizontal" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:284 msgid "Move Down" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:285 msgid "Move Up" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:286 msgid "Move Left" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:287 msgid "Move Right" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:288 msgid "Animate Top" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:289 msgid "Animate Bottom" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:295 msgid "Structure" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:299 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1100 msgid "Width" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:302 msgctxt "Width." msgid "Auto" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:303 msgid "Full Width" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:304 msgid "Custom" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:320 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:77 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:76 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:74 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:76 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-price.php:71 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:71 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-title.php:72 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-variation.php:72 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:305 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:252 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:155 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:142 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:143 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:144 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:143 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:143 msgid "Alignment" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:323 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:333 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:80 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:79 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:77 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:79 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:313 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:490 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:260 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:163 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:150 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:151 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:152 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:151 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:151 msgid "Center" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:324 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:334 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:81 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:80 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:78 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:80 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1954 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:309 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:486 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:256 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:159 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:146 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:147 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:148 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:147 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:147 msgid "Left" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:325 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:335 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:82 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:81 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:79 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:81 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1962 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:317 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:494 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:264 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:167 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:154 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:155 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:156 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:155 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:155 msgid "Right" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:330 msgid "Mobile Alignment" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:340 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:343 msgid "Padding" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:355 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:482 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:90 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:397 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:234 msgid "Border" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:369 msgid "Border Hover Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:380 msgid "Custom Width" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:389 msgid "Custom Height" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:398 msgid "Padding Top/Bottom" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:407 msgid "Padding Left/Right" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:416 msgid "Round Corners" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:425 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1143 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2230 msgid "Colors" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:443 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:166 msgid "Text Hover Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:468 msgid "Background Hover Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:479 msgid "Apply Hover Color To" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:483 msgid "Background" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:493 #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:508 #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:182 #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:99 #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:107 #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:131 #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:89 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:134 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-price.php:83 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-title.php:84 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:196 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:172 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:187 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:172 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:210 msgid "Typography" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:496 msgid "Button Settings" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php:500 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:265 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:212 msgid "Icon Size" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:31 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:65 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:52 msgid "Offer Yes/No Link" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:32 msgid "Offer Yes/No Link." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php:102 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:158 msgid "Link Text" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:31 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-description.php:101 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:65 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:135 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:264 msgid "Offer Product Description" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:32 msgid "Offer Product Description." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php:76 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-description.php:73 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:143 msgid "Short Description" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:32 #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:73 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:151 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:63 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:134 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:489 msgid "Offer Product Image" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:33 msgid "Offer Product Image." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:92 msgid "Image Bottom Spacing" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:182 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:156 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:219 msgid "Thumbnails" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:186 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:114 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:227 msgid "Spacing between Thumbnails" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php:194 msgid "Thumbnails Border Style" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:31 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-price.php:104 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:65 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:135 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:322 msgid "Offer Product Price" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php:32 msgid "Offer Product Price." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:30 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:146 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:66 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:136 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:374 msgid "Offer Product Quantity" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:31 msgid "Offer Product Quantity." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:89 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:91 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:167 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:166 msgid "Width(%)" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:103 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:105 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:198 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:185 msgid "Label Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php:117 #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:120 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:210 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:197 msgid "Input Text Color" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:31 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-title.php:105 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:65 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:135 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:210 msgid "Offer Product Title" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php:32 msgid "Offer Product Title." msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:31 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-variation.php:134 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:65 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:135 #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:437 msgid "Offer Product Variation" msgstr "" #: modules/beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php:32 msgid "Offer Product Variation." msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:66 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2157 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:310 msgid "Product Title" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:67 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:73 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:79 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:85 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:91 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:97 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:103 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:109 #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:115 msgid "CartFlows" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:72 #: modules/bricks/elements/class-cartflows-pro-bricks-upsell-layout.php:164 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:331 msgid "Product Price" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:78 #: modules/bricks/elements/class-cartflows-pro-bricks-upsell-layout.php:129 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2173 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:317 msgid "Product Description" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:84 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:324 msgid "Product Short Description" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:90 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1929 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:339 msgid "Product Image" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:96 #: modules/bricks/elements/class-cartflows-pro-bricks-upsell-layout.php:178 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:302 msgid "Product Quantity" msgstr "" #: modules/bricks/class-cartflows-pro-bricks-dynamic-data.php:102 msgid "Product Variation" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:108 msgid "Get Your FREE copy of CartFlows in just few steps" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:113 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:133 msgid "Steps" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php:148 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:182 msgid "Offer Button" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-description.php:49 msgid "Product Description " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-description.php:79 msgid "Styling" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:56 msgid "Product Image " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:78 msgid "Image Spacing" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-image.php:126 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:243 msgid "Thumbnail Border" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-price.php:49 msgid "Product Price " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:49 msgid "Product Quantity " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:83 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-variation.php:84 msgid "Max-Width" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:98 msgid "Quantity Field Border" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:110 #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-variation.php:99 msgid "Label Typography" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-quantity.php:124 msgid "Text Typography" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-title.php:49 msgid "Product Title " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-variation.php:49 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:294 msgid "Product Variation " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-offer-product-variation.php:113 msgid "Input Text Typography" msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-upsell-layout.php:53 msgid "Offer Steps Layout " msgstr "" #: modules/bricks/elements/class-cartflows-pro-bricks-upsell-layout.php:472 #: modules/bricks/elements/class-cartflows-pro-bricks-upsell-layout.php:482 msgid "Column" msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:85 #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:149 msgid "No post data found." msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:349 msgid "Product not added in the cart." msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:368 #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:378 #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:390 msgid "Oops, can't add the product to the cart" msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:398 #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:436 msgid "Product is Out of Stock" msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:430 msgid "Product Added Successfully" msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:569 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:130 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2127 msgid "{first_name}, Wait! Your Order Is Almost Complete..." msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:574 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:142 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2195 msgid "Yes, Add to My Order!" msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:579 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:147 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2211 msgid "No, thanks!" msgstr "" #: modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php:599 #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:126 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2176 msgid "Write a few words about this awesome product and tell shoppers why they must get it. You may highlight this as \"one time offer\" and make it irresistible." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:117 msgid "___Don't miss out the offer___" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:134 msgid "We have a special one time offer just for you." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:364 msgid "no title" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:424 msgid "Yes, I will take it!" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:432 msgid "Here is Great Offer!" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:436 msgid "One Time Offer" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php:440 msgid "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut, quod hic expedita consectetur vitae nulla sint adipisci cupiditate at." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-markup.php:1060 #: modules/optin/classes/class-cartflows-pro-optin-markup.php:141 msgid "Billing Custom Fields" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-markup.php:1098 msgid "Shipping Custom Fields" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-markup.php:1143 msgid "Processing..." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:82 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:122 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:133 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:297 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:337 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:347 msgid "matches any of" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:86 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:137 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:301 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:351 msgid "matches all of" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:90 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:126 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:141 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:305 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:341 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:355 msgid "matches none of" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:96 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:311 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:369 msgid "is equal to" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:100 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:315 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:373 msgid "is not equal to" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:104 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:319 msgid "is greater than" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:108 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:323 msgid "is less than" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:112 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:327 msgid "is greater or equal to" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:116 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:331 msgid "is less or equal to" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:145 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:359 msgid "exist" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:149 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:363 msgid "not exist" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:157 msgid "Cart" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:161 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:385 msgid "Product(s)" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:165 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:389 msgid "Product category(s)" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:169 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:393 msgid "Product tag(s)" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:177 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:401 msgid "Coupon(s)" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:181 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:405 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:256 msgid "Shipping method" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:188 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:416 msgid "Geography" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:192 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:420 msgid "Shipping country" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:196 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:424 msgid "Billing country" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:209 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:446 msgid "Search for products.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:220 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:457 msgid "Search for products cat.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:231 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:468 msgid "Search for products tags.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:249 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:486 msgid "Search for coupons.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:259 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:496 msgid "Search for shipping methods.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:270 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:281 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:507 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:518 msgid "Search for country.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:381 msgid "Order" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:409 msgid "Payment Method" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:430 msgid "Custom Fields" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:434 msgid "Order Custom Field" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:529 msgid "Search for payment method.." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:542 msgid "Enter custom field meta key" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:546 msgid "Expected custom field meta value" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:565 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2345 msgid "Enable Browser Tab Animation" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:571 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2125 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2352 msgid "Title Text" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:867 msgid "Select Coupon" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:868 msgid "Search for a coupon" msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:875 msgid "For more information about the CartFlows coupon please %1$1s Click here.%2$2s" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:882 msgid "Enable Product Options" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:889 msgid "Enable Conditions" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:894 msgid "Restrict user to purchase all products" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:898 msgid "Let user select one product from all options" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:902 msgid "Let user select multiple products from all options" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:930 msgid "Enable Variations" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:951 msgid "Show variations inline" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:955 msgid "Show variations in popup" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:987 msgid "Enable Quantity" msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1012 msgid "For more information about the product option settings %1$1s Click here. %2$2s" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1023 msgid "Replace First Product" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1027 msgid "It will replace the first selected product (from checkout products) with the order bump product. %1$1sLearn More »%2$2s" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1040 msgid "Show Pre-Checked" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1042 msgid "It will pre-check this order bump and add the assigned product to the cart on the checkout page." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1051 msgid "Enable Quantity Field" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1053 msgid "It will display the quantity field in the order bump description." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1068 msgid "Layout" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1072 msgid "Order Bump Skin" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1077 msgid "Style 1" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1081 msgid "Style 2" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1085 msgid "Style 3" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1089 msgid "Style 4" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1093 msgid "Style 5" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1105 msgid "50%" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1109 msgid "100%" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1116 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:317 msgid "Position" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1129 msgid "After Order" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1133 msgid "After Payment" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1147 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2280 msgid "Description Text Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1152 msgid "Title Text Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1166 msgid "Label Text Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1196 msgid "Label Background Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1226 #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2295 msgid "Button Text Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1256 msgid "Button Text Hover Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1286 msgid "Button Background Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1316 msgid "Button Background Hover Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1346 msgid "Highlight Text Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1360 msgid "Box Background Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1368 msgid "Borders" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1372 msgid "Label Border Style" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1415 msgid "Label Border Width" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1438 msgid "Label Border Radius" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1461 msgid "label Border Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1483 msgid "Button Border Style" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1537 msgid "Button Border Width" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1571 msgid "Button Border Radius" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1606 msgid "Button Border Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1639 msgid "Box Border Style" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1668 msgid "Box Border Width" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1677 msgid "Box Border Radius" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1687 msgid "Box Border Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1696 msgid "Shadows" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1700 msgid "Horizontal" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1709 msgid "Vertical" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1718 msgid "Blur" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1727 msgid "Spread" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1736 msgid "Box Shadow Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1747 msgid "Enable Arrow " msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1777 msgid "Enable Animation " msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1810 msgid "Action Element" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1824 msgid "Element" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1829 msgid "Checkbox" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1833 msgid "Button" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1849 msgid "Checkbox Label" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1897 msgid "Highlight Text" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1912 msgid "Description" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1917 msgid "Use {{product_name}}, {{product_desc}}, {{product_price}} & {{quantity}} to fetch respective product details." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1923 msgid "Enable Image Options" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1933 msgid "By default, product image will be shown. If product image is not set then placeholder image will be used as product image." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1943 msgid "Minimum image size should be 300 X 300 in pixes for ideal display." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1949 msgid "Image Position" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1979 msgid "Image Width" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1984 msgid "Keep value empty for 100% width" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:1999 msgid "Show Image on Tab and Mobile" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2022 msgid "Select Product" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2026 msgid "Type to search for a product" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2039 msgid "Discount Type" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2045 msgid "Original" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2049 msgid "Discount Percentage" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2053 msgid "Discount Price" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2069 msgid "Discount Value" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2089 msgid "Original Price" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2091 msgid "This is the unit price of product" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2106 msgid "Sell Price" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2108 msgid "This is the unit discounted price of product" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2142 msgid "Sub-title Text" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2159 msgid "Enter to override default product title." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2193 msgid "Order Button Text" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2209 msgid "Skip Button Text" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2235 msgid "NavBar Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2250 msgid "Title Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2265 msgid "Subtitle Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2310 msgid "Overlay Background Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2382 msgid "Two-Step Design" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2398 msgid "Enable Note Text" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2434 msgid "Note Box Background Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2473 msgid "Step Section Width" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2479 msgid "Step Border" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2522 msgid "Section Title" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2530 msgid "Section Position" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2536 msgid "Before Checkout Section" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2550 msgid "Skins" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2568 msgid "It will add images on checkout page." msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2574 msgid "Product Text Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2579 msgid "Product Background Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php:2595 msgid "Highlight Box Border Color" msgstr "" #: modules/checkout/classes/class-cartflows-pro-checkout-rules.php:120 msgid "No gateway found" msgstr "" #: modules/checkout/classes/class-cartflows-pro-order-bump-product.php:152 msgid "Sorry, your session has expired." msgstr "" #: modules/checkout/classes/class-cartflows-pro-product-options.php:1147 msgid "Choose a Variation" msgstr "" #. translators: %s: Attribute name. #: modules/checkout/classes/class-cartflows-pro-product-options.php:1308 msgid "Invalid value posted for %s" msgstr "" #. translators: %s: Attribute name. #: modules/checkout/classes/class-cartflows-pro-product-options.php:1317 msgid "%s is a required field" msgid_plural "%s are required fields" msgstr[0] "" msgstr[1] "" #: modules/checkout/classes/class-cartflows-pro-product-options.php:1442 #: modules/checkout/templates/your-product/item-title.php:60 msgid " every " msgstr "" #. translators: %1$s %2$s : trial length trial period #: modules/checkout/classes/class-cartflows-pro-product-options.php:1784 msgid " with %1$s %2$s free trial " msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:76 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:414 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:358 msgid "Continue to shipping" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:78 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:417 msgid "Continue to order notes" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:82 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:89 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:423 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:359 msgid "Continue to payment" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:295 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:660 msgid "Contact" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:299 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:664 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:674 msgid "Change" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:344 msgid "Order notes" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:352 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:360 msgid "Information" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:387 msgid "« Back to shipping" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:390 msgid "« Back to order notes" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:394 #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:428 msgid "« Back to information" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:464 msgid "Customer information" msgstr "" #. translators: %1$s: Link HTML start, %2$s Link HTML End #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:466 msgid "Already have an account? %1$1s Log in%2$2s" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:479 msgid "Email Address" msgstr "" #. translators: %s: asterisk mark #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:482 msgid "Email Address %s" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:497 msgid "Password" msgstr "" #. translators: %s: asterisk mark #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:499 msgid "Password %s" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:505 msgid "Login" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:506 msgid "Lost your password?" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:511 msgid "Login is optional, you can continue with your order below." msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:523 msgid "Create an account?" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:538 msgid "Account username" msgstr "" #. translators: %s: asterisk mark #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:540 msgid "Account username %s" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:552 msgid "Create account password" msgstr "" #. translators: %s: asterisk mark #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:554 msgid "Create account password %s" msgstr "" #. translators: %1$s: username, %2$s emailid #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:563 msgid " Welcome Back %1$s ( %2$s )" msgstr "" #: modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php:670 msgid "Address" msgstr "" #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:46 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:51 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:60 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:64 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:52 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:56 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:110 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:114 msgid "Add" msgstr "" #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:46 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:49 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:60 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:62 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:52 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:54 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:110 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:112 msgid "Remove" msgstr "" #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:49 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:62 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:54 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:112 msgid "Removing" msgstr "" #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:51 #: modules/checkout/templates/bump-order/wcf-bump-order-style-4.php:64 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:56 #: modules/checkout/templates/bump-order/wcf-bump-order-style-5.php:114 msgid "Adding" msgstr "" #: modules/checkout/templates/checkout/multistep-review-order.php:23 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:111 msgid "Products" msgstr "" #: modules/checkout/templates/checkout/multistep-review-order.php:24 #: modules/checkout/templates/checkout/multistep-review-order.php:56 msgid "Subtotal" msgstr "" #: modules/checkout/templates/pre-checkout-offer/pre-checkout-offer.php:19 msgid "Order Submitted" msgstr "" #: modules/checkout/templates/pre-checkout-offer/pre-checkout-offer.php:27 msgid "Special Offer" msgstr "" #: modules/checkout/templates/pre-checkout-offer/pre-checkout-offer.php:35 msgid "Order Receipt" msgstr "" #: modules/checkout/templates/quick-view/quick-view-product-image.php:54 msgid "Placeholder" msgstr "" #: modules/checkout/templates/your-product/item-quantity.php:23 msgid "This product is set to purchase only 1 item per order." msgstr "" #: modules/checkout/templates/your-product/item-title.php:38 msgid "Select" msgstr "" #: modules/checkout/templates/your-product/item-title.php:64 msgid " and a " msgstr "" #: modules/checkout/templates/your-product/item-title.php:66 msgid " sign-up fee " msgstr "" #: modules/checkout/templates/your-product/product-table-titles.php:20 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:149 #: modules/thankyou/template/child-order-details.php:58 msgid "Product" msgstr "" #: modules/checkout/templates/your-product/product-table-titles.php:26 msgid "Price" msgstr "" #: modules/downsell/classes/class-cartflows-downsell-markup.php:82 #: modules/downsell/classes/class-cartflows-downsell-markup.php:137 #: modules/offer/classes/class-cartflows-pro-base-offer-markup.php:222 #: modules/upsell/classes/class-cartflows-pro-upsell-markup.php:87 #: modules/upsell/classes/class-cartflows-pro-upsell-markup.php:144 msgid "Order does not exist" msgstr "" #: modules/downsell/classes/class-cartflows-downsell-markup.php:90 msgid "Downsell Payment Failed" msgstr "" #: modules/downsell/classes/class-cartflows-downsell-markup.php:129 #: modules/upsell/classes/class-cartflows-pro-upsell-markup.php:136 msgid "Current Step Not Found" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:109 msgid "YES" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:110 msgid "NO" msgstr "" #. translators: %1$1s, %2$2s Link to meta #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:380 msgid "Please enable \"Product Options\" from %1$1smeta settings%2$2s to edit options." msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:502 #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:591 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:405 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:245 msgid "Rounded Corners" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:516 msgid "Highlight Product" msgstr "" #. translators: %1$1s, %2$2s Link to meta #: modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php:639 msgid "Please enable \"Product Options\" from %1$1smeta settings%2$2s to apply styles." msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:218 msgid "Icon Vertical Alignment" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:321 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:268 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:171 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:159 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:159 msgid "Justify" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:333 msgid "Button Size" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:357 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:294 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:185 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:185 msgid "Normal" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:419 #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:315 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:215 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:215 msgid "Hover" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:426 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:222 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:222 msgid "Hover Text Color" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:439 msgid "Hover Background Color" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:474 msgid "Content" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:482 msgid "Text Alignment" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:513 msgid "Title Typography" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:525 msgid "Sub Title Typography" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php:539 msgid "Title and Sub Title Spacing" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:179 msgid "Before Link" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:180 msgid "After Link" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:281 msgid "Link Typography" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:301 msgid "Link Color" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php:322 msgid "Hover Link Color" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:145 msgid "Show" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:146 msgid "Hide" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php:208 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:205 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php:258 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:205 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php:224 msgid "Text Shadow" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:168 msgid "Image bottom Spacing" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:184 msgid "Image Border" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:195 msgid "Image Rounded Corners" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php:254 msgid "Thumbnail Rounded Corners" msgstr "" #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php:235 #: modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php:235 msgid "Hover Text Shadow" msgstr "" #. translators: %1s Release payment #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:368 msgid "%1$s - Release Payment for Order %2$s" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:372 msgid "Payment token missing/invalid." msgstr "" #. translators: %1s payment released #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:395 msgid "%1$s %2$s Release Payment Approved: %3$s ending in %4$s (expires %5$s)" msgstr "" #. translators: %1s transaction id #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:402 msgid "(Transaction ID %s)" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:419 msgid "Authorization only transaction" msgstr "" #. translators: %1s payment failed message #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:436 msgid "Pre-Order Release Payment Failed: %s" msgstr "" #. translators: %1s error message #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:690 msgid "Authorize.net CIM Transaction Failed (%s)" msgstr "" #. translators: %1s site name #: modules/gateways/class-cartflows-pro-gateway-authorize-net.php:700 msgid "Authorize.Net CIM Transaction Failed (%s)" msgstr "" #. translators: %1s site name #. translators: %1$s: site name, %2$s: order id, %3$s: step id #: modules/gateways/class-cartflows-pro-gateway-cpsw-stripe-element.php:248 #: modules/gateways/class-cartflows-pro-gateway-cpsw-stripe.php:266 #: modules/gateways/class-cartflows-pro-gateway-square-old.php:264 #: modules/gateways/class-cartflows-pro-gateway-square.php:327 msgid "%1$s - Order %2$s_%3$s - One Click Payment" msgstr "" #. translators: %1s order number #: modules/gateways/class-cartflows-pro-gateway-cpsw-stripe-element.php:250 #: modules/gateways/class-cartflows-pro-gateway-cpsw-stripe.php:268 msgid "Order %1$s_%2$s OTO" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-mollie-credit-card.php:192 #: modules/gateways/class-cartflows-pro-gateway-mollie-ideal.php:193 msgid "0 value product" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-mollie-credit-card.php:243 #: modules/gateways/class-cartflows-pro-gateway-mollie-ideal.php:244 msgid "Customer id not found. Payment failed" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-mollie-credit-card.php:331 msgid "Mollie credit card payment processed." msgstr "" #: modules/gateways/class-cartflows-pro-gateway-mollie-ideal.php:350 msgid "Mollie ideal payment processed." msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-express.php:303 #: modules/gateways/class-cartflows-pro-gateway-paypal-standard.php:499 msgid "Nonce verification failed" msgstr "" #. translators: placeholder is blogname. #: modules/gateways/class-cartflows-pro-gateway-paypal-express.php:433 #: modules/gateways/class-cartflows-pro-gateway-paypal-standard.php:627 msgctxt "data sent to paypal" msgid "Orders with %s" msgstr "" #. translators: blog name. #: modules/gateways/class-cartflows-pro-gateway-paypal-express.php:560 msgctxt "data sent to PayPal" msgid "Orders with %s" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-express.php:689 #: modules/gateways/class-cartflows-pro-gateway-paypal-standard.php:1189 msgid "Unable to find order for PayPal billing agreement." msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-express.php:744 #: modules/gateways/class-cartflows-pro-gateway-paypal-standard.php:1244 msgid "An error occurred, please try again or try an alternate form of payment." msgstr "" #. translators: exception message. #: modules/gateways/class-cartflows-pro-gateway-paypal-express.php:1064 msgid "PayPal Exp Transaction Failed (%s)" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-payments.php:221 msgid "Cannot make the Payment for Zero value product" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-payments.php:294 #: modules/gateways/class-cartflows-pro-gateway-paypal-payments.php:384 msgid "PayPal order is not created" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-payments.php:314 msgid "Order created successfully" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-paypal-payments.php:403 msgid "Order Captured successfully" msgstr "" #. translators: %s order id. #: modules/gateways/class-cartflows-pro-gateway-paypal-payments.php:435 msgid "One Time Offer - %s" msgstr "" #. translators: %1s site name #: modules/gateways/class-cartflows-pro-gateway-stripe.php:562 msgid "%1$s - Order %2$s - One Time offer" msgstr "" #. translators: %1s order number #: modules/gateways/class-cartflows-pro-gateway-stripe.php:565 #: modules/gateways/class-cartflows-pro-gateway-woocommerce-payments.php:529 msgid "Order %1$s-OTO" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-stripe.php:582 msgid "customer_name" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-stripe.php:583 msgid "customer_email" msgstr "" #: modules/gateways/class-cartflows-pro-gateway-woocommerce-payments.php:240 msgid "No payment. No gateway found" msgstr "" #: modules/gateways/class-cartflows-pro-paypal-gateway-helper.php:159 msgid "Total Discount" msgstr "" #. translators: placeholder is blogname. #: modules/gateways/class-cartflows-pro-paypal-gateway-helper.php:251 msgid "%s - Order" msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:53 msgid "Display a link to accept or reject a offer." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:106 msgid "Display a button to accept or reject a offer." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:211 msgid "Display the title of offer product." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:265 msgid "Display the description of offer product." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:323 msgid "Display the price of offer product." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:375 msgid "Display a field to enter quantity of offer product." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:438 msgid "Display fields to select variations of the offered product." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-block-config.php:490 msgid "Display the image of offer product." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:107 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:125 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:149 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:167 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:185 #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:203 msgid "Permission denied." msgstr "" #: modules/gutenberg/classes/class-cartflows-pro-init-blocks.php:404 msgid "Cartflows Pro" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-markup.php:257 msgid "Seems like this order is been already purchased." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-markup.php:285 msgid "Oooops! Product is out of stock." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-markup.php:307 msgid "Oooops! Product's price is not correct." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-markup.php:431 msgid "Redirecting..." msgstr "" #. translators: %1$1s, %2$2s Link to meta #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:161 msgid "Do you want to cancel the main order on the purchase of upsell/downsell offer?
    Please set the \"Create a new child order\" option in the %1$1sOffer Global Settings%2$2s to use the cancel primary order option." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:169 msgid "Replace Main Order" msgstr "" #. translators: %1$1s, %2$2s Link to meta #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:173 msgid "Note: If \"Replace Main Order\" option is enabled then on the purchase of upsell/downsell offer it will charge the difference of main order total and this product. %1$1sLearn More >>%2$2s" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:177 msgid "If this option is enabled, it will cancel the main order on the purchase of upsell/downsell offer." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:187 msgid "Skip Offer" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:188 msgid "Exclude the offer if the buyer has previously purchased the selected product." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:239 msgid "Offer Popup Strings" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:245 msgid "Offer Processing" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:252 msgid "Offer Success" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:259 msgid "Offer Failure" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:266 msgid "Offer Success Note" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:274 msgid "Shortcodes" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:280 msgid "Accept Offer Link" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:287 msgid "Decline Offer Link" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:296 msgid "Add this shortcode to your offer page for variation selection. If product is variable, it will show variations." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:304 msgid "Add this shortcode to your offer page for quantity selection." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:333 msgid "This shortcode will show the products single quantity price." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:355 msgid "Step Slug" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:363 msgid "Conditional Redirection" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:369 msgid "Offer - Yes Next Step" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:371 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:387 msgid "Upsell (Woo)" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:372 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:388 msgid "Downsell (Woo)" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:373 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:389 msgid "Thankyou (Woo)" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:385 msgid "Offer - No Next Step" msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:401 msgid "For more information about the conditional redirection please %1$1sClick here.%2$2s" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:407 #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:413 msgid "Custom Script" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:420 msgid "Offer Success Script" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:423 msgid "Add your custom script which you need to run when the offer is accepted." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:428 msgid "Offer Rejected Script" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:431 msgid "Add your custom script which you need to run when the offer is rejected." msgstr "" #. translators: %1$1s: link html start, %2$12: link html end #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:433 msgid "Use {{order_id}}, {{product_id}} & {{quantity}} and more shortcodes to fetch offer details. %1$1sClick here.%2$2s to know more." msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php:445 msgid "Step Note" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-shortcodes.php:198 msgid "Shipping: " msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-shortcodes.php:200 msgid " via Flat rate" msgstr "" #: modules/offer/classes/class-cartflows-pro-base-offer-shortcodes.php:309 msgid "Awaiting product image" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:75 msgid "CartFlows Order Auto Cancelled" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:83 msgid "CartFlows Upsell" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:85 msgid "CartFlows Downsell" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:110 msgid "Amount Charged: " msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:111 msgid "This order has charged the difference, and the same amount will be considered while refunding this order. You need to refund the rest of the amount from the parent order." msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:120 msgid "CartFlows Parent Order" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:132 msgid "CartFlows Upsell/Downsell Orders" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:141 msgid "Upsell" msgstr "" #: modules/offer/classes/class-cartflows-pro-offer-order-meta.php:143 msgid "Downsell" msgstr "" #: modules/orders/class-cartflows-pro-orders.php:78 msgctxt "Order status" msgid "Main Order Accepted (CF)" msgstr "" #. translators: %s: Single count value #: modules/orders/class-cartflows-pro-orders.php:100 msgid "Main Order Accepted (%s)" msgid_plural "Main Order Accepted (%s)" msgstr[0] "" msgstr[1] "" #. translators: %s step type #: modules/orders/class-cartflows-pro-orders.php:512 msgid "Order has been cancelled as the user has upgraded to the CartFlows %s order." msgstr "" #: modules/thankyou/template/child-order-details.php:37 msgid "Order number:" msgstr "" #: modules/thankyou/template/child-order-details.php:42 msgid "Total:" msgstr "" #: modules/thankyou/template/child-order-details.php:49 msgid "Order details" msgstr "" #: modules/thankyou/template/child-order-details.php:100 msgid "Note:" msgstr "" #: modules/tracking/class-cartflows-pro-analytics-tracking.php:111 msgid "Page is opened in a preview mode." msgstr "" #: modules/tracking/class-cartflows-pro-analytics-tracking.php:123 msgid "Page is opened directly without placing an order." msgstr "" #: modules/upsell/classes/class-cartflows-pro-upsell-markup.php:95 msgid "Upsell Payment Failed" msgstr "" #. translators: abbreviation for units #: modules/gutenberg/build/blocks.js:11 msgid "Before Link Text" msgstr "" #: modules/gutenberg/build/blocks.js:11 msgid "After Link Text" msgstr "" #: modules/gutenberg/build/blocks.js:11 msgid "Add text…" msgstr "" modules/ab-test/classes/class-cartflows-pro-ab-test-factory.php000064400000015650147600244370020646 0ustar00step_id = intval( $id ); /* Data from step */ $this->ab_test = get_post_meta( $this->step_id, 'wcf-ab-test', true ); if ( $this->ab_test ) { $this->flow_id = get_post_meta( $this->step_id, 'wcf-flow-id', true ); $control_step_id = get_post_meta( $this->step_id, 'wcf-control-step', true ); $this->control_step_id = empty( $control_step_id ) ? $this->step_id : intval( $control_step_id ); $this->step_type = get_post_meta( $this->step_id, 'wcf-step-type', true ); /* Data from flow */ $this->flow_id = get_post_meta( $this->step_id, 'wcf-flow-id', true ); $this->flow_steps = get_post_meta( $this->flow_id, 'wcf-steps', true ); /* Set variaiton data */ $this->set_ab_test(); } } } /** * Is ab test enable */ public function is_ab_test_enable() { if ( $this->ab_test && $this->start_ab_test ) { return true; } return false; } /** * Get flow id */ public function get_flow_id() { return $this->flow_id; } /** * Get step id */ public function get_step_id() { return $this->step_id; } /** * Get flow steps */ public function get_flow_steps() { return $this->flow_steps; } /** * Set flow steps map */ public function check_step_cookie() { $cookie_name = CARTFLOWS_AB_TEST_COOKIE . $this->control_step_id; if ( isset( $_COOKIE[ $cookie_name ] ) ) { return true; } return false; } /** * Set flow steps map */ public function get_step_cookie() { $cookie_name = CARTFLOWS_AB_TEST_COOKIE . $this->control_step_id; if ( isset( $_COOKIE[ $cookie_name ] ) ) { return intval( $_COOKIE[ $cookie_name ] ); //phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE } return 0; } /** * Set visited cookie */ public function set_step_cookie() { $cookie_name = CARTFLOWS_AB_TEST_COOKIE . $this->control_step_id; $cookiepath = $this->get_cookiepath(); $expire_time = time() + ( 30 * 24 * 60 * MINUTE_IN_SECONDS ); $value = $this->show_variation_id; setcookie( $cookie_name, $value, $expire_time, $cookiepath, COOKIE_DOMAIN, CARTFLOWS_HTTPS ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie } /** * Get cookie path * * @return string cookiepath. */ public function get_cookiepath() { return COOKIEPATH ? COOKIEPATH : '/'; } /** * Set ab test */ public function set_ab_test() { foreach ( $this->flow_steps as $in => $data ) { if ( $this->control_step_id === $data['id'] ) { $this->all_variations = isset( $data['ab-test-variations'] ) ? $data['ab-test-variations'] : array(); $this->start_ab_test = isset( $data['ab-test-start'] ) ? $data['ab-test-start'] : false; break; } } } /** * Run ab test * * @return string redirect. */ public function run_ab_test() { // If cookie exists get already previewed id. if ( $this->check_step_cookie() ) { $this->show_variation_id = $this->get_step_cookie(); } else { $this->show_variation_id = $this->choose_display_variation(); // Set preview variation step in cookie. $this->set_step_cookie(); } // If show variation step is equal current step. Return. if ( $this->show_variation_id === $this->step_id ) { return; } $this->redirect_to_step( $this->show_variation_id ); } /** * Handle redirection to given step. * * @param int $step_id step id. */ public function redirect_to_step( $step_id ) { $url_to_redirect = get_permalink( $step_id ); // If post exists. if ( $url_to_redirect ) { $abtest_settings = Cartflows_Pro_Helper::get_abtest_settings(); $override = 'enable' === $abtest_settings['override_permalink'] ? true : false; if ( apply_filters( 'cartflows_ab_test_override_variation_content', $override ) ) { $this->override_variation_content_to_control( $this->show_variation_id ); } else { if ( ! empty( $_SERVER['QUERY_STRING'] ) ) { $query_string = sanitize_text_field( wp_unslash( $_SERVER['QUERY_STRING'] ) ); $url_to_redirect = add_query_arg( $query_string, '', $url_to_redirect ); } // Redirect to variation id. wp_safe_redirect( $url_to_redirect ); die(); } } } /** * Redirect to winner step. * * @param int $step_id step id. */ public function maybe_redirect_winner_step( $step_id ) { // In case if user is trying to visit old archived variation after completing A/B test. $is_winner_step_id = get_post_meta( $step_id, 'wcf-winner-step', true ); $step_to_redirect = $is_winner_step_id ? $is_winner_step_id : get_post_meta( $step_id, 'wcf-control-step', true ); if ( $step_to_redirect ) { $this->redirect_to_step( $step_to_redirect ); } } /** * Choose variation based on current traffic. * * @return int variation id. */ public function choose_display_variation() { $rand_num = wp_rand( 0, 100 ); $measurement = 0; foreach ( $this->all_variations as $variation ) { $traffic = intval( $variation['traffic'] ); if ( ( $rand_num >= $measurement ) && ( $rand_num <= ( $measurement + $traffic ) ) ) { return $variation['id']; } $measurement += $traffic; } return $this->control_step_id; } /** * Overrides variation content to control url * * @param int $variation_id chosen variation id. * @return void * @since X.X.X */ public function override_variation_content_to_control( $variation_id ) { $variant = get_post( $variation_id ); if ( $variant && 'publish' === $variant->post_status ) { if ( isset( $GLOBALS['posts'][0] ) ) { $GLOBALS['posts'][0] = $variant; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } if ( isset( $GLOBALS['wp_the_query']->post ) ) { $GLOBALS['wp_the_query']->post = $variant; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } $GLOBALS['post'] = $variant; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } } } modules/ab-test/classes/class-cartflows-pro-ab-test-markup.php000064400000002136147600244370020471 0ustar00is_ab_test_enable() ) { $ab_test->run_ab_test(); } else { $ab_test->maybe_redirect_winner_step( $step_id ); } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Ab_Test_Markup::get_instance(); modules/ab-test/classes/class-cartflows-pro-ab-test-meta.php000064400000056027147600244370020130 0ustar00 $data ) { if ( intval( $data['id'] ) === $control_step ) { $all_variations = $flow_steps[ $index ]['ab-test-variations']; $archived_variations = $flow_steps[ $index ]['ab-test-archived-variations']; if ( ! is_array( $archived_variations ) ) { $archived_variations = array(); } if ( $control_step === $step_id && isset( $all_variations[1] ) ) { $step_to_update = $all_variations[1]['id']; $flow_steps[ $index ] = array( 'id' => intval( $step_to_update ), 'title' => get_the_title( $step_to_update ), 'type' => get_post_meta( $step_to_update, 'wcf-step-type', true ), ); foreach ( $all_variations as $v_index => $v_data ) { if ( $step_to_update !== $v_data['id'] ) { update_post_meta( $v_data['id'], 'wcf-control-step', $step_to_update ); } } // Update the control step id in archived variations so if anyone visit it it will redirect to control step. foreach ( $archived_variations as $av_index => $av_data ) { if ( $step_to_update !== $av_data['id'] ) { update_post_meta( $av_data['id'], 'wcf-control-step', $step_to_update ); } } delete_post_meta( $step_to_update, 'wcf-control-step' ); do_action( 'cartflows_ab_test_update_control', $flow_id, $flow_steps[ $index ] ); } // It mean this step is not available for ab test process until it is restored. delete_post_meta( $step_id, 'wcf-ab-test' ); $current_time = current_time( 'Y-m-d H:i:s' ); /* Add to archived list */ $step_to_archive_data = array( 'id' => $step_id, 'title' => get_the_title( $step_id ), 'note' => get_post_meta( $step_id, 'wcf-step-note', true ), 'deleted' => $delete_data, 'raw_date' => $current_time, 'date' => gmdate( 'M d, Y', strtotime( $current_time ) ), ); if ( $delete_data ) { $archived_variations[] = $step_to_archive_data; } else { array_unshift( $archived_variations, $step_to_archive_data ); } /* Delete the item from variation */ if ( count( $all_variations ) > 1 ) { foreach ( $all_variations as $v_index => $v_data ) { if ( $step_id === $v_data['id'] ) { array_splice( $all_variations, $v_index, 1 ); } } /* Update traffic after variation deleted */ $traffic = array( 50, 50 ); foreach ( $all_variations as $v_index => $v_data ) { if ( isset( $traffic[ $v_index ] ) ) { $all_variations[ $v_index ]['traffic'] = intval( $traffic[ $v_index ] ); } else { $all_variations[ $v_index ]['traffic'] = 0; } } } $flow_steps[ $index ]['ab-test'] = true; $flow_steps[ $index ]['ab-test-ui'] = true; $flow_steps[ $index ]['ab-test-start'] = false; $flow_steps[ $index ]['ab-test-variations'] = $all_variations; $flow_steps[ $index ]['ab-test-archived-variations'] = $archived_variations; break; } } /* Set index order properly */ $flow_steps = array_merge( $flow_steps ); /* Update latest data */ update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); if ( $delete_data ) { /* Delete step */ wp_delete_post( $step_id, true ); } } } /** * Delete ab test delete. * * @return void */ public function delete_ab_test_variation() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-delete-ab-test-step', 'security' ); $flow_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $result = array( 'status' => false, 'reload' => false, /* translators: %s flow id */ 'text' => sprintf( __( 'Step not deleted for flow - %s', 'cartflows-pro' ), $flow_id ), ); if ( ! $flow_id || ! $step_id ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } $this->delete_variation( $flow_id, $step_id, true ); $result = array( 'status' => true, 'reload' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Step deleted for flow - %s', 'cartflows-pro' ), $flow_id ), ); wp_send_json( $result ); } /** * Delete ab test delete. * * @return void */ public function archive_ab_test_variation() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-archive-ab-test-step', 'security' ); if ( isset( $_POST['post_id'] ) && isset( $_POST['step_id'] ) ) { $flow_id = intval( $_POST['post_id'] ); $step_id = intval( $_POST['step_id'] ); } $result = array( 'status' => false, 'reload' => false, /* translators: %s flow id */ 'text' => sprintf( __( 'Can\'t archive this step - %1$s. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); if ( ! $flow_id || ! $step_id ) { wp_send_json( $result ); } $this->delete_variation( $flow_id, $step_id, false ); $result = array( 'status' => true, 'reload' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Step - %1$s archived. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); wp_send_json( $result ); } /** * Create variation for current step * * @since 1.0.0 * * @return void */ public function create_ab_test_variation() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-create-ab-test-variation', 'security' ); $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $result = array( 'status' => false, /* translators: %s step id */ 'text' => sprintf( __( 'Can\'t create a variation for this step - %s', 'cartflows-pro' ), $step_id ), ); if ( ! $flow_id || ! $step_id ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } /* Enable abtest for step */ update_post_meta( $step_id, 'wcf-ab-test', true ); // Step - Clone step as a variation. $new_step_id = wcf_pro()->utils->clone_step( $step_id ); if ( $new_step_id ) { // Step - Add control step as parent. update_post_meta( $new_step_id, 'wcf-control-step', $step_id ); // Flow - Add ab test variations array. $show_variations = array( array( 'id' => $step_id, 'traffic' => 50, ), array( 'id' => $new_step_id, 'traffic' => 50, ), ); $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) { foreach ( $flow_steps as $index => $step_data ) { if ( $step_data['id'] === $step_id ) { $flow_steps[ $index ]['ab-test'] = true; $flow_steps[ $index ]['ab-test-ui'] = true; $flow_steps[ $index ]['ab-test-variations'] = $show_variations; $flow_steps[ $index ]['ab-test-start'] = false; $archived_variations = array(); if ( isset( $flow_steps[ $index ]['ab-test-archived-variations'] ) ) { $archived_variations = $flow_steps[ $index ]['ab-test-archived-variations']; } $flow_steps[ $index ]['ab-test-archived-variations'] = $archived_variations; } } update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); $result = array( 'status' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Variation created for step - %s', 'cartflows-pro' ), $step_id ), ); } } wp_send_json( $result ); } /** * Start split test for current variation * * @since 1.6.13 * * @return void */ public function start_ab_test() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-start-ab-test', 'security' ); $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $result = array( 'status' => false, 'text' => __( 'Can\'t start a split test', 'cartflows-pro' ), ); if ( ! $flow_id || ! $step_id ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } $success_text = __( 'Stop Split Test', 'cartflows-pro' ); $start_test = true; $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) { foreach ( $flow_steps as $index => $step_data ) { if ( intval( $step_data['id'] ) === $step_id ) { if ( isset( $flow_steps[ $index ]['ab-test-start'] ) ) { if ( $flow_steps[ $index ]['ab-test-start'] ) { $flow_steps[ $index ]['ab-test-start'] = false; $start_test = false; $success_text = __( 'Start Split Test', 'cartflows-pro' ); } else { $flow_steps[ $index ]['ab-test-start'] = true; $start_test = true; } } else { $flow_steps[ $index ]['ab-test-start'] = true; $start_test = true; } } } update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); $result = array( 'status' => true, 'start' => $start_test, 'text' => $success_text, ); } wp_send_json( $result ); } /** * Declare ab test winner * * @since 1.6.13 * * @return void */ public function declare_ab_test_winner() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-declare-ab-test-winner', 'security' ); $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $result = array( 'status' => false, /* translators: %s step id */ 'text' => sprintf( __( 'Can\'t update the winner for this step - %s', 'cartflows-pro' ), $step_id ), ); if ( ! $flow_id || ! $step_id ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( ! is_array( $flow_steps ) ) { wp_send_json( $result ); } $control_step = get_post_meta( $step_id, 'wcf-control-step', true ); $control_step = empty( $control_step ) ? $step_id : intval( $control_step ); foreach ( $flow_steps as $index => $data ) { if ( intval( $data['id'] ) === $control_step ) { $all_variations = $flow_steps[ $index ]['ab-test-variations']; $archived_variations = $flow_steps[ $index ]['ab-test-archived-variations']; if ( ! is_array( $archived_variations ) ) { $archived_variations = array(); } /* Update winner step */ $flow_steps[ $index ] = array( 'id' => intval( $step_id ), 'title' => get_the_title( $step_id ), 'type' => get_post_meta( $step_id, 'wcf-step-type', true ), ); /* Remove step ab test trace */ delete_post_meta( $step_id, 'wcf-ab-test' ); delete_post_meta( $step_id, 'wcf-control-step' ); do_action( 'cartflows_ab_test_update_control', $flow_id, $flow_steps[ $index ] ); /* Update winner step in already archived variations. So if anyone visited so will reirect to winner step */ foreach ( $archived_variations as $av_index => $av_data ) { if ( $step_id !== $av_data['id'] ) { update_post_meta( $av_data['id'], 'wcf-winner-step', $step_id ); } } /* Archive all rest of variation */ $current_time = current_time( 'Y-m-d H:i:s' ); /* Add rest of variation to archived list */ foreach ( $all_variations as $v_index => $v_data ) { if ( $step_id !== $v_data['id'] ) { $step_to_archive_data = array( 'id' => $v_data['id'], 'title' => get_the_title( $v_data['id'] ), 'note' => get_post_meta( $v_data['id'], 'wcf-step-note', true ), 'deleted' => false, 'raw_date' => $current_time, 'date' => gmdate( 'M d, Y', strtotime( $current_time ) ), ); array_unshift( $archived_variations, $step_to_archive_data ); update_post_meta( $v_data['id'], 'wcf-winner-step', $step_id ); delete_post_meta( $v_data['id'], 'wcf-ab-test' ); } } /* Keep ab step data for analytics */ $flow_steps[ $index ]['ab-test'] = true; $flow_steps[ $index ]['ab-test-ui'] = false; $flow_steps[ $index ]['ab-test-start'] = false; $flow_steps[ $index ]['ab-test-variations'] = array(); $flow_steps[ $index ]['ab-test-archived-variations'] = $archived_variations; break; } } /* Set index order properly */ $flow_steps = array_merge( $flow_steps ); /* Update latest data */ update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); $result = array( 'status' => true, /* translators: %s step id */ 'text' => sprintf( __( 'Winner updated for this step - %s', 'cartflows-pro' ), $step_id ), ); wp_send_json( $result ); } /** * Create variation for current step * * @since 1.0.0 * * @return void */ public function clone_ab_test_variation() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-clone-ab-test-step', 'security' ); if ( isset( $_POST['post_id'] ) && isset( $_POST['step_id'] ) && isset( $_POST['control_id'] ) ) { $flow_id = intval( $_POST['post_id'] ); $step_id = intval( $_POST['step_id'] ); $control_id = intval( $_POST['control_id'] ); } $result = array( 'status' => false, 'reload' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Can\'t clone this step - %1$s. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); if ( ! $flow_id || ! $step_id || ! $control_id ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } // Step - Clone step as a variation. $new_step_id = wcf_pro()->utils->clone_step( $step_id ); if ( $new_step_id ) { // Step - Add control step as parent. update_post_meta( $new_step_id, 'wcf-control-step', $control_id ); $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) { foreach ( $flow_steps as $index => $step_data ) { if ( $step_data['id'] === $control_id ) { $variations = $flow_steps[ $index ]['ab-test-variations']; if ( ! is_array( $variations ) ) { $variations = array(); } // Flow - Add ab test variations array. $variations[] = array( 'id' => $new_step_id, 'traffic' => 0, ); $flow_steps[ $index ]['ab-test-variations'] = $variations; } } update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); $result = array( 'status' => true, 'reload' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Step - %1$s archived. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); } } wp_send_json( $result ); } /** * Restore archived variation. * * @return void */ public function restore_archive_ab_test_variation() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-restore-archive-ab-test-variation', 'security' ); if ( isset( $_POST['flow_id'] ) && isset( $_POST['step_id'] ) && isset( $_POST['control_id'] ) ) { $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $control_step = isset( $_POST['control_id'] ) ? intval( $_POST['control_id'] ) : 0; } $result = array( 'status' => false, /* translators: %s flow id */ 'text' => sprintf( __( 'Can\'t restore this variation - %1$s. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); if ( ! $flow_id || ! $step_id || ! $control_step ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true ); // Update control id to step. update_post_meta( $step_id, 'wcf-control-step', $control_step ); // It mean this step is not archived and in process of ab test. update_post_meta( $step_id, 'wcf-ab-test', true ); if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) { foreach ( $flow_steps as $index => $data ) { if ( intval( $data['id'] ) === $control_step ) { $all_variations = $flow_steps[ $index ]['ab-test-variations']; $archived_variations = $flow_steps[ $index ]['ab-test-archived-variations']; /* Add to variation list list */ $new_variation = array( 'id' => $step_id, 'traffic' => 0, ); $all_variations[] = $new_variation; /* Delete the item from archived list */ foreach ( $archived_variations as $v_index => $v_data ) { if ( $step_id === $v_data['id'] ) { array_splice( $archived_variations, $v_index, 1 ); delete_post_meta( $v_data['id'], 'wcf-winner-step' ); break; } } $flow_steps[ $index ]['ab-test-variations'] = $all_variations; $flow_steps[ $index ]['ab-test-archived-variations'] = $archived_variations; break; } } /* Set index order properly */ $flow_steps = array_merge( $flow_steps ); /* Update latest data */ update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); $result = array( 'status' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Variation - %1$s restored. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); } wp_send_json( $result ); } /** * Delete archived variation. * * @return void */ public function delete_archive_ab_test_variation() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { return; } check_ajax_referer( 'wcf-delete-archive-ab-test-variation', 'security' ); if ( isset( $_POST['flow_id'] ) && isset( $_POST['step_id'] ) && isset( $_POST['control_id'] ) ) { $flow_id = intval( $_POST['flow_id'] ); $step_id = intval( $_POST['step_id'] ); $control_step = intval( $_POST['control_id'] ); } $result = array( 'status' => false, /* translators: %s flow id */ 'text' => sprintf( __( 'Can\'t delete this variation - %1$s. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); if ( ! $flow_id || ! $step_id || ! $control_step ) { wp_send_json( $result ); } if ( CARTFLOWS_FLOW_POST_TYPE !== get_post_type( $flow_id ) || CARTFLOWS_STEP_POST_TYPE !== get_post_type( $step_id ) ) { wp_send_json_error( $result ); } $flow_steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( is_array( $flow_steps ) && ! empty( $flow_steps ) ) { foreach ( $flow_steps as $index => $data ) { if ( intval( $data['id'] ) === $control_step ) { $archived_variations = $flow_steps[ $index ]['ab-test-archived-variations']; /* Mark as deleted, update time in the archived list */ foreach ( $archived_variations as $v_index => $v_data ) { if ( $step_id === $v_data['id'] ) { unset( $archived_variations[ $v_index ] ); break; } } $flow_steps[ $index ]['ab-test-archived-variations'] = array_values( $archived_variations ); break; } } /* Set index order properly */ $flow_steps = array_merge( $flow_steps ); /* Update latest data */ update_post_meta( $flow_id, 'wcf-steps', $flow_steps ); /* Delete step */ wp_delete_post( $step_id, true ); $result = array( 'status' => true, /* translators: %s flow id */ 'text' => sprintf( __( 'Variation - %1$s deleted. Funnel - %2$s', 'cartflows-pro' ), $step_id, $flow_id ), ); } wp_send_json( $result ); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Ab_Test_Meta::get_instance(); modules/ab-test/class-cartflows-pro-ab-test.php000064400000002012147600244370015530 0ustar00 .fl-lightbox .cartflows-bb-note { color: #007cba; font-weight: 500; } checkout_layout; $product_options = get_post_meta( $post->ID, 'wcf-enable-product-options', true ); $pre_checkout_offer = get_post_meta( $post->ID, 'wcf-pre-checkout-offer', true ); $show_product_options = Cartflows_Pro_Helper::is_show_product_options_settings( $post->ID ); ?> .fl-node- .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note { color: note_text_color ); ?>; } .fl-node- .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note { background-color: note_bg_color ); ?>; } .fl-node- .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before { border-top-color: note_bg_color ); ?>; } $module_settings, 'setting_name' => 'note_typography', 'selector' => ".fl-node-$module_id .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note", ) ); } ?> .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row { color: product_text_color ); ?>; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { background-color: product_bg_color ); ?>; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { border-radius: product_option_border_radius ) ? $module_settings->product_option_border_radius : '0'; ?>px; } product_option_border_style ) { ?> .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options { border-style: product_option_border_style ) ? $module_settings->product_option_border_style : 'solid'; ?>; border-color: product_option_border_color ); ?>; border-width: product_option_border_size ) ? $module_settings->product_option_border_size : '0'; ?>px; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row { border-style: product_option_border_style ) ? $module_settings->product_option_border_style : 'solid'; ?>; border-color: product_option_border_color ); ?>; border-width: product_option_border_size ) ? $module_settings->product_option_border_size : '0'; ?>px; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight { color: highlight_product_text_color ); ?>; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight { background-color: highlight_product_bg_color ); ?>; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight { border-radius: highlight_product_border_radius ) ? $module_settings->highlight_product_border_radius : '0'; ?>px; } highlight_product_border_style ) { ?> .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight { border-style: highlight_product_border_style ) ? $module_settings->highlight_product_border_style : 'solid'; ?>; border-width: highlight_product_border_size ) ? $module_settings->highlight_product_border_size : '0'; ?>px; border-color: highlight_product_border_color ); ?>; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight .wcf-highlight-head { color: highlight_flag_text_color ); ?>; } .fl-node- .cartflows-bb__checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight .wcf-highlight-head { background-color: highlight_flag_bg_color ); ?>; } modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/js/settings-js.php000064400000004366147600244370023737 0ustar00 (function($) { var $wrapper = $('.fl-node-node; ?> .cartflows-bb__checkout-form' ); var $offer_wrap = $('body').find( '#wcf-pre-checkout-offer-modal' ); var settings_data = $wrapper.data( 'settings-data' ); var enable_product_options = settings_data.enable_product_options; var form = $('.fl-builder-settings'); var checkout_settings = { offer_title: [ settings_data.title_text, '.wcf-content-modal-title h1' ], offer_subtitle: [ settings_data.subtitle_text, '.wcf-content-modal-sub-title span' ], offer_product_name: [ settings_data.product_name, '.wcf-pre-checkout-offer-product-title h1' ], offer_product_desc: [ settings_data.product_desc, '.wcf-pre-checkout-offer-desc span' ], offer_accept_button : [ settings_data.accept_button_text, '.wcf-pre-checkout-offer-btn-action.wcf-pre-checkout-add-cart-btn button' ], offer_skip_button : [ settings_data.skip_button_text, '.wcf-pre-checkout-offer-btn-action.wcf-pre-checkout-skip-btn .wcf-pre-checkout-skip' ] }; if( 'yes' === enable_product_options ) { form.find( "#fl-field-product_options_position .fl-field-label" ).show(); form.find( "#fl-field-product_options_position select" ).show(); form.find( "#fl-field-product_options_position .fl-field-description" ).hide(); form.find( "#fl-field-product_options_skin" ).show(); form.find( "#fl-field-product_options_images" ).show(); form.find( "#fl-field-product_option_section_title_text" ).show(); form.find('#fl-builder-settings-section-product_style').show(); } else { form.find( "#fl-field-product_options_position .fl-field-label" ).hide(); form.find( "#fl-field-product_options_position select" ).hide(); form.find( "#fl-field-product_options_position .fl-field-description" ).show(); form.find( "#fl-field-product_options_skin" ).hide(); form.find( "#fl-field-product_options_images" ).hide(); form.find( "#fl-field-product_option_section_title_text" ).hide(); form.find('#fl-builder-settings-section-product_style').hide(); } })(jQuery); modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/js/settings.js000064400000005016147600244370023143 0ustar00( function ( $ ) { FLBuilder.registerModuleHelper( 'cartflows-bb-checkout-form', { init() { const form = $( '.fl-builder-settings' ), layout = form.find( 'select[name=checkout_layout]' ); form.find( '#fl-field-checkout_layout .fl-field-description' ).hide(); form.find( '#fl-field-input_skins .fl-field-description' ).hide(); // Init validation events. this._layout_styleChanged(); // Validation events. layout.on( 'change', $.proxy( this._layout_styleChanged, this ) ); const module_id = $( '.fl-module-cartflows-bb-checkout-form' ).data( 'node' ); const $module_wrapper = $( '.fl-node-' + module_id + ' .cartflows-bb__checkout-form' ); const settings_data = $module_wrapper.data( 'settings-data' ); const enable_product_options = settings_data.enable_product_options; //var enable_order_bump = settings_data.enable_order_bump; if ( 'yes' === enable_product_options ) { form.find( '#fl-field-product_options_position .fl-field-label' ).show(); form.find( '#fl-field-product_options_position select' ).show(); form.find( '#fl-field-product_options_position .fl-field-description' ).hide(); form.find( '#fl-field-product_options_skin' ).show(); form.find( '#fl-field-product_options_images' ).show(); form.find( '#fl-field-product_option_section_title_text' ).show(); form.find( '#fl-builder-settings-section-product_style' ).show(); } else { form.find( '#fl-field-product_options_position .fl-field-label' ).hide(); form.find( '#fl-field-product_options_position select' ).hide(); form.find( '#fl-field-product_options_position .fl-field-description' ).show(); form.find( '#fl-field-product_options_skin' ).hide(); form.find( '#fl-field-product_options_images' ).hide(); form.find( '#fl-field-product_option_section_title_text' ).hide(); form.find( '#fl-builder-settings-section-product_style' ).hide(); } }, _layout_styleChanged() { const form = $( '.fl-builder-settings' ), layout = form.find( 'select[name=checkout_layout]' ).val(); if ( 'two-step' === layout ) { // form.find( "#fl-field-width" ).hide(); form.find( '#fl-builder-settings-section-two_step' ).show(); form.find( '#fl-builder-settings-section-two_step_style' ).show(); } else { form.find( '#fl-builder-settings-section-two_step' ).hide(); form.find( '#fl-builder-settings-section-two_step_style' ).hide(); } }, } ); } )( jQuery ); beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php000064400000053650147600244370030206 0ustar00modulesoptions->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); // Controls filters. $checkout_fields = array( // Two step texts. array( 'filter_slug' => 'wcf-checkout-step-one-title', 'setting_name' => 'step_one_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-one-sub-title', 'setting_name' => 'step_one_sub_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-two-title', 'setting_name' => 'step_two_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-two-sub-title', 'setting_name' => 'step_two_sub_title_text', ), array( 'filter_slug' => 'wcf-checkout-offer-button-title', 'setting_name' => 'offer_button_title_text', ), array( 'filter_slug' => 'wcf-checkout-offer-button-sub-title', 'setting_name' => 'offer_button_subtitle_text', ), ); if ( isset( $checkout_fields ) && is_array( $checkout_fields ) ) { foreach ( $checkout_fields as $key => $field ) { $setting_name = $field['setting_name']; $setting_value = $settings->$setting_name; if ( '' !== $setting_value ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_value ) { $value = $setting_value; return $value; }, 10, 1 ); } } } add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note', function ( $is_note_enabled ) use ( $settings ) { $is_note_enabled = ( 'yes' === $settings->enable_note ) ? 'yes' : 'no'; return $is_note_enabled; }, 10, 1 ); if ( 'yes' === $settings->enable_note && '' !== $settings->note_text ) { add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note-text', function ( $checkout_note_text ) use ( $settings ) { $checkout_note_text = $settings->note_text; return $checkout_note_text; }, 10, 1 ); } // Product options. if ( 'yes' === $enable_product_options ) { $product_options_fields = array( array( 'filter_slug' => 'wcf-product-options-skin', 'setting_name' => 'product_options_skin', ), array( 'filter_slug' => 'wcf-show-product-images', 'setting_name' => 'product_options_images', ), array( 'filter_slug' => 'wcf-product-opt-title', 'setting_name' => 'product_option_section_title_text', ), array( 'filter_slug' => 'wcf-your-products-position', 'setting_name' => 'product_options_position', ), ); if ( isset( $product_options_fields ) && is_array( $product_options_fields ) ) { foreach ( $product_options_fields as $key => $field ) { $setting_name = $field['setting_name']; $setting_value = isset( $settings->$setting_name ) ? $settings->$setting_name : ''; if ( '' !== $setting_value ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_value ) { $value = $setting_value; return $value; }, 10, 1 ); } } } } add_filter( 'cartflows_bb_checkout_settings', function ( $data_settings ) use ( $settings, $enable_product_options ) { $data_settings = array( 'enable_product_options' => $enable_product_options, ); return $data_settings; }, 10, 1 ); } /** * Extending row setting. * * @param array $form Settings array. * @param string $id module id. * * @since 1.6.13 */ public static function bb_checkout_form_extend( $form, $id ) { if ( 'cartflows-bb-checkout-form' == $id ) { $checkout_id = get_the_id(); $show_product_options = Cartflows_Pro_Helper::is_show_product_options_settings( $checkout_id ); if ( $show_product_options ) { $license_status = cartflows_pro_is_active_license(); $row_html = ''; if ( ! $license_status ) { $row_html = wcf_pro()->utils->get_license_restriction_template( array( 'title' => __( 'Explore Product Options', 'cartflows-pro' ), 'messages' => array( __( 'Easily customize and select multiple products during checkout to match your preferences and needs.', 'cartflows-pro' ), ), ) ); } else { $row_html = wp_kses_post( sprintf( /* translators: %1$1s, %2$2s Link to meta */ __( 'Please enable "Product-Options" from %1$1shere%2$2s to edit options.', 'cartflows-pro' ), '', '' ) ); } $form['general']['sections']['product_options'] = array( 'title' => 'Product Options', 'fields' => array( 'product_options_position' => array( 'type' => 'select', 'label' => __( 'Select Position', 'cartflows-pro' ), 'default' => 'after-customer', 'options' => array( 'before-customer' => __( 'Before Checkout', 'cartflows-pro' ), 'after-customer' => __( 'After Customer Details', 'cartflows-pro' ), 'before-order' => __( 'Before Order Review', 'cartflows-pro' ), ), 'description' => $row_html, ), 'product_options_skin' => array( 'type' => 'select', 'label' => __( 'Skin', 'cartflows-pro' ), 'default' => 'classic', 'options' => array( 'classic' => __( 'Classic', 'cartflows-pro' ), 'cards' => __( 'Cards', 'cartflows-pro' ), ), ), 'product_options_images' => array( 'type' => 'select', 'label' => __( 'Show Product Images', 'cartflows-pro' ), 'default' => 'no', 'options' => array( 'yes' => __( 'Yes', 'cartflows-pro' ), 'no' => __( 'No', 'cartflows-pro' ), ), ), 'product_option_section_title_text' => array( 'type' => 'text', 'label' => __( 'Section Title Text', 'cartflows-pro' ), 'placeholder' => __( 'Your Products', 'cartflows-pro' ), 'connections' => array( 'string' ), ), ), ); $form['style']['sections']['product_style'] = array( 'title' => __( 'Product Options', 'cartflows-pro' ), 'fields' => array( 'product_text_color' => array( 'type' => 'color', 'label' => __( 'Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row', 'property' => 'color', 'unit' => 'px', ), ), 'product_bg_color' => array( 'type' => 'color', 'label' => __( 'Background Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row', 'property' => 'background-color', 'unit' => 'px', ), ), 'product_option_border_style' => array( 'type' => 'select', 'label' => __( 'Border Style', 'cartflows-pro' ), 'default' => 'none', 'help' => __( 'The type of border to use. Double borders must have a width of at least 3px to render properly.', 'cartflows-pro' ), 'options' => array( 'none' => __( 'None', 'cartflows-pro' ), 'solid' => __( 'Solid', 'cartflows-pro' ), 'dashed' => __( 'Dashed', 'cartflows-pro' ), 'dotted' => __( 'Dotted', 'cartflows-pro' ), 'double' => __( 'Double', 'cartflows-pro' ), ), 'toggle' => array( 'solid' => array( 'fields' => array( 'product_option_border_size', 'product_option_border_radius', 'product_option_border_color' ), ), 'dashed' => array( 'fields' => array( 'product_option_border_size', 'product_option_border_radius', 'product_option_border_color' ), ), 'dotted' => array( 'fields' => array( 'product_option_border_size', 'product_option_border_radius', 'product_option_border_color' ), ), 'double' => array( 'fields' => array( 'product_option_border_size', 'product_option_border_radius', 'product_option_border_color' ), ), ), 'preview' => array( 'type' => 'css', 'selector' => '.wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row', 'property' => 'border-style', ), ), 'product_option_border_size' => array( 'type' => 'unit', 'label' => __( 'Border Width', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '1', 'preview' => array( 'type' => 'css', 'selector' => '.wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row', 'property' => 'border-width', 'unit' => 'px', ), ), 'product_option_border_color' => array( 'type' => 'color', 'label' => __( 'Border Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row', 'property' => 'border-color', 'unit' => 'px', ), ), 'product_option_border_radius' => array( 'type' => 'unit', 'label' => __( 'Border Radius', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '0', 'preview' => array( 'type' => 'css', 'selector' => '.wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options, .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row', 'property' => 'border-radius', 'unit' => 'px', ), ), 'highlight_product_bg_color' => array( 'type' => 'color', 'label' => __( 'Highlight Product Background Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight', 'property' => 'background-color', 'unit' => 'px', ), ), 'highlight_product_text_color' => array( 'type' => 'color', 'label' => __( 'Highlight Product Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight', 'property' => 'color', 'unit' => 'px', ), ), 'highlight_product_border_style' => array( 'type' => 'select', 'label' => __( 'Highlight Product Border Style', 'cartflows-pro' ), 'default' => 'none', 'help' => __( 'The type of border to use. Double borders must have a width of at least 3px to render properly.', 'cartflows-pro' ), 'options' => array( 'none' => __( 'None', 'cartflows-pro' ), 'solid' => __( 'Solid', 'cartflows-pro' ), 'dashed' => __( 'Dashed', 'cartflows-pro' ), 'dotted' => __( 'Dotted', 'cartflows-pro' ), 'double' => __( 'Double', 'cartflows-pro' ), ), 'toggle' => array( 'solid' => array( 'fields' => array( 'highlight_product_border_size', 'highlight_product_border_radius', 'highlight_product_border_color' ), ), 'dashed' => array( 'fields' => array( 'highlight_product_border_size', 'highlight_product_border_radius', 'highlight_product_border_color' ), ), 'dotted' => array( 'fields' => array( 'highlight_product_border_size', 'highlight_product_border_radius', 'highlight_product_border_color' ), ), 'double' => array( 'fields' => array( 'highlight_product_border_size', 'highlight_product_border_radius', 'highlight_product_border_color' ), ), ), 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight', 'property' => 'border-style', ), ), 'highlight_product_border_size' => array( 'type' => 'unit', 'label' => __( 'Border Width', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '1', 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight', 'property' => 'border-width', 'unit' => 'px', ), ), 'highlight_product_border_color' => array( 'type' => 'color', 'label' => __( 'Border Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight', 'property' => 'border-color', 'unit' => 'px', ), ), 'highlight_product_border_radius' => array( 'type' => 'unit', 'label' => __( 'Border Radius', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '0', 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight', 'property' => 'border-radius', 'unit' => 'px', ), ), 'highlight_flag_text_color' => array( 'type' => 'color', 'label' => __( 'Highlight Flag Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight .wcf-highlight-head', 'property' => 'color', 'unit' => 'px', ), ), 'highlight_flag_bg_color' => array( 'type' => 'color', 'label' => __( 'Highlight Flag Background Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-qty-options .wcf-qty-row.wcf-highlight .wcf-highlight-head', 'property' => 'background-color', 'unit' => 'px', ), ), ), ); } // Content related options. $form['general']['sections']['two_step'] = array( 'title' => 'Two Step', 'fields' => array( 'enable_note' => array( 'type' => 'select', 'label' => __( 'Enable Checkout Note', 'cartflows-pro' ), 'default' => 'yes', 'options' => array( 'yes' => __( 'Yes', 'cartflows-pro' ), 'no' => __( 'No', 'cartflows-pro' ), ), 'toggle' => array( 'yes' => array( 'fields' => array( 'note_text' ), ), ), ), 'note_text' => array( 'type' => 'text', 'label' => __( 'Note Text', 'cartflows-pro' ), 'placeholder' => __( 'Get Your FREE copy of CartFlows in just few steps.', 'cartflows-pro' ), 'connections' => array( 'string' ), ), 'step_one_title_text' => array( 'type' => 'text', 'label' => __( 'Step One Title', 'cartflows-pro' ), 'placeholder' => __( 'Shipping', 'cartflows-pro' ), 'connections' => array( 'string' ), ), 'step_one_sub_title_text' => array( 'type' => 'text', 'label' => __( 'Step One Sub Title', 'cartflows-pro' ), 'placeholder' => __( 'Where to ship it?', 'cartflows-pro' ), 'connections' => array( 'string' ), ), 'step_two_title_text' => array( 'type' => 'text', 'label' => __( 'Step Two Title', 'cartflows-pro' ), 'placeholder' => __( 'Payment', 'cartflows-pro' ), 'connections' => array( 'string' ), ), 'step_two_sub_title_text' => array( 'type' => 'text', 'label' => __( 'Step Two Sub Title', 'cartflows-pro' ), 'placeholder' => __( 'Of your order', 'cartflows-pro' ), 'connections' => array( 'string' ), ), 'offer_button_title_text' => array( 'type' => 'text', 'label' => __( 'Offer Button Title', 'cartflows-pro' ), 'placeholder' => __( 'For Special Offer Click Here', 'cartflows-pro' ), 'connections' => array( 'string' ), ), 'offer_button_subtitle_text' => array( 'type' => 'text', 'label' => __( 'Offer Button Sub Title', 'cartflows-pro' ), 'placeholder' => __( 'Yes! I want this offer!', 'cartflows-pro' ), 'connections' => array( 'string' ), ), ), ); // Style options. $form['style']['sections']['two_step_style'] = array( 'title' => __( 'Two Step', 'cartflows-pro' ), 'fields' => array( 'note_text_color' => array( 'type' => 'color', 'label' => __( 'Note Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embed-checkout-form-note', 'property' => 'color', 'unit' => 'px', ), ), 'note_bg_color' => array( 'type' => 'color', 'label' => __( 'Note Background Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embed-checkout-form-note', 'property' => 'background-color', 'unit' => 'px', ), ), 'note_typography' => array( 'type' => 'typography', 'label' => __( 'Note Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embed-checkout-form-note', ), ), ), ); } return $form; } /** * Extending row setting. * * @param file $css gets the Modules CSS. * @param array $nodes Modules array. * @param array $global_settings module global settings. * * @since 1.6.13 */ public static function bb_checkout_form_css( $css, $nodes, $global_settings ) { foreach ( $nodes['modules'] as $module_object ) { if ( 'cartflows-bb-checkout-form' === $module_object->slug ) { $module_id = $module_object->node; $module_settings = $module_object->settings; $module_slug = $module_object->slug; ob_start(); include CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/includes/frontend-css.php'; $css .= ob_get_clean(); } } return $css; } /** * Render Global uabb-layout-builder js * * @since 1.6.13 * @param file $js Gets the js file contents. * @param array $nodes Gets the nodes of the layout builder. * @param object $global_settings Gets the object for the Layout builder. */ public static function bb_checkout_form_js( $js, $nodes, $global_settings ) { return $js; } } Cartflows_Pro_BB_Checkout_Form_Extend::init(); } modules/beaver-builder/cartflows-pro-bb-offer-action-button/css/frontend.css000064400000044752147600244370023316 0ustar00.cartflows-pro-bb__action-button-icon-after, .cartflows-pro-bb__action-button-icon-before, .cartflows-pro-bb__action-button-text { vertical-align: middle; } .cartflows-pro-bb__button-icon-top .cartflows-pro-bb__action-button-icon { align-self: flex-start; } .cartflows-pro-bb__button-icon-middle .cartflows-pro-bb__action-button-icon { align-self: center; } .cartflows-pro-bb__action-button-icon-before-title-desc { margin-right: 10px; } .cartflows-pro-bb__action-button-icon-after-title-desc { margin-left: 10px; } .cartflows-pro-bb__action-button-description { font-size: 0.9em; } .cartflows-pro-bb__offer-yes-no-inner-wrap { display: inline-flex; } .cartflows-pro-bb__action-creative-button-wrap a, .cartflows-pro-bb__action-creative-button-wrap a:visited { padding: 12px 24px; } a.cartflows-pro-bb__action-button.cartflows-pro-bb__action-creative-button.cartflows-pro-bb__action-creative-gradient-btn { border: none; } .cartflows-pro-bb__action-button-wrap a, .cartflows-pro-bb__action-button-wrap a:visited { display: inline-block; font-size: 16px; line-height: 18px; text-decoration: none; text-shadow: none; } .cartflows-pro-bb__action-button-wrap a *, .cartflows-pro-bb__action-button-wrap a:visited * { /*color: #333;*/ } .fl-builder-content .cartflows-pro-bb__action-button:hover { text-decoration: none; } .fl-builder-content .cartflows-pro-bb__action-button-width-full .cartflows-pro-bb__action-button { display: block; text-align: center; } .cartflows-pro-bb__action-button-width-custom .cartflows-pro-bb__action-button { display: inline-block; text-align: center; max-width: 100%; } .fl-builder-content .cartflows-pro-bb__action-button-left { text-align: left; } .fl-builder-content .cartflows-pro-bb__action-button-center { text-align: center; } .fl-builder-content .cartflows-pro-bb__action-button-right { text-align: right; } .fl-builder-content .cartflows-pro-bb__action-button i, .fl-builder-content .cartflows-pro-bb__action-button i::before { font-size: 1em; height: 1em; line-height: 1em; width: 1em; } .cartflows-pro-bb__action-button .cartflows-pro-bb__action-button-icon-after { margin-left: 8px; margin-right: 0; } .cartflows-pro-bb__action-button .cartflows-pro-bb__action-button-icon-before { margin-left: 0; margin-right: 8px; } .cartflows-pro-bb__action-button .cartflows-pro-bb__action-button-icon-no-text { margin: 0; } .cartflows-pro-bb__action-button-has-icon .cartflows-pro-bb__action-button-text { vertical-align: middle; } /* Creative Button ___________________________________________________________________________*/ .cartflows-pro-bb__action-creative-button-wrap a, .cartflows-pro-bb__action-creative-button-wrap a:visited { background: #fafafa; border: 1px solid #ccc; color: #333; display: inline-block; vertical-align: middle; text-align: center; overflow: hidden; text-decoration: none; text-shadow: none; box-shadow: none; position: relative; -webkit-transition: all 200ms linear; -moz-transition: all 200ms linear; -ms-transition: all 200ms linear; -o-transition: all 200ms linear; transition: all 200ms linear; } .cartflows-pro-bb__action-creative-button-wrap a:focus { text-decoration: none; text-shadow: none; box-shadow: none; } .cartflows-pro-bb__action-creative-button-wrap a .cartflows-pro-bb__action-creative-button-text, .cartflows-pro-bb__action-creative-button-wrap a .cartflows-pro-bb__action-creative-button-icon, .cartflows-pro-bb__action-creative-button-wrap a:visited .cartflows-pro-bb__action-creative-button-text, .cartflows-pro-bb__action-creative-button-wrap a:visited .cartflows-pro-bb__action-creative-button-icon { -webkit-transition: all 200ms linear; -moz-transition: all 200ms linear; -ms-transition: all 200ms linear; -o-transition: all 200ms linear; transition: all 200ms linear; } .cartflows-pro-bb__action-creative-button-wrap a:hover { text-decoration: none; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button-width-full .cartflows-pro-bb__action-creative-button { display: block; text-align: center; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button-width-custom .cartflows-pro-bb__action-creative-button { display: inline-block; text-align: center; max-width: 100%; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button-left { text-align: left; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button-center { text-align: center; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button-right { text-align: right; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button i { font-size: 1.3em; height: auto; vertical-align: middle; width: auto; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button .cartflows-pro-bb__action-creative-button-icon-after { margin-left: 8px; margin-right: 0; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button .cartflows-pro-bb__action-creative-button-icon-before { margin-right: 8px; margin-left: 0; } .cartflows-pro-bb__action-creative-button-wrap.cartflows-pro-bb__action-creative-button-icon-no-text .cartflows-pro-bb__action-creative-button i { margin: 0; } .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button-has-icon .cartflows-pro-bb__action-creative-button-text { vertical-align: middle; } .cartflows-pro-bb__action-creative-button-wrap a, .cartflows-pro-bb__action-creative-button-wrap a:visited { padding: 12px 24px; } /* Translate Button styles */ .cartflows-pro-bb__action-creative-button.cartflows-pro-bb__action-creative-transparent-btn { background: transparent; } .cartflows-pro-bb__action-creative-button.cartflows-pro-bb__action-creative-transparent-btn::after { content: ""; position: absolute; z-index: 1; -webkit-transition: all 200ms linear; -moz-transition: all 200ms linear; -ms-transition: all 200ms linear; -o-transition: all 200ms linear; transition: all 200ms linear; } /* transparent-fill-top, transparent-fill-bottom */ .cartflows-pro-bb__action-transparent-fill-top-btn::after, .cartflows-pro-bb__action-transparent-fill-bottom-btn::after { width: 100%; height: 0; left: 0; } /* transparent-fill-top */ .cartflows-pro-bb__action-transparent-fill-top-btn::after { top: 0; } /* transparent-fill-bottom */ .cartflows-pro-bb__action-transparent-fill-bottom-btn::after { bottom: 0; } /* transparent-fill-left, transparent-fill-right */ .cartflows-pro-bb__action-transparent-fill-left-btn::after, .cartflows-pro-bb__action-transparent-fill-right-btn::after { width: 0; height: 100%; top: 0; } /* transparent-fill-left */ .cartflows-pro-bb__action-transparent-fill-left-btn::after { left: 0; } /* transparent-fill-right */ .cartflows-pro-bb__action-transparent-fill-right-btn::after { right: 0; } /* transparent-fill-center */ .cartflows-pro-bb__action-transparent-fill-center-btn::after { width: 0; height: 100%; top: 50%; left: 50%; -webkit-transform: translateX( -50% ) translateY( -50% ); -moz-transform: translateX( -50% ) translateY( -50% ); -ms-transform: translateX( -50% ) translateY( -50% ); -o-transform: translateX( -50% ) translateY( -50% ); transform: translateX( -50% ) translateY( -50% ); } /* transparent-fill-diagonal, transparent-fill-horizontal */ .cartflows-pro-bb__action-transparent-fill-diagonal-btn::after, .cartflows-pro-bb__action-transparent-fill-horizontal-btn::after { width: 100%; height: 0; top: 50%; left: 50%; } /* transparent-fill-diagonal */ .cartflows-pro-bb__action-transparent-fill-diagonal-btn { overflow: hidden; } .cartflows-pro-bb__action-transparent-fill-diagonal-btn::after { -webkit-transform: translateX( -50% ) translateY( -50% ) rotate( 45deg ); -moz-transform: translateX( -50% ) translateY( -50% ) rotate( 45deg ); -ms-transform: translateX( -50% ) translateY( -50% ) rotate( 45deg ); -o-transform: translateX( -50% ) translateY( -50% ) rotate( 45deg ); transform: translateX( -50% ) translateY( -50% ) rotate( 45deg ); } /* transparent-fill-horizontal */ .cartflows-pro-bb__action-transparent-fill-horizontal-btn::after { -webkit-transform: translateX( -50% ) translateY( -50% ); -moz-transform: translateX( -50% ) translateY( -50% ); -ms-transform: translateX( -50% ) translateY( -50% ); -o-transform: translateX( -50% ) translateY( -50% ); transform: translateX( -50% ) translateY( -50% ); } /* 3D Button styles */ .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_down-btn, .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_up-btn, .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_left-btn, .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_right-btn { -webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none; transition: none; } .perspective { -webkit-perspective: 800px; -moz-perspective: 800px; perspective: 800px; margin: 0; } .cartflows-pro-bb__action-creative-button.cartflows-pro-bb__action-creative-threed-btn::after { content: ""; position: absolute; z-index: -1; -webkit-transition: all 200ms linear; -moz-transition: all 200ms linear; transition: all 200ms linear; } .cartflows-pro-bb__action-creative-button.cartflows-pro-bb__action-creative-threed-btn { /*display: block;*/ outline: 1px solid transparent; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; } /* 3D Button styles --- Animate to top */ .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-animate_top-btn::after { height: 40%; left: 0; top: -40%; width: 100%; -webkit-transform-origin: 0% 100%; -moz-transform-origin: 0% 100%; transform-origin: 0% 100%; -webkit-transform: rotateX( 90deg ); -moz-transform: rotateX( 90deg ); transform: rotateX( 90deg ); } /* 3D Button styles --- Animate to bottom */ .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-animate_bottom-btn::after { width: 100%; height: 40%; left: 0; top: 100%; -webkit-transform-origin: 0% 0%; -moz-transform-origin: 0% 0%; -ms-transform-origin: 0% 0%; transform-origin: 0% 0%; -webkit-transform: rotateX( -90deg ); -moz-transform: rotateX( -90deg ); -ms-transform: rotateX( -90deg ); transform: rotateX( -90deg ); } /* 3D Button styles --- Animate to Left */ .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-animate_left-btn::after { width: 20%; height: 100%; left: -20%; top: 0; -webkit-transform-origin: 100% 0%; -moz-transform-origin: 100% 0%; -ms-transform-origin: 100% 0%; transform-origin: 100% 0%; -webkit-transform: rotateY( -60deg ); -moz-transform: rotateY( -60deg ); -ms-transform: rotateY( -60deg ); transform: rotateY( -60deg ); } /* 3D Button styles --- Animate to Right */ .cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-animate_right-btn::after { width: 20%; height: 100%; left: 104%; top: 0; -webkit-transform-origin: 0% 0%; -moz-transform-origin: 0% 0%; -ms-transform-origin: 0% 0%; transform-origin: 0% 0%; -webkit-transform: rotateY( 120deg ); -moz-transform: rotateY( 120deg ); -ms-transform: rotateY( 120deg ); transform: rotateY( 120deg ); } /* Animate Top */ .cartflows-pro-bb__action-animate_top-btn:hover { -webkit-transform: rotateX( -15deg ); -moz-transform: rotateX( -15deg ); -ms-transform: rotateX( -15deg ); -o-transform: rotateX( -15deg ); transform: rotateX( -15deg ); } /* Animate Bottom */ .cartflows-pro-bb__action-animate_bottom-btn:hover { -webkit-transform: rotateX( 15deg ); -moz-transform: rotateX( 15deg ); -ms-transform: rotateX( 15deg ); -o-transform: rotateX( 15deg ); transform: rotateX( 15deg ); } /* Animate Left */ .cartflows-pro-bb__action-animate_left-btn:hover { -webkit-transform: rotateY( 6deg ); -moz-transform: rotateY( 6deg ); -ms-transform: rotateY( 6deg ); -o-transform: rotateY( 6deg ); transform: rotateY( 6deg ); } /* Animate Right */ .cartflows-pro-bb__action-animate_right-btn:hover { -webkit-transform: rotateY( -6deg ); -moz-transform: rotateY( -6deg ); -ms-transform: rotateY( -6deg ); -o-transform: rotateY( -6deg ); transform: rotateY( -6deg ); } /* Flat Button styles */ /* Common Classes */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn { overflow: hidden; position: relative; } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn i, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn i, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn i, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn i { bottom: 0; height: 100%; margin: 0; opacity: 1; position: absolute; right: 0; width: 100%; -webkit-transition: all 200ms linear; -moz-transition: all 200ms linear; transition: all 200ms linear; -webkit-transform: translateY( 0 ); -moz-transform: translateY( 0 ); -o-transform: translateY( 0 ); -ms-transform: translateY( 0 ); transform: translateY( 0 ); } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn .cartflows-pro-bb__action-button-description, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn .cartflows-pro-bb__action-button-description, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn .cartflows-pro-bb__action-button-description, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn .cartflows-pro-bb__action-button-description { display: inline-block; width: 100%; height: 100%; -webkit-transition: all 200ms linear; -moz-transition: all 200ms linear; -ms-transition: all 200ms linear; -o-transition: all 200ms linear; transition: all 200ms linear; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; backface-visibility: hidden; } /* Making Icon position center */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn i::before, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn i::before, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn i::before, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn i::before { position: absolute; top: 50%; left: 50%; -webkit-transform: translateX( -50% ) translateY( -50% ); -moz-transform: translateX( -50% ) translateY( -50% ); -o-transform: translateX( -50% ) translateY( -50% ); -ms-transform: translateX( -50% ) translateY( -50% ); transform: translateX( -50% ) translateY( -50% ); } /* Common Hover Classes */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn:hover i, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn:hover i { left: 0; } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn:hover i, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn:hover i { top: 0; } /* Animate Icon to the right */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn i { top: 0; left: -100%; } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn:hover .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_right-btn:hover .cartflows-pro-bb__action-button-description { -webkit-transform: translateX( 200% ); -moz-transform: translateX( 200% ); -ms-transform: translateX( 200% ); -o-transform: translateX( 200% ); transform: translateX( 200% ); } /* Animate Icon to the left */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn i { top: 0; left: 100%; } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn:hover .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_to_left-btn:hover .cartflows-pro-bb__action-button-description { -webkit-transform: translateX( -200% ); -moz-transform: translateX( -200% ); -ms-transform: translateX( -200% ); -o-transform: translateX( -200% ); transform: translateX( -200% ); } /* Animate Icon From the Top */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn i { top: -100%; left: 0; } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn:hover .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn:hover .cartflows-pro-bb__action-button-description { -webkit-transform: translateY( 400px ); -moz-transform: translateY( 400px ); -ms-transform: translateY( 400px ); -o-transform: translateY( 400px ); transform: translateY( 400px ); } /* Animate Icon From the Bottom */ .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn i { top: 100%; left: 0; } .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn:hover .cartflows-pro-bb__action-button-text, .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn:hover .cartflows-pro-bb__action-button-description { -webkit-transform: translateY( -400px ); -moz-transform: translateY( -400px ); -ms-transform: translateY( -400px ); -o-transform: translateY( -400px ); transform: translateY( -400px ); } modules/beaver-builder/cartflows-pro-bb-offer-action-button/icon/bb-action-button.svg000064400000035633147600244370025013 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-action-button/includes/frontend.css.php000064400000070403147600244370025112 0ustar00bg_color = Cartflows_Pro_BB_Helper::cartflows_bb_colorpicker( $settings, 'bg_color', true ); $settings->bg_hover_color = Cartflows_Pro_BB_Helper::cartflows_bb_colorpicker( $settings, 'bg_hover_color', true ); $settings->text_color = Cartflows_Pro_BB_Helper::cartflows_bb_colorpicker( $settings, 'text_color' ); $settings->text_hover_color = Cartflows_Pro_BB_Helper::cartflows_bb_colorpicker( $settings, 'text_hover_color' ); // Border Size. if ( 'transparent' == $settings->style ) { $border_size = ( '' !== trim( $settings->border_size ) ) ? $settings->border_size : '2'; } else { $border_size = 1; } // Border Color. if ( ! empty( $settings->bg_color ) ) { $border_color = $settings->bg_color; } if ( ! empty( $settings->bg_hover_color ) ) { $border_hover_color = $settings->bg_hover_color; } // Old Background Gradient Setting. if ( isset( $settings->three_d ) && $settings->three_d ) { $settings->style = 'gradient'; } // Background Gradient. if ( ! empty( $settings->bg_color ) ) { $hex_bg = Cartflows_Pro_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_color ); $bg_grad_start = '#' . FLBuilderColor::adjust_brightness( $hex_bg, 30, 'lighten' ); } if ( ! empty( $settings->bg_hover_color ) ) { $hex_hover_bg = Cartflows_Pro_BB_Helper::cartflows_bb_parse_color_to_hex( $settings->bg_hover_color ); $bg_hover_grad_start = '#' . FLBuilderColor::adjust_brightness( $hex_hover_bg, 30, 'lighten' ); } ?> threed_button_options || 'animate_bottom' == $settings->threed_button_options ) { ?> /* 3D Fix */ .fl-node- .cartflows-pro-bb__action-creative-button-wrap.cartflows-pro-bb__action-creative-button-width-auto .perspective, .fl-node- .cartflows-pro-bb__action-creative-button-wrap.cartflows-pro-bb__action-creative-button-width-custom .perspective { display: inline-block; max-width: 100%; } $settings, 'setting_name' => 'button_typo', 'selector' => ".fl-node-$id .cartflows-pro-bb__action-creative-button-wrap a,.fl-node-$id .cartflows-pro-bb__action-creative-button-wrap a:visited", ) ); } ?> style ) { ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { width ) { $padding_top_bottom = ( '' !== $settings->padding_top_bottom ) ? $settings->padding_top_bottom : '0'; $padding_left_right = ( '' !== $settings->padding_left_right ) ? $settings->padding_left_right : '0'; ?> padding-top: px; padding-bottom: px; padding-left: px; padding-right: px; border_radius ) : ?> border-radius: border_radius; ?>px; -moz-border-radius: border_radius; ?>px; -webkit-border-radius: border_radius; ?>px; width ) : ?> width: custom_width; ?>px; min-height: custom_height; ?>px; display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; style ) : // Transparent. ?> border: px solid ; bg_color ) ) : ?> background: bg_color; ?>; border: px solid ; style ) : // Transparent. ?> background: none; style ) : // Gradient. ?> background: -moz-linear-gradient(top, 0%, bg_color; ?> 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,), color-stop(100%,bg_color; ?>)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, 0%,bg_color; ?> 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, 0%,bg_color; ?> 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, 0%,bg_color; ?> 100%); /* IE10+ */ background: linear-gradient(to bottom, 0%,bg_color; ?> 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='', endColorstr='bg_color; ?>',GradientType=0 ); /* IE6-9 */ } button_padding_dimension_top; ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { button_padding_dimension_top ) ) { echo 'padding-top:' . $settings->button_padding_dimension_top . 'px;'; } if ( isset( $settings->button_padding_dimension_bottom ) ) { echo 'padding-bottom:' . $settings->button_padding_dimension_bottom . 'px;'; } if ( isset( $settings->button_padding_dimension_left ) ) { echo 'padding-left:' . $settings->button_padding_dimension_left . 'px;'; } if ( isset( $settings->button_padding_dimension_right ) ) { echo 'padding-right:' . $settings->button_padding_dimension_right . 'px;'; } ?> } $settings, 'setting_name' => 'button_border', 'selector' => ".fl-node-$id .cartflows-pro-bb__action-module-content.cartflows-pro-bb__action-creative-button-wrap a, .fl-node-$id .cartflows-pro-bb__action-button", ) ); } ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited, .fl-node- .cartflows-pro-bb__action-button { background: bg_color; ?>; background-color: bg_color; ?>; } .fl-node- .cartflows-pro-bb__action-module-content.cartflows-pro-bb__action-creative-button-wrap a:hover, .fl-node- a.cartflows-pro-bb__action-button:hover { border_hover_color . ';'; ?> } .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover, .fl-node- .cartflows-pro-bb__action-button:hover, .fl-node- a.cartflows-pro-bb__action-button:hover { background:bg_hover_color; ?>; } .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a *, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited *, .fl-node- .cartflows-pro-bb__action-button-description { color: text_color; ?>!important; } .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover *, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover .cartflows-pro-bb__action-button-description, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover .cartflows-pro-bb__action-button-icon { color: text_hover_color; ?>!important; } button_typo ) ) { ?> button_typo['line_height'] ) && is_array( $settings->button_typo['line_height'] ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?> html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { line-height: custom_height; ?>px; } button_typo['line_height'] ) && is_object( $settings->button_typo['line_height'] ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?> html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { line-height: custom_height; ?>px; } button_typo ) ) { ?> button_typo->line_height ) && is_object( $settings->button_typo->line_height ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?> html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { line-height: custom_height; ?>px; } button_typo->line_height ) && is_object( $settings->button_typo->line_height ) && 'custom' == $settings->width && '' != $settings->custom_height ) { ?> html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, html.internet-explorer .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { line-height: custom_height; ?>px; } width && '' != $settings->custom_height ) : $translate_text = intval( $settings->custom_height ) + ( $padding_top_bottom * 2 ) + 50; ?> .fl-node- .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_top-btn:hover .cartflows-pro-bb__action-button-text { -webkit-transform: translateY(px); -moz-transform: translateY(px); -ms-transform: translateY(px); -o-transform: translateY(px); transform: translateY(px); } .fl-node- .cartflows-pro-bb__action-creative-flat-btn.cartflows-pro-bb__action-animate_from_bottom-btn:hover .cartflows-pro-bb__action-button-text { -webkit-transform: translateY(-px); -moz-transform: translateY(-px); -ms-transform: translateY(-px); -o-transform: translateY(-px); transform: translateY(-px); } text_color ) && 'default' !== $settings->style ) : ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a *, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited *, .fl-node- .cartflows-pro-bb__action-button-description { color: text_color; ?>; } bg_hover_color ) ) : ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover { style && 'gradient' != $settings->style && 'default' != $settings->style ) { ?> background: bg_hover_color; ?>; style ) { ?> border: px solid ; style ) : // Gradient. ?> background: -moz-linear-gradient(top, 0%, bg_hover_color; ?> 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,), color-stop(100%,bg_hover_color; ?>)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, 0%,bg_hover_color; ?> 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, 0%,bg_hover_color; ?> 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, 0%,bg_hover_color; ?> 100%); /* IE10+ */ background: linear-gradient(to bottom, 0%,bg_hover_color; ?> 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='', endColorstr='bg_hover_color; ?>',GradientType=0 ); /* IE6-9 */ } text_hover_color ) && 'default' !== $settings->style ) : ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover *, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover .cartflows-pro-bb__action-button-description { color: text_hover_color; ?>; } responsive_enabled ) : ?> @media ( max-width: medium_breakpoint . 'px'; ?> ) { style ) { ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { button_padding_dimension_top_medium ) ) { echo 'padding-top:' . $settings->button_padding_dimension_top_medium . 'px;'; } if ( isset( $settings->button_padding_dimension_bottom_medium ) ) { echo 'padding-bottom:' . $settings->button_padding_dimension_bottom_medium . 'px;'; } if ( isset( $settings->button_padding_dimension_left_medium ) ) { echo 'padding-left:' . $settings->button_padding_dimension_left_medium . 'px;'; } if ( isset( $settings->button_padding_dimension_right_medium ) ) { echo 'padding-right:' . $settings->button_padding_dimension_right_medium . 'px;'; } ?> } } @media ( max-width: responsive_breakpoint; ?>px ) { .fl-node- .cartflows-pro-bb__action-creative-button-wrap.cartflows-pro-bb__action-creative-button-reponsive-mob_align; ?> { text-align: mob_align; ?>; } style ) { ?> .fl-node- .cartflows-pro-bb__action-creative-button-wrap a, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:visited { button_padding_dimension_top_responsive ) ) { echo 'padding-top:' . $settings->button_padding_dimension_top_responsive . 'px;'; } if ( isset( $settings->button_padding_dimension_bottom_responsive ) ) { echo 'padding-bottom:' . $settings->button_padding_dimension_bottom_responsive . 'px;'; } if ( isset( $settings->button_padding_dimension_left_responsive ) ) { echo 'padding-left:' . $settings->button_padding_dimension_left_responsive . 'px;'; } if ( isset( $settings->button_padding_dimension_right_responsive ) ) { echo 'padding-right:' . $settings->button_padding_dimension_right_responsive . 'px;'; } ?> } } style ) && 'transparent' == $settings->style ) { ?> .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-none-btn:hover{ transparent_button_options ) { if ( 'border' == $settings->hover_attribute ) { ?> border-color:bg_hover_color; ?>; background:bg_hover_color; ?>; background:bg_hover_color; ?>; } .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-none-btn:hover .cartflows-pro-bb__action-creative-button-icon { text_hover_color && 'FFFFFF' != $settings->text_hover_color && 'none' == $settings->transparent_button_options ) { ?> color: text_hover_color; ?> color: text_color; ?>; } .fl-node- .cartflows-pro-bb__action-creative-button-wrap a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-none-btn:hover .cartflows-pro-bb__action-creative-button-text, .fl-node- .cartflows-pro-bb__action-creative-button-wrap a:hover .cartflows-pro-bb__action-button-description { text_hover_color && 'FFFFFF' != $settings->text_hover_color && 'none' == $settings->transparent_button_options ) { ?> color: text_hover_color; ?> color: text_color; ?>; } .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fade-btn:hover{ background: bg_hover_color; ?>; } /*transparent-fill-top*/ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-top-btn:hover:after{ background: bg_hover_color; ?>; height: 100%; } /*transparent-fill-bottom*/ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-bottom-btn:hover:after{ background: bg_hover_color; ?>; height: 100%; } /*transparent-fill-left*/ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-left-btn:hover:after{ background: bg_hover_color; ?>; width: 100%; } /*transparent-fill-right*/ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-right-btn:hover:after{ background: bg_hover_color; ?>; width: 100%; } /*transparent-fill-center*/ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-center-btn:hover:after{ background: bg_hover_color; ?>; height: calc( 100% + ); width: calc( 100% + ); } /* transparent-fill-diagonal */ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-diagonal-btn:hover:after{ background: bg_hover_color; ?>; height: 260%; } /*transparent-fill-horizontal*/ .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent-fill-horizontal-btn:hover:after{ background: bg_hover_color; ?>; height: calc( 100% + ); width: calc( 100% + ); } .fl-node- a.cartflows-pro-bb__action-transparent-fill-diagonal-btn:hover { background: none; } .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent_button_options; ?>-btn:hover .cartflows-pro-bb__action-creative-button-text, .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent_button_options; ?>-btn:hover .cartflows-pro-bb__action-button-description, .fl-node- a.cartflows-pro-bb__action-creative-transparent-btn.cartflows-pro-bb__action-transparent_button_options; ?>-btn:hover .cartflows-pro-bb__action-button-icon { color: text_hover_color; ?>; position: relative; z-index: 9; } .fl-node- .cartflows-pro-bb__action-transparent_button_options; ?>-btn:hover .cartflows-pro-bb__action-creative-button-icon { color: text_hover_color; ?>; position: relative; z-index: 9; } style ) && 'threed' == $settings->style ) { ?> .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_down-btn { bg_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' ); ?> box-shadow: 0 6px ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_down-btn:hover{ bg_hover_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' ); ?> top: 2px; box-shadow: 0 4px ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_down-btn:active{ box-shadow:none!important; -webkit-transition:all 50ms linear; -moz-transition:all 50ms linear; transition:all 50ms linear; top: 6px; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_up-btn{ bg_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' ); ?> box-shadow: 0 -6px ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_up-btn:hover{ bg_hover_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' ); ?> top: -2px; box-shadow: 0 -4px ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_up-btn:active{ box-shadow:none!important; -webkit-transition:all 50ms linear; -moz-transition:all 50ms linear; transition:all 50ms linear; top: -6px; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_left-btn{ bg_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' ); ?> box-shadow: -6px 0 ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_left-btn:hover{ bg_hover_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' ); ?> left: -2px; box-shadow: -4px 0 ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_left-btn:active { box-shadow:none!important; -webkit-transition:all 50ms linear; -moz-transition:all 50ms linear; transition:all 50ms linear; left: -6px; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_right-btn{ bg_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_shadow_color, 10, 'darken' ); ?> box-shadow: 6px 0 ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_right-btn:hover{ bg_hover_color ); $shadow_color = '#' . FLBuilderColor::adjust_brightness( $hex_hover_shadow_color, 10, 'darken' ); ?> left: 2px; box-shadow: 4px 0 ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_right-btn:active { box-shadow:none!important; -webkit-transition:all 50ms linear; -moz-transition:all 50ms linear; transition:all 50ms linear; left: 6px; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_button_options; ?>-btn:hover:after{ bg_hover_color ); $background_color = '#' . FLBuilderColor::adjust_brightness( $hex_bg_color, 10, 'darken' ); ?> background: ; } .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_button_options; ?>-btn:hover .cartflows-pro-bb__action-creative-button-text, .fl-node- a.cartflows-pro-bb__action-creative-threed-btn.cartflows-pro-bb__action-threed_button_options; ?>-btn:hover .cartflows-pro-bb__action-button-description { color: text_hover_color; ?>; } .fl-node- .cartflows-pro-bb__action-creative-button-wrap { threed_button_options ) : ?> padding-bottom: 6px; threed_button_options ) : ?> padding-top: 6px; threed_button_options ) : ?> padding-left: 6px; threed_button_options ) : ?> padding-right: 6px; } icon ) ) { ?> .fl-node- .cartflows-pro-bb__offer-yes-no-button-content-wrap i { font-size: icon_size . 'px'; ?>; } .fl-node- .cartflows-pro-bb__action-button-icon-before-title-desc, .fl-node- .cartflows-pro-bb__action-button-icon-before, .fl-node- .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button .cartflows-pro-bb__action-creative-button-icon-before { margin-right: icon_spacing . 'px'; ?>; } .fl-node- .cartflows-pro-bb__action-button-icon-after-title-desc, .fl-node- .cartflows-pro-bb__action-button-icon-after .fl-node- .cartflows-pro-bb__action-creative-button-wrap .cartflows-pro-bb__action-creative-button .cartflows-pro-bb__action-creative-button-icon-after { margin-left: icon_spacing . 'px'; ?>; } modules/beaver-builder/cartflows-pro-bb-offer-action-button/includes/frontend.php000064400000007253147600244370024326 0ustar00
    threed_button_options ) && ( 'animate_top' == $settings->threed_button_options || 'animate_bottom' == $settings->threed_button_options || 'animate_left' == $settings->threed_button_options || 'animate_right' == $settings->threed_button_options ) ) { ?>
    modules/beaver-builder/cartflows-pro-bb-offer-action-button/js/settings.js000064400000010252147600244370022773 0ustar00( function ( $ ) { FLBuilder.registerModuleHelper( 'cartflows-pro-bb-offer-action-button', { init() { const form = $( '.fl-builder-settings' ), btn_style = form.find( 'select[name=style]' ), transparent_button_options = form.find( 'select[name=transparent_button_options]' ), hover_attribute = form.find( 'select[name=hover_attribute]' ), btn_style_opt = form.find( 'select[name=flat_button_options]' ); // Init validation events. this._btn_styleChanged(); // Validation events. btn_style.on( 'change', $.proxy( this._btn_styleChanged, this ) ); btn_style_opt.on( 'change', $.proxy( this._btn_styleChanged, this ) ); transparent_button_options.on( 'change', $.proxy( this._btn_styleChanged, this ) ); hover_attribute.on( 'change', $.proxy( this._btn_styleChanged, this ) ); }, _btn_styleChanged() { const form = $( '.fl-builder-settings' ), btn_style = form.find( 'select[name=style]' ).val(), btn_style_opt = form .find( 'select[name=flat_button_options]' ) .val(), hover_attribute = form .find( 'select[name=hover_attribute]' ) .val(), transparent_button_options = form .find( 'select[name=transparent_button_options]' ) .val(), icon = form.find( 'input[name=icon]' ); icon.rules( 'remove' ); if ( btn_style === 'flat' && btn_style_opt !== 'none' ) { icon.rules( 'add', { required: true } ); } if ( btn_style === 'threed' ) { form.find( '#fl-field-threed_button_options' ).show(); form.find( '#fl-field-hover_attribute' ).hide(); form.find( '#fl-field-bg_color th label' ).text( 'Background Color' ); form.find( '#fl-field-bg_hover_color th label' ).text( 'Background Hover Color' ); form.find( '#fl-field-border_size' ).hide(); form.find( '#fl-field-transparent_button_options' ).hide(); form.find( '#fl-field-width' ).show(); } else if ( btn_style === 'flat' ) { form.find( '#fl-field-hover_attribute' ).hide(); form.find( '#fl-field-bg_color th label' ).text( 'Background Color' ); form.find( '#fl-field-bg_hover_color th label' ).text( 'Background Hover Color' ); form.find( '#fl-field-threed_button_options' ).hide(); form.find( '#fl-field-border_size' ).hide(); form.find( '#fl-field-transparent_button_options' ).hide(); form.find( '#fl-field-width' ).show(); } else if ( btn_style === 'transparent' ) { form.find( '#fl-field-border_size' ).show(); form.find( '#fl-field-transparent_button_options' ).show(); form.find( '#fl-field-threed_button_options' ).hide(); form.find( '#fl-field-bg_color th label' ).text( 'Border Color' ); form.find( '#fl-field-width' ).show(); if ( transparent_button_options === 'none' ) { form.find( '#fl-field-hover_attribute' ).show(); if ( hover_attribute === 'bg' ) { form.find( '#fl-field-bg_hover_color th label' ).text( 'Background Hover Color' ); } else { form.find( '#fl-field-bg_hover_color th label' ).text( 'Border Hover Color' ); } } else { form.find( '#fl-field-hover_attribute' ).hide(); form.find( '#fl-field-bg_hover_color th label' ).text( 'Background Hover Color' ); } } else if ( 'default' === btn_style ) { form.find( '#fl-field-width' ).hide(); form.find( '#fl-field-border_radius' ).hide(); form.find( '#fl-field-border_size' ).hide(); form.find( '#fl-field-transparent_button_options' ).hide(); form.find( '#fl-field-threed_button_options' ).hide(); form.find( '#fl-field-button_gradient' ).hide(); form.find( '#fl-field-button_gradient' ).hide(); form.find( '#fl-field-hover_attribute' ).hide(); } else { form.find( '#fl-field-hover_attribute' ).hide(); form.find( '#fl-field-bg_color th label' ).text( 'Background Color' ); form.find( '#fl-field-bg_hover_color th label' ).text( 'Background Hover Color' ); form.find( '#fl-field-border_size' ).hide(); form.find( '#fl-field-transparent_button_options' ).hide(); form.find( '#fl-field-threed_button_options' ).hide(); form.find( '#fl-field-width' ).show(); } }, } ); } )( jQuery ); modules/beaver-builder/cartflows-pro-bb-offer-action-button/cartflows-pro-bb-offer-action-button.php000064400000043675147600244370027757 0ustar00is_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Yes/No Button', 'cartflows-pro' ), 'description' => __( 'Offer Yes/No Button.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-action-button/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-action-button/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-action-button.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-action-button/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-action-button/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } /** * Function that gets the class names. */ public function get_classname() { $classname = 'cartflows-pro-bb__action-button-wrap cartflows-pro-bb__action-button-wrap cartflows-pro-bb__action-creative-button-wrap'; if ( ! empty( $this->settings->width ) ) { $classname .= ' cartflows-pro-bb__action-button-width-' . $this->settings->width; $classname .= ' cartflows-pro-bb__action-creative-button-width-' . $this->settings->width; } if ( ! empty( $this->settings->align ) ) { $classname .= ' cartflows-pro-bb__action-button-' . $this->settings->align; $classname .= ' cartflows-pro-bb__action-creative-button-' . $this->settings->align; } if ( ! empty( $this->settings->mob_align ) ) { $classname .= ' cartflows-pro-bb__action-button-reponsive-' . $this->settings->mob_align; $classname .= ' cartflows-pro-bb__action-creative-button-reponsive-' . $this->settings->mob_align; } if ( ! empty( $this->settings->icon ) ) { $classname .= ' cartflows-pro-bb__action-button-has-icon'; $classname .= ' cartflows-pro-bb__action-creative-button-has-icon'; } if ( empty( $this->settings->text ) ) { $classname .= ' cartflows-pro-bb__action-creative-button-icon-no-text'; } return $classname; } /** * Function that gets the button styling. */ public function get_button_style() { $btn_style = ''; if ( ! empty( $this->settings->style ) && 'transparent' == $this->settings->style ) { if ( isset( $this->settings->transparent_button_options ) && ! empty( $this->settings->transparent_button_options ) ) { $btn_style .= ' cartflows-pro-bb__action-' . $this->settings->transparent_button_options . '-btn'; } } if ( ! empty( $this->settings->style ) && 'threed' == $this->settings->style ) { if ( isset( $this->settings->threed_button_options ) && ! empty( $this->settings->threed_button_options ) ) { $btn_style .= ' cartflows-pro-bb__action-' . $this->settings->threed_button_options . '-btn'; } } return $btn_style; } /** * Function that gets the class names. */ public function get_link() { $step_type = Cartflows_Pro_BB_Helper::cartflows_bb_step_type(); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { $accept_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-yes' : '?class=wcf-down-offer-yes'; $reject_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-no' : '?class=wcf-down-offer-no'; } $action_link = ( 'accept_offer' === $this->settings->offer_action ) ? $accept_offer_link : $reject_offer_link; return $action_link; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Action_Button', array( 'general' => array( 'title' => __( 'General', 'cartflows-pro' ), 'sections' => array( 'general' => array( 'title' => '', 'fields' => array( 'offer_action' => array( 'type' => 'select', 'label' => __( 'Offer Action', 'cartflows-pro' ), 'default' => 'accept_offer', 'options' => array( 'accept_offer' => __( 'Accept Offer', 'cartflows-pro' ), 'reject_offer' => __( 'Reject Offer', 'cartflows-pro' ), ), ), 'text' => array( 'type' => 'text', 'label' => __( 'Title', 'cartflows-pro' ), 'default' => __( 'Offer Action', 'cartflows-pro' ), 'preview' => array( 'type' => 'text', 'selector' => '.cartflows-pro-bb__action-button-text', ), 'connections' => array( 'string' ), ), 'description' => array( 'type' => 'text', 'label' => __( 'Sub Title', 'cartflows-pro' ), 'preview' => array( 'type' => 'text', 'selector' => '.cartflows-pro-bb__action-button-description', ), 'connections' => array( 'string' ), ), 'icon' => array( 'type' => 'icon', 'label' => __( 'Icon', 'cartflows-pro' ), 'show_remove' => true, 'preview' => array( 'type' => 'none', ), ), 'icon_position' => array( 'type' => 'select', 'label' => __( 'Icon Position', 'cartflows-pro' ), 'default' => 'before', 'options' => array( 'before' => __( 'Before Title', 'cartflows-pro' ), 'after' => __( 'After Title', 'cartflows-pro' ), 'before_title_desc' => __( 'Before Title & Sub Title', 'cartflows-pro' ), 'after_title_desc' => __( 'After Title & Sub Title', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'none', ), 'toggle' => array( 'before_title_desc' => array( 'fields' => array( 'verticle_align' ), ), 'after_title_desc' => array( 'fields' => array( 'verticle_align' ), ), ), ), 'verticle_align' => array( 'type' => 'select', 'label' => __( 'Vertical Alignment', 'cartflows-pro' ), 'default' => 'top', 'options' => array( 'top' => __( 'Top', 'cartflows-pro' ), 'middle' => __( 'Middle', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'none', ), ), 'icon_spacing' => array( 'type' => 'unit', 'label' => __( 'Icon Spacing', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '30', 'size' => '5', ), ), ), ), ), 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'style' => array( 'type' => 'select', 'label' => __( 'Type', 'cartflows-pro' ), 'default' => 'default', 'class' => 'creative_button_styles', 'options' => array( 'default' => __( 'Default', 'cartflows-pro' ), 'flat' => __( 'Flat', 'cartflows-pro' ), 'gradient' => __( 'Gradient', 'cartflows-pro' ), 'transparent' => __( 'Transparent', 'cartflows-pro' ), 'threed' => __( '3D', 'cartflows-pro' ), ), 'toggle' => array( 'default' => array( 'fields' => array( 'button_padding_dimension', 'button_border', 'border_hover_color' ), ), ), ), 'border_size' => array( 'type' => 'unit', 'label' => __( 'Border Size', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '5', 'placeholder' => '2', 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__action-creative-button-wrap a', 'property' => 'border-width', 'unit' => 'px', ), ), 'transparent_button_options' => array( 'type' => 'select', 'label' => __( 'Hover Styles', 'cartflows-pro' ), 'default' => 'transparent-fade', 'options' => array( 'none' => __( 'None', 'cartflows-pro' ), 'transparent-fade' => __( 'Fade Background', 'cartflows-pro' ), 'transparent-fill-top' => __( 'Fill Background From Top', 'cartflows-pro' ), 'transparent-fill-bottom' => __( 'Fill Background From Bottom', 'cartflows-pro' ), 'transparent-fill-left' => __( 'Fill Background From Left', 'cartflows-pro' ), 'transparent-fill-right' => __( 'Fill Background From Right', 'cartflows-pro' ), 'transparent-fill-center' => __( 'Fill Background Vertical', 'cartflows-pro' ), 'transparent-fill-diagonal' => __( 'Fill Background Diagonal', 'cartflows-pro' ), 'transparent-fill-horizontal' => __( 'Fill Background Horizontal', 'cartflows-pro' ), ), ), 'threed_button_options' => array( 'type' => 'select', 'label' => __( 'Hover Styles', 'cartflows-pro' ), 'default' => 'threed_down', 'options' => array( 'threed_down' => __( 'Move Down', 'cartflows-pro' ), 'threed_up' => __( 'Move Up', 'cartflows-pro' ), 'threed_left' => __( 'Move Left', 'cartflows-pro' ), 'threed_right' => __( 'Move Right', 'cartflows-pro' ), 'animate_top' => __( 'Animate Top', 'cartflows-pro' ), 'animate_bottom' => __( 'Animate Bottom', 'cartflows-pro' ), ), ), ), ), 'formatting' => array( 'title' => __( 'Structure', 'cartflows-pro' ), 'fields' => array( 'width' => array( 'type' => 'select', 'label' => __( 'Width', 'cartflows-pro' ), 'default' => 'auto', 'options' => array( 'auto' => _x( 'Auto', 'Width.', 'cartflows-pro' ), 'full' => __( 'Full Width', 'cartflows-pro' ), 'custom' => __( 'Custom', 'cartflows-pro' ), ), 'toggle' => array( 'auto' => array( 'fields' => array( 'align', 'mob_align' ), ), 'full' => array( 'fields' => array(), ), 'custom' => array( 'fields' => array( 'align', 'mob_align', 'custom_width', 'custom_height', 'padding_top_bottom', 'padding_left_right' ), ), ), ), 'align' => array( 'type' => 'align', 'label' => __( 'Alignment', 'cartflows-pro' ), 'default' => 'center', 'options' => array( 'center' => __( 'Center', 'cartflows-pro' ), 'left' => __( 'Left', 'cartflows-pro' ), 'right' => __( 'Right', 'cartflows-pro' ), ), ), 'mob_align' => array( 'type' => 'align', 'label' => __( 'Mobile Alignment', 'cartflows-pro' ), 'default' => 'center', 'options' => array( 'center' => __( 'Center', 'cartflows-pro' ), 'left' => __( 'Left', 'cartflows-pro' ), 'right' => __( 'Right', 'cartflows-pro' ), ), ), 'button_padding_dimension' => array( 'type' => 'dimension', 'label' => __( 'Padding', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => 'a.cartflows-pro-bb__action-button, .cartflows-pro-bb__next-step-creative-button-wrap a, .cartflows-pro-bb__action-creative-button-wrap a:visited', 'property' => 'padding', 'unit' => 'px', 'important' => true, ), ), 'button_border' => array( 'type' => 'border', 'label' => __( 'Border', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'preview' => array( 'type' => 'css', 'selector' => 'a.cartflows-pro-bb__action-button, .cartflows-pro-bb__next-step-creative-button-wrap a', 'property' => 'border', 'unit' => 'px', 'important' => true, ), ), 'border_hover_color' => array( 'type' => 'color', 'label' => __( 'Border Hover Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'none', ), ), 'custom_width' => array( 'type' => 'unit', 'label' => __( 'Custom Width', 'cartflows-pro' ), 'default' => '200', 'maxlength' => '3', 'size' => '4', 'slider' => true, 'units' => array( 'px' ), ), 'custom_height' => array( 'type' => 'unit', 'label' => __( 'Custom Height', 'cartflows-pro' ), 'default' => '45', 'maxlength' => '3', 'size' => '4', 'slider' => true, 'units' => array( 'px' ), ), 'padding_top_bottom' => array( 'type' => 'unit', 'label' => __( 'Padding Top/Bottom', 'cartflows-pro' ), 'placeholder' => '0', 'maxlength' => '3', 'size' => '4', 'slider' => true, 'units' => array( 'px' ), ), 'padding_left_right' => array( 'type' => 'unit', 'label' => __( 'Padding Left/Right', 'cartflows-pro' ), 'placeholder' => '0', 'maxlength' => '3', 'size' => '4', 'slider' => true, 'units' => array( 'px' ), ), 'border_radius' => array( 'type' => 'unit', 'label' => __( 'Round Corners', 'cartflows-pro' ), 'maxlength' => '3', 'size' => '4', 'slider' => true, 'units' => array( 'px' ), ), ), ), 'colors' => array( 'title' => __( 'Colors', 'cartflows-pro' ), 'fields' => array( 'text_color' => array( 'type' => 'color', 'label' => __( 'Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__action-creative-button-wrap a, .cartflows-pro-bb__action-creative-button-wrap a *, .cartflows-pro-bb__action-button-description', 'property' => 'color', 'unit' => 'px', ), ), 'text_hover_color' => array( 'type' => 'color', 'label' => __( 'Text Hover Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'none', ), 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__action-creative-button-wrap a:hover, .cartflows-pro-bb__action-creative-button-wrap a:hover *, .cartflows-pro-bb__action-creative-button-wrap a:hover .cartflows-pro-bb__action-button-description, .cartflows-pro-bb__action-creative-button-wrap a:hover ..cartflows-pro-bb__action-button-icon', 'property' => 'color', 'unit' => 'px', ), ), 'bg_color' => array( 'type' => 'color', 'label' => __( 'Background Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, ), 'bg_hover_color' => array( 'type' => 'color', 'label' => __( 'Background Hover Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'none', ), ), 'hover_attribute' => array( 'type' => 'select', 'label' => __( 'Apply Hover Color To', 'cartflows-pro' ), 'default' => 'bg', 'options' => array( 'border' => __( 'Border', 'cartflows-pro' ), 'bg' => __( 'Background', 'cartflows-pro' ), ), 'width' => '75px', ), ), ), ), ), 'creative_typography' => array( 'title' => __( 'Typography', 'cartflows-pro' ), 'sections' => array( 'typography' => array( 'title' => __( 'Button Settings', 'cartflows-pro' ), 'fields' => array( 'icon_size' => array( 'type' => 'unit', 'label' => __( 'Icon Size', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '30', 'size' => '5', ), 'button_typo' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__next-step-creative-button', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-action-link/css/frontend.css000064400000000440147600244370022722 0ustar00.cartflows-pro-bb__action-link-icon-after, .cartflows-pro-bb__action-link-icon-before, .cartflows-pro-bb__action-link-text { vertical-align: middle; } .cartflows-pro-bb__action-link-icon-before { margin-right: 10px; } .cartflows-pro-bb__action-link-icon-after { margin-left: 10px; } modules/beaver-builder/cartflows-pro-bb-offer-action-link/icon/bb-action-link.svg000064400000033246147600244370024055 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-action-link/includes/frontend.css.php000064400000003107147600244370024531 0ustar00 .fl-node- .cartflows-pro-bb__action-link, .fl-node- .cartflows-pro-bb__action-link i, .fl-node- .cartflows-pro-bb__action-link .cartflows-pro-bb__action-link-text { color: text_color ); ?>; } .fl-node- .cartflows-pro-bb__action-link:hover, .fl-node- .cartflows-pro-bb__action-link:hover i, .fl-node- .cartflows-pro-bb__action-link:hover .cartflows-pro-bb__action-link-text { color: text_hover_color ); ?>; } $settings, 'setting_name' => 'link_typography', 'selector' => ".fl-node-$id .cartflows-pro-bb__action-link", ) ); } ?> icon_position && ! empty( $settings->icon ) ) { ?> .fl-node- .cartflows-pro-bb__action-link-icon-before { margin-right: icon_spacing; ?>px; } icon_position && ! empty( $settings->icon ) ) { ?> .fl-node- .cartflows-pro-bb__action-link-icon-after { margin-left: icon_spacing; ?>px; } modules/beaver-builder/cartflows-pro-bb-offer-action-link/includes/frontend.php000064400000001672147600244370023747 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-action-link/cartflows-pro-bb-offer-action-link.php000064400000013770147600244370027014 0ustar00is_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Yes/No Link', 'cartflows-pro' ), 'description' => __( 'Offer Yes/No Link.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-action-link/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-action-link/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-action-link.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-action-link/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-action-link/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } /** * Function that gets the class names. */ public function get_link() { $step_type = Cartflows_Pro_BB_Helper::cartflows_bb_step_type(); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { $accept_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-yes' : '?class=wcf-down-offer-yes'; $reject_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-no' : '?class=wcf-down-offer-no'; } $action_link = ( 'accept_offer' === $this->settings->offer_action ) ? $accept_offer_link : $reject_offer_link; return $action_link; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Action_Link', array( 'general' => array( 'title' => __( 'General', 'cartflows-pro' ), 'sections' => array( 'general' => array( 'title' => '', 'fields' => array( 'offer_action' => array( 'type' => 'select', 'label' => __( 'Offer Action', 'cartflows-pro' ), 'default' => 'accept_offer', 'options' => array( 'accept_offer' => __( 'Accept Offer', 'cartflows-pro' ), 'reject_offer' => __( 'Reject Offer', 'cartflows-pro' ), ), ), 'text' => array( 'type' => 'text', 'label' => __( 'Link Text', 'cartflows-pro' ), 'default' => __( 'Offer Action', 'cartflows-pro' ), 'preview' => array( 'type' => 'text', 'selector' => '.cartflows-pro-bb__action-button-text', ), 'connections' => array( 'string' ), ), 'icon' => array( 'type' => 'icon', 'label' => __( 'Icon', 'cartflows-pro' ), 'show_remove' => true, 'preview' => array( 'type' => 'none', ), ), 'icon_position' => array( 'type' => 'select', 'label' => __( 'Icon Position', 'cartflows-pro' ), 'default' => 'before', 'options' => array( 'before' => __( 'Before Title', 'cartflows-pro' ), 'after' => __( 'After Title', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'none', ), ), 'icon_spacing' => array( 'type' => 'unit', 'label' => __( 'Icon Spacing', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '30', 'size' => '5', ), ), ), ), ), 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'link_style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'text_color' => array( 'type' => 'color', 'label' => __( 'Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__action-link, .cartflows-pro-bb__action-link i, .cartflows-pro-bb__action-link .cartflows-pro-bb__action-link-text', 'property' => 'color', 'unit' => 'px', ), ), 'text_hover_color' => array( 'type' => 'color', 'label' => __( 'Text Hover Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__action-link:hover, .cartflows-pro-bb__action-link:hover i, .cartflows-pro-bb__action-link:hover .cartflows-pro-bb__action-link-text', 'property' => 'color', 'unit' => 'px', ), ), 'link_typography' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__action-link', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-product-description/css/frontend.css000064400000000440147600244370024513 0ustar00.cartflows-pro-bb__action-link-icon-after, .cartflows-pro-bb__action-link-icon-before, .cartflows-pro-bb__action-link-text { vertical-align: middle; } .cartflows-pro-bb__action-link-icon-before { margin-right: 10px; } .cartflows-pro-bb__action-link-icon-after { margin-left: 10px; } beaver-builder/cartflows-pro-bb-offer-product-description/icon/bb-offer-product-description.svg000064400000017126147600244370030456 0ustar00modules modules/beaver-builder/cartflows-pro-bb-offer-product-description/includes/frontend.css.php000064400000001250147600244370026317 0ustar00 .fl-node- .cartflows-pro-bb__offer-product-desc { color: text_color ); ?>; } $settings, 'setting_name' => 'typography', 'selector' => ".fl-node-$id .cartflows-pro-bb__offer-product-desc", ) ); } ?> modules/beaver-builder/cartflows-pro-bb-offer-product-description/includes/frontend.php000064400000000500147600244370025525 0ustar00
    short_description ) { echo do_shortcode( '[cartflows_offer_product_short_desc]' ); } else { echo do_shortcode( '[cartflows_offer_product_desc]' ); } ?>
    cartflows-pro-bb-offer-product-description/cartflows-pro-bb-offer-product-description.php000064400000006634147600244370032320 0ustar00modules/beaver-builderis_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Product Description', 'cartflows-pro' ), 'description' => __( 'Offer Product Description.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-description/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-product-description/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-offer-product-description.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-description/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-description/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Product_Description', array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'link_style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'short_description' => array( 'type' => 'select', 'label' => __( 'Short Description', 'cartflows-pro' ), 'default' => 'no', 'options' => array( 'yes' => __( 'Yes', 'cartflows-pro' ), 'no' => __( 'No', 'cartflows-pro' ), ), ), 'text_color' => array( 'type' => 'color', 'label' => __( 'Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-desc', 'property' => 'color', 'unit' => 'px', ), ), 'typography' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-desc', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-product-image/icon/bb-product-image.svg000064400000021405147600244370024727 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-product-image/includes/frontend.css.php000064400000005076147600244370025070 0ustar00 .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper { margin-bottom: image_spacing . 'px'; ?>; } .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__image { text-align: align; ?>; } .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img { border-radius: image_border_radius ) ? $settings->image_border_radius : '0'; ?>px; } image_border_style ) { ?> .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img { border-style: image_border_style ) ? $settings->image_border_style : 'solid'; ?>; border-width: image_border_width ) ? $settings->image_border_width : '0'; ?>px; border-color: image_border_color ); ?>; } .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery ol li:not(:last-child) { margin-bottom: thumbnails_spacing . 'px'; ?>; margin-right: thumbnails_spacing . 'px'; ?>; margin-top: 0px; margin-left: 0px; } .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery ol li img { border-radius: thumbnails_border_radius ) ? $settings->thumbnails_border_radius : '0'; ?>px; } thumbnails_border_style ) { ?> .fl-node- .cartflows-pro-bb__offer-product-image .woocommerce-product-gallery ol li img { border-style: thumbnails_border_style ) ? $settings->thumbnails_border_style : 'solid'; ?>; border-width: thumbnails_border_width ) ? $settings->thumbnails_border_width : '0'; ?>px; border-color: thumbnails_border_color ); ?>; } modules/beaver-builder/cartflows-pro-bb-offer-product-image/includes/frontend.js.php000064400000000657147600244370024714 0ustar00 (function($) { $(function() { new Cartflows_Pro_BBProductImage ({ id: '', isBuilderActive: , settings: }); }); })(jQuery); modules/beaver-builder/cartflows-pro-bb-offer-product-image/includes/frontend.php000064400000000300147600244370024262 0ustar00
    modules/beaver-builder/cartflows-pro-bb-offer-product-image/js/frontend.js000064400000017413147600244370022732 0ustar00let Cartflows_Pro_BBProductImage; ( function ( $ ) { Cartflows_Pro_BBProductImage = function ( settings ) { this.settings = settings; this.node = settings.id; this.nodeClass = '.fl-node-' + settings.id; this.isBuilderActive = settings.isBuilderActive; this._initFilter(); }; Cartflows_Pro_BBProductImage.prototype = { settings: {}, node: '', nodeClass: '', isBuilderActive: false, /** * Intaialize the Filterable Tabs. * * @since x.x.x * */ _initFilter() { const nodeClass = $( this.nodeClass ); const product_gallery = nodeClass.find( '.woocommerce-product-gallery' ); if ( product_gallery.length > 0 ) { if ( product_gallery.find( '.woocommerce-product-gallery__image' ).length > 1 ) { const slider_obj = $( '.woocommerce-product-gallery' ).flexslider( { animation: 'slide', animationLoop: false, controlNav: 'thumbnails', selector: '.slides .woocommerce-product-gallery__image', directionNav: false, } ); $( window ).on( 'load', function () { slider_obj.trigger( 'resize' ); } ); /* Variation change gallery */ const variations_form = $( '.variations_form' ); if ( variations_form.length > 0 ) { /** * Reset the slide position if the variation has a different image than the current one * * @param {Object} variation variation data. */ const maybe_trigger_slide_position_reset = function ( variation ) { const $form = variations_form, $product_gallery = $( '.woocommerce-product-gallery' ), new_image_id = variation && variation.image_id ? variation.image_id : ''; let reset_slide_position = false; if ( $form.attr( 'current-image' ) !== new_image_id ) { reset_slide_position = true; } $form.attr( 'current-image', new_image_id ); if ( reset_slide_position ) { $product_gallery.flexslider( 0 ); } }; /** * Sets product images for the chosen variation * * @param {Object} variation variation data. */ const variations_image_update = function ( variation ) { const $form = variations_form, $product_gallery = $( '.woocommerce-product-gallery' ), $gallery_nav = $product_gallery.find( '.flex-control-nav' ); if ( variation && variation.image && variation.image.src && variation.image.src.length > 1 ) { // See if the gallery has an image with the same original src as the image we want to switch to. const galleryHasImage = $gallery_nav.find( 'li img[data-o_src="' + variation.image .gallery_thumbnail_src + '"]' ).length > 0; // If the gallery has the image, reset the images. We'll scroll to the correct one. if ( galleryHasImage ) { variations_image_reset(); } // See if gallery has a matching image we can slide to. const slideToImage = $gallery_nav.find( 'li img[src="' + variation.image.gallery_thumbnail_src + '"]' ); if ( slideToImage.length > 0 ) { slideToImage.trigger( 'click' ); $form.attr( 'current-image', variation.image_id ); window.setTimeout( function () { $( window ).trigger( 'resize' ); $product_gallery.trigger( 'woocommerce_gallery_init_zoom' ); }, 20 ); return; } const $product_img_wrap = $product_gallery .find( '.woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder' ) .eq( 0 ), $product_img = $product_img_wrap.find( '.wp-post-image' ), $product_link = $product_img_wrap .find( 'a' ) .eq( 0 ), $gallery_img = $gallery_nav.find( 'li:eq(0) img' ); $product_img.wc_set_variation_attr( 'src', variation.image.src ); $product_img.wc_set_variation_attr( 'height', variation.image.src_h ); $product_img.wc_set_variation_attr( 'width', variation.image.src_w ); $product_img.wc_set_variation_attr( 'srcset', variation.image.srcset ); $product_img.wc_set_variation_attr( 'sizes', variation.image.sizes ); $product_img.wc_set_variation_attr( 'title', variation.image.title ); $product_img.wc_set_variation_attr( 'data-caption', variation.image.caption ); $product_img.wc_set_variation_attr( 'alt', variation.image.alt ); $product_img.wc_set_variation_attr( 'data-src', variation.image.full_src ); $product_img.wc_set_variation_attr( 'data-large_image', variation.image.full_src ); $product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w ); $product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h ); $product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src ); $gallery_img.wc_set_variation_attr( 'src', variation.image.gallery_thumbnail_src ); $product_link.wc_set_variation_attr( 'href', variation.image.full_src ); } else { variations_image_reset(); } window.setTimeout( function () { $( window ).trigger( 'resize' ); maybe_trigger_slide_position_reset( variation ); }, 20 ); }; /** * Reset main image to defaults. */ const variations_image_reset = function () { const $product_gallery = $( '.woocommerce-product-gallery' ), $gallery_nav = $product_gallery.find( '.flex-control-nav' ), $gallery_img = $gallery_nav.find( 'li:eq(0) img' ), $product_img_wrap = $product_gallery .find( '.woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder' ) .eq( 0 ), $product_img = $product_img_wrap.find( '.wp-post-image' ), $product_link = $product_img_wrap .find( 'a' ) .eq( 0 ); $product_img.wc_reset_variation_attr( 'src' ); $product_img.wc_reset_variation_attr( 'width' ); $product_img.wc_reset_variation_attr( 'height' ); $product_img.wc_reset_variation_attr( 'srcset' ); $product_img.wc_reset_variation_attr( 'sizes' ); $product_img.wc_reset_variation_attr( 'title' ); $product_img.wc_reset_variation_attr( 'data-caption' ); $product_img.wc_reset_variation_attr( 'alt' ); $product_img.wc_reset_variation_attr( 'data-src' ); $product_img.wc_reset_variation_attr( 'data-large_image' ); $product_img.wc_reset_variation_attr( 'data-large_image_width' ); $product_img.wc_reset_variation_attr( 'data-large_image_height' ); $product_img_wrap.wc_reset_variation_attr( 'data-thumb' ); $gallery_img.wc_reset_variation_attr( 'src' ); $product_link.wc_reset_variation_attr( 'href' ); }; $( '.variations_form' ).on( 'found_variation', function ( event, variation ) { variations_image_update( variation ); } ); } } } }, }; } )( jQuery ); modules/beaver-builder/cartflows-pro-bb-offer-product-image/cartflows-pro-bb-offer-product-image.php000064400000022505147600244370027670 0ustar00is_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Product Image', 'cartflows-pro' ), 'description' => __( 'Offer Product Image.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-image/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-product-image/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-product-image.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-image/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-image/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Product_Image', array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'image_style' => array( 'title' => __( 'Offer Product Image', 'cartflows-pro' ), 'fields' => array( 'align' => array( 'type' => 'align', 'label' => __( 'Alignment', 'cartflows-pro' ), 'default' => 'left', 'options' => array( 'center' => __( 'Center', 'cartflows-pro' ), 'left' => __( 'Left', 'cartflows-pro' ), 'right' => __( 'Right', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery .woocommerce-product-gallery__image', 'property' => 'text-align', ), ), 'image_spacing' => array( 'type' => 'unit', 'label' => __( 'Image Bottom Spacing', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '100', 'size' => '5', 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery .woocommerce-product-gallery__wrapper', 'property' => 'margin-bottom', 'unit' => 'px', ), ), 'image_border_style' => array( 'type' => 'select', 'label' => __( 'Border Style', 'cartflows-pro' ), 'default' => 'none', 'help' => __( 'The type of border to use. Double borders must have a width of at least 3px to render properly.', 'cartflows-pro' ), 'options' => array( 'none' => __( 'None', 'cartflows-pro' ), 'solid' => __( 'Solid', 'cartflows-pro' ), 'dashed' => __( 'Dashed', 'cartflows-pro' ), 'dotted' => __( 'Dotted', 'cartflows-pro' ), 'double' => __( 'Double', 'cartflows-pro' ), ), 'toggle' => array( 'solid' => array( 'fields' => array( 'image_border_width', 'image_border_color' ), ), 'dashed' => array( 'fields' => array( 'image_border_width', 'image_border_color' ), ), 'dotted' => array( 'fields' => array( 'image_border_width', 'image_border_color' ), ), 'double' => array( 'fields' => array( 'image_border_width', 'image_border_color' ), ), ), 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img', 'property' => 'border-style', ), ), 'image_border_width' => array( 'type' => 'unit', 'label' => __( 'Border Width', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '1', 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img', 'property' => 'border-width', 'unit' => 'px', ), ), 'image_border_color' => array( 'type' => 'color', 'label' => __( 'Border Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img', 'property' => 'border-color', 'unit' => 'px', ), ), 'image_border_radius' => array( 'type' => 'unit', 'label' => __( 'Border Radius', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '0', 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img', 'property' => 'border-radius', 'unit' => 'px', ), ), ), ), 'thumbnail_style' => array( 'title' => __( 'Thumbnails', 'cartflows-pro' ), 'fields' => array( 'thumbnails_spacing' => array( 'type' => 'unit', 'label' => __( 'Spacing between Thumbnails', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '100', 'size' => '5', ), 'thumbnails_border_style' => array( 'type' => 'select', 'label' => __( 'Thumbnails Border Style', 'cartflows-pro' ), 'default' => 'none', 'help' => __( 'The type of border to use. Double borders must have a width of at least 3px to render properly.', 'cartflows-pro' ), 'options' => array( 'none' => __( 'None', 'cartflows-pro' ), 'solid' => __( 'Solid', 'cartflows-pro' ), 'dashed' => __( 'Dashed', 'cartflows-pro' ), 'dotted' => __( 'Dotted', 'cartflows-pro' ), 'double' => __( 'Double', 'cartflows-pro' ), ), 'toggle' => array( 'solid' => array( 'fields' => array( 'thumbnails_border_width', 'thumbnails_border_color' ), ), 'dashed' => array( 'fields' => array( 'thumbnails_border_width', 'thumbnails_border_color' ), ), 'dotted' => array( 'fields' => array( 'thumbnails_border_width', 'thumbnails_border_color' ), ), 'double' => array( 'fields' => array( 'thumbnails_border_width', 'thumbnails_border_color' ), ), ), 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery ol li img', 'property' => 'border-style', ), ), 'thumbnails_border_width' => array( 'type' => 'unit', 'label' => __( 'Border Width', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '1', 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery ol li img', 'property' => 'border-width', 'unit' => 'px', ), ), 'thumbnails_border_color' => array( 'type' => 'color', 'label' => __( 'Border Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery ol li img', 'property' => 'border-color', 'unit' => 'px', ), ), 'thumbnails_border_radius' => array( 'type' => 'unit', 'label' => __( 'Border Radius', 'cartflows-pro' ), 'slider' => true, 'units' => array( 'px' ), 'maxlength' => '3', 'size' => '6', 'placeholder' => '0', 'preview' => array( 'type' => 'css', 'selector' => '.woocommerce-product-gallery ol li img', 'property' => 'border-radius', 'unit' => 'px', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-product-price/css/frontend.css000064400000000136147600244370023274 0ustar00.cartflows-pro-bb__offer-product-price .wcf-offer-price-inner { display: block !important; } modules/beaver-builder/cartflows-pro-bb-offer-product-price/icon/bb-offer-product-price.svg000064400000020065147600244370026067 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-product-price/includes/frontend.css.php000064400000002024147600244370025076 0ustar00 .fl-node- .cartflows-pro-bb__offer-product-price, .fl-node- .cartflows-pro-bb__offer-product-price .wcf-offer-price { color: text_color ); ?>; } $settings, 'setting_name' => 'typography', 'selector' => ".fl-node-$id .cartflows-pro-bb__offer-product-price, .fl-node-$id .cartflows-pro-bb__offer-product-price .wcf-offer-price", ) ); } ?> .fl-node- .cartflows-pro-bb__offer-product-price, .fl-node- .cartflows-pro-bb__offer-product-price .wcf-offer-price { text-align: align; ?>; } modules/beaver-builder/cartflows-pro-bb-offer-product-price/includes/frontend.php000064400000000300147600244370024302 0ustar00
    modules/beaver-builder/cartflows-pro-bb-offer-product-price/cartflows-pro-bb-offer-product-price.php000064400000007373147600244370027736 0ustar00is_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Product Price', 'cartflows-pro' ), 'description' => __( 'Offer Product Price.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-price/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-product-price/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-offer-product-price.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-price/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-price/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Product_Price', array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'link_style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'align' => array( 'type' => 'align', 'label' => __( 'Alignment', 'cartflows-pro' ), 'default' => 'left', 'options' => array( 'center' => __( 'Center', 'cartflows-pro' ), 'left' => __( 'Left', 'cartflows-pro' ), 'right' => __( 'Right', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-price, .cartflows-pro-bb__offer-product-price .wcf-offer-price', 'property' => 'text-align', ), ), 'text_color' => array( 'type' => 'color', 'label' => __( 'Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-price, .cartflows-pro-bb__offer-product-price .wcf-offer-price', 'property' => 'color', 'unit' => 'px', ), ), 'typography' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-price, .cartflows-pro-bb__offer-product-price .wcf-offer-price', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/css/frontend.css000064400000001506147600244370024052 0ustar00.cartflows-bb__offer-product-quantity_align-left.cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity { margin-right: auto; } .cartflows-bb__offer-product-quantity_align-right.cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity { margin-left: auto; } .cartflows-bb__offer-product-quantity_align-center.cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity { margin-left: auto; margin-right: auto; } .cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap label { left: 0; height: 100%; } .cartflows-pro-bb__offer-product-quantity .quantity .input-text.qty.text { max-width: 100%; } .cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity .screen-reader-text { display: unset; } modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/icon/bb-offer-product-quantity.svg000064400000021276147600244370027424 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/includes/frontend.css.php000064400000002576147600244370025666 0ustar00 .fl-node- .cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity { max-width: width . '%'; ?>; } .fl-node- .cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap label { color: label_color ); ?>; } .fl-node- .cartflows-pro-bb__offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity input[type=number]{ color: text_color ); ?>; } $settings, 'setting_name' => 'typography', 'selector' => ".fl-node-$id .cartflows-pro-bb__offer-product-quantity, .fl-node-$id .wcf-embeded-product-quantity-wrap .quantity input[type=number].input-text, .fl-node-$id .cartflows-pro-bb__offer-product-quantity .quantity label", ) ); } ?> .fl-node- .cartflows-pro-bb__offer-product-quantity { text-align: align; ?>; } modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/includes/frontend.php000064400000000446147600244370025071 0ustar00
    beaver-builder/cartflows-pro-bb-offer-product-quantity/cartflows-pro-bb-offer-product-quantity.php000064400000011243147600244370031176 0ustar00modulesis_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Product Quantity', 'cartflows-pro' ), 'description' => __( 'Offer Product Quantity.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-offer-product-quantity.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-quantity/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Product_Quantity', array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'link_style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'align' => array( 'type' => 'align', 'label' => __( 'Alignment', 'cartflows-pro' ), 'default' => 'left', 'options' => array( 'center' => __( 'Center', 'cartflows-pro' ), 'left' => __( 'Left', 'cartflows-pro' ), 'right' => __( 'Right', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-quantity', 'property' => 'text-align', ), ), 'width' => array( 'type' => 'unit', 'label' => __( 'Width(%)', 'cartflows-pro' ), 'slider' => true, 'units' => array( '%' ), 'maxlength' => '100', 'size' => '5', 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embeded-product-quantity-wrap .quantity', 'property' => 'max-width', 'unit' => '%', ), ), 'label_color' => array( 'type' => 'color', 'label' => __( 'Label Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embeded-product-quantity-wrap label', 'property' => 'color', 'unit' => 'px', ), ), 'text_color' => array( 'type' => 'color', 'label' => __( 'Input Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embeded-product-quantity-wrap .quantity input[type=number]', 'property' => 'color', 'unit' => 'px', ), ), 'typography' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-quantity, .wcf-embeded-product-quantity-wrap .quantity input[type=number].input-text, .cartflows-pro-bb__offer-product-quantity .quantity label', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-product-title/icon/bb-offer-product-title.svg000064400000020653147600244370026130 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-product-title/includes/frontend.css.php000064400000001264147600244370025122 0ustar00 .fl-node- .cartflows-pro-bb__offer-product-title { color: text_color ); ?>; } $settings, 'setting_name' => 'typography', 'selector' => ".fl-node-$id .cartflows-pro-bb__offer-product-title", ) ); } ?> modules/beaver-builder/cartflows-pro-bb-offer-product-title/includes/frontend.php000064400000000306147600244370024327 0ustar00
    modules/beaver-builder/cartflows-pro-bb-offer-product-title/cartflows-pro-bb-offer-product-title.php000064400000006101147600244370027760 0ustar00is_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Product Title', 'cartflows-pro' ), 'description' => __( 'Offer Product Title.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-title/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-product-title/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-offer-product-title.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-title/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-title/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Product_Title', array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'link_style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'text_color' => array( 'type' => 'color', 'label' => __( 'Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-title', 'property' => 'color', 'unit' => 'px', ), ), 'typography' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-title', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-offer-product-variation/css/frontend.css000064400000001005147600244370024162 0ustar00.cartflows-bb__offer-product-variation_align-left.cartflows-pro-bb__offer-product-variation .wcf-embeded-product-variation-wrap .variations { margin-right: auto; } .cartflows-bb__offer-product-variation_align-right.cartflows-pro-bb__offer-product-variation .wcf-embeded-product-variation-wrap .variations { margin-left: auto; } .cartflows-bb__offer-product-variation_align-center.cartflows-pro-bb__offer-product-variation .wcf-embeded-product-variation-wrap .variations { margin-left: auto; margin-right: auto; } modules/beaver-builder/cartflows-pro-bb-offer-product-variation/icon/bb-offer-product-variation.svg000064400000020405147600244370027651 0ustar00 modules/beaver-builder/cartflows-pro-bb-offer-product-variation/includes/frontend.css.php000064400000002661147600244370025777 0ustar00 .fl-node- .cartflows-pro-bb__offer-product-variation .wcf-embeded-product-variation-wrap .variations { max-width: width . '%'; ?>; } .fl-node- .cartflows-pro-bb__offer-product-variation label, .fl-node- .cartflows-pro-bb__offer-product-variation .out-of-stock { color: label_color ); ?>; } .fl-node- .cartflows-pro-bb__offer-product-variation .wcf-embeded-product-variation-wrap .variations .value select{ color: text_color ); ?>; } $settings, 'setting_name' => 'typography', 'selector' => ".fl-node-$id .cartflows-pro-bb__offer-product-variation, .fl-node-$id .wcf-embeded-product-variation-wrap .variations .value select, .fl-node-$id .cartflows-pro-bb__offer-product-variation .label label", ) ); } ?> .fl-node- .cartflows-pro-bb__offer-product-variation { text-align: align; ?>; } modules/beaver-builder/cartflows-pro-bb-offer-product-variation/includes/frontend.php000064400000000440147600244370025201 0ustar00
    beaver-builder/cartflows-pro-bb-offer-product-variation/cartflows-pro-bb-offer-product-variation.php000064400000011352147600244370031433 0ustar00modulesis_woo_active && ( 'upsell' === $step_type || 'downsell' === $step_type || $is_bb_setting_page ) ) ? true : false; parent::__construct( array( 'name' => __( 'Offer Product Variation', 'cartflows-pro' ), 'description' => __( 'Offer Product Variation.', 'cartflows-pro' ), 'category' => __( 'Cartflows Modules', 'cartflows-pro' ), 'group' => __( 'Cartflows Modules', 'cartflows-pro' ), 'dir' => CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-variation/', 'url' => CARTFLOWS_PRO_URL . 'modules/beaver-builder/cartflows-pro-bb-offer-product-variation/', 'partial_refresh' => false, // Defaults to false and can be omitted. 'icon' => 'bb-offer-product-variation.svg', 'enabled' => $is_enabled, ) ); } /** * Function to get the icon for the module * * @param string $icon gets the icon for the module. */ public function get_icon( $icon = '' ) { if ( '' !== $icon && file_exists( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-variation/icon/' . $icon ) ) { return file_get_contents( CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-offer-product-variation/icon/' . $icon ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } return ''; } } /** * Register the module and its form settings. */ FLBuilder::register_module( 'Cartflows_Pro_BB_Offer_Product_Variation', array( 'style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'sections' => array( 'link_style' => array( 'title' => __( 'Style', 'cartflows-pro' ), 'fields' => array( 'align' => array( 'type' => 'align', 'label' => __( 'Alignment', 'cartflows-pro' ), 'default' => 'left', 'options' => array( 'center' => __( 'Center', 'cartflows-pro' ), 'left' => __( 'Left', 'cartflows-pro' ), 'right' => __( 'Right', 'cartflows-pro' ), ), 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-variation', 'property' => 'text-align', ), ), 'width' => array( 'type' => 'unit', 'label' => __( 'Width(%)', 'cartflows-pro' ), 'slider' => true, 'units' => array( '%' ), 'maxlength' => '100', 'size' => '5', 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embeded-product-variation-wrap .variations', 'property' => 'max-width', 'unit' => '%', ), ), 'label_color' => array( 'type' => 'color', 'label' => __( 'Label Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-variation label, .cartflows-pro-bb__offer-product-variation .out-of-stock', 'property' => 'color', 'unit' => 'px', ), ), 'text_color' => array( 'type' => 'color', 'label' => __( 'Input Text Color', 'cartflows-pro' ), 'default' => '', 'show_reset' => true, 'connections' => array( 'color' ), 'show_alpha' => true, 'preview' => array( 'type' => 'css', 'selector' => '.wcf-embeded-product-variation-wrap .variations .value select', 'property' => 'color', 'unit' => 'px', ), ), 'typography' => array( 'type' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'responsive' => true, 'preview' => array( 'type' => 'css', 'selector' => '.cartflows-pro-bb__offer-product-variation, .wcf-embeded-product-variation-wrap .variations .value select, .cartflows-pro-bb__offer-product-variation .label label', ), ), ), ), ), ), ) ); modules/beaver-builder/cartflows-pro-bb-optin-form-extend/cartflows-pro-bb-optin-form-extend.php000064400000001077147600244370027131 0ustar00 1 ) { $opacity = $opacity / 100; } $output = 'rgba(' . implode( ',', $rgb ) . ',' . $opacity . ')'; } else { $output = 'rgb(' . implode( ',', $rgb ) . ')'; } if ( $is_array ) { return $rgb; } else { return $output; } } /** * Initializes an array to replace recursive function * * @param var $settings returns the bas values. * * @param array $name returns the replacements values. * @param array $opc returns the replacements values. */ public static function cartflows_bb_colorpicker( $settings, $name = '', $opc = false ) { $hex_color = ''; $opacity = ''; $hex_color = $settings->$name; if ( '' != $hex_color && 'r' != $hex_color[0] && 'R' != $hex_color[0] ) { if ( true == $opc && isset( $settings->{ $name . '_opc' } ) ) { if ( '' !== $settings->{ $name . '_opc' } ) { $opacity = $settings->{ $name . '_opc' }; $rgba = self::cartflows_bb_hex2rgba( $hex_color, $opacity / 100 ); return $rgba; } } if ( '#' != $hex_color[0] ) { return '#' . $hex_color; } } return $hex_color; } /** * Provide option to parse a color code. * * @param var $code Returns a hex value for color from rgba or #hex color. * @return string - hex value for the color */ public static function cartflows_bb_parse_color_to_hex( $code = '' ) { $color = ''; $hex = ''; if ( '' != $code ) { if ( false !== strpos( $code, 'rgba' ) ) { $code = ltrim( $code, 'rgba(' ); $code = rtrim( $code, ')' ); $rgb = explode( ',', $code ); $hex .= str_pad( dechex( $rgb[0] ), 2, '0', STR_PAD_LEFT ); $hex .= str_pad( dechex( $rgb[1] ), 2, '0', STR_PAD_LEFT ); $hex .= str_pad( dechex( $rgb[2] ), 2, '0', STR_PAD_LEFT ); $color = $hex; } else { $color = ltrim( $code, '#' ); } } return $color; } /** * Check for the Beaver Builder's setting page. * * @since 1.6.x * @var function wcf_is_bb_setting_page */ public static function wcf_pro_is_bb_setting_page() { if ( is_admin() && isset( $_GET['page'] ) && 'fl-builder-settings' === sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended return true; } return false; } } } modules/beaver-builder/class-cartflows-pro-bb-modules-loader.php000064400000006340147600244370021027 0ustar00modules_extend_files(); } /** * Function that initializes init function * * @since 1.6.13 */ public function init() { $this->include_modules_files(); } /** * Returns Script array. * * @return array() * @since 1.6.13 */ public static function get_module_list() { $widget_list = array( 'cartflows-pro-bb-offer-action-button', 'cartflows-pro-bb-offer-action-link', 'cartflows-pro-bb-offer-product-description', 'cartflows-pro-bb-offer-product-price', 'cartflows-pro-bb-offer-product-variation', 'cartflows-pro-bb-offer-product-image', 'cartflows-pro-bb-offer-product-title', 'cartflows-pro-bb-offer-product-quantity', ); return $widget_list; } /** * Include Widgets files * * Load widgets files * * @since 1.6.13 * @access public */ public function include_modules_files() { global $post; if ( ! isset( $post ) ) { return; } $post_type = $post->post_type; if ( 'cartflows_step' === $post_type && class_exists( 'FLBuilder' ) ) { $this->get_module_files(); } } /** * Register CartFlows Pro Modules * * Register modules early to disply them on options page * * @since 1.6.13 * @access public */ public function register_pro_modules() { if ( is_admin() && isset( $_GET['page'] ) && 'fl-builder-settings' === sanitize_text_field( wp_unslash( $_GET['page'] ) ) && class_exists( 'FLBuilder' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $this->get_module_files(); } } /** * Get Module files * * @since 1.6.13 * @access public */ public function get_module_files() { $widget_list = $this->get_module_list(); if ( ! empty( $widget_list ) ) { foreach ( $widget_list as $handle => $data ) { include_once CARTFLOWS_PRO_DIR . 'modules/beaver-builder/' . $data . '/' . $data . '.php'; } } } /** * Extend widget with pro functionality. * * @since 1.6.13 */ public function modules_extend_files() { if ( class_exists( 'FLBuilder' ) ) { include_once CARTFLOWS_PRO_DIR . 'modules/beaver-builder/classes/class-cartflows-pro-bb-helper.php'; require_once CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-checkout-form-extend/cartflows-pro-bb-checkout-form-extend.php'; require_once CARTFLOWS_PRO_DIR . 'modules/beaver-builder/cartflows-pro-bb-optin-form-extend/cartflows-pro-bb-optin-form-extend.php'; } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_BB_Modules_Loader::get_instance(); modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php000064400000021167147600244370023556 0ustar00 esc_html__( 'Two Step', 'cartflows-pro' ), 'tab' => 'content', 'required' => array( 'layout', '=', 'two-step' ), ); $control_groups['section_two_step_style_fields'] = array( 'title' => esc_html__( 'Two Step', 'cartflows-pro' ), 'tab' => 'style', 'required' => array( array( 'layout', '=', 'two-step' ), array( 'enable_note', '=', true ), ), ); return $control_groups; } /** * Add custom controls. * * @since 2.1.0 * @param array $controls controls data. */ public function add_custom_controls( $controls ) { $controls['enable_note'] = array( 'group' => 'section_two_step_section_fields', 'label' => esc_html__( 'Enable Checkout Note', 'cartflows-pro' ), 'type' => 'checkbox', 'inline' => true, 'small' => true, 'default' => true, ); $controls['note_text'] = array( 'group' => 'section_two_step_section_fields', 'label' => esc_html__( 'Note Text', 'cartflows-pro' ), 'type' => 'text', 'default' => esc_html__( 'Get Your FREE copy of CartFlows in just few steps', 'cartflows-pro' ), 'required' => array( 'enable_note', '=', true ), ); $controls['two_step_section_heading'] = array( 'label' => __( 'Steps', 'cartflows-pro' ), 'type' => 'heading', 'separator' => 'before', 'group' => 'section_two_step_section_fields', ); $controls['step_one_title_text'] = array( 'label' => __( 'Step One Title', 'cartflows-pro' ), 'type' => 'text', 'default' => __( 'Shipping', 'cartflows-pro' ), 'group' => 'section_two_step_section_fields', ); $controls['step_one_sub_title_text'] = array( 'label' => __( 'Step One Sub Title', 'cartflows-pro' ), 'type' => 'text', 'default' => __( 'Where to ship it?', 'cartflows-pro' ), 'group' => 'section_two_step_section_fields', ); $controls['step_two_title_text'] = array( 'label' => __( 'Step Two Title', 'cartflows-pro' ), 'type' => 'text', 'default' => __( 'Payment', 'cartflows-pro' ), 'group' => 'section_two_step_section_fields', ); $controls['step_two_sub_title_text'] = array( 'label' => __( 'Step Two Sub Title', 'cartflows-pro' ), 'type' => 'text', 'default' => __( 'Of your order', 'cartflows-pro' ), 'group' => 'section_two_step_section_fields', ); $controls['offer_button_section'] = array( 'label' => __( 'Offer Button', 'cartflows-pro' ), 'type' => 'heading', 'separator' => 'before', 'group' => 'section_two_step_section_fields', ); $controls['offer_button_title_text'] = array( 'label' => __( 'Offer Button Title', 'cartflows-pro' ), 'type' => 'text', 'default' => __( 'For Special Offer Click Here', 'cartflows-pro' ), 'group' => 'section_two_step_section_fields', ); $controls['offer_button_subtitle_text'] = array( 'label' => __( 'Offer Button Sub Title', 'cartflows-pro' ), 'type' => 'text', 'default' => __( 'Yes! I want this offer!', 'cartflows-pro' ), 'group' => 'section_two_step_section_fields', ); $controls['note_text_color'] = array( 'label' => __( 'Note Text Color', 'cartflows-pro' ), 'type' => 'color', 'separator' => 'before', 'group' => 'section_two_step_style_fields', 'required' => array( 'enable_note', '=', true ), 'css' => array( array( 'property' => 'color', 'selector' => '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note', ), ), ); $controls['note_bg_color'] = array( 'label' => __( 'Note Background Color', 'cartflows-pro' ), 'type' => 'color', 'group' => 'section_two_step_style_fields', 'required' => array( 'enable_note', '=', true ), 'css' => array( array( 'property' => 'background-color', 'selector' => '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note', ), array( 'property' => 'border-top-color', 'selector' => '.wcf-bricks-checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note::before', ), array( 'property' => 'border-color', 'selector' => '.wcf-bricks-checkout-form .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note', ), ), ); $controls['note_typography'] = array( 'label' => __( 'Note Typography', 'cartflows-pro' ), 'type' => 'typography', 'group' => 'section_two_step_style_fields', 'required' => array( 'enable_note', '=', true ), 'css' => array( array( 'property' => 'font-family', 'selector' => '.wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note', ), ), ); return $controls; } /** * Added dynamic filter. * * @since 2.1.0 * @param array $settings settings data. */ public function dynamic_filters( $settings ) { $checkout_id = get_the_id(); $enable_checkout_offer = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer' ); if ( 'yes' === $enable_checkout_offer ) { $settings['enable_checkout_offer'] = $enable_checkout_offer; add_filter( 'cartflows_bricks_checkout_settings', function ( $data_settings ) use ( $settings ) { $data_settings = $settings; return $data_settings; }, 10, 1 ); } $checkout_fields = array( // Two step texts. array( 'filter_slug' => 'wcf-checkout-step-one-title', 'setting_name' => 'step_one_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-one-sub-title', 'setting_name' => 'step_one_sub_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-two-title', 'setting_name' => 'step_two_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-two-sub-title', 'setting_name' => 'step_two_sub_title_text', ), array( 'filter_slug' => 'wcf-checkout-offer-button-title', 'setting_name' => 'offer_button_title_text', ), array( 'filter_slug' => 'wcf-checkout-offer-button-sub-title', 'setting_name' => 'offer_button_subtitle_text', ), ); if ( isset( $checkout_fields ) && is_array( $checkout_fields ) ) { foreach ( $checkout_fields as $key => $field ) { $setting_name = $field['setting_name']; if ( isset( $settings[ $setting_name ] ) && '' !== $settings[ $setting_name ] ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_name, $settings ) { $value = $settings[ $setting_name ]; return $value; }, 10, 1 ); } } } add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note', function ( $is_note_enabled ) use ( $settings ) { $is_note_enabled = ( isset( $settings['enable_note'] ) && true === $settings['enable_note'] ) ? 'yes' : 'no'; return $is_note_enabled; }, 10, 1 ); if ( isset( $settings['enable_note'] ) && true === $settings['enable_note'] && ( isset( $settings['note_text'] ) && '' !== $settings['note_text'] ) ) { add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note-text', function ( $checkout_note_text ) use ( $settings ) { $checkout_note_text = $settings['note_text']; return $checkout_note_text; }, 10, 1 ); } } } /** * Initiate the class. */ Cartflows_Pro_Bricks_Checkout_Form_Extended::get_instance(); modules/bricks/elements/class-cartflows-pro-bricks-offer-product-description.php000064400000005647147600244370024317 0ustar00controls['short_description'] = array( 'label' => __( 'Short Description', 'cartflows-pro' ), 'type' => 'checkbox', 'group' => 'offer_product_description', ); $this->controls['offer_product_description_styling'] = array( 'label' => __( 'Styling', 'cartflows-pro' ), 'type' => 'typography', 'separator' => 'before', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-description', ), ), 'group' => 'offer_product_description', ); } /** * Set builder control groups * * @since 2.1.0 * @access public */ public function set_control_groups() { $this->control_groups['offer_product_description'] = array( 'title' => esc_html__( 'Offer Product Description', 'cartflows-pro' ), 'tab' => 'content', ); } /** * Constructor function. * * @since 2.1.0 */ public function set_controls() { $this->register_product_description_style_controls(); } /** * Render element HTML on frontend * * If no 'render_builder' function is defined then this code is used to render element HTML in builder, too. */ public function render() { $this->set_attribute( '_root', 'data-element-id', $this->id ); ?>
    render_attributes( '_root' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
    settings['short_description'] ) && true === $this->settings['short_description'] ) { echo do_shortcode( '[cartflows_offer_product_short_desc]' ); } else { echo do_shortcode( '[cartflows_offer_product_desc]' ); } ?>
    controls['image_spacing'] = array( 'label' => __( 'Image Spacing', 'cartflows-pro' ), 'type' => 'dimensions', 'css' => array( array( 'property' => 'margin', 'selector' => '.cartflows-pro-bricks__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper', ), ), 'group' => 'offer_product_image_styling', ); $this->controls['image_border'] = array( 'label' => __( 'Border', 'cartflows-pro' ), 'type' => 'border', 'show_label' => true, 'label_block' => true, 'css' => array( array( 'property' => 'border-style', 'selector' => '.cartflows-pro-bricks__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img', ), ), 'group' => 'offer_product_image_styling', ); } /** * Register Offer Product Image Style Controls. * * @since 2.1.0 * @access protected */ protected function register_product_thumbnails_style_controls() { $this->controls['thumbnail_spacing'] = array( 'label' => __( 'Spacing between Thumbnails', 'cartflows-pro' ), 'type' => 'dimensions', 'css' => array( array( 'property' => 'margin', 'selector' => '.cartflows-pro-bricks__offer-product-image .woocommerce-product-gallery ol li:not(:last-child)', ), ), 'group' => 'offer_thumbnails_styling', ); $this->controls['thumbnail_border'] = array( 'label' => __( 'Thumbnail Border', 'cartflows-pro' ), 'type' => 'border', 'show_label' => true, 'label_block' => true, 'name' => 'thumbnail_border', 'css' => array( array( 'property' => 'border', 'selector' => '.cartflows-pro-bricks__offer-product-image .woocommerce-product-gallery ol li img', ), ), 'group' => 'offer_thumbnails_styling', ); } /** * Set builder control groups * * @since 2.1.0 * @access public */ public function set_control_groups() { $this->control_groups['offer_product_image_styling'] = array( 'title' => esc_html__( 'Offer Product Image', 'cartflows-pro' ), 'tab' => 'content', ); $this->control_groups['offer_thumbnails_styling'] = array( 'title' => esc_html__( 'Thumbnails', 'cartflows-pro' ), 'tab' => 'content', ); } /** * Constructor function. * * @since 2.1.0 */ public function set_controls() { $this->register_product_image_style_controls(); $this->register_product_thumbnails_style_controls(); } /** * Render element HTML on frontend * * If no 'render_builder' function is defined then this code is used to render element HTML in builder, too. */ public function render() { $this->set_attribute( '_root', 'data-element-id', $this->id ); ?>
    render_attributes( '_root' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
    controls['alignment'] = array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => 'align-items', 'css' => array( array( 'property' => 'align-items', 'selector' => '.cartflows-pro-bricks__offer-product-price .wcf-offer-price', ), ), 'group' => 'offer_product_price_styling', ); $this->controls['price_style'] = array( 'label' => __( 'Typography', 'cartflows-pro' ), 'type' => 'typography', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-price .wcf-offer-price', ), ), 'group' => 'offer_product_price_styling', ); } /** * Set builder control groups * * @since 2.1.0 * @access public */ public function set_control_groups() { $this->control_groups['offer_product_price_styling'] = array( 'title' => esc_html__( 'Offer Product Price', 'cartflows-pro' ), 'tab' => 'content', ); } /** * Constructor function. * * @since 2.1.0 */ public function set_controls() { $this->register_product_price_style_controls(); } /** * Render element HTML on frontend * * If no 'render_builder' function is defined then this code is used to render element HTML in builder, too. */ public function render() { $this->set_attribute( '_root', 'data-element-id', $this->id ); ?>
    render_attributes( '_root' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
    controls['alignment'] = array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => 'align-items', 'css' => array( array( 'property' => 'align-items', 'selector' => '.cartflows-pro-elementor__offer-product-quantity .quantity', ), ), 'group' => 'offer_product_quantity_styling', ); $this->controls['quantity_width'] = array( 'label' => __( 'Max-Width', 'cartflows-pro' ), 'type' => 'number', 'unit' => '%', 'min' => 0, 'max' => 100, 'css' => array( array( 'property' => 'max-width', 'selector' => '.cartflows-pro-bricks__offer-product-quantity .quantity', ), ), 'group' => 'offer_product_quantity_styling', ); $this->controls['quantity_label_border'] = array( 'label' => __( 'Quantity Field Border', 'cartflows-pro' ), 'type' => 'border', 'css' => array( array( 'property' => 'border', 'selector' => '.cartflows-pro-bricks__offer-product-quantity .quantity .input-text.qty.text', ), ), 'group' => 'offer_product_quantity_styling', ); $this->controls['quantity_label_style'] = array( 'label' => __( 'Label Typography', 'cartflows-pro' ), 'type' => 'typography', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-quantity .quantity .screen-reader-text', ), ), 'group' => 'offer_product_quantity_styling', ); $this->controls['quantity_text_style'] = array( 'label' => __( 'Text Typography', 'cartflows-pro' ), 'type' => 'typography', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-quantity .quantity .input-text.qty.text', ), ), 'group' => 'offer_product_quantity_styling', ); } /** * Set builder control groups * * @since 2.1.0 * @access public */ public function set_control_groups() { $this->control_groups['offer_product_quantity_styling'] = array( 'title' => esc_html__( 'Offer Product Quantity', 'cartflows-pro' ), 'tab' => 'content', ); } /** * Constructor function. * * @since 2.1.0 */ public function set_controls() { $this->register_product_quantity_style_controls(); } /** * Render element HTML on frontend * * If no 'render_builder' function is defined then this code is used to render element HTML in builder, too. */ public function render() { $this->set_attribute( '_root', 'data-element-id', $this->id ); ?>
    render_attributes( '_root' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
    controls['alignment'] = array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => 'align-items', 'css' => array( array( 'property' => 'align-items', 'selector' => '.cartflows-pro-bricks__offer-product-title', ), ), 'group' => 'offer_product_title_styling', ); $this->controls['title_style'] = array( 'label' => __( 'Typography', 'cartflows-pro' ), 'type' => 'typography', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-title', ), ), 'group' => 'offer_product_title_styling', ); } /** * Set builder control groups * * @since 2.1.0 * @access public */ public function set_control_groups() { $this->control_groups['offer_product_title_styling'] = array( 'title' => esc_html__( 'Offer Product Title', 'cartflows-pro' ), 'tab' => 'content', ); } /** * Constructor function. * * @since 2.1.0 */ public function set_controls() { $this->register_product_title_style_controls(); } /** * Render element HTML on frontend * * If no 'render_builder' function is defined then this code is used to render element HTML in builder, too. */ public function render() { $this->set_attribute( '_root', 'data-element-id', $this->id ); ?>
    render_attributes( '_root' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
    controls['alignment'] = array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => 'align-items', 'css' => array( array( 'property' => 'align-items', 'selector' => '.cartflows-pro-bricks__offer-product-variation .wcf-embeded-product-variation-wrap', ), ), 'group' => 'offer_product_quantity_styling', ); $this->controls['variation_width'] = array( 'label' => __( 'Max-Width', 'cartflows-pro' ), 'type' => 'number', 'unit' => '%', 'min' => 0, 'max' => 100, 'css' => array( array( 'property' => 'max-width', 'selector' => '.cartflows-pro-bricks__offer-product-variation .wcf-embeded-product-variation-wrap .variations', ), ), 'group' => 'offer_product_variation_styling', ); $this->controls['variation_label_style'] = array( 'label' => __( 'Label Typography', 'cartflows-pro' ), 'type' => 'typography', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-variation label', ), ), 'group' => 'offer_product_quantity_styling', ); $this->controls['variation_text_style'] = array( 'label' => __( 'Input Text Typography', 'cartflows-pro' ), 'type' => 'typography', 'css' => array( array( 'property' => 'font', 'selector' => '.cartflows-pro-bricks__offer-product-variation .wcf-embeded-product-variation-wrap .variations .value select', ), ), 'group' => 'offer_product_variation_styling', ); } /** * Set builder control groups * * @access public */ public function set_control_groups() { $this->control_groups['offer_product_variation_styling'] = array( 'title' => esc_html__( 'Offer Product Variation', 'cartflows-pro' ), 'tab' => 'content', ); } /** * Constructor function. */ public function set_controls() { $this->register_product_title_style_controls(); } /** * Render element HTML on frontend * * If no 'render_builder' function is defined then this code is used to render element HTML in builder, too. */ public function render() { $this->set_attribute( '_root', 'data-element-id', $this->id ); ?>
    render_attributes( '_root' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
    'block', 'children' => array( array( 'name' => 'bricks-cf-product-image', 'settings' => array( '_margin' => array( 'top' => '0', ), '_border' => array( 'radius' => array( 'top' => '8', 'right' => '8', 'left' => '8', 'bottom' => '8', ), ), '_width:mobile_landscape' => '100%', ), ), ), 'settings' => array( '_margin:mobile_portrait' => array( 'top' => 0, ), ), ), ); $right_column_children = array( array( 'name' => 'block', 'children' => array( array( 'name' => 'bricks-cf-product-title', 'settings' => array( '_typography' => array( 'font-size' => '28px', 'color' => array( 'hex' => '#030303', ), 'font-family' => 'Inter', 'font-weight' => 600, 'text-align' => 'left', ), ), ), array( 'name' => 'bricks-cf-product-description', 'label' => esc_html__( 'Product Description', 'cartflows-pro' ), 'settings' => array( '_typography' => array( 'font-size' => '16px', 'color' => array( 'hex' => '#030303', ), 'font-family' => 'Inter', 'font-weight' => 400, 'text-align' => 'left', ), 'short_description' => true, ), ), array( 'name' => 'text', 'settings' => array( 'text' => '
    Price:
    ', '_typography' => array( 'text-transform' => 'capitalize', 'font-family' => 'Inter', 'font-weight' => '500', ), '_margin' => array( 'top' => '23', ), '_display' => 'inline-block', '_alignSelf' => 'flex-start', '_width' => '44%', ), ), array( 'name' => 'bricks-cf-product-price', 'label' => esc_html__( 'Product Price', 'cartflows-pro' ), 'settings' => array( '_typography' => array( 'text-align' => 'left', 'text-transform' => 'capitalize', 'font-family' => 'Inter', 'font-weight' => '500', ), '_alignSelf' => 'flex-start', '_position' => 'static', ), ), array( 'name' => 'bricks-cf-product-quantity', 'label' => esc_html__( 'Product Quantity', 'cartflows-pro' ), 'settings' => array( '_typography' => array( 'font-family' => 'Inter', 'font-weight' => 600, 'text-align' => 'left', ), '_width' => '1000%', '_alignSelf' => 'center', '_margin' => array( 'bottom' => '25', ), 'alignment' => 'flex-start', 'quantity_width' => '25', 'quantity_width:mobile_landscape' => '15', 'quantity_width:mobile_portrait' => '20', ), ), array( 'name' => 'button', 'settings' => array( 'text' => 'Add to my order', 'link' => array( 'type' => 'meta', 'useDynamicData' => '{wcf_accept_offer}', ), '_alignSelf' => 'flex-start', '_background' => array( 'color' => array( 'hex' => '#ff6700', ), ), 'padding' => array( 'top' => '15px', 'bottom' => '15px', 'left' => '15px', 'right' => '15px', ), '_typography' => array( 'color' => array( 'hex' => '#ffffff', ), 'font-size' => '14px', 'font-weight' => 600, 'text-align' => 'center', 'font-style' => 'normal', 'text-transform' => 'uppercase', ), '_position' => 'static', '_display' => 'inline', 'circle' => true, 'size' => 'md', '_border' => array( 'width' => array( 'top' => '1', 'left' => '1', 'right' => '1', 'bottom' => '1', ), 'style' => 'solid', 'color' => array( 'hex' => '#ffdd56', ), 'radius' => array( 'top' => '24', 'right' => '24', 'bottom' => '24', 'left' => '24', ), ), '_padding' => array( 'top' => '12', 'left' => '24', 'right' => '24', 'bottom' => '12', ), '_width' => '100%', ), ), array( 'name' => 'text-link', 'settings' => array( 'text' => "No Thanks, I'll Pass", 'link' => array( 'type' => 'meta', 'useDynamicData' => '{wcf_reject_offer}', ), '_alignSelf' => 'flex-start', '_width' => '100%', 'align-items' => 'center', '_display' => 'inline-block', 'padding' => array( 'top' => '15px', 'bottom' => '15px', 'left' => '15px', 'right' => '15px', ), '_typography' => array( 'font-size' => '12x', 'font-weight' => 400, 'text-align' => 'center', 'color' => array( 'hex' => '#616161', ), ), '_margin' => array( 'top' => '15', 'left' => '0', ), ), ), ), ), ); return array( array( 'name' => 'section', 'settings' => array( '_padding' => array( 'top' => '15px', 'bottom' => '15px', ), '_margin' => array( 'top' => '10px', ), '_padding:tablet_portrait' => array( 'top' => '40', 'right' => '20', 'left' => '20', 'bottom' => '40', ), '_padding:mobile_portrait' => array( 'left' => '20', 'right' => '20', 'top' => '45', 'bottom' => '45', ), ), 'children' => array( array( 'name' => 'container', 'children' => array( array( 'name' => 'heading', 'settings' => array( 'text' => 'WAIT!', '_typography' => array( 'text-align' => 'center', 'font-family' => 'Inter', 'font-weight' => '700', 'font-size' => '34', ), '_margin' => array( 'bottom' => '10', ), '_alignSelf' => 'center', '_typography:mobile_portrait' => array( 'line-height' => '1.3', 'font-size' => '28', ), 'tag' => 'h2', '_margin:mobile_portrait' => array( 'bottom' => '15', ), ), ), array( 'name' => 'heading', 'settings' => array( 'text' => 'Don’t Miss Out – Save on Our Top Product!', '_typography' => array( 'text-align' => 'center', 'font-weight' => '700', 'font-size' => '22', ), '_margin' => array( 'bottom' => '30', ), '_typography:mobile_portrait' => array( 'line-height' => '1.3', 'font-size' => '18', ), '_alignSelf' => 'center', 'tag' => 'h4', ), ), array( 'name' => 'progress-bar', 'settings' => array( 'bars' => array( array( 'percentage' => 80, 'id' => 'uzvgzt', 'color' => array( 'hex' => '#ff6700', ), ), ), 'height' => '10', 'barBackgroundColor' => array( 'hex' => '#ffe2cc', ), '_alignSelf' => 'center', '_border' => array( 'radius' => array( 'top' => '5', 'right' => '5', 'bottom' => '5', 'left' => '5', ), ), '_width' => '70%', '_width:mobile_portrait' => '100%', ), ), ), ), array( 'name' => 'container', 'settings' => array( '_direction' => 'row', '_columnGap' => '60px', '_rowGap' => '30px', '_margin' => array( 'top' => '30px', ), '_border' => array( array( 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', ), 'style' => 'solid', 'color' => array( 'hex' => '#dddddd', ), 'radius' => array( 'top' => '8', 'right' => '8', 'left' => '8', 'bottom' => '8', ), ), '_padding' => array( 'top' => '30px', 'bottom' => '30px', 'left' => '30px', 'right' => '30px', ), '_alignItems' => 'center', '_padding:mobile_portrait' => array( 'left' => 20, 'right' => 20, 'top' => 20, 'bottom' => 20, ), '_padding:mobile_landscape' => array( 'top' => 20, 'left' => 20, 'right' => 20, 'bottom' => 20, ), '_padding:tablet_portrait' => array( 'left' => 20, 'right' => 20, 'top' => 0, 'bottom' => 20, ), '_background' => array( 'color' => array( 'hex' => '#ffffff', ), ), ), 'children' => array( array( 'name' => 'block', 'label' => esc_html__( 'Column', 'cartflows-pro' ), 'settings' => array( '_width' => '50%', '_width:mobile_portrait' => '100%', '_width:mobile_landscape' => '100%', ), 'children' => $left_column_children, ), array( 'name' => 'block', 'label' => esc_html__( 'Column', 'cartflows-pro' ), 'settings' => array( '_width' => '50%', '_width:mobile_portrait' => '100%', '_width:mobile_landscape' => '100%', '_direction' => 'column', '_rowGap' => '0.75em', ), 'children' => $right_column_children, ), ), ), ), ), ); } /** * Render element. * * @return void */ public function render() { echo \Bricks\Frontend::render_children( $this ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } modules/bricks/widgets-css/frontend.css000064400000004453147600244370014273 0ustar00/* CSS for Offer Dynamic Content */ .brxe-bricks-cf-upsell-layout .brx-nestable-children, .brxe-bricks-cf-upsell-layout.brx-nestable-children-placeholder { display: block !important; } .cartflows-bricks-offer-product-image ol.flex-control-nav.flex-control-thumbs, .cartflows-pro-bricks__offer-product-image ol.flex-control-nav.flex-control-thumbs { display: inline-block; margin-top: 5%; } /* CSS for Offer Product Price module */ .cartflows-pro-bricks__offer-product-price .wcf-offer-price .wcf-offer-price-inner { display: block !important; } .cartflows-bricks-offer-product-quantity .wcf-offer-product-quantity .quantity span.action.minus, .cartflows-pro-bricks__offer-product-quantity .wcf-offer-product-quantity .quantity span.action.minus { display: none; } .cartflows-bricks-offer-product-quantity .wcf-offer-product-quantity .quantity span.action.plus, .cartflows-pro-bricks__offer-product-quantity .wcf-offer-product-quantity .quantity span.action.plus { display: none; } .cartflows-bricks-offer-product-variations form.cart table.variations tr, form.woocommerce-cart-form table.variations tr { border-bottom: 0; } .cartflows-bricks-offer-product-quantity .wcf-embeded-product-quantity-wrap .quantity input[type="number"], .cartflows-bricks-offer-product-quantity .wcf-embeded-product-variation-wrap .variations_form .variations select { background-color: #fff; background-image: none; border: 1px solid; border-color: #d4d4d4; border-radius: 0; box-shadow: inset 0 -1em 0.7em 0 rgba( 0, 0, 0, 0.01 ); display: inline-block; font-family: inherit; font-weight: inherit; font-size: 14px; height: auto; line-height: 1.42857143 !important; min-height: 34px; outline: none; padding: 10px 15px; max-width: 100%; /* min-width: 85%; */ width: 100%; margin-right: 0; -webkit-appearance: none; } .cartflows-bricks-offer-product-variations .wcf-embeded-product-variation-wrap .variations_form .variations .reset_variations { text-decoration: none; font-family: inherit; font-weight: 500; font-size: 10px; float: right; margin-top: 10px; color: #a00a00; letter-spacing: 0.5px; display: none; text-transform: capitalize; } .cartflows-bricks-offer-product-image .woocommerce-product-gallery, .cartflows-pro-bricks__offer-product-image .woocommerce-product-gallery { display: block !important; width: 100%; } modules/bricks/class-cartflows-pro-bricks-dynamic-data.php000064400000013353147600244370017727 0ustar00 'wcf_product_title', 'name' => '{wcf_product_title}', 'label' => esc_html__( 'Product Title', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_product_price', 'name' => '{wcf_product_price}', 'label' => esc_html__( 'Product Price', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_product_description', 'name' => '{wcf_product_description}', 'label' => esc_html__( 'Product Description', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_product_short_description', 'name' => '{wcf_product_short_description}', 'label' => esc_html__( 'Product Short Description', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_product_image', 'name' => '{wcf_product_image}', 'label' => esc_html__( 'Product Image', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_product_quantity', 'name' => '{wcf_product_quantity}', 'label' => esc_html__( 'Product Quantity', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_product_variation', 'name' => '{wcf_product_variation}', 'label' => esc_html__( 'Product Variation', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_accept_offer', 'name' => '{wcf_accept_offer}', 'label' => esc_html__( 'Accept Offer', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), array( 'slug' => 'wcf_reject_offer', 'name' => '{wcf_reject_offer}', 'label' => esc_html__( 'Reject Offer', 'cartflows-pro' ), 'group' => esc_html__( 'CartFlows', 'cartflows-pro' ), ), ) ); } /** * Parse tag * * @since 2.1.0 * @param string $name Tag name. * @param object $post Post object. * @return string|void */ public function parse_tag( $name, $post ) { $post_id = $post->ID; $product = wcf_pro()->utils->get_offer_data( $post_id ); // Handle cases where the product is not valid. if ( empty( $product ) ) { return; } // Map specific product-related tags to their corresponding HTML. $tag_to_html = array( 'wcf_product_title' => '
    ' . $product['name'] . '
    ', 'wcf_product_price' => '
    ' . wc_price( $product['display_price'] ) . '
    ', 'wcf_product_description' => '
    ' . $product['desc'] . '
    ', 'wcf_product_short_description' => '
    ' . $product['short_desc'] . '
    ', ); if ( isset( $tag_to_html[ $name ] ) ) { return $tag_to_html[ $name ]; } // Handle specific non-product related tags. switch ( $name ) { case 'wcf_product_image': $product_image = Cartflows_Pro_Base_Offer_Shortcodes::get_instance()->product_image( $post ); return '
    ' . $product_image . '
    '; case 'wcf_product_quantity': $quantity_selector = Cartflows_Pro_Base_Offer_Shortcodes::get_instance()->quantity_selector( $post ); return '
    ' . $quantity_selector . '
    '; case 'wcf_product_variation': $variation_selector = Cartflows_Pro_Base_Offer_Shortcodes::get_instance()->variation_selector( $post ); return '
    ' . $variation_selector . '
    '; case 'wcf_accept_offer': return '?class=wcf-up-offer-yes'; case 'wcf_reject_offer': return '?class=wcf-up-offer-no'; } return $name; } /** * Main function to render the tag value for WooCommerce provider * * @param string $tag Tag name. * @param object $post Post object. * * @since 2.1.0 * @return string|void */ public function get_the_tag_value_pro( $tag, $post ) { // Get all the registered tags and check if the tag exists. $registered_tags = $this->dynamic_tags_pro(); $tag_slug = strtok( $tag, ':' ); if ( false === array_search( $tag_slug, array_column( $registered_tags, 'slug' ), true ) ) { return $tag; } // Return the parsed tag value. return $this->parse_tag( $tag, $post ); } } /** * Initiate the class. */ Cartflows_Pro_Bricks_Dynamic_Data::get_instance(); modules/bricks/class-cartflows-pro-bricks-elements-loader.php000064400000007242147600244370020454 0ustar00widget_extend_files(); } /** * Returns Script array. * * @since 2.1.0 * @return Array of Module instances. */ public static function get_module_list() { $widget_list = array( 'class-cartflows-pro-bricks-offer-product-description', 'class-cartflows-pro-bricks-offer-product-image', 'class-cartflows-pro-bricks-offer-product-price', 'class-cartflows-pro-bricks-offer-product-quantity', 'class-cartflows-pro-bricks-offer-product-title', 'class-cartflows-pro-bricks-offer-product-variation', 'class-cartflows-pro-bricks-upsell-layout', ); return $widget_list; } /** * Extend widget with pro functionality. * * @since 2.1.0 * @return void */ public function widget_extend_files() { require_once CARTFLOWS_PRO_DIR . 'modules/bricks/elements/class-cartflows-pro-bricks-checkout-form-extended.php'; } /** * Include elements files * * Load elements files * * @since 2.1.0 * @return void */ public function register_elements() { $element_files = $this->get_module_list(); wp_enqueue_style( 'cartflows-pro-bricks-style', CARTFLOWS_PRO_URL . 'modules/bricks/widgets-css/frontend.css', array(), CARTFLOWS_PRO_VER ); $step_type = get_post_meta( (int) get_the_ID(), 'wcf-step-type', true ); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { wp_enqueue_style( 'wcf-pro-flexslider', wcf_pro()->utils->get_css_url( 'flexslider' ), array(), CARTFLOWS_PRO_VER ); wp_enqueue_script( 'flexslider' ); } foreach ( $element_files as $file ) { $file = CARTFLOWS_PRO_DIR . 'modules/bricks/elements/' . $file . '.php'; \Bricks\Elements::register_element( $file ); } } /** * Add default content on upsell creation. * * @param int $new_step_id new step id. * @param string $step_type step type. * * @since 2.1.0 */ public function add_default_content_on_upsell_creation( $new_step_id, $step_type ) { $default_content = ''; if ( ! class_exists( 'Cartflows_Helper' ) ) { return; } $page_builder = Cartflows_Helper::get_common_setting( 'default_page_builder' ); if ( 'bricks-builder' == $page_builder && ( 'upsell' == $step_type || 'downsell' == $step_type ) ) { if ( file_exists( CARTFLOWS_PRO_DIR . 'admin-core/assets/importer-data/cartflows-bricks-offer-module.json' ) ) { $default_content = file_get_contents( CARTFLOWS_PRO_DIR . 'admin-core/assets/importer-data/cartflows-bricks-offer-module.json' ); } $json_decode = json_decode( (string) $default_content, true ); update_post_meta( $new_step_id, BRICKS_DB_PAGE_CONTENT, $json_decode ); update_post_meta( $new_step_id, BRICKS_DB_EDITOR_MODE, 'bricks' ); } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Bricks_Elements_Loader::get_instance(); modules/checkout/classes/layout/class-cartflows-pro-multistep-checkout.php000064400000064562147600244370023264 0ustar00is_multistep_checkout_layout( $checkout_id ) ) { return $localize; } $show_order_field = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-additional-fields' ); $is_hide_shipping_tab = ! WC()->cart->needs_shipping() && 'no' === $show_order_field; $button_text = __( 'Continue to shipping', 'cartflows-pro' ); if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) { $button_text = __( 'Continue to order notes', 'cartflows-pro' ); } if ( $is_hide_shipping_tab ) { $button_text = __( 'Continue to payment', 'cartflows-pro' ); } $localize['is_hide_shipping_tab'] = $is_hide_shipping_tab; $localize['multistep_buttons_strings'] = array( 'billing' => $button_text, 'shipping' => __( 'Continue to payment', 'cartflows-pro' ), 'is_guest_checkout' => 'yes' === get_option( 'woocommerce_enable_guest_checkout', false ), ); return $localize; } /** * Include custom class for multistep checkout. * * @param string $checkout_layout layout type. */ public function add_class_for_multistep_checkout( $checkout_layout ) { return 'multistep-checkout' === $checkout_layout ? 'modern-checkout wcf-modern-skin-multistep wcf-billing' : $checkout_layout; } /** * Add order review template path for multistep checkout. * * @param string $path template path. * @param string $checkout_layout layout type. */ public function update_path_for_order_review_template( $path, $checkout_layout ) { return 'multistep-checkout' === $checkout_layout ? CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/checkout/multistep-review-order.php' : $path; } /** * Multistep Checkout Layout Actions. * * @param int $checkout_id checkout ID. */ public function multistep_checkout_layout_actions( $checkout_id ) { if ( $this->is_multistep_checkout_layout( $checkout_id ) ) { add_action( 'woocommerce_checkout_before_customer_details', array( $this, 'add_multistep_checkout_breadcrumb' ), 10, 1 ); add_action( 'woocommerce_checkout_before_customer_details', array( $this, 'multistep_customer_info_parent_wrapper_start' ), 20, 1 ); add_action( 'woocommerce_checkout_billing', array( $this, 'add_custom_billing_email_field' ), 9, 1 ); add_action( 'woocommerce_review_order_before_payment', array( $this, 'display_custom_payment_heading' ), 12 ); remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 ); add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'add_navigation_buttons' ), 99, 1 ); // Add the collapsable order review section for mobile view at the top of Checkout form. add_action( 'woocommerce_before_checkout_form', array( $this, 'add_custom_collapsed_order_review_table' ), 8 ); // Re-arrange the position of payment section only for multistep checkout. remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); add_action( 'cartflows_checkout_after_multistep_checkout_layout', 'woocommerce_checkout_payment', 21 ); add_filter( 'woocommerce_order_button_html', array( $this, 'add_back_nav_button_for_payment' ), 9 ); // Skip the loading of default custom shipping section. add_filter( 'cartflows_should_render_custom_shipping', '__return_false' ); add_action( 'woocommerce_before_checkout_shipping_fields', array( $this, 'add_shipping_section' ), 1 ); remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 ); add_action( 'woocommerce_checkout_order_review', array( $this, 'custom_order_review_template' ), 9 ); } } /** * Update cart total on button and order review mobile sction. * * @param string $fragments shipping message. * * @return array $fragments updated Woo fragments. */ public function update_order_review_template( $fragments ) { $checkout_id = _get_wcf_checkout_id(); if ( ! $checkout_id ) { $checkout_id = isset( $_GET['wcf_checkout_id'] ) && ! empty( $_GET['wcf_checkout_id'] ) ? intval( wp_unslash( $_GET['wcf_checkout_id'] ) ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended } if ( empty( $checkout_id ) || ! $this->is_multistep_checkout_layout( $checkout_id ) ) { return $fragments; } ob_start(); $this->custom_order_review_template(); $wcf_multistep_order_review = ob_get_clean(); ob_start(); wc_cart_totals_shipping_html(); $wcf_shipping_method_html = ob_get_clean(); $fragments['.woocommerce-checkout-review-order-table'] = $wcf_multistep_order_review; $fragments['.woocommerce-shipping-totals'] = $wcf_shipping_method_html; if ( wp_doing_ajax() && isset( $_GET['wc-ajax'] ) && 'update_order_review' === $_GET['wc-ajax'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended ob_start(); $this->custom_contact_section(); $custom_contact_section = ob_get_clean(); ob_start(); $this->custom_address_section(); $custom_address_section = ob_get_clean(); $fragments['.wcf-shipping-step-review-details'] = $custom_contact_section; $fragments['.wcf-payment-step-review-details'] = $custom_address_section; } return $fragments; } /** * Return true if checkout layout skin is conditional checkout. * * @param int $checkout_id Checkout ID. * * @return bool */ public function is_multistep_checkout_layout( $checkout_id = '' ) { global $post; $is_multistep_checkout = false; if ( ! empty( $post ) && empty( $checkout_id ) ) { $checkout_id = $post->ID; } if ( ! empty( $checkout_id ) ) { // Get checkout layout skin. $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' ); if ( 'multistep-checkout' === $checkout_layout ) { $is_multistep_checkout = true; } } return $is_multistep_checkout; } /** * Include custom order review template. */ public function custom_order_review_template() { include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/checkout/multistep-review-order.php'; } /** * Add custom shipping method secition. */ public function add_shipping_section() { ob_start(); $this->custom_contact_section(); ?> cart->needs_shipping() && WC()->cart->show_shipping() ) { ?>

    '; } /** * Add Customer Information Section. * * @param int $checkout_id checkout ID. * * @return void */ public function add_multistep_checkout_breadcrumb( $checkout_id ) { if ( ! $checkout_id ) { $checkout_id = _get_wcf_checkout_id(); } $breadcrumb_text = __( 'Shipping', 'cartflows-pro' ); if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) { $breadcrumb_text = __( 'Order notes', 'cartflows-pro' ); } $show_order_field = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-additional-fields' ); if ( ! WC()->cart->needs_shipping() && 'no' === $show_order_field ) { echo ''; } else { echo ''; } } /** * Add back button for payment step. * * @param string $html Button HTML. */ public function add_back_nav_button_for_payment( $html ) { $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); if ( ! $checkout_id ) { $checkout_id = _get_wcf_checkout_id(); } if ( ! $this->is_multistep_checkout_layout( $checkout_id ) || ( wp_doing_ajax() && isset( $_REQUEST['action'] ) && 'update_order_review' !== $_REQUEST['action'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended return $html; } $show_order_field = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-additional-fields' ); $back_button = '' . __( '« Back to shipping', 'cartflows-pro' ) . ''; if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) { $back_button = '' . __( '« Back to order notes', 'cartflows-pro' ) . ''; } if ( ! WC()->cart->needs_shipping() && 'no' === $show_order_field ) { $back_button = '' . __( '« Back to information', 'cartflows-pro' ) . ''; } return "
    " . $back_button . $html . '
    '; } /** * Add bottom navigation buttons. * * @param int $checkout_id checkout ID. */ public function add_navigation_buttons( $checkout_id ) { if ( ! $checkout_id ) { $checkout_id = _get_wcf_checkout_id(); } do_action( 'cartflows_checkout_after_multistep_checkout_layout', $checkout_id ); $second_step_btn_text = __( 'Continue to shipping', 'cartflows-pro' ); if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) { $second_step_btn_text = __( 'Continue to order notes', 'cartflows-pro' ); } $data_target = 'shipping'; $show_order_field = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-additional-fields' ); if ( ! WC()->cart->needs_shipping() && 'no' === $show_order_field ) { $second_step_btn_text = __( 'Continue to payment', 'cartflows-pro' ); $data_target = 'payment'; } echo "
    " . esc_html__( '« Back to information', 'cartflows-pro' ) . " " . esc_html( $second_step_btn_text ) . '
    '; } /** * Add Custom Email Field. * * @return void */ public function add_custom_billing_email_field() { $checkout_id = _get_wcf_checkout_id(); if ( ! $checkout_id ) { $checkout_id = isset( $_GET['wcf_checkout_id'] ) && ! empty( $_GET['wcf_checkout_id'] ) ? intval( wp_unslash( $_GET['wcf_checkout_id'] ) ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended } $default = ''; if ( ( function_exists( 'is_auto_prefill_checkout_fields_enabled' ) && is_auto_prefill_checkout_fields_enabled() ) && ( isset( $_GET['billing_email'] ) && ! empty( $_GET['billing_email'] ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $default = sanitize_email( wp_unslash( $_GET['billing_email'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended } $lost_password_url = esc_url( wp_lostpassword_url() ); $current_user_name = wp_get_current_user()->display_name; $current_user_email = wp_get_current_user()->user_email; $is_allow_login = 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ); $fields_skins = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-fields-skins' ); $required_mark = 'modern-label' === $fields_skins ? '*' : ''; ?>

    'email', 'class' => array( 'form-row-fill' ), 'required' => true, 'label' => __( 'Email Address', 'cartflows-pro' ), 'default' => $default, /* translators: %s: asterisk mark */ 'placeholder' => sprintf( __( 'Email Address %s', 'cartflows-pro' ), $required_mark ), 'autocomplete' => 'email username', ) ); if ( 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ) { ?>
    custom_address_section() ?>

    cart->needs_shipping() || wc_ship_to_billing_address_only() ? 'billing' : 'shipping'; if ( ! empty( $post_data ) && ! empty( $post_data ) ) { $countries = WC()->countries->countries; $billing_email = $post_data['billing_email']; if ( ! empty( $post_data['shipping_first_name'] ) ) { $state = isset( $post_data['shipping_state'] ) ? $post_data['shipping_state'] : ''; $country = isset( $post_data['shipping_country'] ) ? $post_data['shipping_country'] : ''; if ( ! empty( $state ) && ! empty( $country ) ) { $state = WC()->countries->states[ $country ][ $state ]; } $address = array( $post_data['shipping_first_name'] . ' ' . $post_data['shipping_last_name'], ! empty( $post_data['shipping_address_1'] ) ? $post_data['shipping_address_1'] : '', ! empty( $post_data['shipping_address_2'] ) ? $post_data['shipping_address_2'] : '', ! empty( $post_data['shipping_city'] ) ? $post_data['shipping_city'] : '', ! empty( $post_data['shipping_postcode'] ) ? $post_data['shipping_postcode'] : '', ! empty( $state ) ? $state : '', ! empty( $country ) ? $countries[ $country ] : '', ); } else { $state = isset( $post_data['billing_state'] ) ? $post_data['billing_state'] : ''; $country = isset( $post_data['billing_country'] ) ? $post_data['billing_country'] : ''; if ( ! empty( $state ) && ! empty( $country ) ) { $state = WC()->countries->states[ $country ][ $state ]; } $address = array( $post_data['billing_first_name'] . ' ' . $post_data['billing_last_name'], ! empty( $post_data['billing_address_1'] ) ? $post_data['billing_address_1'] : '', ! empty( $post_data['billing_address_2'] ) ? $post_data['billing_address_2'] : '', ! empty( $post_data['billing_city'] ) ? $post_data['billing_city'] : '', ! empty( $post_data['billing_postcode'] ) ? $post_data['billing_postcode'] : '', ! empty( $state ) ? $state : '', ! empty( $country ) ? $countries[ $country ] : '', ); } $ship_to = implode( ', ', array_filter( $address ) ); } ob_start(); ?> utils->get_checkout_id_from_post_data(); } if ( ! $this->is_multistep_checkout_layout( $checkout_id ) ) { return $checkout_fields; } // No nonce verification required as it is called on woocommerce action. if ( isset( $_GET['wc-ajax'] ) && 'checkout' === $_GET['wc-ajax'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended return $checkout_fields; } // Unset defalut billing email from Billing Details. unset( $checkout_fields['billing']['billing_email'] ); unset( $checkout_fields['account']['account_username'] ); unset( $checkout_fields['account']['account_password'] ); return $checkout_fields; } /** * Customized order review section used to display in modern checkout responsive devices. * * @return void */ public function add_custom_collapsed_order_review_table() { include CARTFLOWS_CHECKOUT_DIR . 'templates/checkout/collapsed-order-summary.php'; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Multistep_Checkout::get_instance(); modules/checkout/classes/class-cartflows-pre-checkout-offer-product.php000064400000047616147600244370022467 0ustar00 true, 'message' => __( 'No post data found.', 'cartflows-pro' ), ); wp_send_json( $data ); } $nonce = ! empty( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_pre_checkout_validate_form' ) ) { $data = array( 'error' => true, 'message' => __( 'Nonce verification failed.', 'cartflows-pro' ), ); wp_send_json( $data ); } $errors = new \WP_Error(); $posted_data = WC()->checkout->get_posted_data(); // Update customer shipping and payment method to posted method. $chosen_shipping_methods = WC()->session->get( 'chosen_shipping_methods' ); if ( is_array( $posted_data['shipping_method'] ) ) { foreach ( $posted_data['shipping_method'] as $i => $value ) { $chosen_shipping_methods[ $i ] = $value; } } WC()->session->set( 'chosen_shipping_methods', $chosen_shipping_methods ); WC()->session->set( 'chosen_payment_method', $posted_data['payment_method'] ); $this->validate_checkout( $posted_data, $errors ); $error_messages = $errors->get_error_messages(); if ( ! empty( $error_messages ) ) { foreach ( $error_messages as $message ) { wc_add_notice( $message, 'error' ); } wp_send_json( $this->send_ajax_failure_response() ); } else { $response = array( 'result' => 'success', ); } wp_send_json( $response ); } /** * Validates that the checkout has enough info to proceed. * * @since 3.0.0 * @param array $data An array of posted data. * @param WP_Error $errors Validation errors. */ protected function validate_checkout( &$data, &$errors ) { if ( ! isset( $_POST['security'] ) ) { $data = array( 'error' => true, 'message' => __( 'No post data found.', 'cartflows-pro' ), ); wp_send_json( $data ); } $nonce = ! empty( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_pre_checkout_validate_form' ) ) { $data = array( 'error' => true, 'message' => __( 'Nonce verification failed.', 'cartflows-pro' ), ); wp_send_json( $data ); } $this->validate_posted_data( $data, $errors ); WC()->checkout->check_cart_items(); if ( empty( $data['woocommerce_checkout_update_totals'] ) && empty( $data['terms'] ) && ! empty( $_POST['terms-field'] ) ) { $errors->add( 'terms', __( 'Please read and accept the terms and conditions to proceed with your order.', 'woocommerce' ) ); } if ( WC()->cart->needs_shipping() ) { $shipping_country = WC()->customer->get_shipping_country(); if ( empty( $shipping_country ) ) { $errors->add( 'shipping', __( 'Please enter an address to continue.', 'woocommerce' ) ); } elseif ( ! in_array( WC()->customer->get_shipping_country(), array_keys( WC()->countries->get_shipping_countries() ), true ) ) { /* translators: %s: shipping location */ $errors->add( 'shipping', sprintf( __( 'Unfortunately we do not ship %s. Please enter an alternative shipping address.', 'woocommerce' ), WC()->countries->shipping_to_prefix() . ' ' . WC()->customer->get_shipping_country() ) ); } else { $chosen_shipping_methods = WC()->session->get( 'chosen_shipping_methods' ); foreach ( WC()->shipping()->get_packages() as $i => $package ) { if ( ! isset( $chosen_shipping_methods[ $i ], $package['rates'][ $chosen_shipping_methods[ $i ] ] ) ) { $errors->add( 'shipping', __( 'No shipping method has been selected. Please double check your address, or contact us if you need any help.', 'woocommerce' ) ); } } } } do_action( 'woocommerce_after_checkout_validation', $data, $errors ); } /** * See if a fieldset should be skipped. * * @since 3.0.0 * @param string $fieldset_key Fieldset key. * @param array $data Posted data. * @return bool */ protected function maybe_skip_fieldset( $fieldset_key, $data ) { if ( 'shipping' === $fieldset_key && ( ! $data['ship_to_different_address'] || ! WC()->cart->needs_shipping_address() ) ) { return true; } if ( 'account' === $fieldset_key && ( is_user_logged_in() || ( ! WC()->checkout->is_registration_required() && empty( $data['createaccount'] ) ) ) ) { return true; } return false; } /** * Validates the posted checkout data based on field properties. * * @since 3.0.0 * @param array $data An array of posted data. * @param WP_Error $errors Validation error. */ protected function validate_posted_data( &$data, &$errors ) { foreach ( WC()->checkout->get_checkout_fields() as $fieldset_key => $fieldset ) { $validate_fieldset = true; if ( $this->maybe_skip_fieldset( $fieldset_key, $data ) ) { $validate_fieldset = false; } foreach ( $fieldset as $key => $field ) { if ( ! isset( $data[ $key ] ) ) { continue; } $required = ! empty( $field['required'] ); $format = array_filter( isset( $field['validate'] ) ? (array) $field['validate'] : array() ); $field_label = isset( $field['label'] ) ? $field['label'] : ''; switch ( $fieldset_key ) { case 'shipping': /* translators: %s: field name */ $field_label = sprintf( __( 'Shipping %s', 'woocommerce' ), $field_label ); break; case 'billing': /* translators: %s: field name */ $field_label = sprintf( __( 'Billing %s', 'woocommerce' ), $field_label ); break; } if ( in_array( 'postcode', $format, true ) ) { $country = isset( $data[ $fieldset_key . '_country' ] ) ? $data[ $fieldset_key . '_country' ] : WC()->customer->{"get_{$fieldset_key}_country"}(); $data[ $key ] = wc_format_postcode( $data[ $key ], $country ); if ( $validate_fieldset && '' !== $data[ $key ] && ! WC_Validation::is_postcode( $data[ $key ], $country ) ) { switch ( $country ) { case 'IE': /* translators: %1$s: field name, %2$s finder.eircode.ie URL */ $postcode_validation_notice = sprintf( __( '%1$s is not valid. You can look up the correct Eircode here.', 'woocommerce' ), '' . esc_html( $field_label ) . '', 'https://finder.eircode.ie' ); break; default: /* translators: %s: field name */ $postcode_validation_notice = sprintf( __( '%s is not a valid postcode / ZIP.', 'woocommerce' ), '' . esc_html( $field_label ) . '' ); } $errors->add( 'validation', apply_filters( 'woocommerce_checkout_postcode_validation_notice', $postcode_validation_notice, $country, $data[ $key ] ) ); } } if ( in_array( 'phone', $format, true ) ) { if ( $validate_fieldset && '' !== $data[ $key ] && ! WC_Validation::is_phone( $data[ $key ] ) ) { /* translators: %s: phone number */ $errors->add( 'validation', sprintf( __( '%s is not a valid phone number.', 'woocommerce' ), '' . esc_html( $field_label ) . '' ) ); } } if ( in_array( 'email', $format, true ) && '' !== $data[ $key ] ) { $email_is_valid = is_email( $data[ $key ] ); $data[ $key ] = sanitize_email( $data[ $key ] ); if ( $validate_fieldset && ! $email_is_valid ) { /* translators: %s: email address */ $errors->add( 'validation', sprintf( __( '%s is not a valid email address.', 'woocommerce' ), '' . esc_html( $field_label ) . '' ) ); continue; } } if ( '' !== $data[ $key ] && in_array( 'state', $format, true ) ) { $country = isset( $data[ $fieldset_key . '_country' ] ) ? $data[ $fieldset_key . '_country' ] : WC()->customer->{"get_{$fieldset_key}_country"}(); $valid_states = WC()->countries->get_states( $country ); if ( ! empty( $valid_states ) && is_array( $valid_states ) && count( $valid_states ) > 0 ) { $valid_state_values = array_map( 'wc_strtoupper', array_flip( array_map( 'wc_strtoupper', $valid_states ) ) ); $data[ $key ] = wc_strtoupper( $data[ $key ] ); if ( isset( $valid_state_values[ $data[ $key ] ] ) ) { // With this part we consider state value to be valid as well, convert it to the state key for the valid_states check below. $data[ $key ] = $valid_state_values[ $data[ $key ] ]; } if ( $validate_fieldset && ! in_array( $data[ $key ], $valid_state_values, true ) ) { /* translators: 1: state field 2: valid states */ $errors->add( 'validation', sprintf( __( '%1$s is not valid. Please enter one of the following: %2$s', 'woocommerce' ), '' . esc_html( $field_label ) . '', implode( ', ', $valid_states ) ) ); } } } if ( $validate_fieldset && $required && '' === $data[ $key ] ) { /* translators: %s: field name */ $errors->add( 'required-field', apply_filters( 'woocommerce_checkout_required_field_notice', sprintf( __( '%s is a required field.', 'woocommerce' ), '' . esc_html( $field_label ) . '' ), $field_label ) ); } } } } /** * If checkout failed during an AJAX call, send failure response. */ protected function send_ajax_failure_response() { if ( is_ajax() ) { // Only print notices if not reloading the checkout, otherwise they're lost in the page reload. if ( ! isset( WC()->session->reload_checkout ) ) { $messages = wc_print_notices( true ); } $response = array( 'result' => 'failure', 'messages' => isset( $messages ) ? $messages : '', 'refresh' => isset( WC()->session->refresh_totals ), 'reload' => isset( WC()->session->reload_checkout ), ); unset( WC()->session->refresh_totals, WC()->session->reload_checkout ); return $response; } } /** * Add to cart. */ public function wcf_add_pre_checkout_product() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_pre_checkout_offer' ) ) { $data = array( 'error' => true, 'message' => __( 'Product not added in the cart.', 'cartflows-pro' ), ); wp_send_json( $data ); } $pre_checkout_offer_price = ''; $checkout_id = isset( $_POST['checkout_id'] ) ? intval( $_POST['checkout_id'] ) : 0; $pre_checkout_offer_product = get_post_meta( $checkout_id, 'wcf-pre-checkout-offer-product', true ); $product_quantity = isset( $_POST['product_quantity'] ) ? intval( $_POST['product_quantity'] ) : ''; $discount_type = get_post_meta( $checkout_id, 'wcf-pre-checkout-offer-discount', true ); $discount_value = floatval( get_post_meta( $checkout_id, 'wcf-pre-checkout-offer-discount-value', true ) ); if ( isset( $pre_checkout_offer_product ) && ! empty( $pre_checkout_offer_product ) ) { $product_id = $pre_checkout_offer_product[0]; } else { $data = array( 'error' => true, 'message' => __( 'Oops, can\'t add the product to the cart', 'cartflows-pro' ), ); wp_send_json( $data ); } $_product = wc_get_product( $product_id ); if ( ! $_product ) { $data = array( 'error' => true, 'message' => __( 'Oops, can\'t add the product to the cart', 'cartflows-pro' ), ); wp_send_json( $data ); } $product_id = wcf_pro()->utils->get_variable_variation_product_id( $product_id ); $_product = wc_get_product( $product_id ); if ( ! $_product ) { $data = array( 'error' => true, 'message' => __( 'Oops, can\'t add the product to the cart', 'cartflows-pro' ), ); wp_send_json( $data ); } if ( ! $_product->is_in_stock() ) { $data = array( 'error' => true, 'message' => __( 'Product is Out of Stock', 'cartflows-pro' ), ); wp_send_json( $data ); } $_product_price = $_product->get_price(); if ( '' !== $discount_type && $discount_value > 0 ) { $_product_price = $this->calculate_pre_checkout_discount( $discount_type, $discount_value, $_product_price ); } $cart_item_data = array( 'cartflows_pre_checkout_offer' => true, ); if ( '' !== $_product_price ) { $cart_item_data = array( 'pre_checkout_offer_price' => $_product_price, 'cartflows_pre_checkout_offer' => true, ); } $cart_hash = WC()->cart->add_to_cart( $product_id, $product_quantity, 0, array(), $cart_item_data ); if ( ! empty( $cart_hash ) ) { do_action( 'wcf_pre_checkout_offer_item_added', $checkout_id, $cart_hash ); $data = array( 'error' => false, 'cart_hash' => $cart_hash, 'message' => __( 'Product Added Successfully', 'cartflows-pro' ), ); } else { $data = array( 'error' => true, 'cart_hash' => $cart_hash, 'message' => __( 'Product is Out of Stock', 'cartflows-pro' ), ); } wp_send_json( $data ); } /** * Calculate discount for product. * * @param string $discount_type discount type. * @param int $discount_value discount value. * @param int $_product_price product price. * @return int * @since 1.1.5 */ public function calculate_pre_checkout_discount( $discount_type, $discount_value, $_product_price ) { $custom_price = ''; if ( ! empty( $discount_type ) ) { if ( 'discount_percent' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $_product_price - ( ( $_product_price * $discount_value ) / 100 ); } } elseif ( 'discount_price' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $_product_price - $discount_value; } } } return $custom_price; } /** * Preserve the custom item price added by Variations & Quantity feature * * @param array $cart_object cart object. * @since 1.0.0 */ public function wcf_precheckout_offer_price_to_cart_item( $cart_object ) { if ( wp_doing_ajax() && ! WC()->session->__isset( 'reload_checkout' ) ) { foreach ( $cart_object->cart_contents as $key => $value ) { if ( isset( $value['pre_checkout_offer_price'] ) && '' !== $value['pre_checkout_offer_price'] ) { $value['data']->set_price( $value['pre_checkout_offer_price'] ); } } } } /** * Pre checkout Offer Modal. * * @param type $checkout object. */ public function wcf_add_pre_checkout_offer_modal( $checkout ) { if ( ! _is_wcf_checkout_type() ) { return; } global $post; $checkout_id = false; if ( $post ) { $checkout_id = $post->ID; } if ( $checkout_id ) { $output = ''; $src = ''; $pre_checkout_offer = get_post_meta( $checkout_id, 'wcf-pre-checkout-offer', true ); if ( 'yes' !== $pre_checkout_offer ) { return; } $pre_checkout_offer_product = get_post_meta( $checkout_id, 'wcf-pre-checkout-offer-product', true ); if ( ! empty( $pre_checkout_offer_product ) ) { $pre_checkout_offer_product_id = $pre_checkout_offer_product[0]; $_product = wc_get_product( $pre_checkout_offer_product_id ); $image_src = get_the_post_thumbnail_url( $pre_checkout_offer_product_id ); if ( ! $_product ) { return; } $parent_id = $pre_checkout_offer_product_id; if ( empty( $image_src ) && $_product->is_type( 'variable' ) ) { $src = get_the_post_thumbnail_url( $parent_id ); } else { $src = $image_src; } $pre_checkout_offer_product_id = wcf_pro()->utils->get_variable_variation_product_id( $pre_checkout_offer_product_id ); $_product = wc_get_product( $pre_checkout_offer_product_id ); if ( ! $src ) { $src = wc_placeholder_img_src(); } $pre_checkout_popup_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-popup-title' ); $pre_checkout_popup_sub_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-popup-sub-title' ); $pre_checkout_popup_btn_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-popup-btn-text' ); $pre_checkout_popup_skip_btn_text = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-popup-skip-btn-text' ); $pre_checkout_product_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-product-title' ); if ( empty( $pre_checkout_product_title ) ) { $product_title = get_the_title( $pre_checkout_offer_product_id ); } else { $product_title = $pre_checkout_product_title; } if ( empty( $pre_checkout_popup_title ) ) { $pre_checkout_popup_title = __( '{first_name}, Wait! Your Order Is Almost Complete...', 'cartflows-pro' ); } if ( empty( $pre_checkout_popup_btn_text ) ) { $pre_checkout_popup_btn_text = __( 'Yes, Add to My Order!', 'cartflows-pro' ); } if ( empty( $pre_checkout_popup_skip_btn_text ) ) { $pre_checkout_popup_skip_btn_text = __( 'No, thanks!', 'cartflows-pro' ); } $discount_type = get_post_meta( $checkout_id, 'wcf-pre-checkout-offer-discount', true ); $discount_value = floatval( get_post_meta( $checkout_id, 'wcf-pre-checkout-offer-discount-value', true ) ); $original_product_price = $_product->get_price(); if ( ! empty( $discount_type ) && $discount_value > 0 ) { $_product_price = $this->calculate_pre_checkout_discount( $discount_type, $discount_value, $original_product_price ); $price_html = wc_format_sale_price( $original_product_price, $_product_price ); } else { $price_html = $_product->get_price_html(); } $product_description = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-desc' ); if ( empty( $product_description ) ) { $product_description = __( 'Write a few words about this awesome product and tell shoppers why they must get it. You may highlight this as "one time offer" and make it irresistible.', 'cartflows-pro' ); } $template_path = CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/pre-checkout-offer/pre-checkout-offer.php'; if ( file_exists( $template_path ) ) { ob_start(); include $template_path; $output .= ob_get_clean(); } // Reason for PHPCS ignore: The output is already escaped in the above included template file. echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pre_Checkout_Offer_Product::get_instance(); modules/checkout/classes/class-cartflows-pro-checkout-default-meta.php000064400000041163147600244370022261 0ustar00 array(), 'sanitize' => 'FILTER_CARTFLOWS_PRO_CHECKOUT_PRODUCT_OPTIONS', ); $fields['wcf-enable-product-options'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-product-opt-title'] = array( 'default' => __( 'Your Products', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-your-products-position'] = array( 'default' => 'after-customer', 'sanitize' => 'FILTER_SANITIZE_STRING', ); /* Product Selection */ $fields['wcf-product-options'] = array( 'default' => 'force-all', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-enable-product-variation'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-product-variation-options'] = array( 'default' => 'inline', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-enable-product-quantity'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-show-product-images'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-discount-coupon'] = array( 'default' => array(), 'sanitize' => 'FILTER_CARTFLOWS_ARRAY', ); /* pre-checkout meta fields*/ $fields['wcf-pre-checkout-offer'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-animate-browser-tab'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-animate-browser-tab-title'] = array( 'default' => __( '___Don\'t miss out the offer___', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-pre-checkout-offer-product'] = array( 'default' => array(), 'sanitize' => 'FILTER_CARTFLOWS_ARRAY', ); $fields['wcf-pre-checkout-offer-desc'] = array( 'default' => __( 'Write a few words about this awesome product and tell shoppers why they must get it. You may highlight this as "one time offer" and make it irresistible.', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ); $fields['wcf-pre-checkout-offer-popup-title'] = array( 'default' => __( '{first_name}, Wait! Your Order Is Almost Complete...', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ); $fields['wcf-pre-checkout-offer-popup-sub-title'] = array( 'default' => __( 'We have a special one time offer just for you.', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-pre-checkout-offer-product-title'] = array( 'default' => __( 'Product Name', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-pre-checkout-offer-popup-btn-text'] = array( 'default' => __( 'Yes, Add to My Order!', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-pre-checkout-offer-popup-skip-btn-text'] = array( 'default' => __( 'No, thanks!', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-pre-checkout-offer-discount'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-pre-checkout-offer-discount-value'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_FLOAT', ); /* Checkout Offer Styling Options */ $fields['wcf-pre-checkout-offer-bg-color'] = array( 'default' => '#eee', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-pre-checkout-offer-model-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-pre-checkout-offer-title-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-pre-checkout-offer-subtitle-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-pre-checkout-offer-desc-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-pre-checkout-offer-navbar-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-pre-checkout-offer-button-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); /* Order Bump Options */ $fields['wcf-order-bumps'] = array( 'default' => array(), 'sanitize' => 'FILTER_DEFAULT', ); /* Highlight product styles*/ $fields['wcf-product-options-skin'] = array( 'default' => 'classic', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-yp-text-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-yp-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-yp-hl-text-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-yp-hl-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-yp-hl-border-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-yp-hl-flag-text-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-yp-hl-flag-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); /* Custom Fields Options*/ $fields['wcf-show-bump-arrow'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-show-bump-animate-arrow'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-advance-options-fields'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); /* Two Step Default Options */ $fields['wcf-checkout-box-note'] = array( 'default' => 'yes', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-box-note-text'] = array( 'default' => __( 'Get Your FREE copy of CartFlows in just few steps.', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ); $fields['wcf-checkout-box-note-text-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-checkout-box-note-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ); $fields['wcf-checkout-step-one-title'] = array( 'default' => __( 'Shipping', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-step-one-sub-title'] = array( 'default' => __( 'Where to ship it?', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-step-two-title'] = array( 'default' => __( 'Payment', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-step-two-sub-title'] = array( 'default' => __( 'Of your order', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-offer-button-title'] = array( 'default' => __( 'For Special Offer Click Here', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-offer-button-sub-title'] = array( 'default' => __( 'Yes! I want this offer!', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ); /** Comment $fields['wcf-checkout-two-step-title-text-color'] = array( 'default' => '', 'sanitize' => 'FILTER_DEFAULT', ); $fields['wcf-checkout-step-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_DEFAULT', ); $fields['wcf-checkout-two-step-section-bg-color'] = array( 'default' => '#ffffff', 'sanitize' => 'FILTER_DEFAULT', ); $fields['wcf-checkout-active-step-bg-color'] = array( 'default' => '', 'sanitize' => 'FILTER_DEFAULT', ); */ $fields['wcf-checkout-two-step-section-width'] = array( 'default' => '500', 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ); $fields['wcf-checkout-two-step-section-border'] = array( 'default' => 'solid', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-rules'] = array( 'default' => array( array( 'group_id' => substr( md5( wp_rand() ), 2, 3 ), 'rules' => array( array( 'rule_id' => substr( md5( wp_rand() ), 2, 3 ), 'condition' => 'cart_item', 'operator' => '', 'value' => '', ), ), 'step_id' => '', ), ), 'sanitize' => 'FILTER_CARTFLOWS_PRO_CHECKOUT_RULES', ); $fields['wcf-checkout-rules-option'] = array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ); $fields['wcf-checkout-rules-default-step'] = array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ); return $fields; } /** * Multiple order bump default meta. */ public function order_bump_default_meta() { $order_bump_fields = array( 'id' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'title' => array( 'default' => __( 'no title', 'cartflows-pro' ), 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'status' => array( 'default' => false, 'sanitize' => 'FILTER_VALIDATE_BOOLEAN', ), 'product' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'quantity' => array( 'default' => 1, 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'default_state' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'display_quantity_field' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'discount_type' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'discount_value' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_FLOAT', ), 'discount_coupon' => array( 'default' => array(), 'sanitize' => 'FILTER_SANITIZE_ARRAY', ), 'enable_show_image' => array( 'default' => 'yes', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'ob_image_position' => array( 'default' => 'left', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'ob_image_width' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'product_image' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_URL', ), 'product_img_obj' => array( 'default' => '', 'sanitize' => 'FILTER_CARTFLOWS_OB_IMAGE', ), 'position' => array( 'default' => 'after-order', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'checkbox_label' => array( 'default' => __( 'Yes, I will take it!', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ), 'action_element' => array( 'default' => 'checkbox', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'title_text' => array( 'default' => __( 'Here is Great Offer!', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ), 'hl_text' => array( 'default' => __( 'One Time Offer', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ), 'desc_text' => array( 'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut, quod hic expedita consectetur vitae nulla sint adipisci cupiditate at.', 'cartflows-pro' ), 'sanitize' => 'FILTER_WP_KSES_POST', ), 'replace_product' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'next_step' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_NUMBER_INT', ), 'style' => array( 'default' => 'style-1', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'border_style' => array( 'default' => 'inherit', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'box_border_radius' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'box_border_width' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'box_shadow_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'box_shadow_horizontal' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'box_shadow_vertical' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'box_shadow_blur' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'box_shadow_spread' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'show_image_mobile' => array( 'default' => 'yes', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'show_arrow' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'show_animation' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'border_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'bg_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'label_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'title_text_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'label_bg_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'desc_text_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'hl_text_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'button_text_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'button_text_hover_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'button_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'button_hover_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'button_border_width' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'button_border_radius' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'button_border_style' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'button_border_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'width' => array( 'default' => '100', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'label_border_style' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'label_border_width' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'label_border_radius' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_STRING', ), 'label_border_color' => array( 'default' => '', 'sanitize' => 'FILTER_SANITIZE_COLOR', ), 'rules' => array( 'default' => array( array( 'group_id' => substr( md5( wp_rand() ), 2, 3 ), 'rules' => array( array( 'rule_id' => substr( md5( wp_rand() ), 2, 3 ), 'condition' => 'cart_item', 'operator' => '', 'value' => '', ), ), ), ), 'sanitize' => 'FILTER_SANITIZE_RULES', ), 'is_rule' => array( 'default' => 'no', 'sanitize' => 'FILTER_SANITIZE_STRING', ), ); return $order_bump_fields; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Checkout_Default_Meta::get_instance(); modules/checkout/classes/class-cartflows-pro-checkout-markup.php000064400000121274147600244370021212 0ustar00include_required_class(); add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_checkout_fields' ), 10, 2 ); /* Scripts */ add_action( 'cartflows_checkout_scripts', array( $this, 'checkout_order_scripts' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'load_compatibility_scripts_for_pro' ), 102 ); /** Filter add_filter( 'cartflows_checkout_layout_template', array( $this, 'include_checkout_template' ), 10, 1 ); */ add_action( 'cartflows_checkout_form_before', array( $this, 'two_step_actions' ), 10, 1 ); add_action( 'cartflows_checkout_after_configure_cart', array( $this, 'after_configure_cart' ), 10, 1 ); add_action( 'woocommerce_admin_order_data_after_billing_address', array( $this, 'display_billing_custom_order_meta' ), 10, 1 ); add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'display_shipping_custom_order_meta' ), 10, 1 ); add_filter( 'woocommerce_email_order_meta_fields', array( $this, 'custom_woo_email_order_meta_fields' ), 10, 3 ); add_filter( 'global_cartflows_js_localize', array( $this, 'add_frontend_localize_scripts' ) ); add_filter( 'woocommerce_form_field_hidden', array( $this, 'wcf_form_field_hidden' ), 10, 4 ); add_action( 'cartflows_checkout_before_shortcode', array( $this, 'add_products_using_url' ), 10 ); add_action( 'cartflows_checkout_before_shortcode', array( $this, 'apply_url_coupon' ), 30 ); // Execute this action after the above action to avoid applying the coupon early. add_filter( 'cartflows_selected_checkout_products', array( $this, 'update_the_checkout_products_data' ), 10, 2 ); add_filter( 'cartflows_skip_configure_cart', array( $this, 'skip_cart_configuration' ), 10, 2 ); } /** * Skip the cart configuration when product is added from URL. * * @param bool $skip_cart is skip cart. * @param int $checkout_id checkout id. */ public function skip_cart_configuration( $skip_cart, $checkout_id ) { if ( ! empty( $_GET['wcf-add-to-cart'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended WC()->cart->empty_cart(); $skip_cart = true; } return $skip_cart; } /** * Add the product in cart through URL. * * @return void */ public function add_products_using_url() { $url_products = apply_filters( 'cartflows_add_to_cart_products_from_url', true ); if ( $url_products ) { $products = isset( $_GET['wcf-add-to-cart'] ) ? explode( ',', sanitize_text_field( wp_unslash( $_GET['wcf-add-to-cart'] ) ) ) : array(); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $quantity = isset( $_GET['wcf-qty'] ) ? explode( ',', sanitize_text_field( wp_unslash( $_GET['wcf-qty'] ) ) ) : array(); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $checkout_id = _get_wcf_checkout_id(); if ( ! empty( $products ) ) { foreach ( $products as $key => $product_id ) { $product_id = wcf_pro()->utils->get_variable_variation_product_id( $product_id ); $product = wc_get_product( $product_id ); if ( $product ) { $product_qunatity = isset( $quantity[ $key ] ) && ! empty( $quantity[ $key ] ) ? $quantity[ $key ] : 1; WC()->cart->add_to_cart( $product_id, $product_qunatity ); } } Cartflows_Checkout_Markup::get_instance()->set_active_checkout_cookie_data( $checkout_id ); } } } /** * Merge product options array with checkout products. * * @param array $products products. * @param int $checkout_id checkout id. */ public function update_the_checkout_products_data( $products, $checkout_id ) { $products_options = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); if ( 'yes' === $products_options && $products ) { $products_data = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-options-data' ); $products_option_condition = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-options' ); foreach ( $products as $key => $data ) { $unique_key = $data['unique_id']; if ( $unique_key && isset( $products_data[ $unique_key ] ) ) { $products[ $key ] = wp_parse_args( $products_data[ $unique_key ], $data ); } if ( ! isset( $products_data[ $unique_key ]['add_to_cart'] ) && 'single-selection' === $products_option_condition ) { $products[ $key ]['add_to_cart'] = 'no'; } } $cart_value = array_column( $products, 'add_to_cart' ); if ( ! in_array( 'yes', $cart_value, true ) ) { $products[0]['add_to_cart'] = 'yes'; } } return $products; } /** * Apply the coupon if available in url. */ public function apply_url_coupon() { $url_coupon = apply_filters( 'cartflows_apply_coupon_from_url', true ); if ( $url_coupon ) { $coupon = isset( $_GET['coupon'] ) ? sanitize_text_field( wp_unslash( $_GET['coupon'] ) ) : false; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( $coupon ) { if ( WC()->cart->has_discount( $coupon ) ) { return; } WC()->cart->apply_coupon( $coupon ); } } } /** * Two Step Layout Actions. * * @param int $checkout_id checkout id. * @since 1.1.9 */ public function two_step_actions( $checkout_id ) { $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' ); if ( 'two-step' == $checkout_layout ) { add_action( 'cartflows_add_before_main_section', array( $this, 'get_checkout_form_note' ), 10, 1 ); add_action( 'woocommerce_checkout_before_customer_details', array( $this, 'add_two_step_first_step_wrapper' ), 13 ); add_action( 'cartflows_add_before_main_section', array( $this, 'add_two_step_second_step_wrapper' ), 11 ); add_action( 'cartflows_add_before_main_section', array( $this, 'add_two_step_nav_menu' ), 12, 1 ); add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'add_two_step_next_btn' ), 12 ); add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'add_two_step_closing_div' ), 13 ); add_action( 'cartflows_add_after_main_section', array( $this, 'add_two_step_closing_div' ), 14 ); } } /** * Hidden Field Actions. * * @param string $field field. * @param string $key key. * @param array $args args. * @param string $value value. * * @since 1.1.9 */ public function wcf_form_field_hidden( $field = '', $key = '', $args = array(), $value = '' ) { $field = ' '; return $field; } /** * Send custom fields in the order email. * * @param array $fields of fields. * @param string $sent_to_admin domain name to send. * @param object $order of order details. */ public function custom_woo_email_order_meta_fields( $fields, $sent_to_admin, $order ) { // Return if order not found. if ( ! $order ) { return $fields; } $order_id = $order->get_id(); $checkout_id = $order->get_meta( '_wcf_checkout_id' ); if ( ! $checkout_id ) { return $fields; } // Get custom fields. $custom_fields = get_post_meta( $checkout_id, 'wcf-custom-checkout-fields', true ); if ( 'yes' === $custom_fields ) { // Billing Fields & Values. $billing_fields = get_post_meta( $checkout_id, 'wcf_field_order_billing', true ); if ( empty( $billing_fields ) ) { $billing_fields = get_post_meta( $checkout_id, 'wcf_fields_billing', true ); } if ( is_array( $billing_fields ) ) { foreach ( $billing_fields as $field => $data ) { if ( ( isset( $data['custom'] ) && $data['custom'] ) && ( isset( $data['show_in_email'] ) && $data['show_in_email'] ) ) { $fields[ $field ] = array( 'label' => $data['label'], 'value' => $order->get_meta( '_' . $field ), ); } } } // Shipping Fields & Values. $shipping_fields = get_post_meta( $checkout_id, 'wcf_field_order_shipping', true ); if ( empty( $shipping_fields ) ) { $shipping_fields = get_post_meta( $checkout_id, 'wcf_fields_shipping', true ); } if ( is_array( $shipping_fields ) ) { foreach ( $shipping_fields as $field => $data ) { if ( ( isset( $data['custom'] ) && $data['custom'] ) && ( isset( $data['show_in_email'] ) && $data['show_in_email'] ) ) { $fields[ $field ] = array( 'label' => $data['label'], 'value' => $order->get_meta( '_' . $field ), ); } } } } return $fields; } /** * After configure cart. * * @param int $checkout_id checkout id. */ public function after_configure_cart( $checkout_id ) { // Don't add the coupon if cart is empty. if ( WC()->cart->is_empty() ) { return; } $discount_coupon = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-discount-coupon' ); if ( is_array( $discount_coupon ) && ! empty( $discount_coupon ) ) { $discount_coupon = reset( $discount_coupon ); } if ( ! empty( $discount_coupon ) ) { $show_coupon_msg = apply_filters( 'cartflows_show_applied_coupon_message', true ); if ( ! $show_coupon_msg ) { add_filter( 'woocommerce_coupon_message', '__return_empty_string' ); } WC()->cart->add_discount( $discount_coupon ); if ( ! $show_coupon_msg ) { remove_filter( 'woocommerce_coupon_message', '__return_empty_string' ); } } } /** * Add markup classes * * @return void */ public function include_required_class() { include_once CARTFLOWS_PRO_CHECKOUT_DIR . 'classes/class-cartflows-pre-checkout-offer-product.php'; include_once CARTFLOWS_PRO_CHECKOUT_DIR . 'classes/class-cartflows-pro-product-options.php'; include_once CARTFLOWS_PRO_CHECKOUT_DIR . 'classes/class-cartflows-pro-checkout-tab-animation.php'; include_once CARTFLOWS_PRO_CHECKOUT_DIR . 'classes/class-cartflows-pro-checkout-rules.php'; /* Start-Plus-Feature */ if ( defined( 'CARTFLOWS_PRO_PLUGIN_TYPE' ) && in_array( CARTFLOWS_PRO_PLUGIN_TYPE, array( 'plus', 'pro' ), true ) ) { include_once CARTFLOWS_PRO_CHECKOUT_DIR . 'classes/class-cartflows-pro-order-bump-product.php'; include_once CARTFLOWS_PRO_CHECKOUT_DIR . 'classes/class-cartflows-pro-order-bump-rules.php'; } /* End-Plus-Feature */ } /** * Load shortcode scripts. * * @return void */ public function checkout_order_scripts() { global $post; if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() || Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $post->ID ) ) { $this->divi_status = true; } wp_enqueue_style( 'wcf-pro-checkout', wcf_pro()->utils->get_css_url( 'checkout-styles' ), '', CARTFLOWS_PRO_VER ); wp_enqueue_style( 'wcf-pro-multistep-checkout', wcf_pro()->utils->get_css_url( 'multistep-checkout' ), '', CARTFLOWS_PRO_VER ); wp_enqueue_script( 'wcf-pro-checkout', wcf_pro()->utils->get_js_url( 'checkout' ), array( 'jquery' ), CARTFLOWS_PRO_VER, true ); $checkout_id = $post->ID; $pre_checkout_offer = get_post_meta( $checkout_id, 'wcf-pre-checkout-offer', true ); if ( 'yes' === $pre_checkout_offer ) { wp_enqueue_script( 'wcf-pro-pre-checkout', wcf_pro()->utils->get_js_url( 'pre-checkout' ), array( 'jquery', 'jquery-ui-dialog' ), CARTFLOWS_PRO_VER, true ); } wp_enqueue_style( 'dashicons' ); $style = get_post_meta( $checkout_id, 'wcf-pro-dynamic-css', true ); $css_version = get_post_meta( $checkout_id, 'wcf-pro-dynamic-css-version', true ); if ( empty( $style ) || CARTFLOWS_ASSETS_VERSION !== $css_version ) { $style = $this->generate_style(); update_post_meta( $checkout_id, 'wcf-pro-dynamic-css', $style ); update_post_meta( $checkout_id, 'wcf-pro-dynamic-css-version', CARTFLOWS_ASSETS_VERSION ); } wp_add_inline_style( 'wcf-pro-checkout', $style ); } /** * Load compatibility scripts. * * @return void */ public function load_compatibility_scripts_for_pro() { if ( ! _is_wcf_checkout_type() ) { return; } // Add DIVI Compatibility css if DIVI theme is enabled. if ( $this->divi_status ) { wp_enqueue_style( 'wcf-checkout-styles-divi', wcf_pro()->utils->get_css_url( 'checkout-styles-divi' ), '', CARTFLOWS_PRO_VER ); } } /** * Generate styles. * * @return string */ public function generate_style() { if ( ! _is_wcf_checkout_type() ) { return; } global $post; $checkout_id = $post->ID; $output = ''; $enable_design_setting = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-design-settings' ); $output .= $this->order_bump_dynamic_css( $checkout_id ); /* Pre-checkout offer*/ $is_pre_checkut_upsell = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer' ); $primary_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-primary-color' ); $base_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-base-font-family' ); if ( 'yes' === $is_pre_checkut_upsell ) { $pre_checkout_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-bg-color' ); $pre_checkout_model_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-model-bg-color' ); $pre_checkout_title_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-title-color' ); $pre_checkout_subtitle_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-subtitle-color' ); $pre_checkout_desc_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-desc-color' ); $navbar_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-navbar-color' ); $button_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer-button-color' ); $pre_checkout_navbar_color = ! empty( $navbar_color ) ? $navbar_color : $primary_color; $pre_checkout_button_color = ! empty( $button_color ) ? $button_color : $primary_color; include CARTFLOWS_PRO_CHECKOUT_DIR . 'includes/pre-checkout-offer-dynamic-css.php'; } /* Pre-checkout offer*/ if ( 'yes' !== $enable_design_setting ) { return $output; } /* For single product quick view lightbox popup*/ $r = ''; $g = ''; $b = ''; $submit_tb_padding = ''; $submit_lr_padding = ''; $field_heading_color = ''; $field_color = ''; $field_input_size = ''; $field_label_color = ''; $field_bg_color = ''; $field_border_color = ''; $field_tb_padding = ''; $field_lr_padding = ''; $input_font_family = ''; $input_font_weight = ''; $submit_button_height = ''; $submit_color = ''; $submit_bg_color = $primary_color; $submit_border_color = $primary_color; $submit_hover_color = ''; $submit_bg_hover_color = $primary_color; $submit_border_hover_color = $primary_color; $section_heading_color = $primary_color; $section_bg_color = $primary_color; $is_advance_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-advance-options-fields' ); $button_font_family = ''; $button_font_weight = ''; $heading_font_family = ''; $heading_font_weight = ''; $base_font_family = $base_font_family; $hl_bg_color = ''; if ( 'yes' == $is_advance_option ) { // Buttons, inputs, title : size, font, color, width options. $section_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-color' ); $section_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-section-bg-color' ); $field_heading_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-heading-color' ); $submit_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-tb-padding' ); $submit_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-lr-padding' ); $field_input_size = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-field-size' ); $field_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-color' ); $field_label_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-label-color' ); $field_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-bg-color' ); $field_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-border-color' ); $field_tb_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-tb-padding' ); $field_lr_padding = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-field-lr-padding' ); $submit_button_height = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-button-size' ); $submit_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-color' ); $submit_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-color', $primary_color ); $submit_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-color', $primary_color ); $submit_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-hover-color' ); $submit_bg_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-bg-hover-color', $primary_color ); $submit_border_hover_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-submit-border-hover-color', $primary_color ); // Font and weight options. $button_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-family' ); $button_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-button-font-weight' ); $input_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-family' ); $input_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-input-font-weight' ); $heading_font_family = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-family' ); $heading_font_weight = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-heading-font-weight' ); $hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-hl-bg-color' ); } if ( isset( $primary_color ) ) { list($r, $g, $b) = sscanf( $primary_color, '#%02x%02x%02x' ); } $enable_product_options = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); $product_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-options' ); $variation_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-variation-options' ); // Remove margin for perticular product variation option. if ( 'force-all' == $product_option && 'popup' == $variation_option ) { $output .= '.wcf-product-option-wrap .wcf-qty-options .wcf-qty-row .wcf-item-choose-options{ margin: 5px 0 0 0px; }'; } // Remove margin for perticular product variation option. // Highlight products styles. $yp_text_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-text-color' ); $yp_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-bg-color' ); $yp_hl_text_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-hl-text-color' ); $yp_hl_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-hl-bg-color' ); $yp_hl_border_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-hl-border-color' ); $yp_flag_text_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-hl-flag-text-color' ); $yp_flag_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-yp-hl-flag-bg-color' ); // Bump Order. $bump_border_style = ''; $bump_border_color = ''; $bump_bg_color = ''; $bump_label_color = ''; $bump_label_bg_color = ''; $bump_desc_text_color = ''; $bump_hl_text_color = ''; $bump_blinking_arrow_color = ''; /* * Two step Layout */ // Get checkout page layout. $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' ); if ( 'two-step' === $checkout_layout ) { $checkout_note_enabled = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-box-note', false ); $step_two_width = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-two-step-section-width' ); $two_step_box_text_color = ''; $two_step_box_bg_color = ''; $two_step_section_border = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-two-step-section-border' ); if ( 'yes' == $checkout_note_enabled ) { $two_step_box_text_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-box-note-text-color', '' ); $two_step_box_bg_color = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-box-note-bg-color', $primary_color ); } } /* Two step Layout */ // Override CSS vars for product options. $output .= '.wcf-product-option-wrap {'; $output .= ! empty( $yp_text_color ) ? '--wcf-yp-text-color: ' . $yp_text_color . ';' : ''; $output .= ! empty( $yp_bg_color ) ? '--wcf-yp-bg-color: ' . $yp_bg_color . ';' : ''; $output .= ! empty( $yp_hl_text_color ) ? '--wcf-yp-hl-text-color: ' . $yp_hl_text_color . ';' : ''; $output .= ! empty( $yp_hl_bg_color ) ? '--wcf-yp-hl-bg-color: ' . $yp_hl_bg_color . ';' : ''; $output .= ! empty( $yp_hl_border_color ) ? '--wcf-yp-hl-border-color: ' . $yp_hl_border_color . ';' : ''; $output .= ! empty( $yp_flag_text_color ) ? '--wcf-yp-hl-flag-text-color: ' . $yp_flag_text_color . ';' : ''; $output .= ! empty( $yp_flag_bg_color ) ? '--wcf-yp-hl-flag-bg-color: ' . $yp_flag_bg_color . ';' : ''; $output .= '}'; if ( $this->divi_status ) { include CARTFLOWS_PRO_CHECKOUT_DIR . 'includes/checkout-pro-dynamic-divi-css.php'; } else { include CARTFLOWS_PRO_CHECKOUT_DIR . 'includes/checkout-pro-dynamic-css.php'; } return $output; } /** * To generate the dynamic css for multiple order bumps. * * @param int $checkout_id checkout id. */ public function order_bump_dynamic_css( $checkout_id ) { $multi_ob = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bumps' ); $ob_css = ''; if ( empty( $multi_ob ) && 'yes' !== get_post_meta( $checkout_id, 'wcf-order-bump-migrated', true ) && 'yes' === wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump' ) ) { $product_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-image' ); $show_image_mobile = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-show-bump-image-mobile' ); $show_image_mobile = 'yes' === $show_image_mobile ? 'no' : 'yes'; $old_ob = array( 'status' => true, 'enable_show_image' => ! empty( $product_image ) ? 'yes' : 'no', 'ob_image_position' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-image-position' ), 'ob_image_width' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-image-width' ), 'show_image_mobile' => $show_image_mobile, 'style' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-style' ), 'border_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-border-color' ), 'border_style' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-border-style' ), 'bg_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-bg-color' ), 'label_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-label-color' ), 'label_bg_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-label-bg-color' ), 'desc_text_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-desc-text-color' ), 'hl_text_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-hl-text-color' ), ); array_push( $multi_ob, $old_ob ); } if ( is_array( $multi_ob ) && ! empty( $multi_ob ) ) { $default_meta = Cartflows_Pro_Checkout_Default_Meta::get_instance()->order_bump_default_meta(); $ob_default_meta = array(); foreach ( $default_meta as $key => $value ) { $ob_default_meta[ $key ] = $value['default']; } foreach ( $multi_ob as $index => $order_bump_data ) { if ( ! $order_bump_data['status'] ) { continue; } $order_bump_data = wp_parse_args( $order_bump_data, $ob_default_meta ); $ob_id = isset( $order_bump_data['id'] ) ? $order_bump_data['id'] : ''; $bump_border_style_value = isset( $order_bump_data['style'] ) ? $order_bump_data['style'] : 'style-1'; // Define bump order layout. if ( 'inherit' !== $bump_border_style_value ) { $bump_border_style = $order_bump_data['border_style']; } if ( in_array( $order_bump_data['style'], array( 'style-1', 'style-2', 'style-3', 'style-4', 'style-5' ), true ) && 'inherit' === $bump_border_style ) { $bump_border_style = 'solid'; } // Get bump order styling values. $order_bump_position = isset( $order_bump_data['position'] ) ? $order_bump_data['position'] : 'after-order'; $bump_border_color = isset( $order_bump_data['border_color'] ) ? $order_bump_data['border_color'] : ''; $bump_bg_color = isset( $order_bump_data['bg_color'] ) ? $order_bump_data['bg_color'] : ''; $bump_box_border_width = isset( $order_bump_data['box_border_width'] ) ? $order_bump_data['box_border_width'] : ''; $bump_box_border_radius = isset( $order_bump_data['box_border_radius'] ) ? $order_bump_data['box_border_radius'] : ''; $bump_box_shadow_color = isset( $order_bump_data['box_shadow_color'] ) ? $order_bump_data['box_shadow_color'] : ''; $bump_box_shadow_horizontal = isset( $order_bump_data['box_shadow_horizontal'] ) ? $order_bump_data['box_shadow_horizontal'] : ''; $bump_box_shadow_vertical = isset( $order_bump_data['box_shadow_vertical'] ) ? $order_bump_data['box_shadow_vertical'] : ''; $bump_box_shadow_blur = isset( $order_bump_data['box_shadow_blur'] ) ? $order_bump_data['box_shadow_blur'] : ''; $bump_box_shadow_spread = isset( $order_bump_data['box_shadow_spread'] ) ? $order_bump_data['box_shadow_spread'] : ''; $bump_label_color = isset( $order_bump_data['label_color'] ) ? $order_bump_data['label_color'] : ''; if ( in_array( $order_bump_data['style'], array( 'style-3', 'style-4' ), true ) ) { $bump_label_color = isset( $order_bump_data['title_text_color'] ) ? $order_bump_data['title_text_color'] : ''; } $bump_label_bg_color = isset( $order_bump_data['label_bg_color'] ) ? $order_bump_data['label_bg_color'] : ''; $bump_desc_text_color = isset( $order_bump_data['desc_text_color'] ) ? $order_bump_data['desc_text_color'] : ''; $bump_hl_text_color = isset( $order_bump_data['hl_text_color'] ) ? $order_bump_data['hl_text_color'] : ''; $bump_button_text_color = isset( $order_bump_data['button_text_color'] ) ? $order_bump_data['button_text_color'] : ''; $bump_button_color = isset( $order_bump_data['button_color'] ) ? $order_bump_data['button_color'] : ''; $bump_button_hover_color = isset( $order_bump_data['button_hover_color'] ) ? $order_bump_data['button_hover_color'] : ''; $bump_button_text_hover_color = isset( $order_bump_data['button_text_hover_color'] ) ? $order_bump_data['button_text_hover_color'] : ''; $bump_button_border_width = isset( $order_bump_data['button_border_width'] ) ? $order_bump_data['button_border_width'] : ''; $bump_button_border_style = isset( $order_bump_data['button_border_style'] ) ? $order_bump_data['button_border_style'] : ''; $bump_button_border_color = isset( $order_bump_data['button_border_color'] ) ? $order_bump_data['button_border_color'] : ''; $bump_button_border_radius = isset( $order_bump_data['button_border_radius'] ) ? $order_bump_data['button_border_radius'] : ''; $bump_blinking_arrow_color = ''; $enabled_bump_image = isset( $order_bump_data['enable_show_image'] ) ? $order_bump_data['enable_show_image'] : 'no'; $bump_image_position = isset( $order_bump_data['ob_image_position'] ) ? $order_bump_data['ob_image_position'] : 'left'; $bump_image_width = isset( $order_bump_data['ob_image_width'] ) ? $order_bump_data['ob_image_width'] : ''; $enabled_bump_image_mobile = isset( $order_bump_data['show_image_mobile'] ) ? $order_bump_data['show_image_mobile'] : 'yes'; $bump_width = isset( $order_bump_data['width'] ) ? $order_bump_data['width'] : '100'; $label_border_style = isset( $order_bump_data['label_border_style'] ) ? $order_bump_data['label_border_style'] : 'solid'; $label_border_width = isset( $order_bump_data['label_border_width'] ) ? $order_bump_data['label_border_width'] : 'solid'; $label_border_radius = isset( $order_bump_data['label_border_radius'] ) ? $order_bump_data['label_border_radius'] : 'solid'; $label_border_color = isset( $order_bump_data['label_border_color'] ) ? $order_bump_data['label_border_color'] : ''; $bump_title_color = isset( $order_bump_data['title_text_color'] ) ? $order_bump_data['title_text_color'] : ''; if ( 'inherit' === $label_border_style && 'style-5' === $order_bump_data['style'] ) { $label_border_style = ''; } else { $label_border_style = 'solid'; } if ( in_array( $order_bump_data['style'], array( 'style-4', 'style-5' ), true ) && 'inherit' === $bump_button_border_style ) { $bump_button_border_style = ''; } include CARTFLOWS_PRO_CHECKOUT_DIR . 'includes/order-bump-dynamic-css.php'; } } return $ob_css; } /** * Save checkout fields. * * @param int $order_id order id. * @param array $posted posted data. * @return void */ public function save_checkout_fields( $order_id, $posted ) { if ( isset( $_POST['_wcf_bump_products'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing // We are sanitizing the input after decoding. $order_bumps = json_decode( wp_unslash( $_POST['_wcf_bump_products'] ), true ); //phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized if ( ! empty( $order_bumps ) ) { $ob_data = array(); foreach ( $order_bumps as $key => $order_bump ) { if ( is_array( $order_bump ) ) { foreach ( $order_bump as $data_key => $data ) { $ob_data[ sanitize_text_field( $key ) ][ sanitize_text_field( $data_key ) ] = sanitize_text_field( $data ); } } } $order = wc_get_order( $order_id ); if ( $order ) { $order->update_meta_data( '_wcf_bump_products', $ob_data ); $order->save(); } } } } /** * Save checkout fields. * * @param string $layout_style layout style. * @return link */ public function include_checkout_template( $layout_style ) { if ( ( 'two-step' === $layout_style ) || ( 'one-column' === $layout_style ) ) { return CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/embed/checkout-template-simple.php'; } return $layout_style; } /** * Display Two Step Nav Menu. * * @param string $layout_style layout style. * @return markup */ public function add_two_step_nav_menu( $layout_style ) { if ( 'two-step' === $layout_style ) { // Get Checkout ID. global $post; $checkout_id = false; if ( _is_wcf_checkout_type() ) { $checkout_id = $post->ID; } else { if ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $checkout_id = intval( $_POST['id'] );// phpcs:ignore WordPress.Security.NonceVerification.Missing } } if ( ! $checkout_id ) { return; } // Get/Set default values. $is_note_enabled = ''; $checkout_note = ''; $step_one_title = ''; $step_one_sub_title = ''; $step_two_title = ''; $step_two_sub_title = ''; $two_step_section_border = ''; // Get default values from the default meta to show if the advance option is not enabled. $all_fields = Cartflows_Default_Meta::get_instance()->get_checkout_fields( $checkout_id ); $step_one_title = $all_fields['wcf-checkout-step-one-title']['default']; $step_one_sub_title = $all_fields['wcf-checkout-step-one-sub-title']['default']; $step_two_title = $all_fields['wcf-checkout-step-two-title']['default']; $step_two_sub_title = $all_fields['wcf-checkout-step-two-sub-title']['default']; // Get the values form the applied settings. // Get step titles. $step_one_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-step-one-title', '' ); $step_one_sub_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-step-one-sub-title', '' ); $step_two_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-step-two-title', '' ); $step_two_sub_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-step-two-sub-title', '' ); $two_step_section_border = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-two-step-section-border' ); $two_step_html = ''; $two_step_html .= "'; echo wp_kses_post( $two_step_html ); } return $layout_style; } /** * Display Two Step note box. * * @param string $layout_style layout style. * @return void */ public function get_checkout_form_note( $layout_style ) { // Get Checkout ID. $checkout_id = false; global $post; if ( $post ) { $checkout_id = $post->ID; } else { if ( is_admin() && isset( $_POST['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing $checkout_id = intval( $_POST['id'] );// phpcs:ignore WordPress.Security.NonceVerification } } if ( ! $checkout_id ) { return; } $is_note_enabled = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-box-note', false ); if ( 'yes' == $is_note_enabled ) { $checkout_note = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-box-note-text', '' ); $two_step_note = ''; $two_step_note .= "
    "; $two_step_note .= '

    ' . wp_kses_post( $checkout_note ) . '

    '; $two_step_note .= '
    '; echo wp_kses_post( $two_step_note ); } } /** * Display Two Step Nav Next Button. */ public function add_two_step_next_btn() { global $post; $checkout_id = false; if ( _is_wcf_checkout_type() ) { $checkout_id = $post->ID; } else { if ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification $checkout_id = intval( $_POST['id'] );//phpcs:ignore WordPress.Security.NonceVerification } } if ( ! $checkout_id ) { return; } $checkout_layout = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-layout' ); $button_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-offer-button-title', '' ); $button_sub_title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-offer-button-sub-title', '' ); if ( 'two-step' === $checkout_layout ) { $two_step_next_btn_html = ''; $two_step_next_btn_html .= ''; echo wp_kses_post( $two_step_next_btn_html ); } } /** * Display billing custom field data on order page * * @param obj $order Order object. * @return void */ public function display_billing_custom_order_meta( $order ) { if ( ! $order ) { return; } $checkout_id = $order->get_meta( '_wcf_checkout_id' ); /* Custom Field To Do */ $custom_fields = get_post_meta( $checkout_id, 'wcf-custom-checkout-fields', true ); if ( 'yes' === $custom_fields ) { $output = ''; $billing_fields = get_post_meta( $checkout_id, 'wcf_fields_billing', true ); if ( is_array( $billing_fields ) ) { foreach ( $billing_fields as $field => $data ) { if ( isset( $data['custom'] ) && $data['custom'] ) { $output .= '

    ' . $data['label'] . ': ' . $order->get_meta( '_' . $field ) . '

    '; } } } if ( '' !== $output ) { $output = '

    ' . __( 'Billing Custom Fields', 'cartflows-pro' ) . '

    ' . $output; } echo wp_kses_post( $output ); } } /** * Display shipping custom field data on order page * * @param obj $order Order object. * @return void */ public function display_shipping_custom_order_meta( $order ) { if ( ! $order ) { return; } $order_id = $order->get_id(); $checkout_id = $order->get_meta( '_wcf_checkout_id' ); /* Custom Field To Do */ $custom_fields = get_post_meta( $checkout_id, 'wcf-custom-checkout-fields', true ); if ( 'yes' === $custom_fields ) { $output = ''; $shipping_fields = get_post_meta( $checkout_id, 'wcf_fields_shipping', true ); if ( is_array( $shipping_fields ) ) { foreach ( $shipping_fields as $field => $data ) { if ( isset( $data['custom'] ) && $data['custom'] ) { $output .= '

    ' . $data['label'] . ': ' . $order->get_meta( '_' . $field ) . '

    '; } } } if ( '' !== $output ) { $output = '

    ' . __( 'Shipping Custom Fields', 'cartflows-pro' ) . '

    ' . $output; } echo wp_kses_post( $output ); } } /** * Add second step opening dev * * @since 1.1.9 */ public function add_two_step_second_step_wrapper() { echo "
    "; } /** * Add first step opening dev * * @since X.X.X */ public function add_two_step_first_step_wrapper() { echo '
    '; } /** * Add Startng & closing dev * * @since 1.1.9 */ public function add_two_step_closing_div() { echo '
    '; } /** * Add localize variables. * * @since 1.1.5 * @param array $localize settings. * @return array $localize settings. */ public function add_frontend_localize_scripts( $localize ) { $localize['allow_autocomplete_zipcode'] = apply_filters( 'cartflows_autocomplete_zip_data', 'no' ); $localize['add_to_cart_text'] = __( 'Processing...', 'cartflows-pro' ); $localize['wcf_refresh_checkout'] = apply_filters( 'cartflows_checkout_trigger_update_order_review', false ); return $localize; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Checkout_Markup::get_instance(); modules/checkout/classes/class-cartflows-pro-checkout-meta-data.php000064400000230360147600244370021545 0ustar00 __( 'matches any of', 'cartflows-pro' ), 'value' => 'any', ), array( 'label' => __( 'matches all of', 'cartflows-pro' ), 'value' => 'all', ), array( 'label' => __( 'matches none of', 'cartflows-pro' ), 'value' => 'none', ), ); $math_operators = array( array( 'label' => __( 'is equal to', 'cartflows-pro' ), 'value' => '==', ), array( 'label' => __( 'is not equal to', 'cartflows-pro' ), 'value' => '!=', ), array( 'label' => __( 'is greater than', 'cartflows-pro' ), 'value' => '>', ), array( 'label' => __( 'is less than', 'cartflows-pro' ), 'value' => '<', ), array( 'label' => __( 'is greater or equal to', 'cartflows-pro' ), 'value' => '>=', ), array( 'label' => __( 'is less or equal to', 'cartflows-pro' ), 'value' => '<=', ), ); $shipping_operators = array( array( 'label' => __( 'matches any of', 'cartflows-pro' ), 'value' => 'any', ), array( 'label' => __( 'matches none of', 'cartflows-pro' ), 'value' => 'none', ), ); $coupon_operators = array( array( 'label' => __( 'matches any of', 'cartflows-pro' ), 'value' => 'any', ), array( 'label' => __( 'matches all of', 'cartflows-pro' ), 'value' => 'all', ), array( 'label' => __( 'matches none of', 'cartflows-pro' ), 'value' => 'none', ), array( 'label' => __( 'exist', 'cartflows-pro' ), 'value' => 'exist', ), array( 'label' => __( 'not exist', 'cartflows-pro' ), 'value' => 'not_exist', ), ); return array( 'conditions' => array( array( 'title' => __( 'Cart', 'cartflows-pro' ), 'isopt' => true, 'options' => array( array( 'label' => __( 'Product(s)', 'cartflows-pro' ), 'value' => 'cart_item', ), array( 'label' => __( 'Product category(s)', 'cartflows-pro' ), 'value' => 'cart_item_category', ), array( 'label' => __( 'Product tag(s)', 'cartflows-pro' ), 'value' => 'cart_item_tag', ), array( 'label' => __( 'Total', 'cartflows-pro' ), 'value' => 'cart_total', ), array( 'label' => __( 'Coupon(s)', 'cartflows-pro' ), 'value' => 'cart_coupons', ), array( 'label' => __( 'Shipping method', 'cartflows-pro' ), 'value' => 'cart_shipping_method', ), ), ), array( 'title' => __( 'Geography', 'cartflows-pro' ), 'isopt' => true, 'options' => array( array( 'label' => __( 'Shipping country', 'cartflows-pro' ), 'value' => 'cart_shipping_country', ), array( 'label' => __( 'Billing country', 'cartflows-pro' ), 'value' => 'cart_billing_country', ), ), ), ), 'field_data' => array( 'cart_item' => array( 'operator' => $string_operators, 'fields' => array( array( 'type' => 'product', 'placeholder' => __( 'Search for products..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_item_category' => array( 'operator' => $string_operators, 'fields' => array( array( 'type' => 'select2', 'options' => $this->get_product_categories(), 'placeholder' => __( 'Search for products cat..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_item_tag' => array( 'operator' => $string_operators, 'fields' => array( array( 'type' => 'select2', 'options' => $this->get_product_tags(), 'placeholder' => __( 'Search for products tags..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_total' => array( 'operator' => $math_operators, 'fields' => array( array( 'type' => 'number', ), ), ), 'cart_coupons' => array( 'operator' => $coupon_operators, 'fields' => array( array( 'type' => 'coupon', 'placeholder' => __( 'Search for coupons..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_shipping_method' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for shipping methods..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_shipping_methods(), ), ), ), 'cart_shipping_country' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for country..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_allowed_countries(), ), ), ), 'cart_billing_country' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for country..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_allowed_countries(), ), ), ), ), ); } /** * Prepare checkout rules settings. */ public function get_checkout_rules_settings() { $string_operators = array( array( 'label' => __( 'matches any of', 'cartflows-pro' ), 'value' => 'any', ), array( 'label' => __( 'matches all of', 'cartflows-pro' ), 'value' => 'all', ), array( 'label' => __( 'matches none of', 'cartflows-pro' ), 'value' => 'none', ), ); $math_operators = array( array( 'label' => __( 'is equal to', 'cartflows-pro' ), 'value' => '==', ), array( 'label' => __( 'is not equal to', 'cartflows-pro' ), 'value' => '!=', ), array( 'label' => __( 'is greater than', 'cartflows-pro' ), 'value' => '>', ), array( 'label' => __( 'is less than', 'cartflows-pro' ), 'value' => '<', ), array( 'label' => __( 'is greater or equal to', 'cartflows-pro' ), 'value' => '>=', ), array( 'label' => __( 'is less or equal to', 'cartflows-pro' ), 'value' => '<=', ), ); $shipping_operators = array( array( 'label' => __( 'matches any of', 'cartflows-pro' ), 'value' => 'any', ), array( 'label' => __( 'matches none of', 'cartflows-pro' ), 'value' => 'none', ), ); $coupon_operators = array( array( 'label' => __( 'matches any of', 'cartflows-pro' ), 'value' => 'any', ), array( 'label' => __( 'matches all of', 'cartflows-pro' ), 'value' => 'all', ), array( 'label' => __( 'matches none of', 'cartflows-pro' ), 'value' => 'none', ), array( 'label' => __( 'exist', 'cartflows-pro' ), 'value' => 'exist', ), array( 'label' => __( 'not exist', 'cartflows-pro' ), 'value' => 'not_exist', ), ); $custom_fields_operators = array( array( 'label' => __( 'is equal to', 'cartflows-pro' ), 'value' => '===', ), array( 'label' => __( 'is not equal to', 'cartflows-pro' ), 'value' => '!==', ), ); return array( 'conditions' => array( array( 'title' => __( 'Order', 'cartflows-pro' ), 'isopt' => true, 'options' => array( array( 'label' => __( 'Product(s)', 'cartflows-pro' ), 'value' => 'cart_item', ), array( 'label' => __( 'Product category(s)', 'cartflows-pro' ), 'value' => 'cart_item_category', ), array( 'label' => __( 'Product tag(s)', 'cartflows-pro' ), 'value' => 'cart_item_tag', ), array( 'label' => __( 'Total', 'cartflows-pro' ), 'value' => 'cart_total', ), array( 'label' => __( 'Coupon(s)', 'cartflows-pro' ), 'value' => 'cart_coupons', ), array( 'label' => __( 'Shipping method', 'cartflows-pro' ), 'value' => 'cart_shipping_method', ), array( 'label' => __( 'Payment Method', 'cartflows-pro' ), 'value' => 'cart_payment_method', ), ), ), array( 'title' => __( 'Geography', 'cartflows-pro' ), 'isopt' => true, 'options' => array( array( 'label' => __( 'Shipping country', 'cartflows-pro' ), 'value' => 'cart_shipping_country', ), array( 'label' => __( 'Billing country', 'cartflows-pro' ), 'value' => 'cart_billing_country', ), ), ), array( 'title' => __( 'Custom Fields', 'cartflows-pro' ), 'isopt' => true, 'options' => array( array( 'label' => __( 'Order Custom Field', 'cartflows-pro' ), 'value' => 'order_custom_field', ), ), ), ), 'field_data' => array( 'cart_item' => array( 'operator' => $string_operators, 'fields' => array( array( 'type' => 'product', 'placeholder' => __( 'Search for products..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_item_category' => array( 'operator' => $string_operators, 'fields' => array( array( 'type' => 'select2', 'options' => $this->get_product_categories(), 'placeholder' => __( 'Search for products cat..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_item_tag' => array( 'operator' => $string_operators, 'fields' => array( array( 'type' => 'select2', 'options' => $this->get_product_tags(), 'placeholder' => __( 'Search for products tags..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_total' => array( 'operator' => $math_operators, 'fields' => array( array( 'type' => 'number', ), ), ), 'cart_coupons' => array( 'operator' => $coupon_operators, 'fields' => array( array( 'type' => 'coupon', 'placeholder' => __( 'Search for coupons..', 'cartflows-pro' ), 'isMulti' => true, ), ), ), 'cart_shipping_method' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for shipping methods..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_shipping_methods(), ), ), ), 'cart_shipping_country' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for country..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_allowed_countries(), ), ), ), 'cart_billing_country' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for country..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_allowed_countries(), ), ), ), 'cart_payment_method' => array( 'operator' => $shipping_operators, 'fields' => array( array( 'type' => 'select2', 'placeholder' => __( 'Search for payment method..', 'cartflows-pro' ), 'isMulti' => true, 'options' => $this->get_supported_payment_methods(), ), ), ), 'order_custom_field' => array( 'operator' => $custom_fields_operators, 'fields' => array( array( 'type' => 'multitext', 'fields' => array( array( 'placeholder' => __( 'Enter custom field meta key', 'cartflows-pro' ), 'name' => 'meta_key', ), array( 'placeholder' => __( 'Expected custom field meta value', 'cartflows-pro' ), 'name' => 'meta_value', ), ), ), ), ), ), ); } /** * Add pro checkout settings. * * @param array $settings settings. */ public function add_checkout_settings_pro_fields( $settings ) { $settings['settings']['advanced']['fields']['wcf-animate-browser-tab'] = array( 'type' => 'toggle', 'label' => __( 'Enable Browser Tab Animation', 'cartflows-pro' ), 'name' => 'wcf-animate-browser-tab', 'is_fullwidth' => true, ); $settings['settings']['advanced']['fields']['wcf-animate-browser-tab-text'] = array( 'type' => 'text', 'label' => __( 'Title Text', 'cartflows-pro' ), 'name' => 'wcf-animate-browser-tab-title', 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-animate-browser-tab', 'operator' => '===', 'value' => 'yes', ), ), ), ); return $settings; } /** * Get supported payment methods. */ public function get_supported_payment_methods() { $payment_method_found = array(); if ( ! class_exists( 'Cartflows_Pro_Gateways' ) ) { return $payment_method_found; } $supported_gateways = array_keys( Cartflows_Pro_Gateways::get_instance()->get_supported_gateways() ); $woo_available_gateways = WC()->payment_gateways->get_available_payment_gateways(); foreach ( $woo_available_gateways as $method_id => $method ) { if ( in_array( $method_id, $supported_gateways, true ) ) { array_push( $payment_method_found, array( 'value' => $method_id, 'label' => $method->method_title, ) ); } } return $payment_method_found; } /** * Get shipping methods. */ public function get_shipping_methods() { $shipping_method_found = array(); foreach ( WC()->shipping()->get_shipping_methods() as $method_id => $method ) { array_push( $shipping_method_found, array( 'value' => $method_id, 'label' => $method->get_method_title(), ) ); } return $shipping_method_found; } /** * Get countries list. */ public function get_allowed_countries() { $countries = WC()->countries->get_allowed_countries(); $countries_found = array(); if ( $countries ) { foreach ( $countries as $key => $country ) { array_push( $countries_found, array( 'value' => $key, 'label' => $country, ) ); } } return $countries_found; } /** * Get product categories. */ public function get_product_categories() { $categories = get_terms( 'product_cat', array( 'hide_empty' => false ) ); $category_found = array(); if ( $categories && ! is_wp_error( $categories ) ) { foreach ( $categories as $category ) { array_push( $category_found, array( 'value' => $category->term_id, 'label' => $category->name, ) ); } } return $category_found; } /** * Get product tags. */ public function get_product_tags() { $terms = get_terms( 'product_tag', array( 'hide_empty' => false ) ); $tags_found = array(); if ( $terms && ! is_wp_error( $terms ) ) { foreach ( $terms as $term ) { array_push( $tags_found, array( 'value' => $term->term_id, 'label' => $term->name, ) ); } } return $tags_found; } /** * Filter checkout values * * @param array $options options. * @param int $step_id step id. */ public function filter_values( $options, $step_id ) { $admin_helper = Cartflows_Pro_Admin_Helper::get_instance(); // @todo Remove this code after v1.7.4 update. // Start. if ( ! empty( $options['wcf-order-bump-product'][0] ) ) { $product_id = intval( $options['wcf-order-bump-product'][0] ); $options['wcf-order-bump-product'] = $admin_helper::get_products_label( array( $product_id ) ); } if ( ! empty( $options['wcf-order-bump-discount-coupon'][0] ) ) { $all_discount_types = wc_get_coupon_types(); $coupon_code = $options['wcf-order-bump-discount-coupon'][0]; $coupon_data = new WC_Coupon( $coupon_code ); $coupon_id = $coupon_data->get_id(); $discount_type = get_post_meta( $coupon_id, 'discount_type', true ); if ( $discount_type ) { $options['wcf-order-bump-discount-coupon'] = array( 'value' => $coupon_code, 'label' => get_the_title( $coupon_id ) . ' (Type: ' . $all_discount_types[ $discount_type ] . ')', ); } } // End. if ( ! empty( $options['wcf-pre-checkout-offer-product'][0] ) ) { $product_id = intval( $options['wcf-pre-checkout-offer-product'][0] ); $options['wcf-pre-checkout-offer-product'] = $admin_helper::get_products_label( array( $product_id ) ); } if ( ! empty( $options['wcf-checkout-discount-coupon'][0] ) ) { $all_discount_types = wc_get_coupon_types(); $coupon_code = $options['wcf-checkout-discount-coupon'][0]; $coupon_data = new WC_Coupon( $coupon_code ); $coupon_id = $coupon_data->get_id(); $discount_type = get_post_meta( $coupon_id, 'discount_type', true ); if ( $discount_type ) { $options['wcf-checkout-discount-coupon'] = array( 'value' => $coupon_code, 'label' => get_the_title( $coupon_id ) . ' (Type: ' . $all_discount_types[ $discount_type ] . ')', ); } } if ( ( isset( $options['wcf-checkout-rules-option'] ) && 'yes' === $options['wcf-checkout-rules-option'] ) && isset( $options['wcf-checkout-rules'] ) ) { $options['wcf-checkout-rules'] = $this->filter_checkout_rules_values( $options['wcf-checkout-rules'] ); } return $options; } /** * Filter checkout rules. * * @param array $conditions conditions data. */ public function filter_checkout_rules_values( $conditions ) { if ( is_array( $conditions ) ) { foreach ( $conditions as $group_index => $group_data ) { if ( is_array( $group_data ) & ! empty( $group_data['rules'] ) ) { $conditions[ $group_index ]['rules'] = $this->filter_rules_data( $group_data['rules'] ); } } } return $conditions; } /** * Filter rule options. * * @param array $rules rule. */ public function filter_rules_data( $rules ) { $admin_helper = Cartflows_Pro_Admin_Helper::get_instance(); foreach ( $rules as $rule_index => $rule_data ) { if ( is_array( $rule_data['value'] ) && ! empty( $rule_data['value'][0] ) ) { switch ( $rule_data['condition'] ) { case 'cart_item': $rules[ $rule_index ]['value'] = $admin_helper::get_products_label( $rule_data['value'] ); break; case 'cart_shipping_method': $rules[ $rule_index ]['value'] = $admin_helper::get_labels( $rule_data['value'] ); break; case 'cart_item_category': $rules[ $rule_index ]['value'] = $admin_helper::get_products_cat_label( $rule_data['value'] ); break; case 'cart_item_tag': $rules[ $rule_index ]['value'] = $admin_helper::get_products_tag_label( $rule_data['value'] ); break; case 'cart_coupons': $rules[ $rule_index ]['value'] = $admin_helper::get_coupons_label( $rule_data['value'] ); break; case 'cart_payment_method': $rules[ $rule_index ]['value'] = $admin_helper::get_payment_methods_label( $rule_data['value'] ); break; case 'cart_shipping_country': case 'cart_billing_country': $rules[ $rule_index ]['value'] = $admin_helper::get_country_label( $rule_data['value'] ); break; default: break; } } } return $rules; } /** * Add meta fields * * @param array $settings checkout fields. * @param int $step_id step id. * @param array $options options. */ public function meta_fields_react( $settings, $step_id, $options ) { $flow_id = get_post_meta( $step_id, 'wcf-flow-id', true ); $opt_steps = Cartflows_Pro_Admin_Helper::get_opt_steps( $step_id ); if ( cartflows_pro_is_active_license() ) { $settings['settings']['coupon']['fields'] = array( 'coupon' => array( 'type' => 'coupon', 'name' => 'wcf-checkout-discount-coupon', 'label' => __( 'Select Coupon', 'cartflows-pro' ), 'placeholder' => __( 'Search for a coupon', 'cartflows-pro' ), 'multiple' => false, 'allow_clear' => true, ), 'coupon-doc' => array( 'type' => 'doc', /* translators: %1$1s: link html start, %2$12: link html end*/ 'content' => sprintf( __( 'For more information about the CartFlows coupon please %1$1s Click here.%2$2s', 'cartflows-pro' ), '', '' ), ), ); $settings['settings']['product-options']['fields'] = array( 'wcf-enable-product-options' => array( 'type' => 'toggle', 'label' => __( 'Enable Product Options', 'cartflows-pro' ), 'name' => 'wcf-enable-product-options', 'is_fullwidth' => true, ), 'wcf-product-options' => array( 'type' => 'radio', 'label' => __( 'Enable Conditions', 'cartflows-pro' ), 'name' => 'wcf-product-options', 'options' => array( array( 'value' => 'force-all', 'label' => __( 'Restrict user to purchase all products', 'cartflows-pro' ), ), array( 'value' => 'single-selection', 'label' => __( 'Let user select one product from all options', 'cartflows-pro' ), ), array( 'value' => 'multiple-selection', 'label' => __( 'Let user select multiple products from all options', 'cartflows-pro' ), ), ), 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-product-options-seperator' => array( 'type' => 'separator', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'enable-variation' => array( 'type' => 'toggle', 'label' => __( 'Enable Variations', 'cartflows-pro' ), 'name' => 'wcf-enable-product-variation', 'is_fullwidth' => true, 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-product-variation-options' => array( 'type' => 'radio', 'label' => '', 'name' => 'wcf-product-variation-options', 'child_class' => 'wcf-child-field', 'options' => array( array( 'value' => 'inline', 'label' => __( 'Show variations inline', 'cartflows-pro' ), ), array( 'value' => 'popup', 'label' => __( 'Show variations in popup', 'cartflows-pro' ), ), ), 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), array( 'name' => 'wcf-enable-product-variation', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-product-variation-options-seperator' => array( 'type' => 'separator', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-enable-product-quantity' => array( 'type' => 'toggle', 'label' => __( 'Enable Quantity', 'cartflows-pro' ), 'name' => 'wcf-enable-product-quantity', 'is_fullwidth' => true, 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'product-option-doc' => array( 'type' => 'doc', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-enable-product-options', 'operator' => '===', 'value' => 'yes', ), ), ), /* translators: %1$1s: link html start, %2$12: link html end*/ 'content' => sprintf( __( 'For more information about the product option settings %1$1s Click here. %2$2s', 'cartflows-pro' ), '', '' ), ), ); } // Multiple order bump options arrays start. $settings['settings']['multiple-order-bump-product']['fields'] = array( 'wcf-ob-replace' => array( 'type' => 'toggle', 'label' => __( 'Replace First Product', 'cartflows-pro' ), 'name' => 'replace_product', /* translators: %1$1s, %2$2s Link to meta */ 'desc' => sprintf( __( 'It will replace the first selected product (from checkout products) with the order bump product. %1$1sLearn More »%2$2s', 'cartflows-pro' ), //phpcs:ignore '', '' ), ), 'wcf-ob-default-state-seperator' => array( 'type' => 'separator', ), 'wcf-ob-default-state' => array( 'type' => 'toggle', 'label' => __( 'Show Pre-Checked', 'cartflows-pro' ), 'name' => 'default_state', 'desc' => __( 'It will pre-check this order bump and add the assigned product to the cart on the checkout page.', 'cartflows-pro' ), ), 'wcf-ob-quantity-field-seperator' => array( 'type' => 'separator', ), 'wcf-ob-quantity-field' => array( 'type' => 'toggle', 'label' => __( 'Enable Quantity Field', 'cartflows-pro' ), 'name' => 'display_quantity_field', 'desc' => __( 'It will display the quantity field in the order bump description.', 'cartflows-pro' ), ), ); if ( class_exists( 'Cartflows_Helper' ) && Cartflows_Helper::get_global_setting( '_cartflows_store_checkout' ) === $flow_id ) { unset( $settings['settings']['multiple-order-bump-product']['fields']['wcf-ob-replace'] ); } $settings['settings']['multiple-order-bump-design']['fields'] = array( // Array of fields which are Categorized in sections. 'ob-section-layout' => array( 'id' => 'layout', 'type' => 'section', 'title' => __( 'Layout', 'cartflows-pro' ), 'section_fields' => array( 'wcf-ob-skin' => array( 'type' => 'select', 'label' => __( 'Order Bump Skin', 'cartflows-pro' ), 'name' => 'style', 'options' => array( array( 'value' => 'style-1', 'label' => esc_html__( 'Style 1', 'cartflows-pro' ), ), array( 'value' => 'style-2', 'label' => esc_html__( 'Style 2', 'cartflows-pro' ), ), array( 'value' => 'style-3', 'label' => esc_html__( 'Style 3', 'cartflows-pro' ), ), array( 'value' => 'style-4', 'label' => esc_html__( 'Style 4', 'cartflows-pro' ), ), array( 'value' => 'style-5', 'label' => esc_html__( 'Style 5', 'cartflows-pro' ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-width' => array( 'type' => 'select', 'label' => __( 'Width', 'cartflows-pro' ), 'name' => 'width', 'options' => array( array( 'value' => '50', 'label' => esc_html__( '50%', 'cartflows-pro' ), ), array( 'value' => '100', 'label' => esc_html__( '100%', 'cartflows-pro' ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-position' => array( 'type' => 'select', 'label' => __( 'Position', 'cartflows-pro' ), 'name' => 'position', 'options' => array( array( 'value' => 'before-checkout', 'label' => esc_html__( 'Before Checkout', 'cartflows-pro' ), ), array( 'value' => 'after-customer', 'label' => esc_html__( 'After Customer Details', 'cartflows-pro' ), ), array( 'value' => 'after-order', 'label' => esc_html__( 'After Order', 'cartflows-pro' ), ), array( 'value' => 'after-payment', 'label' => esc_html__( 'After Payment', 'cartflows-pro' ), ), ), 'display_align' => 'vertical', ), ), ), 'ob-section-colors' => array( 'id' => 'colors', 'type' => 'section', 'title' => __( 'Colors', 'cartflows-pro' ), 'section_fields' => array( 'wcf-ob-desc-color' => array( 'type' => 'color-picker', 'label' => __( 'Description Text Color', 'cartflows-pro' ), 'name' => 'desc_text_color', ), 'wcf-ob-title-color' => array( 'type' => 'color-picker', 'label' => __( 'Title Text Color', 'cartflows-pro' ), 'name' => 'title_text_color', 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-3', 'style-4', 'style-5' ), ), ), ), ), 'wcf-ob-label-color' => array( 'type' => 'color-picker', 'label' => __( 'Label Text Color', 'cartflows-pro' ), 'name' => 'label_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-1', 'style-2' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'checkbox', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-label-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Label Background Color', 'cartflows-pro' ), 'name' => 'label_bg_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-1', 'style-2' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'checkbox', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-button-text-color' => array( 'type' => 'color-picker', 'label' => __( 'Button Text Color', 'cartflows-pro' ), 'name' => 'button_text_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-button-text-hover-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Button Text Hover Color', 'cartflows-pro' ), 'name' => 'button_text_hover_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-button-text-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Button Background Color', 'cartflows-pro' ), 'name' => 'button_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-button-hover-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Button Background Hover Color', 'cartflows-pro' ), 'name' => 'button_hover_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-highlight-text-color' => array( 'type' => 'color-picker', 'label' => __( 'Highlight Text Color', 'cartflows-pro' ), 'name' => 'hl_text_color', 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => '!in', 'value' => array( 'style-3', 'style-4', 'style-5' ), ), ), ), ), 'wcf-ob-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Box Background Color', 'cartflows-pro' ), 'name' => 'bg_color', ), ), ), 'ob-section-borders' => array( 'id' => 'borders', 'type' => 'section', 'title' => __( 'Borders', 'cartflows-pro' ), 'section_fields' => array( 'wcf-ob-label-border-style' => array( 'type' => 'select', 'label' => __( 'Label Border Style', 'cartflows-pro' ), 'name' => 'label_border_style', 'options' => array( array( 'value' => 'inherit', 'label' => esc_html__( 'Default', 'cartflows-pro' ), ), array( 'value' => 'dashed', 'label' => esc_html__( 'Dashed', 'cartflows-pro' ), ), array( 'value' => 'dotted', 'label' => esc_html__( 'Dotted', 'cartflows-pro' ), ), array( 'value' => 'solid', 'label' => esc_html__( 'Solid', 'cartflows-pro' ), ), array( 'value' => 'none', 'label' => esc_html__( 'None', 'cartflows-pro' ), ), ), 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-5' ), ), array( 'name' => 'action_element', 'operator' => '===', 'value' => 'checkbox', ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-label-border-width' => array( 'type' => 'number', 'label' => __( 'Label Border Width', 'cartflows-pro' ), 'name' => 'label_border_width', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-5' ), ), array( 'name' => 'action_element', 'operator' => '===', 'value' => 'checkbox', ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-label-border-radius' => array( 'type' => 'number', 'label' => __( 'Label Border Radius', 'cartflows-pro' ), 'name' => 'label_border_radius', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-5' ), ), array( 'name' => 'action_element', 'operator' => '===', 'value' => 'checkbox', ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-label-border-color' => array( 'type' => 'color-picker', 'label' => __( 'label Border Color', 'cartflows-pro' ), 'name' => 'label_border_color', 'withBg' => true, 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-5' ), ), array( 'name' => 'action_element', 'operator' => '===', 'value' => 'checkbox', ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-button-border-style' => array( 'type' => 'select', 'label' => __( 'Button Border Style', 'cartflows-pro' ), 'name' => 'button_border_style', 'options' => array( array( 'value' => 'inherit', 'label' => esc_html__( 'Default', 'cartflows-pro' ), ), array( 'value' => 'dashed', 'label' => esc_html__( 'Dashed', 'cartflows-pro' ), ), array( 'value' => 'dotted', 'label' => esc_html__( 'Dotted', 'cartflows-pro' ), ), array( 'value' => 'solid', 'label' => esc_html__( 'Solid', 'cartflows-pro' ), ), array( 'value' => 'none', 'label' => esc_html__( 'None', 'cartflows-pro' ), ), ), 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-button-border-width' => array( 'type' => 'number', 'label' => __( 'Button Border Width', 'cartflows-pro' ), 'name' => 'button_border_width', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-button-border-radius' => array( 'type' => 'number', 'label' => __( 'Button Border Radius', 'cartflows-pro' ), 'name' => 'button_border_radius', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-button-border-color' => array( 'type' => 'color-picker', 'withBg' => true, 'label' => __( 'Button Border Color', 'cartflows-pro' ), 'name' => 'button_border_color', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'button', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), 'display_align' => 'vertical', 'withBg' => true, ), 'wcf-ob-box-border-style' => array( 'type' => 'select', 'label' => __( 'Box Border Style', 'cartflows-pro' ), 'name' => 'border_style', 'options' => array( array( 'value' => 'inherit', 'label' => esc_html__( 'Default', 'cartflows-pro' ), ), array( 'value' => 'dashed', 'label' => esc_html__( 'Dashed', 'cartflows-pro' ), ), array( 'value' => 'dotted', 'label' => esc_html__( 'Dotted', 'cartflows-pro' ), ), array( 'value' => 'solid', 'label' => esc_html__( 'Solid', 'cartflows-pro' ), ), array( 'value' => 'none', 'label' => esc_html__( 'None', 'cartflows-pro' ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-box-border-width' => array( 'type' => 'number', 'label' => __( 'Box Border Width', 'cartflows-pro' ), 'name' => 'box_border_width', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'display_align' => 'vertical', ), 'wcf-ob-box-border-radius' => array( 'type' => 'number', 'label' => __( 'Box Border Radius', 'cartflows-pro' ), 'name' => 'box_border_radius', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'display_align' => 'vertical', ), 'wcf-ob-box-border-color' => array( 'type' => 'color-picker', 'withBg' => true, 'label' => __( 'Box Border Color', 'cartflows-pro' ), 'name' => 'border_color', 'display_align' => 'vertical', ), ), ), 'ob-section-shadow' => array( 'id' => 'shadow', 'type' => 'section', 'title' => __( 'Shadows', 'cartflows-pro' ), 'section_fields' => array( 'wcf-ob-box-shadow-horizontal' => array( 'type' => 'number', 'label' => __( 'Horizontal', 'cartflows-pro' ), 'name' => 'box_shadow_horizontal', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'display_align' => 'vertical', ), 'wcf-ob-box-shadow-vertical' => array( 'type' => 'number', 'label' => __( 'Vertical', 'cartflows-pro' ), 'name' => 'box_shadow_vertical', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'display_align' => 'vertical', ), 'wcf-ob-box-shadow-blur' => array( 'type' => 'number', 'label' => __( 'Blur', 'cartflows-pro' ), 'name' => 'box_shadow_blur', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'display_align' => 'vertical', ), 'wcf-ob-box-shadow-spread' => array( 'type' => 'number', 'label' => __( 'Spread', 'cartflows-pro' ), 'name' => 'box_shadow_spread', 'min' => '0', 'afterfield' => 'px', 'width' => '80px', 'display_align' => 'vertical', ), 'wcf-ob-box-shadow-color' => array( 'type' => 'color-picker', 'label' => __( 'Box Shadow Color', 'cartflows-pro' ), 'name' => 'box_shadow_color', 'display_align' => 'vertical', 'withBg' => true, ), ), ), // Array of fields which are kept outside the section. 'wcf-ob-arrow' => array( 'type' => 'toggle', 'label' => __( 'Enable Arrow ', 'cartflows-pro' ), 'name' => 'show_arrow', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-1', 'style-2', 'style-3' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'checkbox', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), ), 'wcf-ob-arrow-animation' => array( 'type' => 'toggle', 'label' => __( 'Enable Animation ', 'cartflows-pro' ), 'name' => 'show_animation', 'conditions' => array( 'fields' => array( array( 'name' => 'show_arrow', 'operator' => '===', 'value' => 'yes', ), array( 'name' => 'style', 'operator' => '!in', 'value' => array( 'style-4' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '===', 'value' => 'checkbox', ), ), ), ), ), ), ); $settings['settings']['multiple-order-bump-content']['fields'] = array( 'heading-ob-bump-action' => array( 'type' => 'heading', 'label' => esc_html__( 'Action Element', 'cartflows-pro' ), 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-5' ), ), ), ), ), 'wcf-ob-action-element' => array( 'type' => 'select', 'label' => __( 'Element', 'cartflows-pro' ), 'name' => 'action_element', 'options' => array( array( 'value' => 'checkbox', 'label' => esc_html__( 'Checkbox', 'cartflows-pro' ), ), array( 'value' => 'button', 'label' => esc_html__( 'Button', 'cartflows-pro' ), ), ), 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-5' ), ), ), ), ), 'wcf-ob-label' => array( 'type' => 'text', 'label' => __( 'Checkbox Label', 'cartflows-pro' ), 'name' => 'checkbox_label', 'conditions' => array( 'relation' => 'or', 'fields' => array( array( 'name' => 'style', 'operator' => 'in', 'value' => array( 'style-1', 'style-2' ), ), array( 'relation' => 'and', 'fields' => array( array( 'name' => 'action_element', 'operator' => '==', 'value' => 'checkbox', ), array( 'name' => 'style', 'operator' => '==', 'value' => 'style-5', ), ), ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-title' => array( 'type' => 'text', 'label' => __( 'Title', 'cartflows-pro' ), 'name' => 'title_text', 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => '!in', 'value' => array( 'style-1', 'style-2' ), ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-highlight-text' => array( 'type' => 'text', 'label' => __( 'Highlight Text', 'cartflows-pro' ), 'name' => 'hl_text', 'conditions' => array( 'fields' => array( array( 'name' => 'style', 'operator' => '!in', 'value' => array( 'style-3', 'style-4', 'style-5' ), ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-product-desc' => array( 'type' => 'wp-editor', 'label' => __( 'Description', 'cartflows-pro' ), 'name' => 'desc_text', 'rows' => '7', 'cols' => '39', 'id' => 'wcf-order-bump-desc-editor', 'desc' => __( 'Use {{product_name}}, {{product_desc}}, {{product_price}} & {{quantity}} to fetch respective product details.', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'wcf-ob-enable-image-option' => array( 'type' => 'checkbox', 'label' => __( 'Enable Image Options', 'cartflows-pro' ), 'name' => 'enable_show_image', ), 'product-image' => array( 'type' => 'image-selector', 'label' => __( 'Product Image', 'cartflows-pro' ), 'name' => 'product_image', 'isNameArray' => true, 'objName' => 'product_img_obj', 'tooltip' => __( 'By default, product image will be shown. If product image is not set then placeholder image will be used as product image.', 'cartflows-pro' ), 'conditions' => array( 'fields' => array( array( 'name' => 'enable_show_image', 'operator' => '===', 'value' => 'yes', ), ), ), 'desc' => __( 'Minimum image size should be 300 X 300 in pixes for ideal display.', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'wcf-ob-image-position' => array( 'type' => 'select', 'label' => __( 'Image Position', 'cartflows-pro' ), 'name' => 'ob_image_position', 'options' => array( array( 'value' => 'left', 'label' => esc_html__( 'Left', 'cartflows-pro' ), ), array( 'value' => 'top', 'label' => esc_html__( 'Top', 'cartflows-pro' ), ), array( 'value' => 'right', 'label' => esc_html__( 'Right', 'cartflows-pro' ), ), ), 'conditions' => array( 'fields' => array( array( 'name' => 'enable_show_image', 'operator' => '===', 'value' => 'yes', ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-image-width' => array( 'type' => 'number', 'label' => __( 'Image Width', 'cartflows-pro' ), 'name' => 'ob_image_width', 'min' => 1, 'afterfield' => 'px', 'width' => '80px', 'tooltip' => __( 'Keep value empty for 100% width', 'cartflows-pro' ), 'conditions' => array( 'fields' => array( array( 'name' => 'enable_show_image', 'operator' => '===', 'value' => 'yes', ), ), ), 'display_align' => 'vertical', ), 'wcf-ob-image-option' => array( 'type' => 'toggle', 'label' => __( 'Show Image on Tab and Mobile', 'cartflows-pro' ), 'name' => 'show_image_mobile', 'conditions' => array( 'fields' => array( array( 'name' => 'enable_show_image', 'operator' => '===', 'value' => 'yes', ), ), ), ), ); $settings['settings']['multiple-order-bump-rules'] = $this->get_ob_rules_data(); // Multiple order bump options arrays end. $common = Cartflows_Helper::get_common_settings(); $pre_checkout_offer = $common['pre_checkout_offer']; if ( 'enable' === $pre_checkout_offer ) { $settings['settings']['checkout-offer-product']['fields'] = array( 'wcf-co-product' => array( 'type' => 'product', 'label' => __( 'Select Product', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-product', 'excluded_product_types' => array( 'grouped' ), 'include_product_types' => array( 'braintree-subscription', 'braintree-variable-subscription' ), 'placeholder' => __( 'Type to search for a product', 'cartflows-pro' ), 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-co-discount' => array( 'type' => 'select', 'label' => __( 'Discount Type', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-discount', 'display_align' => 'vertical', 'options' => array( array( 'value' => '', 'label' => esc_html__( 'Original', 'cartflows-pro' ), ), array( 'value' => 'discount_percent', 'label' => esc_html__( 'Discount Percentage', 'cartflows-pro' ), ), array( 'value' => 'discount_price', 'label' => esc_html__( 'Discount Price', 'cartflows-pro' ), ), ), 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-co-dicount-value' => array( 'type' => 'number', 'label' => __( 'Discount Value', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-discount-value', 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), array( 'name' => 'wcf-pre-checkout-offer-discount', 'operator' => 'in', 'value' => array( 'discount_price', 'discount_percent' ), ), ), ), ), 'wcf-co-original-price' => array( 'type' => 'text', 'label' => __( 'Original Price', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-product[original_price]', 'tooltip' => __( 'This is the unit price of product', 'cartflows-pro' ), 'readonly' => true, 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'wcf-co-sell-price' => array( 'type' => 'text', 'label' => __( 'Sell Price', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-product[sell_price]', 'tooltip' => __( 'This is the unit discounted price of product', 'cartflows-pro' ), 'readonly' => true, 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), ); $settings['settings']['checkout-offer-content']['fields'] = array( 'checkout-offer-title' => array( 'type' => 'text', 'label' => __( 'Title Text', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-popup-title', 'placeholder' => esc_html__( '{first_name}, Wait! Your Order Is Almost Complete...', 'cartflows-pro' ), 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-subtitle' => array( 'type' => 'text', 'label' => __( 'Sub-title Text', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-popup-sub-title', 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-product-title' => array( 'type' => 'text', 'label' => __( 'Product Title', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-product-title', 'help' => esc_html__( 'Enter to override default product title.', 'cartflows-pro' ), 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-product-desc' => array( 'type' => 'wp-editor', 'label' => __( 'Product Description', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-desc', 'id' => 'wcf-pre-checkout-offer-desc-editor', 'placeholder' => esc_html__( 'Write a few words about this awesome product and tell shoppers why they must get it. You may highlight this as "one time offer" and make it irresistible.', 'cartflows-pro' ), 'display_align' => 'vertical', 'rows' => '7', 'cols' => '39', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-button-text' => array( 'type' => 'text', 'label' => __( 'Order Button Text', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-popup-btn-text', 'placeholder' => esc_html__( 'Yes, Add to My Order!', 'cartflows-pro' ), 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-skip-button-text' => array( 'type' => 'text', 'label' => __( 'Skip Button Text', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-popup-skip-btn-text', 'placeholder' => esc_html__( 'No, thanks!', 'cartflows-pro' ), 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), ); $settings['settings']['checkout-offer-styles']['fields'] = array( 'checkout-offer-style=section' => array( 'id' => 'co-color', 'type' => 'color', 'title' => __( 'Colors', 'cartflows-pro' ), 'section_fields' => array( 'checkout-offer-navbar-color' => array( 'type' => 'color-picker', 'label' => __( 'NavBar Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-navbar-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-title-color' => array( 'type' => 'color-picker', 'label' => __( 'Title Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-title-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-subtitle-color' => array( 'type' => 'color-picker', 'label' => __( 'Subtitle Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-subtitle-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-desc-color' => array( 'type' => 'color-picker', 'label' => __( 'Description Text Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-desc-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-button-color' => array( 'type' => 'color-picker', 'label' => __( 'Button Text Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-button-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Overlay Background Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-bg-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-offer-overlay-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Background Color', 'cartflows-pro' ), 'name' => 'wcf-pre-checkout-offer-model-bg-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-pre-checkout-offer', 'operator' => '===', 'value' => 'yes', ), ), ), ), ), ), ); } $settings['settings']['checkout-settings']['fields']['wcf-animate-browser-tab'] = array( 'type' => 'toggle', 'label' => __( 'Enable Browser Tab Animation', 'cartflows-pro' ), 'name' => 'wcf-animate-browser-tab', 'is_fullwidth' => true, ); $settings['settings']['checkout-settings']['fields']['wcf-animate-browser-tab-text'] = array( 'type' => 'text', 'label' => __( 'Title Text', 'cartflows-pro' ), 'name' => 'wcf-animate-browser-tab-title', 'display_align' => 'vertical', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-animate-browser-tab', 'operator' => '===', 'value' => 'yes', ), ), ), ); $settings['settings']['rules'] = $this->get_checkout_rules_settings(); return $settings; } /** * Add meta fields * * @param array $settings checkout fields. * @param array $options options. * @param array $flow_id flow id. */ public function design_fields_react( $settings, $options, $flow_id ) { $settings['settings']['checkout-two-step-design'] = array( 'title' => __( 'Two-Step Design', 'cartflows-pro' ), 'slug' => 'two_step_design', 'priority' => 40, 'conditions' => array( 'relation' => 'and', 'fields' => array( array( 'name' => 'wcf-checkout-layout', 'operator' => '===', 'value' => 'two-step', ), ), ), 'fields' => array( 'checkout-note' => array( 'type' => 'toggle', 'label' => __( 'Enable Note Text', 'cartflows-pro' ), 'name' => 'wcf-checkout-box-note', 'after' => esc_html__( 'Enable Checkout Note', 'cartflows-pro' ), 'is_fullwidth' => true, ), 'checkout-note-text' => array( 'type' => 'text', 'label' => __( 'Note Text', 'cartflows-pro' ), 'name' => 'wcf-checkout-box-note-text', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-checkout-box-note', 'operator' => '===', 'value' => 'yes', ), ), ), 'display_align' => 'vertical', ), 'checkout-note-text-color' => array( 'type' => 'color-picker', 'label' => __( 'Text Color', 'cartflows-pro' ), 'name' => 'wcf-checkout-box-note-text-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-checkout-box-note', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'checkout-note-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Note Box Background Color', 'cartflows-pro' ), 'name' => 'wcf-checkout-box-note-bg-color', 'conditions' => array( 'fields' => array( array( 'name' => 'wcf-checkout-box-note', 'operator' => '===', 'value' => 'yes', ), ), ), ), 'step-one-title' => array( 'type' => 'text', 'label' => __( 'Step One Title', 'cartflows-pro' ), 'name' => 'wcf-checkout-step-one-title', 'display_align' => 'vertical', ), 'step-one-subtitle' => array( 'type' => 'text', 'label' => __( 'Step One Sub Title', 'cartflows-pro' ), 'name' => 'wcf-checkout-step-one-sub-title', 'display_align' => 'vertical', ), 'step-two-title' => array( 'type' => 'text', 'label' => __( 'Step Two Title', 'cartflows-pro' ), 'name' => 'wcf-checkout-step-two-title', 'display_align' => 'vertical', ), 'step-two-subtitle' => array( 'type' => 'text', 'label' => __( 'Step Two Sub Title', 'cartflows-pro' ), 'name' => 'wcf-checkout-step-two-sub-title', 'display_align' => 'vertical', ), 'step-section-width' => array( 'type' => 'number', 'label' => __( 'Step Section Width', 'cartflows-pro' ), 'name' => 'wcf-checkout-two-step-section-width', 'display_align' => 'vertical', ), 'step-border' => array( 'type' => 'select', 'label' => __( 'Step Border', 'cartflows-pro' ), 'name' => 'wcf-checkout-two-step-section-border', 'display_align' => 'vertical', 'options' => array( array( 'value' => 'none', 'label' => esc_html__( 'None', 'cartflows-pro' ), ), array( 'value' => 'solid', 'label' => esc_html__( 'Solid', 'cartflows-pro' ), ), ), ), 'offer-button-title' => array( 'type' => 'text', 'label' => __( 'Offer Button Title', 'cartflows-pro' ), 'name' => 'wcf-checkout-offer-button-title', 'display_align' => 'vertical', ), 'offer-button-subtitle' => array( 'type' => 'text', 'label' => __( 'Offer Button Sub Title', 'cartflows-pro' ), 'name' => 'wcf-checkout-offer-button-sub-title', 'display_align' => 'vertical', ), ), ); if ( absint( Cartflows_Helper::get_global_setting( '_cartflows_store_checkout' ) ) === $flow_id && ! apply_filters( 'cartflows_show_store_checkout_product_tab', false ) ) { return $settings; } $settings['settings']['product-option-design'] = array( 'title' => __( 'Product Options', 'cartflows-pro' ), 'slug' => 'product_options', 'priority' => 50, 'fields' => array( 'product-options-title' => array( 'type' => 'text', 'label' => __( 'Section Title', 'cartflows-pro' ), 'name' => 'wcf-product-opt-title', 'placeholder' => esc_html__( 'Your Products', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'product-options-position' => array( 'type' => 'select', 'label' => __( 'Section Position', 'cartflows-pro' ), 'name' => 'wcf-your-products-position', 'display_align' => 'vertical', 'options' => array( array( 'value' => 'before-customer', 'label' => __( 'Before Checkout Section', 'cartflows-pro' ), ), array( 'value' => 'after-customer', 'label' => __( 'After Customer Details', 'cartflows-pro' ), ), array( 'value' => 'before-order', 'label' => __( 'Before Order Review', 'cartflows-pro' ), ), ), ), 'product-options-skin' => array( 'type' => 'select', 'label' => __( 'Skins', 'cartflows-pro' ), 'name' => 'wcf-product-options-skin', 'display_align' => 'vertical', 'options' => array( array( 'value' => 'classic', 'label' => __( 'Classic', 'cartflows-pro' ), ), array( 'value' => 'cards', 'label' => __( 'Cards', 'cartflows-pro' ), ), ), ), 'product-options-image' => array( 'type' => 'toggle', 'label' => __( 'Show Product Images', 'cartflows-pro' ), 'name' => 'wcf-show-product-images', 'tooltip' => __( 'It will add images on checkout page.', 'cartflows-pro' ), 'is_fullwidth' => true, ), 'product-options-product-text-color' => array( 'type' => 'color-picker', 'label' => __( 'Product Text Color', 'cartflows-pro' ), 'name' => 'wcf-yp-text-color', ), 'product-options-product-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Product Background Color', 'cartflows-pro' ), 'name' => 'wcf-yp-bg-color', ), 'product-options-hl-text-color' => array( 'type' => 'color-picker', 'label' => __( 'Highlight Product Text Color', 'cartflows-pro' ), 'name' => 'wcf-yp-hl-text-color', ), 'product-options-hl-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Highlight Product Background Color', 'cartflows-pro' ), 'name' => 'wcf-yp-hl-bg-color', ), 'product-options-hl-box-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Highlight Box Border Color', 'cartflows-pro' ), 'name' => 'wcf-yp-hl-border-color', ), 'product-options-hl-flag-text-color' => array( 'type' => 'color-picker', 'label' => __( 'Highlight Flag Text Color', 'cartflows-pro' ), 'name' => 'wcf-yp-hl-flag-text-color', ), 'product-options-hl-flag-bg-color' => array( 'type' => 'color-picker', 'label' => __( 'Highlight Flag Background Color', 'cartflows-pro' ), 'name' => 'wcf-yp-hl-flag-bg-color', ), ), ); return $settings; } /** * Add custom meta fields * * @param string $id id. */ public function get_product_option_fields( $id ) { $data = wcf()->options->get_checkout_meta_value( $id, 'wcf-product-options-data' ); $checkout_products = wcf_pro()->utils->get_selected_product_options_data( $id, $data ); $product_option_data = array(); if ( ! empty( $checkout_products ) ) { foreach ( $checkout_products as $key => $value ) { if ( ! isset( $value['product'] ) || empty( $value['product'] ) ) { return; } $product = wc_get_product( $value['product'] ); if ( ! is_object( $product ) ) { continue; } $product_id = $product->get_id(); $product_name = $product->get_name(); $unique_id = isset( $value['unique_id'] ) ? $value['unique_id'] : ''; $selected_data = array( 'product_name' => $product_name, 'product_id' => $product_id, 'key' => $key, 'input_product_name' => isset( $value['product_name'] ) ? $value['product_name'] : $product_name, 'input_subtext' => isset( $value['product_subtext'] ) ? $value['product_subtext'] : '', 'input_enable_highlight' => isset( $value['enable_highlight'] ) ? $value['enable_highlight'] : '', 'input_highlight_text' => isset( $value['highlight_text'] ) ? $value['highlight_text'] : '', 'add_to_cart' => isset( $value['add_to_cart'] ) ? $value['add_to_cart'] : 'yes', 'unique_id' => $unique_id, ); $product_option_data[ $key ] = $selected_data; } } return $product_option_data; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Checkout_Meta_Data::get_instance(); modules/checkout/classes/class-cartflows-pro-checkout-rules.php000064400000037017147600244370021046 0ustar00logger->log( 'Start - ' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'Before returning next step: ' . $next_step_id ); $cache = true; if ( null === self::$dynamic_step_id ) { $is_rules_enabled = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-rules-option' ); if ( 'no' === $is_rules_enabled ) { $step_id = $next_step_id; $cache = false; } else { $this->set_order_data( $order ); $group_result = false; $conditions = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-rules' ); foreach ( $conditions as $group_index => $group_data ) { if ( ! empty( $group_data['rules'] ) ) { $group_result = $this->get_group_rules_result( $group_data['rules'], $order ); // If group result is true then return step_id. if ( $group_result ) { $next_step_id = '' === $group_data['step_id'] && ! get_post_status( intval( $group_data['step_id'] ) ) ? $next_step_id : $group_data['step_id']; wcf()->logger->log( 'Group Result is true, Next Step ID : ' . $next_step_id ); break; } } } // If all group are false then refirect to step selected in default step field. if ( false === $group_result ) { $default_step = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-checkout-rules-default-step' ); $next_step_id = empty( $default_step ) ? $next_step_id : $default_step; wcf()->logger->log( 'Group Result is false, Next Step: ' . $next_step_id ); } self::$order_data = null; $step_id = $next_step_id; } } $step_id = null !== self::$dynamic_step_id ? self::$dynamic_step_id : $step_id; // Current step is offer step but the supported gateway is not used then don't redirect to the offer step. if ( wcf()->utils->check_is_offer_page( $step_id ) && ! $this->is_supported_gateway_used( $order ) ) { $order_gateway = ! empty( $order->get_payment_method() ) ? $order->get_payment_method() : __( 'No gateway found', 'cartflows-pro' ); wcf()->logger->log( 'Skipping the dynamic condition for ' . $step_id . ' step. Reason: The gateway "' . $order_gateway . '" is not in the supported for upsell/downsell offers.' ); // Get the next step for the current step. $wcf_step_obj = wcf_pro_get_step( $step_id ); $step_to_redirect = $wcf_step_obj->get_next_step_id(); /* Get next step redirect URL */ $step_id = $wcf_step_obj->get_next_step_from_given_step( $step_id, $step_to_redirect ); // Skip all of the next offers steps in the flow till it reaches to the thank yo page. if ( wcf()->utils->check_is_offer_page( $step_id ) ) { $step_id = $wcf_step_obj->get_next_step_from_given_step( $step_id, $step_to_redirect ); } } if ( wcf()->utils->check_is_offer_page( $step_id ) ) { $step_id = Cartflows_Pro_Base_Offer_Markup::get_instance()->maybe_skip_offer( $step_id, $order ); } if ( $cache ) { self::$dynamic_step_id = $step_id; } wcf()->logger->log( 'Final returning next step: ' . $step_id ); wcf()->logger->log( 'End - ' . __CLASS__ . '::' . __FUNCTION__ ); return $step_id; } /** * Set order data. * * @param object $order order data. */ public function set_order_data( $order ) { $order_items = $order->get_items(); $products_ids = array(); foreach ( $order_items as $item_id => $item ) { $product_id = $item->get_product_id(); $variation_id = $item->get_variation_id(); $products_ids[] = ! empty( $variation_id ) ? $variation_id : $product_id; } self::$order_data['product_ids'] = $products_ids; self::$order_data['order_obj'] = $order; } /** * Check if the supported payment gateway is used on the checkout page or not. * * @param WC_Order $order The Current order object. * @since x.x.x * @return bool $is_supported Is supported gateway used or not */ public function is_supported_gateway_used( $order ) { $is_supported = false; $order_gateway = $order->get_payment_method(); $supported_gateways = array_keys( Cartflows_Pro_Gateways::get_instance()->get_supported_gateways() ); if ( in_array( $order_gateway, $supported_gateways, true ) ) { $is_supported = true; } // Check for supported payment methods of Stripe Payment Element and exclude unsupported ones. if ( 'cpsw_stripe_element' === $order_gateway ) { $payment_method = $order->get_meta( 'wcf_cpsw_selected_payment_type', true ); // Define an extensible array of supported payment methods for Stripe Payment Element. $supported_payment_methods = array( 'card' ); if ( $payment_method && ! in_array( $payment_method, $supported_payment_methods, true ) ) { $is_supported = false; } } return $is_supported; } /** * Get Group result. * * @param array $rules rules. */ public function get_group_rules_result( $rules ) { $result = true; foreach ( $rules as $rule_index => $rule_data ) { $operator = $rule_data['operator']; $value = $rule_data['value']; switch ( $rule_data['condition'] ) { case 'cart_item': $result = $this->compare_string_values( self::$order_data['product_ids'], $value, $operator ); break; case 'cart_item_category': $item_terms = $this->get_order_items_categories(); $result = $this->compare_string_values( $item_terms, $value, $operator ); break; case 'cart_item_tag': $item_terms = $this->get_order_items_tags(); $result = $this->compare_string_values( $item_terms, $value, $operator ); break; case 'cart_total': $order_total = $this->get_order_total(); $result = $this->compare_number_values( $order_total, $value, $operator ); break; case 'cart_coupons': $coupon_used = $this->get_order_coupons(); $coupon_used = ! empty( $coupon_used ) && is_array( $coupon_used ) ? array_map( 'strtolower', $coupon_used ) : $coupon_used; $value = ! empty( $value ) && is_array( $value ) ? array_map( 'strtolower', $value ) : $value; $result = $this->compare_string_values( $coupon_used, $value, $operator ); break; case 'cart_shipping_method': $shipping_methods = $this->get_order_shipping_method(); $result = $this->compare_string_values( $shipping_methods, $value, $operator ); break; case 'cart_shipping_country': $shipping_country = $this->get_order_shipping_country(); $result = $this->compare_string_values( $shipping_country, $value, $operator ); break; case 'cart_billing_country': $billing_country = $this->get_order_billing_country(); $result = $this->compare_string_values( $billing_country, $value, $operator ); break; case 'cart_payment_method': $payment_method = $this->get_order_payment_method(); $result = $this->compare_string_values( $payment_method, $value, $operator ); break; case 'order_custom_field': $meta_key_to_check = $this->get_order_custom_meta_key_value( $value ); $meta_value = is_array( $value ) && isset( $value['meta_value'] ) ? array( $value['meta_value'] ) : $value; $result = $this->compare_string_values( $meta_key_to_check, $meta_value, $operator ); break; default: $result = false; } // If one of rule is false break the loop. if ( false === $result ) { break; } } return $result; } /** * Get order item categories. */ public function get_order_items_categories() { $item_terms = array(); if ( isset( self::$order_data['item_categories'] ) ) { $item_terms = self::$order_data['item_categories']; } else { $products_ids = self::$order_data['product_ids']; foreach ( $products_ids as $index => $product_id ) { // Get Product object. $product = wc_get_product( $product_id ); /** * Check the type of the product. * * This condition is added to get the product categories. * As varation of a product is getting purchased and it does not contains the categories. */ if ( $product->is_type( 'variation' ) ) { $product_id = $product->get_parent_id(); } $cat_terms = wp_get_object_terms( $product_id, 'product_cat', array( 'fields' => 'ids' ) ); $item_terms = array_merge( $item_terms, $cat_terms ); } self::$order_data['item_categories'] = $item_terms; } return $item_terms; } /** * Get order item tags. */ public function get_order_items_tags() { $item_terms = array(); if ( isset( self::$order_data['item_tags'] ) ) { $item_terms = self::$order_data['item_tags']; } else { $products_ids = self::$order_data['product_ids']; foreach ( $products_ids as $index => $product_id ) { // Get Product object. $product = wc_get_product( $product_id ); /** * Check the type of the product. * * This condition is added to get the product categories. * As varation of a product is getting purchased and it does not contains the tags. */ if ( $product->is_type( 'variation' ) ) { $product_id = $product->get_parent_id(); } $tag_terms = wp_get_object_terms( $product_id, 'product_tag', array( 'fields' => 'ids' ) ); $item_terms = array_merge( $item_terms, $tag_terms ); } self::$order_data['item_tags'] = $item_terms; } return $item_terms; } /** * Get order shipping method. */ public function get_order_shipping_method() { $shipping_methods = array(); if ( isset( self::$order_data['shipping_method'] ) ) { $shipping_methods = self::$order_data['shipping_method']; } else { foreach ( self::$order_data['order_obj']->get_shipping_methods() as $method ) { // extract method slug only, discard instance id. $split = strpos( $method['method_id'], ':' ); if ( $split ) { $shipping_methods[] = substr( $method['method_id'], 0, $split ); } else { $shipping_methods[] = $method['method_id']; } } self::$order_data['shipping_method'] = $shipping_methods; } return $shipping_methods; } /** * Get order coupons. */ public function get_order_coupons() { $coupon_used = array(); if ( isset( self::$order_data['coupon_used'] ) ) { $coupon_used = self::$order_data['coupon_used']; } else { $coupon_used = self::$order_data['order_obj']->get_used_coupons(); self::$order_data['coupon_used'] = $coupon_used; } return $coupon_used; } /** * Get order total. */ public function get_order_total() { $order_total = array(); if ( isset( self::$order_data['order_total'] ) ) { $order_total = self::$order_data['order_total']; } else { $order_total = self::$order_data['order_obj']->get_total(); self::$order_data['order_total'] = $order_total; } return $order_total; } /** * Get order billing country. */ public function get_order_billing_country() { $billing_country = array(); if ( isset( self::$order_data['billing_country'] ) ) { $billing_country = self::$order_data['billing_country']; } else { $billing_country = array( self::$order_data['order_obj']->get_billing_country() ); self::$order_data['billing_country'] = $billing_country; } return $billing_country; } /** * Get order shipping country. */ public function get_order_shipping_country() { $shipping_country = array(); if ( isset( self::$order_data['shipping_country'] ) ) { $shipping_country = self::$order_data['shipping_country']; } else { $shipping_country = array( self::$order_data['order_obj']->get_shipping_country() ); self::$order_data['shipping_country'] = $shipping_country; } return $shipping_country; } /** * Get order payment method. */ public function get_order_payment_method() { $payment_method = array(); if ( isset( self::$order_data['payment_method'] ) ) { $payment_method = self::$order_data['payment_method']; } else { $payment_method = array( self::$order_data['order_obj']->get_payment_method() ); self::$order_data['payment_method'] = $payment_method; } return $payment_method; } /** * Get custom field value from the order. * * @param array $value array of values. */ public function get_order_custom_meta_key_value( $value ) { $order_custom_field = array(); $meta_key = is_array( $value ) && isset( $value['meta_key'] ) ? '_' . $value['meta_key'] : $value; if ( self::$order_data['order_obj'] ) { $order_custom_field = array( self::$order_data['order_obj']->get_meta( $meta_key, true ) ); } return $order_custom_field; } /** * Compare string values. * * @param array $order_values order values. * @param array $rule_values rules values. * @param object $operator rule operator. */ public function compare_string_values( $order_values, $rule_values, $operator ) { switch ( $operator ) { case 'all': $result = count( array_intersect( $rule_values, $order_values ) ) === count( $rule_values ); break; case 'any': $result = count( array_intersect( $rule_values, $order_values ) ) >= 1; break; case 'none': $result = ( count( array_intersect( $rule_values, $order_values ) ) === 0 ); break; case 'exist': $result = ( count( $order_values ) >= 1 ); break; case 'not_exist': $result = ( count( $order_values ) === 0 ); break; case '===': $result = count( array_intersect( $rule_values, $order_values ) ) === 1; break; case '!==': $result = count( array_intersect( $rule_values, $order_values ) ) === 0; break; default: $result = false; break; } return $result; } /** * Compare string values. * * @param string $order_value order values. * @param array $rule_value rules values. * @param string $operator rule operator. */ public function compare_number_values( $order_value, $rule_value, $operator ) { // Convert the encoded operator at the time of sanitizing back to HTML entity for comparison. $operator = htmlspecialchars_decode( $operator ); switch ( $operator ) { case '==': $result = $order_value === $rule_value; break; case '!=': $result = $order_value !== $rule_value; break; case '>': $result = $order_value > $rule_value; break; case '<': $result = $order_value < $rule_value; break; case '<=': $result = $order_value <= $rule_value; break; case '>=': $result = $order_value >= $rule_value; break; default: $result = false; break; } return $result; } } /** * Prepare if class 'Cartflows_Pro_Checkout_Rules' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Checkout_Rules::get_instance(); modules/checkout/classes/class-cartflows-pro-checkout-tab-animation.php000064400000003750147600244370022434 0ustar00ID; $this->add_frontend_localize_animate_scripts( $checkout_id ); } /** * Add localize script for animate title. * * @param int $checkout_id Checkout id. */ public function add_frontend_localize_animate_scripts( $checkout_id ) { $localize['enabled'] = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-animate-browser-tab' ); $localize['title'] = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-animate-browser-tab-title' ); $localize_script = ''; $localize_script .= ''; // Reason for PHPCS ignore: Used to localize the strings which will be displayed on the browser's tab. echo $localize_script; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Prepare if class 'Cartflows_Pro_Admin' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Checkout_Tab_Animation::get_instance(); modules/checkout/classes/class-cartflows-pro-order-bump-product.php000064400000144165147600244370021646 0ustar00dynamic_ob_compatibility_po_events(); add_action( 'wcf_after_order_bump_process', array( $this, 'dynamic_ob_compatibility_ob_events' ), 10, 1 ); } /** * Dynamic order bump compatibility with product options events. * * @return void */ public function dynamic_ob_compatibility_po_events() { $product_option_events = array( 'wcf_after_quantity_update', 'wcf_after_force_all_selection', 'wcf_after_multiple_selection', 'wcf_after_single_selection', ); foreach ( $product_option_events as $event ) { add_action( $event, array( $this, 'order_bump_fragments_actions' ), 20, 1 ); } } /** * Trigger after product option change to prepare order bump fragment. * * Works only when the product options is modified. * * @param int $product_id Product ID. * * @return void */ public function order_bump_fragments_actions( $product_id ) { if ( ! empty( $_GET['wcf_checkout_id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended add_filter( 'woocommerce_update_order_review_fragments', array( $this, 'add_order_bump_fragments' ) ); } } /** * Dynamic order bump compatibility with order bumps events. * * @param array $ob_data Processed Order Bump data. * * @return void */ public function dynamic_ob_compatibility_ob_events( $ob_data ) { if ( ! empty( $_GET['wcf_checkout_id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended add_filter( 'woocommerce_update_order_review_fragments', array( $this, 'add_order_bump_fragments' ) ); } } /** * Update fragments based on conditions. * * @param array $fragments Fragments. * * @return array $fragments Updated Fragments. */ public function add_order_bump_fragments( $fragments ) { if ( ! empty( $_GET['wcf_checkout_id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $checkout_id = intval( $_GET['wcf_checkout_id'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $sorted_order_bumps = $this->get_sorted_order_bumps( $checkout_id ); // Update the order review fragment as some order bumps are not visible on checkout and they'r removed from cart in above function. $woocommerce_order_review = cartflows_woocommerce_order_review(); $fragments['.woocommerce-checkout-review-order-table'] = $woocommerce_order_review; if ( ! empty( $sorted_order_bumps ) && is_array( $sorted_order_bumps ) ) { foreach ( $sorted_order_bumps as $position => $order_bumps ) { $fragments[ '.wcf-all-bump-order-wrap.wcf-' . $position ] = $this->get_order_bumps_markup( $checkout_id, $order_bumps, $position ); } } // Compatibility to edit cart option. if ( WC()->cart->is_empty() ) { $fragments['form.woocommerce-checkout'] = '
    ' . __( 'Sorry, your session has expired.', 'cartflows-pro' ) . '
    '; } } return $fragments; } /** * To show order bump dynamically after update order review. * * @param array $post_data Post data. */ public function dynamic_order_bump( $post_data ) { if ( ! empty( $_GET['wcf_checkout_id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $checkout_id = intval( $_GET['wcf_checkout_id'] ); // phpcs:ignore $sorted_order_bumps = $this->get_sorted_order_bumps( $checkout_id ); $this->render_before_checkout_order_bumps( isset( $sorted_order_bumps['before-checkout'] ) ? $sorted_order_bumps['before-checkout'] : array() ); $this->render_after_customer_order_bumps( isset( $sorted_order_bumps['after-customer'] ) ? $sorted_order_bumps['after-customer'] : array() ); $this->render_after_order_order_bumps( isset( $sorted_order_bumps['after-order'] ) ? $sorted_order_bumps['after-order'] : array() ); $this->render_after_payment_order_bumps( isset( $sorted_order_bumps['after-payment'] ) ? $sorted_order_bumps['after-payment'] : array() ); add_filter( 'woocommerce_update_order_review_fragments', array( $this, 'add_order_bump_fragments' ) ); } } /** * Get all order bumps. * * @param int $checkout_id checkout id. */ public function get_all_order_bumps( $checkout_id ) { $multi_ob = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bumps' ); // For backword compatibility until users migrate old order bump to new one. // @todo Remove this block of code after v1.7.3 release. // Start. if ( empty( $multi_ob ) && 'yes' !== get_post_meta( $checkout_id, 'wcf-order-bump-migrated', true ) && 'yes' === wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump' ) ) { $product = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-product' ); $product_image = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-image' ); $show_image_mobile = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-show-bump-image-mobile' ); $show_image_mobile = 'yes' === $show_image_mobile ? 'no' : 'yes'; $old_ob = array( 'status' => true, 'product' => isset( $product[0] ) ? $product[0] : '', 'product_image' => $product_image, 'quantity' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-product-quantity' ), 'discount_type' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-discount' ), 'discount_value' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-discount-value' ), 'discount_coupon' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-discount-coupon' ), 'product_img_obj' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-image-obj' ), 'checkbox_label' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-label' ), 'title_text' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-title' ), 'hl_text' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-hl-text' ), 'desc_text' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-desc' ), 'replace_product' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-replace' ), 'next_step' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-ob-yes-next-step' ), 'position' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-position' ), 'enable_show_image' => ! empty( $product_image ) ? 'yes' : 'no', 'ob_image_position' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-image-position' ), 'ob_image_width' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-image-width' ), 'show_image_mobile' => $show_image_mobile, 'style' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bump-style' ), 'border_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-border-color' ), 'border_style' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-border-style' ), 'bg_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-bg-color' ), 'label_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-label-color' ), 'label_bg_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-label-bg-color' ), 'desc_text_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-desc-text-color' ), 'hl_text_color' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-bump-hl-text-color' ), 'show_arrow' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-show-bump-arrow' ), 'show_animation' => wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-show-bump-animate-arrow' ), ); array_push( $multi_ob, $old_ob ); } // End. return $multi_ob; } /** * Get sorted order bumps. * * @param int $checkout_id checkout id. */ public function get_sorted_order_bumps( $checkout_id ) { $all_order_bumps = $this->get_all_order_bumps( $checkout_id ); $sorted_order_bumps = array(); $bump_action = isset( $_POST['_wcf_bump_product_action'] ) ? sanitize_text_field( $_POST['_wcf_bump_product_action'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing $posted_ob_data = isset( $_POST['_bump_offer_data'] ) ? json_decode( sanitize_text_field( wp_unslash( $_POST['_bump_offer_data'] ) ), true ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing // If order bump exist in multiple order bumps. if ( is_array( $all_order_bumps ) && ! empty( $all_order_bumps ) ) { $sorted_order_bumps = array( 'before-checkout' => array(), 'after-customer' => array(), 'after-order' => array(), 'after-payment' => array(), ); foreach ( $all_order_bumps as $index => $order_bump_data ) { // If no product assigned then continue to next order bump. if ( false === $order_bump_data['status'] || empty( $order_bump_data['product'] ) ) { continue; } $is_visible = Cartflows_Pro_Order_Bump_Rules::get_instance()->is_order_bump_visble( $order_bump_data ); if ( ! $is_visible ) { foreach ( WC()->cart->get_cart() as $key => $item ) { if ( isset( $item['cartflows_bump'] ) && $item['ob_id'] === $order_bump_data['id'] ) { WC()->cart->remove_cart_item( $key ); } } continue; } else { $ob_data = $this->prepare_ob_data( $checkout_id, $order_bump_data['id'] ); $is_pre_checked = isset( $order_bump_data['default_state'] ) && 'yes' === $order_bump_data['default_state']; $found_data = $this->get_item_key_for_order_bump( $ob_data ); $found_item = $found_data['found_item']; if ( 'add_bump_product' === $bump_action && $order_bump_data['id'] === $posted_ob_data['ob_id'] ) { if ( $is_pre_checked && empty( $found_data['found_item_key'] ) ) { // Add the Order Bump product if not already in the cart. $this->add_order_bump_product( $ob_data ); } elseif ( isset( $ob_data['order_bump_qty'] ) ) { // Update the quantity for the Order Bump product. $order_bump_data['order_bump_qty'] = $ob_data['order_bump_qty']; } } elseif ( isset( $found_item['quantity'] ) ) { // Default to the quantity found in the cart for the Order Bump product. $order_bump_data['order_bump_qty'] = $found_item['quantity']; } } if ( 'before-checkout' === $order_bump_data['position'] ) { array_push( $sorted_order_bumps['before-checkout'], $order_bump_data ); } if ( 'after-customer' === $order_bump_data['position'] ) { array_push( $sorted_order_bumps['after-customer'], $order_bump_data ); } if ( 'after-order' === $order_bump_data['position'] ) { array_push( $sorted_order_bumps['after-order'], $order_bump_data ); } if ( 'after-payment' === $order_bump_data['position'] ) { array_push( $sorted_order_bumps['after-payment'], $order_bump_data ); } } wcf_update_the_checkout_transient( $checkout_id ); } return $sorted_order_bumps; } /** * Load Actions * * @param int $checkout_id checkout id. */ public function load_actions( $checkout_id ) { if ( empty( $checkout_id ) && is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification $checkout_id = intval( $_POST['id'] ); //phpcs:ignore WordPress.Security.NonceVerification } $sorted_order_bumps = $this->get_sorted_order_bumps( $checkout_id ); if ( ! empty( $sorted_order_bumps ) ) { // If order bump exist in multiple order bumps. if ( is_array( $sorted_order_bumps ) ) { $this->render_before_checkout_order_bumps( $sorted_order_bumps['before-checkout'] ); $this->render_after_customer_order_bumps( $sorted_order_bumps['after-customer'] ); $this->render_after_order_order_bumps( $sorted_order_bumps['after-order'] ); $this->render_after_payment_order_bumps( $sorted_order_bumps['after-payment'] ); } add_action( 'woocommerce_checkout_after_order_review', array( $this, 'add_order_bump_hidden_fields' ), 99 ); } } /** * Render order bump. * * @param array $order_bumps order bumps. */ public function render_before_checkout_order_bumps( $order_bumps ) { add_action( 'woocommerce_checkout_before_customer_details', function() use ( $order_bumps ) { $this->print_order_bumps( $order_bumps, 'before-checkout' ); } ); } /** * Render order bump. * * @param array $order_bumps order bumps. */ public function render_after_customer_order_bumps( $order_bumps ) { add_action( 'woocommerce_checkout_after_customer_details', function() use ( $order_bumps ) { $this->print_order_bumps( $order_bumps, 'after-customer' ); } ); } /** * Render order bump. * * @param array $order_bumps order bumps. */ public function render_after_order_order_bumps( $order_bumps ) { add_action( 'woocommerce_checkout_order_review', function() use ( $order_bumps ) { $this->print_order_bumps( $order_bumps, 'after-order' ); } ); } /** * Render order bump. * * @param array $order_bumps order bumps. */ public function render_after_payment_order_bumps( $order_bumps ) { add_action( 'woocommerce_review_order_before_submit', function() use ( $order_bumps ) { $this->print_order_bumps( $order_bumps, 'after-payment' ); } ); } /** * Display bump offer box html. */ public function add_order_bump_hidden_fields() { echo ''; } /** * Get order bump hidden data. * * @param int $product_id product id. * @param boolean $order_bump_checked checked value. */ public function get_order_bump_hidden_data( $product_id, $order_bump_checked ) { echo ''; } /** * Get default values of options. * * @return array */ public function get_order_bump_default_meta() { if ( null === self::$ob_default_meta ) { $default_meta = Cartflows_Pro_Checkout_Default_Meta::get_instance()->order_bump_default_meta(); self::$ob_default_meta = array(); foreach ( $default_meta as $key => $value ) { self::$ob_default_meta[ $key ] = $value['default']; } } return self::$ob_default_meta; } /** * Display bump offer box html. * * @param array $order_bumps order bump values. * @param string $position order bump position. */ public function print_order_bumps( $order_bumps, $position ) { global $post; $checkout_id = 0; if ( $post ) { $checkout_id = $post->ID; } elseif ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification $checkout_id = intval( $_POST['id'] );// phpcs:ignore WordPress.Security.NonceVerification } $output = $this->get_order_bumps_markup( $checkout_id, $order_bumps, $position ); // Reason for PHPCS ignore: The output is already escaped in the template file of Order Bump. echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Ger all order bumps markup. * * @param int $checkout_id Checkout id. * @param array $order_bumps Order bumps. * @param string $position Position. * * @return string Order bump markup. */ public function get_order_bumps_markup( $checkout_id, $order_bumps, $position ) { /** * Issue: Order Bump not render after changing payment gateway if mollie is available. * Mollie triggers update_order_review call on change of payment method & Woo does not replace fragment if found same. * Hence we are adding dynamic data attribute so woo will update order bump fragments every time. */ $output = "
    "; if ( is_array( $order_bumps ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $key => $order_bump_data ) { $output .= $this->get_single_order_bump_markup( $checkout_id, $order_bump_data ); } } $output .= '
    '; return $output; } /** * Ger an order bump markup. * * @param int $checkout_id Checkout id. * @param array $order_bump_data Order bump data. * * @return string Order bump markup. */ public function get_single_order_bump_markup( $checkout_id, $order_bump_data ) { $output = ''; if ( is_array( $order_bump_data ) && ! empty( $order_bump_data ) ) { $ob_default_meta = $this->get_order_bump_default_meta(); $order_bump_data = wp_parse_args( $order_bump_data, $ob_default_meta ); $order_bump_product = $order_bump_data['product']; $order_bump_product_quantity_default = isset( $order_bump_data['quantity'] ) ? $order_bump_data['quantity'] : 1; $order_bump_product_quantity = isset( $order_bump_data['order_bump_qty'] ) ? $order_bump_data['order_bump_qty'] : $order_bump_product_quantity_default; $ob_id = isset( $order_bump_data['id'] ) ? $order_bump_data['id'] : ''; $position = isset( $order_bump_data['position'] ) ? $order_bump_data['position'] : 'after-order'; $bump_layout = isset( $order_bump_data['style'] ) ? $order_bump_data['style'] : 'style-2'; $bump_layout_width = isset( $order_bump_data['width'] ) ? $order_bump_data['width'] : '100'; $order_bump_label = isset( $order_bump_data['checkbox_label'] ) ? $order_bump_data['checkbox_label'] : ''; $order_bump_title = isset( $order_bump_data['title_text'] ) ? $order_bump_data['title_text'] : ''; $order_bump_hl_text = isset( $order_bump_data['hl_text'] ) ? $order_bump_data['hl_text'] : ''; $order_bump_desc = $order_bump_data['desc_text']; $enabled_bump_image = isset( $order_bump_data['enable_show_image'] ) ? $order_bump_data['enable_show_image'] : 'no'; $discount_type = isset( $order_bump_data['discount_type'] ) ? $order_bump_data['discount_type'] : ''; $discount_value = isset( $order_bump_data['discount_value'] ) ? $order_bump_data['discount_value'] : ''; $order_bump_action_element = isset( $order_bump_data['action_element'] ) ? $order_bump_data['action_element'] : ''; $display_quantity_field = isset( $order_bump_data['display_quantity_field'] ) ? $order_bump_data['display_quantity_field'] : 'no'; $bump_image_position = 'left'; $bump_order_image_obj = ''; if ( empty( $order_bump_product ) ) { $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id ); if ( wcf()->flow->is_flow_testmode( $flow_id ) ) { $order_bump_product = $this->get_bump_test_product( $checkout_id ); } else { return; } } $product_id = intval( $order_bump_product ); $_product = wc_get_product( $product_id ); // Return if no product is found. if ( ! $_product || empty( $_product ) ) { return; } // Set the checkbox as checked only when it is set to pre-checked and it is in stock. $order_bump_checked = isset( $order_bump_data['default_state'] ) && 'yes' === $order_bump_data['default_state'] && $_product->is_in_stock(); // Check if order bump is already checked or not. if ( ! empty( $_POST['post_data'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification $post_data = array(); $post_raw_data = sanitize_text_field( wp_unslash( $_POST['post_data'] ) ); //phpcs:ignore WordPress.Security.NonceVerification parse_str( $post_raw_data, $post_data ); if ( ! empty( $post_data[ 'wcf-bump-order-cb-' . $ob_id ] ) ) { $order_bump_checked = true; } else { $order_bump_checked = false; } } $ob_items = $this->check_if_ob_in_cart(); if ( in_array( $ob_id, $ob_items ) ) { $order_bump_checked = true; } $bump_offer_arr = array( 'ob_id' => $ob_id, 'product_id' => $product_id, ); // Display the order bump only if the product is found, else render nothing. if ( ! empty( $_product ) ) { $bump_offer_arr['product_id'] = wcf_pro()->utils->get_variable_variation_product_id( $product_id ); } /* Set new ids based on variation */ $product_id = $bump_offer_arr['product_id']; /* bump order blinking arrow */ $is_order_bump_arrow_enabled = $order_bump_data['show_arrow']; $is_order_bump_arrow_anim_enabled = $order_bump_data['show_animation']; $bump_order_blinking_arrow = ''; $bump_order_arrow_animate = ''; if ( 'yes' === $is_order_bump_arrow_enabled ) { if ( 'yes' === $is_order_bump_arrow_anim_enabled ) { $bump_order_arrow_animate = 'wcf-blink'; } $bump_order_blinking_arrow = ''; } /* bump order blinking arrow */ if ( 'yes' === $enabled_bump_image ) { $bump_image_position = isset( $order_bump_data['ob_image_position'] ) ? $order_bump_data['ob_image_position'] : 'left'; $bump_image_width = isset( $order_bump_data['ob_image_width'] ) ? $order_bump_data['ob_image_width'] : ''; $bump_order_image = $this->get_order_bump_image( $order_bump_data, $product_id ); } $product_object = wc_get_product( $product_id ); if ( false === $order_bump_desc ) { $product_desc = $product_object->get_short_description(); $order_bump_desc = $product_desc . '
    ' . "\r\n{{product_price}}"; } /* Execute */ $order_bump_desc = do_shortcode( $order_bump_desc ); // Get the product price and replace the vars with actual values. $product_price = $product_object ? $product_object->get_price( 'edit' ) : ''; $product_price = wcf_pro_filter_price( $product_price ); $custom_price = wcf_pro()->utils->get_calculated_discount( $discount_type, $discount_value, $product_price ); $product_price_data = $this->get_taxable_product_price( $product_object, $product_price, $custom_price ); $display_price = ''; if ( 0 < $discount_value && Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $display_price = '' . wc_price( $product_price_data['product_price'] ) . ''; $display_price .= ' ' . wc_price( $product_price_data['custom_price'] ) . ''; } elseif ( is_array( $product_price_data ) && (int) $product_price_data['product_price'] >= 0 ) { $display_price = '' . wc_price( $product_price_data['product_price'] ) . ''; } else { // Hide the order bump is the custom/discount price is less than zero. return; } // Adding this variable as a data attribute. $bump_offer_data = wp_json_encode( $bump_offer_arr ); $to_replace = array( '{{product_name}}', '{{product_price}}', '{{product_desc}}', '{{quantity}}', ); $with_replace = array( $_product->get_name(), $display_price, $_product->get_short_description(), $order_bump_product_quantity, ); $order_bump_label = str_replace( $to_replace, $with_replace, $order_bump_label ); $order_bump_title = str_replace( $to_replace, $with_replace, $order_bump_title ); $order_bump_hl_text = str_replace( $to_replace, $with_replace, $order_bump_hl_text ); $order_bump_desc = str_replace( $to_replace, $with_replace, $order_bump_desc ); $bump_order_style_file = ''; ob_start(); if ( ! empty( $bump_layout ) && '' !== $bump_layout ) { $bump_order_style_file = CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/bump-order/wcf-bump-order-' . $bump_layout . '.php'; if ( file_exists( $bump_order_style_file ) ) { include $bump_order_style_file; } } else { include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/bump-order/wcf-bump-order-style-1.php'; } $output .= ob_get_clean(); } return $output; } /** * Get product image. * * @param array $order_bump_data order bump data. * @param int $product_id product id. */ public function get_order_bump_image( $order_bump_data, $product_id ) { $bump_order_image_obj = isset( $order_bump_data['product_img_obj'] ) ? $order_bump_data['product_img_obj'] : ''; if ( empty( $bump_order_image_obj ) && empty( $order_bump_data['product_image'] ) ) { $product_image = get_the_post_thumbnail_url( $product_id ); if ( empty( $product_image ) ) { $product_image = esc_url_raw( CARTFLOWS_PRO_URL . 'assets/images/image-placeholder.png' ); } } else { $product_image = $this->get_order_bump_image_url( $bump_order_image_obj, $order_bump_data['product_image'] ); } return $product_image; } /** * Get product price with tax. * * @param object $product_object product data. * @param int $product_price product price. * @param int $custom_price custom price. */ public function get_taxable_product_price( $product_object, $product_price, $custom_price ) { $display_type = get_option( 'woocommerce_tax_display_cart' ); if ( 'excl' === $display_type ) { $product_price = wc_get_price_excluding_tax( $product_object, array( 'price' => $product_price ) ); $custom_price = wc_get_price_excluding_tax( $product_object, array( 'price' => $custom_price ) ); } else { $product_price = wc_get_price_including_tax( $product_object, array( 'price' => $product_price ) ); $custom_price = wc_get_price_including_tax( $product_object, array( 'price' => $custom_price ) ); } return array( 'product_price' => $product_price, 'custom_price' => $custom_price, ); } /** * Process bump order. * * @param object $bump_image_obj image object. * @param string $original_url image url. */ public function get_order_bump_image_url( $bump_image_obj, $original_url ) { $size = apply_filters( 'cartflows_order_bump_image_size', 'medium' ); if ( is_array( $bump_image_obj ) && ! empty( $bump_image_obj ) && '' !== $size ) { $original_url = ! empty( $bump_image_obj['url'][ $size ] ) ? $bump_image_obj['url'][ $size ] : $original_url; } return $original_url; } /** * Process bump order. */ public function order_bump_process() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_bump_order_process' ) ) { return; } $post_data = $_POST; if ( ! isset( $post_data['_wcf_bump_product_action'] ) || ( isset( $post_data['_wcf_bump_product_action'] ) && empty( $post_data['_wcf_bump_product_action'] ) ) ) { return; } $checkout_id = intval( $post_data['_wcf_checkout_id'] ); $bump_action = sanitize_text_field( $post_data['_wcf_bump_product_action'] ); // Check if checkout page is global checkout. $common = Cartflows_Helper::get_common_settings(); $is_global_checkout = false; if ( intval( $common['global_checkout'] ) === $checkout_id ) { $is_global_checkout = true; } if ( 'add_bump_product' === $bump_action ) { $checked = true; } elseif ( 'remove_bump_product' === $bump_action ) { $checked = false; } else { return; } $order_bump_data = isset( $post_data['_bump_offer_data'] ) ? json_decode( wp_unslash( $post_data['_bump_offer_data'] ), true ) : array(); if ( empty( $order_bump_data ) ) { return; } $new_key = ''; $ob_data = $this->prepare_ob_data( $checkout_id, $order_bump_data['ob_id'] ); $ob_data['checked'] = $checked; // If replace main product with order bump option is enabled. if ( 'yes' === $ob_data['is_replace'] && ! $is_global_checkout ) { $this->replace_main_product_with_order_bump( $ob_data ); } // Loop over cart items. $found_data = $this->get_item_key_for_order_bump( $ob_data ); $found_item_key = $found_data['found_item_key']; $found_item = $found_data['found_item']; // Bump offer product found in cart and we need to add it again and update it's quantity. if ( null != $found_item_key && $checked ) { $new_key = $this->order_bump_found_in_cart( $ob_data, $found_item_key, $found_item ); } // add - if not found, remove/reduce - if found. if ( $checked && null === $found_item_key ) { $new_key = $this->add_order_bump_product( $ob_data ); } elseif ( ! $checked && null != $found_item_key ) { $new_key = $this->order_bump_remove_or_reduce( $ob_data, $found_item_key, $found_item ); } wcf_update_the_checkout_transient( $checkout_id ); $data = array( 'total_product_price' => $ob_data['total_product_price'], 'force_update_fragment' => is_null( $new_key ) || false === $new_key ? true : false, 'checkout_id' => $checkout_id, ); do_action( 'wcf_after_order_bump_process', $ob_data ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /** * Process quantity update for the order bump. * * @since x.x.x * @return void */ public function update_order_bump_quantity() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_update_order_bump_qty' ) ) { return; } $post_data = $_POST; $checkout_id = _get_wcf_checkout_id(); if ( ! $checkout_id ) { $checkout_id = ! empty( $_GET['wcf_checkout_id'] ) ? intval( wp_unslash( $_GET['wcf_checkout_id'] ) ) : 0; } $bump_action = sanitize_text_field( $post_data['_wcf_bump_product_action'] ); $updated_ob_qty = intval( $post_data['_bump_offer_qty'] ); if ( 'add_bump_product' === $bump_action ) { $checked = true; } else { return; } $order_bump_data = isset( $post_data['_bump_offer_data'] ) ? json_decode( wp_unslash( $post_data['_bump_offer_data'] ), true ) : array(); if ( empty( $order_bump_data ) ) { return; } $new_key = ''; $ob_data = $this->prepare_ob_data( $checkout_id, $order_bump_data['ob_id'] ); $ob_data['checked'] = $checked; // Loop over cart items. foreach ( WC()->cart->get_cart() as $key => $item ) { if ( isset( $item['cartflows_bump'] ) && $item['ob_id'] === $ob_data['ob_id'] && $item['quantity'] != $updated_ob_qty ) { if ( ( isset( $ob_data['is_variation'] ) && 'yes' === $ob_data['is_variation'] && isset( $item['variation_id'] ) && $item['variation_id'] == $ob_data['product_id'] ) || ( isset( $ob_data['is_variable'] ) && 'yes' === $ob_data['is_variable'] && $item['product_id'] == $ob_data['parent_id'] ) || ( $item['product_id'] == $ob_data['product_id'] ) ) { WC()->cart->set_quantity( $key, $updated_ob_qty ); } } } wcf_update_the_checkout_transient( $checkout_id ); $data = array( 'total_product_price' => $ob_data['total_product_price'] * $updated_ob_qty, 'force_update_fragment' => empty( $new_key ) ? true : false, ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /** * Order bump remove or reduce. * * @param array $ob_data order bump data. * @param string $found_item_key cart key. * @param array $found_item item data. */ public function order_bump_remove_or_reduce( $ob_data, $found_item_key, $found_item ) { $new_qty = $found_item['quantity'] - $ob_data['order_bump_qty']; WC()->cart->remove_cart_item( $found_item_key ); // Removed order bump data is required for GA events hence store it on fragments. $this->add_order_bump_data_in_fragment( $found_item ); do_action( 'wcf_order_bump_item_removed', $ob_data['product_id'] ); if ( $new_qty > 0 ) { if ( 'yes' === $ob_data['is_variable'] || 'yes' === $ob_data['is_variation'] ) { WC()->cart->add_to_cart( $ob_data['parent_id'], $new_qty, $ob_data['product_id'] ); } else { WC()->cart->add_to_cart( $ob_data['parent_id'], $new_qty ); } } if ( ! empty( $ob_data['discount_coupon'] ) ) { if ( WC()->cart->has_discount( $ob_data['discount_coupon'] ) ) { WC()->cart->remove_coupon( $ob_data['discount_coupon'] ); } } } /** * Add order bump data in fragment. * * @param array $ob_data order bump data. */ public function add_order_bump_data_in_fragment( $ob_data ) { $ga_settings = Cartflows_Helper::get_google_analytics_settings(); if ( 'enable' === $ga_settings['enable_google_analytics'] ) { add_filter( 'woocommerce_update_order_review_fragments', function( $data ) use ( $ob_data ) { $data['removed_order_bump_data'] = $ob_data; return $data; } ); } } /** * If order bump not found in cart. * * @param array $ob_data order bump data. * @return bool|string $new_key new item key. */ public function add_order_bump_product( $ob_data ) { $custom_price = ''; $new_key = ''; if ( 'coupon' === $ob_data['discount_type'] ) { $apply_coupon = wcf_pro()->utils->apply_discount_coupon( $ob_data['discount_type'], $ob_data['discount_coupon'] ); } else { $custom_price = wcf_pro()->utils->get_calculated_discount( $ob_data['discount_type'], $ob_data['discount_value'], $ob_data['_product_price'] ); } $cart_item_data = array( 'cartflows_bump' => true, 'ob_id' => $ob_data['ob_id'], ); if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data['custom_price'] = $custom_price; } if ( 'yes' === $ob_data['is_variable'] || 'yes' === $ob_data['is_variation'] ) { $new_key = WC()->cart->add_to_cart( $ob_data['parent_id'], $ob_data['order_bump_qty'], $ob_data['product_id'], array(), $cart_item_data ); } else { $new_key = WC()->cart->add_to_cart( $ob_data['product_id'], $ob_data['order_bump_qty'], 0, array(), $cart_item_data ); } do_action( 'wcf_order_bump_item_added', $ob_data['product_id'] ); return $new_key; } /** * If order bump found in cart then update the quantity and re-add it in the cart. * * @param array $ob_data order bump data. * @param string $found_item_key key. * @param array $found_item item data. * @return bool|string $new_key new item key. */ public function order_bump_found_in_cart( $ob_data, $found_item_key, $found_item ) { $new_key = ''; // Case for discount enabled bump offer product. if ( ! empty( $ob_data['discount_type'] ) && 'coupon' !== $ob_data['discount_type'] ) { $custom_price = wcf_pro()->utils->get_calculated_discount( $ob_data['discount_type'], $ob_data['discount_value'], $ob_data['_product_price'] ); $cart_item_data = array( 'cartflows_bump' => true, 'ob_id' => $ob_data['ob_id'], ); if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data['custom_price'] = $custom_price; } if ( 'yes' === $ob_data['is_variable'] || 'yes' === $ob_data['is_variation'] ) { $new_key = WC()->cart->add_to_cart( $ob_data['parent_id'], $ob_data['order_bump_qty'], $ob_data['product_id'], array(), $cart_item_data ); } else { $new_key = WC()->cart->add_to_cart( $ob_data['product_id'], $ob_data['order_bump_qty'], 0, array(), $cart_item_data ); } do_action( 'wcf_order_bump_item_added', $ob_data['product_id'] ); } else { if ( ! empty( $ob_data['discount_type'] ) && 'coupon' === $ob_data['discount_type'] ) { $apply_coupon = wcf_pro()->utils->apply_discount_coupon( $ob_data['discount_type'], $ob_data['discount_coupon'] ); } $quantity = isset( $found_item['quantity'] ) ? $found_item['quantity'] : 0; $new_qty = $quantity + $ob_data['order_bump_qty']; // If item is already in cart, increase quantity for product in cart. WC()->cart->remove_cart_item( $found_item_key ); if ( $ob_data['_product']->is_in_stock() ) { $cart_item_data = array( 'cartflows_bump' => true, 'ob_id' => $ob_data['ob_id'], ); if ( 'yes' === $ob_data['is_variable'] || 'yes' === $ob_data['is_variation'] ) { $new_key = WC()->cart->add_to_cart( $ob_data['parent_id'], $new_qty, $ob_data['product_id'], array(), $cart_item_data ); } else { $new_key = WC()->cart->add_to_cart( $ob_data['product_id'], $new_qty, 0, array(), $cart_item_data ); } do_action( 'wcf_order_bump_item_added', $ob_data['product_id'] ); } } return $new_key; } /** * Get the item keu for order bump. * * @param array $ob_data order bump data. */ public function get_item_key_for_order_bump( $ob_data ) { $found_item_key = null; $found_item = null; foreach ( WC()->cart->get_cart() as $key => $item ) { if ( isset( $item['cartflows_bump'] ) && $item['ob_id'] === $ob_data['ob_id'] ) { $found_item_key = $key; $found_item = $item; } } return array( 'found_item_key' => $found_item_key, 'found_item' => $found_item, ); } /** * Replace the main product with order bump. * * @param array $ob_data order bump data. */ public function replace_main_product_with_order_bump( $ob_data ) { $main_products = Cartflows_Pro_Product_Options::get_instance()->get_all_main_products( $ob_data['checkout_id'] ); $first_product = $main_products[ $ob_data['index'] ]; $first_product_id = intval( $first_product['product'] ); $_product_data = wc_get_product( $first_product['product'] ); $cart_item_data = array(); if ( $ob_data['checked'] ) { // remove first product. foreach ( WC()->cart->get_cart() as $key => $item ) { if ( $first_product_id === $item['product_id'] || $first_product_id === $item['variation_id'] ) { WC()->cart->remove_cart_item( $key ); } } } else { // check if product is already in cart. If yes then return. foreach ( WC()->cart->get_cart() as $key => $item ) { if ( $first_product_id === $item['product_id'] || $first_product_id === $item['variation_id'] ) { return; } } // add first product. $custom_price = wcf_pro()->utils->get_calculated_discount( $first_product['discount_type'], $first_product['discount_value'], $_product_data->get_price() ); if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data = array( 'custom_price' => $custom_price, ); } if ( true === $first_product['variable'] || true === $first_product['variation'] ) { if ( true === $first_product['variable'] ) { $children_ids = $_product_data->get_children(); $child = $children_ids[0]; $new_key = WC()->cart->add_to_cart( $ob_data['parent_id'], $first_product['quantity'], $child, array(), $cart_item_data ); } else { $parent_id = $_product_data->get_parent_id(); $new_key = WC()->cart->add_to_cart( $parent_id, $first_product['quantity'], $first_product['product'], array(), $cart_item_data ); } } else { $new_key = WC()->cart->add_to_cart( $first_product['product'], $first_product['quantity'], 0, array(), $cart_item_data ); } do_action( 'wcf_order_bump_item_replaced', $first_product['product'], $ob_data ); } } /** * Preserve the custom item price added by Variations & Quantity feature * * @param array $cart_object cart object. * @since 1.0.0 */ public function custom_price_to_cart_item( $cart_object ) { if ( wp_doing_ajax() && ! WC()->session->__isset( 'reload_checkout' ) ) { foreach ( $cart_object->cart_contents as $key => $value ) { if ( isset( $value['custom_price'] ) ) { $custom_price = floatval( $value['custom_price'] ); $value['data']->set_price( $custom_price ); } } } } /** * Bump order product title shortcode. * * @param array $atts shortcode atts. * @return string shortcode output. * @since 1.0.0 */ public function bump_product_title( $atts ) { $output = ''; if ( _is_wcf_checkout_type() ) { global $post; $order_bump_product = get_post_meta( $post->ID, 'wcf-order-bump-product', true ); if ( ! empty( $order_bump_product ) ) { $product_id = reset( $order_bump_product ); $output = get_the_title( $product_id ); } } return $output; } /** * Bump order product title shortcode. * * @param int $step_id step id. * @return array bump order product. * @since 1.0.0 */ public function get_bump_test_product( $step_id ) { $bump_product = array(); $args = array( 'posts_per_page' => 1, 'orderby' => 'rand', 'post_type' => 'product', 'meta_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query // Exclude out of stock products. array( 'key' => '_stock_status', 'value' => 'outofstock', 'compare' => 'NOT IN', ), ), 'tax_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query array( 'taxonomy' => 'product_type', 'field' => 'slug', 'terms' => 'simple', ), ), ); $random_product = get_posts( $args ); if ( isset( $random_product[0]->ID ) ) { $bump_product = array( $random_product[0]->ID, ); } return $bump_product; } /** * Check in Cart if product exists. * * @since 1.1.5 * @param int $product_id product_id. * @param bool $is_bump is bump product. * @return bool. * */ public function cart_has_product( $product_id, $is_bump = false ) { $get_cart = WC()->cart->get_cart(); foreach ( $get_cart as $cart_item_key => $cart_item ) { if ( $cart_item['product_id'] == $product_id ) { if ( $is_bump ) { if ( isset( $cart_item['cartflows_bump'] ) && $cart_item['cartflows_bump'] ) { return true; } } else { return true; } } } return false; } /** * Get order bump data by ob id. * * @param int $checkout_id checkout_id. * @param string $ob_id order bump id. * */ public function get_order_bump_by_id( $checkout_id, $ob_id ) { $order_bumps = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bumps' ); $ob_data = array(); if ( ! empty( $ob_id ) && ! empty( $order_bumps ) ) { foreach ( $order_bumps as $index => $data ) { if ( $ob_id === $data['id'] ) { $ob_data = $data; break; } } } $ob_data['is_variable'] = ''; $ob_data['is_variation'] = ''; $ob_data['parent_id'] = $ob_data['product']; if ( ! empty( $ob_data ) && ! empty( $ob_data['product'] ) ) { $_product = wc_get_product( $ob_data['product'] ); if ( $_product && $_product->is_type( 'variable' ) ) { $ob_data['is_variable'] = 'yes'; $ob_data['parent_id'] = $ob_data['product']; } if ( $_product && $_product->is_type( 'variation' ) ) { $ob_data['is_variation'] = 'yes'; $ob_data['parent_id'] = $_product->get_parent_id(); } $ob_data['product'] = wcf_pro()->utils->get_variable_variation_product_id( $ob_data['product'] ); // Get the product price and replace the vars with actual values. $product_object = wc_get_product( $ob_data['product'] ); $product_price = $product_object ? $product_object->get_price( 'edit' ) : ''; $custom_price = wcf_pro()->utils->get_calculated_discount( $ob_data['discount_type'], $ob_data['discount_value'], $product_price ); $product_price_data = $this->get_taxable_product_price( $product_object, $product_price, $custom_price ); $ob_data['total_product_price'] = wc_get_price_including_tax( $product_object, array( 'price' => $product_price_data['custom_price'] ) ); } return $ob_data; } /** * Get order bump data by ob id. * * @param int $checkout_id checkout_id. * @param array $ob_id order bump ID. * * @return array $ob_id Prepared Order bump data. * */ public function prepare_ob_data( $checkout_id, $ob_id ) { $ob_id = sanitize_text_field( $ob_id ); $required_ob_data = $this->get_order_bump_by_id( $checkout_id, $ob_id ); /* Set new ids based on variation */ $product_id = intval( $required_ob_data['product'] ); $parent_id = intval( $required_ob_data['parent_id'] ); $_product = wc_get_product( $product_id ); $discount_coupon = $required_ob_data['discount_coupon']; if ( is_array( $discount_coupon ) && ! empty( $discount_coupon ) ) { $discount_coupon = reset( $discount_coupon ); } $ob_qty = ! empty( $_POST['_bump_offer_qty'] ) ? intval( $_POST['_bump_offer_qty'] ) : intval( $required_ob_data['quantity'] ); //phpcs:ignore WordPress.Security.NonceVerification $ob_data = array( 'ob_id' => $ob_id, 'checkout_id' => $checkout_id, 'product_id' => $product_id, 'parent_id' => $parent_id, 'is_variable' => sanitize_text_field( $required_ob_data['is_variable'] ), 'is_variation' => sanitize_text_field( $required_ob_data['is_variation'] ), '_product' => $_product, '_product_price' => floatval( $_product->get_price( 'edit' ) ), 'discount_type' => $required_ob_data['discount_type'], 'discount_value' => floatval( $required_ob_data['discount_value'] ), 'discount_coupon' => $discount_coupon, 'default_state' => ! empty( $required_ob_data['default_state'] ) ? $required_ob_data['default_state'] : 'no', 'custom_price' => '', 'order_bump_qty' => $ob_qty, 'is_replace' => $required_ob_data['replace_product'], 'total_product_price' => $required_ob_data['total_product_price'], 'index' => 0, 'checked' => false, ); return $ob_data; } /** * Add the pre-checked order bumps in the cart for the store checkout page. * * Use-case: Add the order bumps in the cart which are pre-selected in the Order Bump settings. * * @return void */ public function store_checkout_add_pre_checked_order_bumps() { if ( _is_wcf_checkout_type() ) { global $post; $checkout_id = 0; // Return if post is empty. if ( empty( $post ) ) { return; } $checkout_id = $post->ID; $store_checkout = (int) Cartflows_Helper::get_global_setting( '_cartflows_store_checkout' ); // Return if checkout ID is empty OR store Checkout ID is empty OR Cart is empty. if ( empty( $store_checkout ) || empty( $checkout_id ) || ( WC()->cart->is_empty() && ! isset( $_GET['wcf-add-to-cart'] ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended return; } $flow_id = (int) wcf()->utils->get_flow_id_from_step_id( $checkout_id ); // Add pre-selected order bump products in the cart only if the flow ID is equal to the Store checkout ID. if ( ! empty( $flow_id ) && $flow_id === $store_checkout ) { $this->add_pre_checked_order_bumps( $checkout_id ); } } } /** * Add order bump in the cart if it is pre-checked from setting. * * @param int $checkout_id checkout_id. * @return void * */ public function add_pre_checked_order_bumps( $checkout_id ) { $order_bumps = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-order-bumps' ); $common = Cartflows_Helper::get_common_settings(); $is_global_checkout = false; if ( intval( $common['global_checkout'] ) === $checkout_id ) { $is_global_checkout = true; } if ( ! empty( $order_bumps ) && ! ( wp_doing_ajax() || isset( $_GET['wc-ajax'] ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended foreach ( $order_bumps as $index => $data ) { // If no product assigned then continue to next order bump. if ( false === $data['status'] || empty( $data['product'] ) ) { continue; } $ob_data = $this->prepare_ob_data( $checkout_id, $data['id'] ); $is_visible = Cartflows_Pro_Order_Bump_Rules::get_instance()->is_order_bump_visble( $ob_data ); // Is pre-checked and visible then add order bump in the cart. if ( $is_visible && ( isset( $ob_data['default_state'] ) && 'yes' === $ob_data['default_state'] ) ) { $this->add_order_bump_product( $ob_data ); // If replace main product with order bump option is enabled. if ( ! $is_global_checkout && isset( $ob_data['is_replace'] ) && 'yes' === $ob_data['is_replace'] ) { $ob_data['checked'] = true; $this->replace_main_product_with_order_bump( $ob_data ); } } } } } /** * Check if order bump product is in cart for store checkout. * * @return array $item return bumps in cart */ public function check_if_ob_in_cart() { $ob_items = array(); $cart_contents = (array) WC()->cart->get_cart(); if ( $cart_contents && is_array( $cart_contents ) && count( $cart_contents ) > 0 ) { foreach ( $cart_contents as $cart_item ) { if ( isset( $cart_item['ob_id'] ) && isset( $cart_item['cartflows_bump'] ) ) { array_push( $ob_items, $cart_item['ob_id'] ); } } } return $ob_items; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Order_Bump_Product::get_instance(); modules/checkout/classes/class-cartflows-pro-order-bump-rules.php000064400000022465147600244370021316 0ustar00 $group_data ) { if ( ! empty( $group_data['rules'] ) ) { $group_result = $this->get_group_rules_result( $group_data['rules'] ); // If group result is true then return true. if ( $group_result ) { break; } } } return $group_result; } /** * Get Group result. * * @param array $rules rules. */ public function get_group_rules_result( $rules ) { $result = true; foreach ( $rules as $rule_index => $rule_data ) { $operator = $rule_data['operator']; $value = $rule_data['value']; switch ( $rule_data['condition'] ) { case 'cart_item': $items = $this->get_cart_items(); $result = $this->compare_string_values( $items, $value, $operator ); break; case 'cart_item_category': $item_terms = $this->get_cart_items_categories(); $result = $this->compare_string_values( $item_terms, $value, $operator ); break; case 'cart_item_tag': $item_terms = $this->get_cart_items_tags(); $result = $this->compare_string_values( $item_terms, $value, $operator ); break; case 'cart_total': $order_total = $this->get_cart_total(); $result = $this->compare_number_values( $order_total, $value, $operator ); break; case 'cart_coupons': $coupon_used = $this->get_cart_coupons(); $coupon_used = ! empty( $coupon_used ) && is_array( $coupon_used ) ? array_map( 'strtolower', $coupon_used ) : $coupon_used; $value = ! empty( $value ) && is_array( $value ) ? array_map( 'strtolower', $value ) : $value; $result = $this->compare_string_values( $coupon_used, $value, $operator ); break; case 'cart_shipping_method': $shipping_methods = $this->get_cart_shipping_method(); $result = $this->compare_string_values( $shipping_methods, $value, $operator ); break; case 'cart_shipping_country': $shipping_country = (array) $this->get_cart_shipping_country(); $result = $this->compare_string_values( $shipping_country, $value, $operator ); break; case 'cart_billing_country': $billing_country = $this->get_cart_billing_country(); $result = $this->compare_string_values( $billing_country, $value, $operator ); break; default: $result = false; } // If one of rule is false break the loop. if ( false === $result ) { break; } } return $result; } /** * Get cart item categories. */ public function get_cart_items() { $item = array(); $cart_contents = (array) WC()->cart->cart_contents; if ( $cart_contents && is_array( $cart_contents ) && count( $cart_contents ) > 0 ) { foreach ( $cart_contents as $cart_item ) { $product_id = 0 !== $cart_item['variation_id'] ? $cart_item['variation_id'] : $cart_item['product_id']; if ( isset( $cart_item['cartflows_bump'] ) && intval( self::$ob_product_id ) === intval( $product_id ) ) { // Do not consider order bump product itself. continue; } array_push( $item, $product_id ); } } return $item; } /** * Get cart item categories. */ public function get_cart_items_categories() { $item_terms = array(); $cart_contents = WC()->cart->get_cart_contents(); if ( $cart_contents && is_array( $cart_contents ) && count( $cart_contents ) > 0 ) { foreach ( $cart_contents as $cart_item ) { if ( isset( $cart_item['cartflows_bump'] ) && self::$ob_product_id === $cart_item['product_id'] ) { // Do not consider order bump product itself. continue; } $product_id = $cart_item['product_id']; // Get Product object. $product = wc_get_product( $product_id ); /** * Check the type of the product. * * This condition is added to get the product categories. * As varation of a product is getting purchased and it does not contains the categories. */ if ( $product->is_type( 'variation' ) ) { $product_id = $product->get_parent_id(); } $terms = wp_get_object_terms( $product_id, 'product_cat', array( 'fields' => 'ids' ) ); $item_terms = array_merge( $item_terms, $terms ); } } return $item_terms; } /** * Get cart item tags. */ public function get_cart_items_tags() { $item_terms = array(); $cart_contents = WC()->cart->get_cart_contents(); if ( $cart_contents && is_array( $cart_contents ) && count( $cart_contents ) > 0 ) { foreach ( $cart_contents as $cart_item ) { if ( isset( $cart_item['cartflows_bump'] ) && self::$ob_product_id === $cart_item['product_id'] ) { // Do not consider order bump product itself. continue; } $product_id = $cart_item['product_id']; // Get Product object. $product = wc_get_product( $product_id ); /** * Check the type of the product. * * This condition is added to get the product categories. * As varation of a product is getting purchased and it does not contains the tags. */ if ( $product->is_type( 'variation' ) ) { $product_id = $product->get_parent_id(); } $terms = wp_get_object_terms( $product_id, 'product_tag', array( 'fields' => 'ids' ) ); $item_terms = array_merge( $item_terms, $terms ); } } return $item_terms; } /** * Get cart shipping method. */ public function get_cart_shipping_method() { $shipping_methods = array(); $selected_shipping = WC()->session->get( 'chosen_shipping_methods' ); if ( $selected_shipping ) { foreach ( $selected_shipping as $method ) { // extract method slug only, discard instance id. $split = strpos( $method, ':' ); if ( $split ) { $shipping_methods[] = substr( $method, 0, $split ); } else { $shipping_methods[] = $method; } } } return $shipping_methods; } /** * Get cart coupons. */ public function get_cart_coupons() { $used_coupons = array(); $cart_coupons = WC()->cart->get_coupons(); if ( $cart_coupons && is_array( $cart_coupons ) && count( $cart_coupons ) > 0 ) { $used_coupons = array_keys( $cart_coupons ); } return $used_coupons; } /** * Get cart total. */ public function get_cart_total() { return WC()->cart->get_total( 'edit' ); } /** * Get cart billing country. */ public function get_cart_billing_country() { return array( WC()->customer->get_billing_country( 'edit' ) ); } /** * Get cart shipping country. */ public function get_cart_shipping_country() { return array( WC()->customer->get_shipping_country( 'edit' ) ); } /** * Compare string values. * * @param array $cart_values cart values. * @param array $rule_values rules values. * @param object $operator rule operator. */ public function compare_string_values( $cart_values, $rule_values, $operator ) { switch ( $operator ) { case 'all': $result = count( array_intersect( $rule_values, $cart_values ) ) === count( $rule_values ); break; case 'any': $result = count( array_intersect( $rule_values, $cart_values ) ) >= 1; break; case 'none': $result = ( count( array_intersect( $rule_values, $cart_values ) ) === 0 ); break; case 'exist': $result = ( count( $cart_values ) >= 1 ); break; case 'not_exist': $result = ( count( $cart_values ) === 0 ); break; default: $result = false; break; } return $result; } /** * Compare string values. * * @param string $cart_value cart values. * @param array $rule_value rules values. * @param string $operator rule operator. */ public function compare_number_values( $cart_value, $rule_value, $operator ) { // Convert the encoded operator at the time of sanitizing back to HTML entity for comparison. $operator = htmlspecialchars_decode( $operator ); switch ( $operator ) { case '==': $result = $cart_value === $rule_value; break; case '!=': $result = $cart_value !== $rule_value; break; case '>': $result = $cart_value > $rule_value; break; case '<': $result = $cart_value < $rule_value; break; case '<=': $result = $cart_value <= $rule_value; break; case '>=': $result = $cart_value >= $rule_value; break; default: $result = false; break; } return $result; } } /** * Prepare if class 'Cartflows_Pro_Order_Bump_Rules' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Order_Bump_Rules::get_instance(); modules/checkout/classes/class-cartflows-pro-product-options.php000064400000201541147600244370021255 0ustar00ID; $localize['wcf_bump_order_process_nonce'] = wp_create_nonce( 'wcf_bump_order_process' ); $localize['wcf_update_order_bump_qty_nonce'] = wp_create_nonce( 'wcf_update_order_bump_qty' ); $localize['wcf_multiple_selection_nonce'] = wp_create_nonce( 'wcf_multiple_selection' ); $localize['wcf_single_selection_nonce'] = wp_create_nonce( 'wcf_single_selection' ); $localize['wcf_quantity_update_nonce'] = wp_create_nonce( 'wcf_quantity_update' ); $localize['wcf_variation_selection_nonce'] = wp_create_nonce( 'wcf_variation_selection' ); $localize['wcf_quick_view_add_cart_nonce'] = wp_create_nonce( 'wcf_quick_view_add_cart' ); $localize['is_product_options'] = wcf()->options->get_checkout_meta_value( $step_id, 'wcf-enable-product-options' ); return $localize; } /** * Product Variation option position * * @param int $checkout_id checkout id. */ public function product_variation_option_position( $checkout_id ) { $your_product_position = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-your-products-position' ); self::$product_option_data['position'] = $your_product_position; $flow_id = wcf()->utils->is_step_post_type() ? wcf()->utils->get_flow_id() : 0; if ( class_exists( 'Cartflows_PRO_Helper' ) && Cartflows_PRO_Helper::is_instant_layout_enabled( (int) $flow_id ) ) { $your_product_position = 'instant-checkout'; } switch ( $your_product_position ) { case 'after-customer': add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'product_selection_option' ) ); break; case 'before-customer': add_action( 'woocommerce_checkout_before_customer_details', array( $this, 'product_selection_option' ), 11, 1 ); break; case 'before-order': add_action( 'cartflows_woocommerce_checkout_before_order_heading', array( $this, 'product_selection_option' ) ); break; case 'instant-checkout': add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'product_selection_option' ), 8, 1 ); break; default: add_action( 'woocommerce_checkout_after_customer_details', array( $this, 'product_selection_option' ) ); break; } } /** * Product selection options */ public function product_selection_option() { $checkout_id = false; if ( _is_wcf_checkout_type() ) { global $post; $checkout_id = $post->ID; } else { if ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification $checkout_id = intval( $_POST['id'] );// phpcs:ignore WordPress.Security.NonceVerification } } if ( $checkout_id ) { $is_product_options = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); if ( 'yes' !== $is_product_options ) { return; } $product_sel_option = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-options' ); $is_product_variation = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-variation' ); $is_product_quantity = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-quantity' ); $variation_as = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-variation-options' ); $title = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-opt-title' ); self::$product_option = $product_sel_option; self::$is_variation = $is_product_variation; self::$is_quantity = $is_product_quantity; self::$variation_as = $variation_as; self::$title = $title; self::$product_option_data['selected_skin'] = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-product-options-skin' ); self::$product_option_data['product_images'] = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-show-product-images' ); /* Preapre cart products variable */ $this->prepare_cart_products(); /* Print your product options markup */ $this->show_your_product_options( $checkout_id, $product_sel_option ); } } /** * Prepare cart products */ public function prepare_cart_products() { $cart_products = array(); $get_cart = WC()->cart->get_cart(); foreach ( $get_cart as $cart_item_key => $cart_item ) { $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) { $_product->quantity = $cart_item['quantity']; $cart_products[ $_product->get_id() ] = $_product; } } self::$cart_items = $get_cart; self::$cart_products = $cart_products; } /** * Get all selected products * * @param int $post_id post id. * @return array product IDs. */ public function get_all_main_products( $post_id ) { if ( null === self::$all_main_products ) { $product_option_data = wcf()->options->get_checkout_meta_value( $post_id, 'wcf-product-options-data' ); $checkout_products = wcf_pro()->utils->get_selected_product_options_data( $post_id, $product_option_data ); // merge two array. foreach ( $checkout_products as $in => $data ) { $unique_id = isset( $data['unique_id'] ) ? $data['unique_id'] : ''; if ( isset( $product_option_data[ $unique_id ] ) ) { $checkout_products[ $in ] = wp_parse_args( $product_option_data[ $unique_id ], $checkout_products[ $in ] ); } $checkout_products[ $in ]['product_id'] = $data['product']; $checkout_products[ $in ]['default_quantity'] = 1; if ( ! isset( $data['cart_item_key'] ) ) { $checkout_products[ $in ]['cart_item_key'] = ''; } $_product = wc_get_product( $data['product'] ); if ( ! empty( $_product ) ) { $checkout_products[ $in ]['variable'] = false; $checkout_products[ $in ]['variation'] = false; if ( $_product->is_type( 'variable' ) ) { $checkout_products[ $in ]['variable'] = true; } if ( $_product->is_type( 'variation' ) ) { $checkout_products[ $in ]['variation'] = true; } if ( $_product->is_type( 'variable-subscription' ) ) { $checkout_products[ $in ]['variable-subscription'] = true; } if ( $_product->is_type( 'subscription_variation' ) ) { $checkout_products[ $in ]['subscription_variation'] = true; } if ( $_product->is_type( 'subscription' ) ) { $checkout_products[ $in ]['subscription'] = true; } } } self::$all_main_products = $checkout_products; } return self::$all_main_products; } /*================ Force all products option ===========================================*/ /** * Quantity selection markup * * @param object $current_product product. * @param array $data product data. * @return string */ public function force_all_product_markup( $current_product, $data ) { $output = ''; $selection_type = 'force-all'; if ( $data['variable'] || $data['variation'] ) { if ( $data['variable'] ) { $current_variation_id = false; $show = false; $single_variation = false; $default_attributes = $current_product->get_default_attributes(); if ( ! empty( $default_attributes ) ) { foreach ( $current_product->get_children() as $c_in => $variation_id ) { $single_variation = new WC_Product_Variation( $variation_id ); if ( ! $single_variation->is_in_stock() ) { continue; } if ( 'yes' === self::$is_variation ) { if ( 'inline' === self::$variation_as ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'inline', $data, $selection_type ); } elseif ( 'popup' === self::$variation_as ) { if ( $default_attributes == $single_variation->get_attributes() ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'popup', $data, $selection_type ); break; } } } elseif ( $default_attributes == $single_variation->get_attributes() ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } else { $product_childrens = $current_product->get_children(); if ( is_array( $product_childrens ) && 'yes' === self::$is_variation ) { if ( 'inline' === self::$variation_as ) { foreach ( $product_childrens as $c_in => $c_id ) { $single_variation = new WC_Product_Variation( $c_id ); $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'inline', $data, $selection_type ); } } else { if ( isset( $product_childrens[0] ) ) { $single_variation_product = $this->get_variation_product_from_cart( $current_product->get_id() ); $single_variation_product = $single_variation_product ? $single_variation_product : $product_childrens[0]; $single_variation = new WC_Product_Variation( $single_variation_product ); $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'popup', $data, $selection_type ); } } } elseif ( isset( $product_childrens[0] ) ) { $single_variation = new WC_Product_Variation( $product_childrens[0] ); $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } else { $single_variation = $current_product; $parent_product = wc_get_product( $current_product->get_parent_id() ); $output .= $this->get_variation_product_markup( $parent_product, $single_variation, '', $data, $selection_type ); } } else { $output .= $this->get_normal_product_markup( $current_product, $data, $selection_type ); } return $output; } /*================ Single selection options =============================================*/ /** * Quantity selection markup * * @param object $current_product product obj. * @param array $data product data. * @return string */ public function single_sel_product_markup( $current_product, $data ) { $output = ''; $selection_type = 'single-selection'; if ( $data['variable'] || $data['variation'] ) { if ( $data['variable'] ) { $current_variation_id = false; $show = false; $single_variation = false; $default_attributes = $current_product->get_default_attributes(); if ( ! empty( $default_attributes ) ) { foreach ( $current_product->get_children() as $var_index => $variation_id ) { $single_variation = new WC_Product_Variation( $variation_id ); if ( 'yes' === self::$is_variation ) { if ( 'popup' === self::$variation_as ) { if ( $default_attributes == $single_variation->get_attributes() ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'popup', $data, $selection_type ); break; } } else { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } elseif ( $default_attributes == $single_variation->get_attributes() ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } else { $product_childrens = $current_product->get_children(); if ( is_array( $product_childrens ) && 'yes' === self::$is_variation ) { foreach ( $product_childrens as $c_in => $c_id ) { $single_variation = new WC_Product_Variation( $c_id ); if ( ! $single_variation->is_in_stock() || 'publish' !== $single_variation->get_status() ) { continue; } if ( 'popup' === self::$variation_as ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'popup', $data, $selection_type ); break; } else { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } elseif ( isset( $product_childrens[0] ) ) { $single_variation = new WC_Product_Variation( $product_childrens[0] ); $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } else { $single_variation = $current_product; $parent_product = wc_get_product( $current_product->get_parent_id() ); $output .= $this->get_variation_product_markup( $parent_product, $single_variation, '', $data, $selection_type ); } } else { $output .= $this->get_normal_product_markup( $current_product, $data, $selection_type ); } return $output; } /*================ Multiple selection options ============================================*/ /** * Quantity selection markup * * @param object $current_product product. * @param array $data product data. * @return string */ public function multiple_sel_product_markup( $current_product, $data ) { $output = ''; $selection_type = 'multiple-selection'; if ( $data['variable'] || $data['variation'] ) { if ( $data['variable'] ) { $current_variation_id = false; $show = false; $single_variation = false; $default_attributes = $current_product->get_default_attributes(); if ( ! empty( $default_attributes ) ) { foreach ( $current_product->get_children() as $var_index => $variation_id ) { $single_variation = new WC_Product_Variation( $variation_id ); if ( 'yes' === self::$is_variation ) { if ( 'popup' === self::$variation_as ) { if ( $default_attributes == $single_variation->get_attributes() ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'popup', $data, $selection_type ); break; } } else { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } elseif ( $default_attributes == $single_variation->get_attributes() ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } else { $product_childrens = $current_product->get_children(); if ( is_array( $product_childrens ) && 'yes' === self::$is_variation ) { foreach ( $product_childrens as $c_in => $c_id ) { $single_variation = new WC_Product_Variation( $c_id ); if ( ! $single_variation->is_in_stock() || 'publish' !== $single_variation->get_status() ) { continue; } if ( 'popup' === self::$variation_as ) { $output .= $this->get_variation_product_markup( $current_product, $single_variation, 'popup', $data, $selection_type ); break; } else { $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } elseif ( isset( $product_childrens[0] ) ) { $single_variation = new WC_Product_Variation( $product_childrens[0] ); $output .= $this->get_variation_product_markup( $current_product, $single_variation, '', $data, $selection_type ); } } } else { $single_variation = $current_product; $parent_product = wc_get_product( $current_product->get_parent_id() ); $output .= $this->get_variation_product_markup( $parent_product, $single_variation, '', $data, $selection_type ); } } else { $output .= $this->get_normal_product_markup( $current_product, $data, $selection_type ); } return $output; } /*=====================================================================================*/ /** * Quantity update in cart */ public function quantity_update() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_quantity_update' ) ) { return; } wc_maybe_define_constant( 'WOOCOMMERCE_CHECKOUT', true ); $option = isset( $_POST['option'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['option'] ) ) : array(); $product_id = intval( $option['product_id'] ); $_product = wc_get_product( $product_id ); $input_quantity = intval( $option['input_quantity'] ); $input_quantity = ( 0 >= $input_quantity ) ? 1 : $input_quantity; $quantity = intval( $option['quantity'] ); $product_type = sanitize_text_field( $option['type'] ); $mode = sanitize_text_field( $option['mode'] ); $final_quantity = intval( $input_quantity * $quantity ); $variation_id = intval( $option['variation_id'] ); $variations = array(); $cart_products = array(); $new_key = ''; foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { $cart_products[ $cart_item['product_id'] ] = $cart_item_key; if ( $cart_item['variation_id'] > 0 ) { $variations[ $cart_item['variation_id'] ] = $cart_item_key; } } if ( 'variation' === $product_type ) { $variation_id = intval( $option['variation_id'] ); if ( ! isset( $variations[ $variation_id ] ) ) { WC()->cart->add_to_cart( $product_id, $final_quantity, $variation_id ); } } else { if ( ! isset( $cart_products[ $product_id ] ) ) { WC()->cart->add_to_cart( $product_id, $final_quantity ); } } foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { if ( in_array( $product_type, array( 'variation', 'variable-subscription', 'subscription_variation' ), true ) ) { if ( isset( $variations[ $variation_id ] ) && ( $cart_item['quantity'] != $final_quantity && ! $this->is_product_sold_individually( $cart_item ) ) && ( $cart_item['variation_id'] == $variation_id ) && ( $cart_item_key == $variations[ $variation_id ] ) ) { WC()->cart->set_quantity( $cart_item_key, $final_quantity ); } if ( isset( $variations[ $variation_id ] ) && ( 0 == $final_quantity ) && ( $cart_item['variation_id'] == $variation_id ) ) { WC()->cart->remove_cart_item( $cart_item_key ); } } else { if ( isset( $cart_products[ $product_id ] ) && ( $cart_item['quantity'] != $final_quantity && ! $this->is_product_sold_individually( $cart_item ) ) && ( $cart_item['product_id'] == $product_id ) && $cart_item_key == $option['cart_item_key'] ) { WC()->cart->set_quantity( $cart_item_key, $final_quantity ); } if ( isset( $cart_products[ $product_id ] ) && ( 0 == $final_quantity ) && ( $cart_item['product_id'] == $product_id ) ) { WC()->cart->remove_cart_item( $cart_item_key ); } } } /* Get display discounted data */ $display_discount_data = $this->calculate_input_discount_data( $option['original_price'], $option['discounted_price'], $final_quantity ); $data = array( 'display_quantity' => $final_quantity, 'display_price' => $display_discount_data['display_price'], 'display_discount_value' => $display_discount_data['discount_value'], 'display_discount_percent' => $display_discount_data['discount_percent'], ); if ( in_array( $product_type, array( 'subscription', 'variable-subscription', 'subscription_variation' ), true ) ) { $data['subscription_price'] = wc_price( $option['subscription_price'] * $final_quantity ); $data['sign_up_fee'] = wc_price( $option['sign_up_fee'] * $final_quantity ); } do_action( 'wcf_after_quantity_update', $product_id ); wcf_update_the_checkout_transient( $option['checkout_id'] ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /************** Ajax *************************************************************************/ /** * Force All Selection */ public function variation_selection() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_variation_selection' ) ) { return; } wc_maybe_define_constant( 'WOOCOMMERCE_CHECKOUT', true ); $option = isset( $_POST['option'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['option'] ) ) : array(); $product_id = intval( $option['product_id'] ); $mode = $option['mode']; $variation_id = intval( $option['variation_id'] ); $input_quantity = intval( $option['input_quantity'] ); $final_quantity = $input_quantity * $option['quantity']; $_product = wc_get_product( $product_id ); $type = sanitize_text_field( $option['type'] ); $variation = ''; $assigned_products = $this->get_all_main_products( $option['checkout_id'] ); foreach ( $assigned_products as $key => $value ) { if ( ( intval( $value['product_id'] ) === $product_id || intval( $value['product_id'] ) === $variation_id ) && $option['unique_id'] === $value['unique_id'] ) { $discount_type = ! empty( $value['discount_type'] ) ? $value['discount_type'] : ''; $discount_value = ! empty( $value['discount_value'] ) ? $value['discount_value'] : ''; if ( $variation_id > 0 ) { $variation = wc_get_product( $variation_id ); $_product_price = $variation->get_price(); } else { $_product_price = $_product->get_price(); } } } $_product_price = wcf_pro_filter_price( $_product_price, $product_id, 'original' ); $discount_value = wcf_pro_filter_price( $discount_value, $product_id, 'original' ); $custom_price = wcf_pro()->utils->get_calculated_discount( $discount_type, $discount_value, $_product_price ); $cart_item_data = array(); // Set the Product's custom price even if it is zero. Discount may have applied. if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data = array( 'custom_price' => $custom_price, 'option' => $option, ); } foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { if ( $cart_item['product_id'] === $product_id ) { WC()->cart->remove_cart_item( $cart_item_key ); } } $new_key = WC()->cart->add_to_cart( $product_id, $final_quantity, $variation_id, array(), $cart_item_data ); $product_prices_data = $this->get_calculated_product_prices( $_product, $_product_price, $custom_price, $variation ); /* Get display discounted data */ $display_discount_data = $this->calculate_input_discount_data( $product_prices_data['product_price'], $product_prices_data['custom_price'], $final_quantity ); $data = array( 'display_quantity' => $final_quantity, 'display_price' => $display_discount_data['display_price'], 'display_discount_value' => $display_discount_data['discount_value'], 'display_discount_percent' => $display_discount_data['discount_percent'], ); if ( in_array( $type, array( 'variation', 'variable-subscription', 'subscription_variation' ), true ) ) { $data['subscription_price'] = wc_price( $option['subscription_price'] * $final_quantity ); $data['sign_up_fee'] = wc_price( $option['sign_up_fee'] * $final_quantity ); } do_action( 'wcf_after_force_all_selection', $variation_id ); wcf_update_the_checkout_transient( $option['checkout_id'] ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /** * Multiple Selection */ public function multiple_selection() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_multiple_selection' ) ) { return; } wc_maybe_define_constant( 'WOOCOMMERCE_CHECKOUT', true ); $option = isset( $_POST['option'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['option'] ) ) : array(); $product_id = intval( $option['product_id'] ); $variation_id = isset( $option['variation_id'] ) ? intval( $option['variation_id'] ) : 0; $type = sanitize_text_field( $option['type'] ); $is_checked = sanitize_text_field( $option['checked'] ); $input_quantity = intval( $option['input_quantity'] ); $input_quantity = ( 0 >= $input_quantity ) ? 1 : $input_quantity; $final_quantity = intval( $input_quantity * $option['quantity'] ); $new_key = ''; $discount_type = ''; $discount_value = ''; $_product = wc_get_product( $product_id ); $_product_price = $_product->get_price( $product_id ); $assigned_products = $this->get_all_main_products( $option['checkout_id'] ); $variation = ''; foreach ( $assigned_products as $key => $value ) { if ( ( intval( $value['product_id'] ) === $product_id || intval( $value['product_id'] ) === $variation_id ) && $option['unique_id'] === $value['unique_id'] ) { $discount_type = ! empty( $value['discount_type'] ) ? $value['discount_type'] : ''; $discount_value = ! empty( $value['discount_value'] ) ? $value['discount_value'] : ''; if ( $variation_id > 0 ) { $variation = wc_get_product( $variation_id ); $_product_price = $variation->get_price(); } else { $_product_price = $_product->get_price(); } } } $_product_price = wcf_pro_filter_price( $_product_price, $product_id, 'original' ); $discount_value = wcf_pro_filter_price( $discount_value, $product_id, 'original' ); $custom_price = wcf_pro()->utils->get_calculated_discount( $discount_type, $discount_value, $_product_price ); $cart_item_data = array(); // Set the Product's custom price even if it is zero. Discount may have applied. if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data = array( 'custom_price' => $custom_price, 'option' => $option, ); } if ( 'yes' === $is_checked ) { if ( in_array( $type, array( 'variation', 'variable-subscription', 'subscription_variation' ), true ) ) { $new_key = WC()->cart->add_to_cart( $product_id, $final_quantity, $variation_id, array(), $cart_item_data ); } else { $new_key = WC()->cart->add_to_cart( $product_id, $final_quantity, 0, array(), $cart_item_data ); } do_action( 'wcf_after_multiple_selection', $product_id ); } else { foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { if ( 'variation' === $type ) { if ( $cart_item_key === $option['cart_item_key'] ) { WC()->cart->remove_cart_item( $cart_item_key ); } } else { if ( $cart_item_key === $option['cart_item_key'] ) { WC()->cart->remove_cart_item( $cart_item_key ); } } } } $product_prices_data = $this->get_calculated_product_prices( $_product, $_product_price, $custom_price, $variation ); /* Get display discounted data */ $display_discount_data = $this->calculate_input_discount_data( $product_prices_data['product_price'], $product_prices_data['custom_price'], $final_quantity ); $data = array( 'display_quantity' => $final_quantity, 'display_price' => $display_discount_data['display_price'], 'display_discount_value' => $display_discount_data['discount_value'], 'display_discount_percent' => $display_discount_data['discount_percent'], ); if ( in_array( $type, array( 'variation', 'variable-subscription', 'subscription_variation' ), true ) ) { $data['subscription_price'] = wc_price( $option['subscription_price'] * $final_quantity ); $data['sign_up_fee'] = wc_price( $option['sign_up_fee'] * $final_quantity ); } do_action( 'wcf_after_multiple_selection', $product_id ); wcf_update_the_checkout_transient( $option['checkout_id'] ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /** * Single Selection */ public function single_selection() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_single_selection' ) ) { return; } wc_maybe_define_constant( 'WOOCOMMERCE_CHECKOUT', true ); $option = isset( $_POST['option'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['option'] ) ) : array(); $product_id = intval( $option['product_id'] ); $variation_id = isset( $option['variation_id'] ) ? intval( $option['variation_id'] ) : 0; $type = sanitize_text_field( $option['type'] ); $input_quantity = intval( $option['input_quantity'] ); $input_quantity = ( 0 >= $input_quantity ) ? 1 : $input_quantity; $final_quantity = intval( $option['quantity'] * $input_quantity ); $checkout_id = intval( $option['checkout_id'] ); $discount_type = ''; $discount_value = ''; $_product = wc_get_product( $product_id ); $_product_price = $_product->get_price( $product_id ); $assigned_products = $this->get_all_main_products( $checkout_id ); $variation = ''; $products = array(); if ( ! empty( $assigned_products ) ) { foreach ( $assigned_products as $key => $value ) { if ( $value['variable'] ) { $temp_product = wc_get_product( $value['product_id'] ); $children = $temp_product->get_children(); $products = array_merge( $products, $children ); } array_push( $products, intval( $value['product_id'] ) ); } } $this->remove_products_from_cart( $products ); // get value for calculate discount. foreach ( $assigned_products as $key => $value ) { if ( ( intval( $value['product_id'] ) === $product_id || intval( $value['product_id'] ) === $variation_id ) && $option['unique_id'] === $value['unique_id'] ) { $discount_type = ! empty( $value['discount_type'] ) ? $value['discount_type'] : ''; $discount_value = ! empty( $value['discount_value'] ) ? $value['discount_value'] : ''; if ( $variation_id > 0 ) { $variation = wc_get_product( $variation_id ); $_product_price = $variation->get_price(); } else { $_product_price = $_product->get_price(); } } } $_product_price = wcf_pro_filter_price( $_product_price, $product_id, 'original' ); $discount_value = wcf_pro_filter_price( $discount_value, $product_id, 'original' ); $custom_price = wcf_pro()->utils->get_calculated_discount( $discount_type, $discount_value, $_product_price, $variation ); $cart_item_data = array(); if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data = array( 'custom_price' => $custom_price, ); } $new_key = ''; if ( in_array( $type, array( 'variation', 'variable-subscription', 'subscription_variation' ), true ) ) { $new_key = WC()->cart->add_to_cart( $product_id, $final_quantity, $variation_id, array(), $cart_item_data ); } else { $new_key = WC()->cart->add_to_cart( $product_id, $final_quantity, 0, array(), $cart_item_data ); } $product_prices_data = $this->get_calculated_product_prices( $_product, $_product_price, $custom_price, $variation ); /* Get display discounted data */ $display_discount_data = $this->calculate_input_discount_data( $product_prices_data['product_price'], $product_prices_data['custom_price'], $final_quantity ); $data = array( 'display_quantity' => $final_quantity, 'display_price' => $display_discount_data['display_price'], 'display_discount_value' => $display_discount_data['discount_value'], 'display_discount_percent' => $display_discount_data['discount_percent'], ); if ( in_array( $type, array( 'subscription', 'variable-subscription', 'subscription_variation' ), true ) ) { $data['subscription_price'] = wc_price( $option['subscription_price'] * $final_quantity ); $data['sign_up_fee'] = wc_price( $option['sign_up_fee'] * $final_quantity ); } do_action( 'wcf_after_single_selection', $product_id ); wcf_update_the_checkout_transient( $checkout_id ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /** * Calculate the product price with tax and sign up fee. * * @param array $_product product array. * @param float|string|int $_product_price product price. * @param float|string|int $custom_price custome price. * @param object $variation variation product. * */ public function get_calculated_product_prices( $_product, $_product_price, $custom_price, $variation ) { $tax_enabled = get_option( 'woocommerce_calc_taxes' ); if ( $variation ) { $_product = $variation; } if ( 'yes' === $tax_enabled ) { $_product_price = $this->get_taxable_product_price( $_product, $_product_price ); if ( '' !== $custom_price ) { $custom_price = $this->get_taxable_product_price( $_product, $custom_price ); } } if ( wcf_pro()->is_wcs_active && $_product->is_type( 'subscription' ) || $_product->is_type( 'variable-subscription' ) || $_product->is_type( 'subscription_variation' ) ) { $_product_price += $this->get_subscription_sign_up_fee( $_product ); if ( '' !== $custom_price ) { $custom_price += $this->get_subscription_sign_up_fee( $_product ); } if ( ! empty( $_product_price ) && WC_Subscriptions_Product::get_trial_length( $_product ) > 0 ) { $_product_price = $this->get_subscription_sign_up_fee( $_product ); $custom_price = ''; } } $product_prices_data = array( 'product_price' => $_product_price, 'custom_price' => $custom_price, ); return $product_prices_data; } /** * Check product in cart and remove. * * @since 1.1.5 * @param array $products product array. * @return void. * */ public function remove_products_from_cart( $products ) { if ( ! empty( $products ) ) { foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { $label = 'product_id'; if ( 0 !== $cart_item['variation_id'] ) { $label = 'variation_id'; } if ( in_array( $cart_item[ $label ], $products, true ) ) { WC()->cart->remove_cart_item( $cart_item_key ); } } } } /**************************************** Popups *************************************/ /** * Variation Popup */ public function variation_popup() { if ( _is_wcf_checkout_type() ) { wp_enqueue_script( 'wc-add-to-cart-variation' ); wp_enqueue_script( 'flexslider' ); include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/quick-view/quick-view-modal.php'; } } /** * Load Quick View Product. * * @since 0.0.1 * @access public */ public function load_quick_view_product() { if ( ! isset( $_REQUEST['product_id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended die(); } // Action // add_action( 'cartflows_woo_quick_view_product_image', 'woocommerce_show_product_sale_flash', 10 ); */ // Image. add_action( 'cartflows_woo_quick_view_product_image', array( $this, 'quick_view_product_images_markup' ), 20 ); // Summary. add_action( 'cartflows_woo_quick_view_product_summary', array( $this, 'quick_view_product_content_structure' ), 10 ); $product_id = intval( $_REQUEST['product_id'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended // set the main wp query for the product. wp( 'p=' . $product_id . '&post_type=product' ); ob_start(); // load content template. include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/quick-view/quick-view-product.php'; // Reason for PHPCS ignore: wp_kses_post will not work as it removing input tags hence ignoring below rule. echo ob_get_clean(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped die(); } /** * Quick view product images markup. */ public function quick_view_product_images_markup() { include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/quick-view/quick-view-product-image.php'; } /** * Product Option title. * * @return title. */ public function product_option_title() { return apply_filters( 'cartflows_product_option_title', self::$title ); } /** * Choose a vatiation text. * * @return text. */ public function variation_popup_toggle_text() { return apply_filters( 'cartflows_variation_popup_toggle_text', __( 'Choose a Variation', 'cartflows-pro' ) ); } /** * Quick view product content structure. */ public function quick_view_product_content_structure() { global $product; $post_id = $product->get_id(); $single_structure = apply_filters( 'cartflows_quick_view_product_structure', array( 'title', // 'ratings', 'price', 'short_desc', // 'meta', 'add_cart', ) ); if ( is_array( $single_structure ) && ! empty( $single_structure ) ) { foreach ( $single_structure as $value ) { switch ( $value ) { case 'title': /** * Add Product Title on single product page for all products. */ do_action( 'cartflows_quick_view_title_before', $post_id ); woocommerce_template_single_title(); do_action( 'cartflows_quick_view_title_after', $post_id ); break; case 'price': /** * Add Product Price on single product page for all products. */ do_action( 'cartflows_quick_view_price_before', $post_id ); woocommerce_template_single_price(); do_action( 'cartflows_quick_view_price_after', $post_id ); break; case 'ratings': /** * Add rating on single product page for all products. */ do_action( 'cartflows_quick_view_rating_before', $post_id ); woocommerce_template_single_rating(); do_action( 'cartflows_quick_view_rating_after', $post_id ); break; case 'short_desc': do_action( 'cartflows_quick_view_short_description_before', $post_id ); woocommerce_template_single_excerpt(); do_action( 'cartflows_quick_view_short_description_after', $post_id ); break; case 'add_cart': do_action( 'cartflows_quick_view_add_to_cart_before', $post_id ); woocommerce_template_single_add_to_cart(); do_action( 'cartflows_quick_view_add_to_cart_after', $post_id ); break; case 'meta': do_action( 'cartflows_quick_view_category_before', $post_id ); woocommerce_template_single_meta(); do_action( 'cartflows_quick_view_category_after', $post_id ); break; default: break; } } } } /** * Handle adding variable products to the cart. * * @param array $form_data Form data of the user selction. * @param int $product_id Product ID to add to the cart. * @param int $final_quantity Input quantity to add to the cart. * @param array $variation_id Variation ID to add to the cart. * @param array $cart_item_data Extra data to add in the cart. * @return array data. */ public function handle_add_to_cart_variation_attributes( $form_data, $product_id, $final_quantity, $variation_id, $cart_item_data ) { $data = array( 'cart_key' => '', 'variation_data' => array(), ); $variation_id = empty( $form_data['variation_id'] ) ? '' : absint( wp_unslash( $form_data['variation_id'] ) ); $quantity = wc_stock_amount( wp_unslash( $final_quantity ) ); $missing_attributes = array(); $variations = array(); $adding_to_cart = wc_get_product( $product_id ); if ( ! $adding_to_cart ) { return false; } // If the $product_id was in fact a variation ID, update the variables. if ( $adding_to_cart->is_type( 'variation' ) ) { $variation_id = $product_id; $product_id = $adding_to_cart->get_parent_id(); $adding_to_cart = wc_get_product( $product_id ); if ( ! $adding_to_cart ) { return false; } } // Gather posted attributes. $posted_attributes = array(); foreach ( $adding_to_cart->get_attributes() as $attribute ) { if ( ! $attribute['is_variation'] ) { continue; } $attribute_key = 'attribute_' . sanitize_title( $attribute['name'] ); if ( isset( $form_data[ $attribute_key ] ) ) { if ( $attribute['is_taxonomy'] ) { $value = sanitize_title( wp_unslash( $form_data[ $attribute_key ] ) ); } else { $value = html_entity_decode( wc_clean( wp_unslash( $form_data[ $attribute_key ] ) ), ENT_QUOTES, get_bloginfo( 'charset' ) ); } $posted_attributes[ $attribute_key ] = $value; } } // Check the data we have is valid. $variation_data = wc_get_product_variation_attributes( $variation_id ); foreach ( $adding_to_cart->get_attributes() as $attribute ) { if ( ! $attribute['is_variation'] ) { continue; } // Get valid value from variation data. $attribute_key = 'attribute_' . sanitize_title( $attribute['name'] ); $valid_value = isset( $variation_data[ $attribute_key ] ) ? $variation_data[ $attribute_key ] : ''; /** * If the attribute value was posted, check if it's valid. * * If no attribute was posted, only error if the variation has an 'any' attribute which requires a value. */ if ( isset( $posted_attributes[ $attribute_key ] ) ) { $value = $posted_attributes[ $attribute_key ]; // Allow if valid or show error. if ( $valid_value === $value ) { $variations[ $attribute_key ] = $value; } elseif ( '' === $valid_value && in_array( $value, $attribute->get_slugs(), true ) ) { // If valid values are empty, this is an 'any' variation so get all possible values. $variations[ $attribute_key ] = $value; } else { /* translators: %s: Attribute name. */ $data['error'] = sprintf( __( 'Invalid value posted for %s', 'cartflows-pro' ), wc_attribute_label( $attribute['name'] ) ); } } elseif ( '' === $valid_value ) { $missing_attributes[] = wc_attribute_label( $attribute['name'] ); } } if ( ! empty( $missing_attributes ) ) { /* translators: %s: Attribute name. */ $data['error'] = sprintf( _n( '%s is a required field', '%s are required fields', count( $missing_attributes ), 'cartflows-pro' ), wc_format_list_of_items( $missing_attributes ) ); } $passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity, $variation_id, $variations ); $data['variation_data'] = $variations; $data['cart_key'] = WC()->cart->add_to_cart( $product_id, $quantity, $variation_id, $variations, $cart_item_data ); return $data; } /** * Single Product add to cart ajax request * * @since 1.1.0 * * @return void. */ public function add_cart_single_product_ajax() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_quick_view_add_cart' ) ) { return; } wc_maybe_define_constant( 'WOOCOMMERCE_CHECKOUT', true ); $form_data = isset( $_POST['form_data'] ) ? sanitize_text_field( wp_unslash( $_POST['form_data'] ) ) : ''; parse_str( $form_data, $form_data ); $option = isset( $_POST['option'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['option'] ) ) : ''; $product_id = intval( $option['product_id'] ); $product_id = isset( $_POST['product_id'] ) ? intval( $_POST['product_id'] ) : 0; $variation_id = isset( $_POST['variation_id'] ) ? intval( $_POST['variation_id'] ) : 0; $input_quantity = intval( $option['input_quantity'] ); $final_quantity = intval( $option['quantity'] * $input_quantity ); $checkout_id = intval( $option['checkout_id'] ); $discount_type = ''; $discount_value = ''; $_product = wc_get_product( $product_id ); $_product_price = $_product->get_price( $product_id ); $assigned_products = $this->get_all_main_products( $checkout_id ); $new_key = ''; $product_type = ''; $variation = ''; $trial_period = ''; $data = array( 'name' => '', 'product_id' => $product_id, 'variation_id' => $variation_id, 'added_to_cart' => 'no', 'price' => false, ); if ( $variation_id ) { // get value for calculate discount. foreach ( $assigned_products as $key => $value ) { if ( ( intval( $value['product_id'] ) === $product_id || intval( $value['product_id'] ) === $variation_id ) && $option['unique_id'] === $value['unique_id'] ) { $discount_type = ! empty( $value['discount_type'] ) ? $value['discount_type'] : ''; $discount_value = ! empty( $value['discount_value'] ) ? $value['discount_value'] : ''; $variation = wc_get_product( $variation_id ); $_product_price = $variation->get_price(); $product_type = $variation->get_type(); } } $custom_price = wcf_pro()->utils->get_calculated_discount( $discount_type, $discount_value, $_product_price ); $cart_item_data = array(); // Set the Product's custom price even if it is zero. Discount may have applied. if ( Cartflows_Pro_Helper::is_valid_custom_price( $custom_price ) ) { $cart_item_data = array( 'custom_price' => $custom_price, ); } foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { if ( $cart_item['product_id'] === $product_id ) { WC()->cart->remove_cart_item( $cart_item_key ); } } $add_cart_data = $this->handle_add_to_cart_variation_attributes( $form_data, $product_id, $final_quantity, $variation_id, $cart_item_data ); $new_key = $add_cart_data['cart_key']; $product_prices_data = $this->get_calculated_product_prices( $_product, $_product_price, $custom_price, $variation ); /* Get display discounted data */ $display_discount_data = $this->calculate_input_discount_data( $product_prices_data['product_price'], $product_prices_data['custom_price'], $final_quantity ); /* Get selected attribute */ $attribute_data = $this->get_selected_attributes( $_product, $variation, $add_cart_data['variation_data'] ); $display_attr = ''; if ( is_array( $attribute_data ) && ! empty( $attribute_data ) ) { foreach ( $attribute_data as $att_slug => $att_data ) { $display_attr .= ''; $display_attr .= $att_data['label'] . ': ' . $att_data['value']; $display_attr .= ','; $display_attr .= ''; } } $signup_fee = ''; $subscription_price = ''; $subscription_details = ''; $is_subscription = false; if ( 'subscription_variation' === $product_type && wcf_pro()->is_wcs_active ) { $is_subscription = true; $price = '' !== $custom_price ? $custom_price : $_product_price; $subscription_price = $this->get_taxable_product_price( $variation, $price ); $subscription_price = $subscription_price * $final_quantity; $signup_fee = $this->get_subscription_sign_up_fee( $variation ) * $final_quantity; $display_subscription_price = wc_price( $subscription_price ); $display_subscription_details = __( ' every ', 'cartflows-pro' ) . WC_Subscriptions_Product::get_interval( $variation ) . ' ' . WC_Subscriptions_Product::get_period( $variation ); $display_signup_fee = wc_price( $signup_fee ); $_product_price = $subscription_price + $signup_fee; // If product has free trial then show sign up fee only. if ( WC_Subscriptions_Product::get_trial_length( $variation->get_id() ) > 0 ) { $_product_price = $signup_fee; $trial_period = $this->get_subscription_trial_period( $variation ); } $custom_price = '' !== $custom_price ? $custom_price + $signup_fee : $custom_price; } $data = array( 'name' => $variation->get_name(), 'display_attr' => $display_attr, 'product_id' => $product_id, 'variation_id' => $variation_id, 'variation_image' => $variation->get_image(), 'added_to_cart' => 'yes', 'original_price' => $_product_price, 'discounted_price' => $custom_price, 'price' => '' . wc_price( $variation->get_price() ) . '', 'display_quantity' => $final_quantity, 'display_price' => $display_discount_data['display_price'], 'display_discount_value' => $display_discount_data['discount_value'], 'display_discount_percent' => $display_discount_data['discount_percent'], ); if ( $is_subscription ) { $data['display_subscription_price'] = $display_subscription_price; $data['display_subscription_details'] = $display_subscription_details; $data['display_signup_fee'] = $display_signup_fee; $data['subscription_price'] = $subscription_price; $data['signup_fee'] = $signup_fee; $data['trial_period_string'] = $trial_period; } } do_action( 'wcf_after_quick_view_selection', $variation_id ); wcf_update_the_checkout_transient( $checkout_id ); wp_send_json( wcf_pro()->utils->get_fragments( $new_key, $data ) ); } /** * Get Cart product variation. * * @since 1.1.5 * @param int $product_id product_id. * @return int variation_id. * */ public function get_variation_product_from_cart( $product_id ) { $variation_id = 0; $get_cart = WC()->cart->get_cart(); foreach ( $get_cart as $cart_item_key => $cart_item ) { if ( $cart_item['product_id'] == $product_id ) { $variation_id = $cart_item['variation_id']; break; } } return $variation_id; } /** * Get Cart product quantity. * * @since 1.1.0 * @param int $product_id product_id. * @return int $qty. */ public function get_cart_product_quantity( $product_id ) { $qty = 1; $cart_product = isset( self::$cart_products[ $product_id ] ) ? self::$cart_products[ $product_id ] : null; if ( isset( $cart_product ) && $cart_product->quantity ) { $qty = $cart_product->quantity; } return $qty; } /** * Calculate discount for product. * * @param string $discount_type discount type. * @param int $discount_value discount value. * @param int $product_price product price. * @return int * @since 1.1.5 */ public function calculate_pre_checkout_discount( $discount_type, $discount_value, $product_price ) { $custom_price = ''; if ( 'discount_percent' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $product_price - ( ( $product_price * $discount_value ) / 100 ); } } elseif ( 'discount_price' === $discount_type ) { if ( $discount_value > 0 ) { $custom_price = $product_price - $discount_value; } } return $custom_price; } /** * Your product comman header section. * * @param int $checkout_id checkout id. * @param string $type optin type. */ public function show_your_product_options( $checkout_id, $type ) { $products = $this->get_all_main_products( $checkout_id ); if ( ! is_array( $products ) || empty( $products ) ) { return; } include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/your-product/your-product-section.php'; } /** * Your product highlight class. * * @param array $data product data. */ public function get_product_highlight_data( $data ) { $highlight_data = array( 'parent_class' => '', 'html_markup' => '', ); if ( isset( $data['enable_highlight'] ) && 'yes' === $data['enable_highlight'] && ! empty( $data['highlight_text'] ) ) { $highlight_data = array( 'parent_class' => ' wcf-highlight', 'html_markup' => '' . $data['highlight_text'] . '', ); } return $highlight_data; } /** * Calculate display discounted data when user input quanity or select product. * * @param float $original_price original price. * @param float $discounted_price discounted price. * @param int $final_quantity final quantity. */ public function calculate_input_discount_data( $original_price, $discounted_price, $final_quantity ) { $display_data = array( 'discount_value' => '', 'discount_percent' => '', ); $total_original_price = $original_price * $final_quantity; $save_value = ''; $save_percent = ''; $currency_code = wcf_pro_filter_currency_code( get_woocommerce_currency() ); if ( '' === $discounted_price ) { $display_data['display_price'] = wc_price( $total_original_price, array( 'currency' => $currency_code ) ); } else { $total_discounted_price = $discounted_price * $final_quantity; $display_data['display_price'] = '' . wc_price( $total_original_price, array( 'currency' => $currency_code ) ) . ' ' . wc_price( $total_discounted_price ) . ''; $save_value = $total_original_price - $total_discounted_price; $save_percent = $save_value / $total_original_price * 100; $display_data['discount_value'] = wc_price( $save_value, array( 'currency' => $currency_code ) ); $display_data['discount_percent'] = number_format( (float) $save_percent, 2, '.', '' ) . '%'; } return $display_data; } /** * Your product common price section. * * @param WC_Product $current_product product data. * @param array $data data. * @param WC_Product $single_variation product data. */ public function your_product_price( $current_product, $data, $single_variation ) { if ( ! empty( $single_variation ) ) { $product_price = $single_variation->get_price(); $product = $single_variation; } else { $product_price = $current_product->get_price(); $product = $current_product; } $sign_up_fee = 0; $is_tax = false; $original_product_price = $product_price; $subscription_price = $product_price; $trial_period = ''; $tax_enabled = get_option( 'woocommerce_calc_taxes' ); if ( 'yes' === $tax_enabled ) { $is_tax = true; $custom_price = $this->get_taxable_product_price( $product, $product_price ); $original_product_price = $custom_price; } $is_subscription_product = $product->is_type( 'subscription' ) || ( isset( $data['variable-subscription'] ) && $data['variable-subscription'] ) || ( isset( $data['subscription_variation'] ) && $data['subscription_variation'] ); if ( $is_subscription_product && wcf_pro()->is_wcs_active ) { $sign_up_fee = $this->get_subscription_sign_up_fee( $product ); $subscription_price = $original_product_price; $original_product_price = $original_product_price + $sign_up_fee; // If product has free trial then show sign up fee only. if ( WC_Subscriptions_Product::get_trial_length( $product->get_id() ) > 0 ) { $original_product_price = ! empty( $sign_up_fee ) ? $sign_up_fee : $original_product_price; $trial_period = $this->get_subscription_trial_period( $product ); } } $total_original_price = $original_product_price * $data['quantity']; $original_price = wc_price( $total_original_price ); $discount_type = $data['discount_type']; $quantity = intval( $data['quantity'] ); $discounted_price = ''; $total_discounted_price = ''; $save_value = ''; $save_percent = ''; if ( ! empty( $discount_type ) && is_numeric( $data['discount_value'] ) ) { $discount_value = wcf_pro_filter_price( $data['discount_value'] ); $discounted_price = $this->calculate_pre_checkout_discount( $discount_type, $discount_value, $product_price ); $discounted_price = $is_tax ? $this->get_taxable_product_price( $product, $discounted_price ) : $discounted_price; $subscription_price = $discounted_price; if ( $is_subscription_product && wcf_pro()->is_wcs_active && class_exists( 'WC_Subscriptions_Product' ) ) { /** * Default: signup fees is zero. * * Case 1: Return the signup fees as it is if the subscription product has a free trial period. * Case 2: Add the signup fees and discounted price if there is no trial period to a subscription product. * Case 3: In case of non subscription product, the signup fees will be zero and only discount_price will be forwarded. */ $discounted_price = WC_Subscriptions_Product::get_trial_length( $product->get_id() ) > 0 ? $sign_up_fee : $discounted_price + $sign_up_fee; } $total_discounted_price = $discounted_price * $quantity; $save_value = $total_original_price - $total_discounted_price; /** * Calculate the discount percentage only if there is a discount. * Save value is not empty and greater than zero. * * P.S: We don't show the product amount with tax. They are displayed without tax irrespective of tax setting in WooCommerce. * */ if ( ! empty( $save_value ) ) { $original_price = wc_format_sale_price( $original_price, $total_discounted_price ); $save_percent = $save_value / $total_original_price * 100; $save_value = wc_price( $save_value ); $save_percent = number_format( (float) $save_percent, 2, '.', '' ) . '%'; } } $product_id = $current_product->get_id(); $variation_id = 0 !== $single_variation ? $single_variation->get_id() : 0; if ( $is_subscription_product ) { $product_type = 'subscription'; } elseif ( $variation_id > 0 ) { $product_type = 'variation'; } else { $product_type = 'simple'; } if ( isset( $data['variable-subscription'] ) && $data['variable-subscription'] ) { $product_type = 'variable-subscription'; } if ( isset( $data['subscription_variation'] ) && $data['subscription_variation'] ) { $product_type = 'subscription_variation'; } $sel_data = array( 'product_id' => $product_id, 'variation_id' => $variation_id, 'type' => $product_type, 'unique_id' => $data['unique_id'], 'mode' => 'quantity', 'highlight_text' => isset( $data['highlight_text'] ) ? $data['highlight_text'] : '', 'quantity' => $data['quantity'], 'default_quantity' => $data['default_quantity'], 'original_price' => $original_product_price, 'discounted_price' => $discounted_price, 'total_discounted_price' => $total_discounted_price, 'currency' => get_woocommerce_currency_symbol(), 'cart_item_key' => $data['cart_item_key'], 'save_value' => $save_value, 'save_percent' => $save_percent, 'sign_up_fee' => $sign_up_fee, 'subscription_price' => $subscription_price, 'trial_period_string' => $trial_period, ); $return = array( 'sel_data' => $sel_data, 'qty' => $quantity, /** * This original price contains the HTML, with scratched original price and the discounted price. * This option is used to display the value on product options section. */ 'original_price' => $original_price, ); return $return; } /** * Get subscription product trial period and length. * * @param WC_Product $product product data. */ public function get_subscription_trial_period( $product ) { $free_trial_string = ''; // Always send the product id instead of the product object as parameter to the WC_Subscriptions_Product functions. $subscription_trial_length = WC_Subscriptions_Product::get_trial_length( $product->get_id() ); if ( 0 !== $subscription_trial_length ) { $subscription_trial_period = WC_Subscriptions_Product::get_trial_period( $product->get_id() ); /* translators: %1$s %2$s : trial length trial period */ $free_trial_string = sprintf( __( ' with %1$s %2$s free trial ', 'cartflows-pro' ), $subscription_trial_length, $subscription_trial_period ); } return $free_trial_string; } /** * Get subscription product sign up fee. * * @param WC_Product $product product data. */ public function get_subscription_sign_up_fee( $product ) { // Always send the product id instead of the product object as parameter to the WC_Subscriptions_Product functions. $subscription_signup_fees = WC_Subscriptions_Product::get_sign_up_fee( $product->get_id() ); $tax_enabled = get_option( 'woocommerce_calc_taxes' ); if ( 'yes' === $tax_enabled ) { $subscription_signup_fees = $this->get_taxable_product_price( $product, $subscription_signup_fees ); } return $subscription_signup_fees; } /** * Get product price with tax. * * @param array $product product data. * @param int|float|string $product_price product price. */ public function get_taxable_product_price( $product, $product_price ) { $display_type = get_option( 'woocommerce_tax_display_cart' ); if ( 'excl' === $display_type ) { $product_price = wc_get_price_excluding_tax( $product, array( 'price' => $product_price ) ); } else { $product_price = wc_get_price_including_tax( $product, array( 'price' => $product_price ) ); } return $product_price; } /** * Get selected attribute data. * * @param WC_Product $current_product product data. * @param WC_Product $single_variation product data. * @param array $form_data selected form data. * * @return array attributes. */ public function get_selected_attributes( $current_product, $single_variation, $form_data = array() ) { $parent_attributes = $current_product->get_attributes(); $attribute_data = array(); foreach ( $parent_attributes as $att_key => $att_obj ) { $att_value = $single_variation->get_attribute( $att_key ); if ( empty( $att_value ) && isset( $form_data[ 'attribute_' . $att_key ] ) ) { $att_value = $form_data[ 'attribute_' . $att_key ]; } $attribute_data[ $att_key ] = array( 'label' => wc_attribute_label( $att_obj->get_name() ), 'value' => $att_value, ); } return $attribute_data; } /** * Normal product markup. * * @param array $current_product product data. * @param array $data data. * @param array $selection_type selection type. */ public function get_normal_product_markup( $current_product, $data, $selection_type ) { include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/your-product/normal-product-markup.php'; } /** * Variation peoduct markup. * * @param array $current_product product data. * @param array $single_variation variation data. * @param array $type show type. * @param array $data products. * @param array $selection_type selection type. */ public function get_variation_product_markup( $current_product, $single_variation, $type, $data, $selection_type ) { include CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/your-product/variation-product-markup.php'; } /** * Check is the product enabled to sold individually or not. * * @since x.x.x * @param array $cart_item Current Cart Items Data. * @return boolean */ public function is_product_sold_individually( $cart_item ) { $product_id = isset( $cart_item['variation_id'] ) && ! empty( $cart_item['variation_id'] ) ? absint( $cart_item['variation_id'] ) : absint( $cart_item['product_id'] ); if ( empty( $product_id ) ) { return false; } $product = wc_get_product( $product_id ); if ( empty( $product ) ) { return false; } return $product->is_sold_individually(); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Product_Options::get_instance(); modules/checkout/includes/checkout-pro-dynamic-css.php000064400000013202147600244370017160 0ustar00divi_status ) { $ob_css .= " .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}{ background: {$bump_bg_color}; border-style: {$bump_border_style}; border-color: {$bump_border_color}; border-radius: {$bump_box_border_radius}; border-width: {$bump_box_border_width}; box-shadow: {$bump_box_shadow_horizontal}px {$bump_box_shadow_vertical}px {$bump_box_shadow_blur}px {$bump_box_shadow_spread}px $bump_box_shadow_color; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap { border-color: {$bump_border_color}; border-top-style: {$bump_border_style}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap { border-color: {$bump_border_color}; border-bottom-style: {$bump_border_style}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-field-wrap{ background: {$bump_label_bg_color}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-field-wrap label{ color: {$bump_label_color}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-desc{ color: {$bump_desc_text_color}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-bump-highlight { color: {$bump_hl_text_color}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .dashicons-arrow-right-alt, .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .dashicons-arrow-left-alt{ color: {$bump_blinking_arrow_color}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-2{ background: {$bump_bg_color}; border-style: {$bump_border_style}; border-color: {$bump_border_color}; } .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-{$ob_id}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap{ border-color: {$bump_border_color}!important; border-top-style: {$bump_border_style}!important; } .et_pb_module #wcf-embed-checkout-form .wcf-{$order_bump_position}.wcf-bump-order-{$ob_id} .wcf-bump-order-image img{ width: {$bump_image_width}px; } img.emoji, img.wp-smiley {} "; if ( 'yes' === $enabled_bump_image_mobile ) { $ob_css .= " @media only screen and (max-width: 520px){ .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-image { display: block; } } "; } else { $ob_css .= " @media only screen and (max-width: 768px){ .et_pb_module #wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-image { display: none; } "; } } else { $ob_css .= " .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}{ background: {$bump_bg_color}; border-style: {$bump_border_style}; border-color: {$bump_border_color}; border-radius: {$bump_box_border_radius}px; border-width: {$bump_box_border_width}px; box-shadow: {$bump_box_shadow_horizontal}px {$bump_box_shadow_vertical}px {$bump_box_shadow_blur}px {$bump_box_shadow_spread}px $bump_box_shadow_color; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap { border-color: {$bump_border_color}; border-top-style: {$bump_border_style}; border-width: {$bump_box_border_width}px; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap { border-color: {$bump_border_color}; border-bottom-style: {$bump_border_style}; border-width: {$bump_box_border_width}px; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-1 .wcf-bump-order-field-wrap, .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-2 .wcf-bump-order-field-wrap, .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-action:not(.wcf-ob-action-button){ background: {$bump_label_bg_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-field-wrap label{ color: {$bump_label_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-desc{ color: {$bump_desc_text_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-bump-highlight { color: {$bump_hl_text_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .dashicons-arrow-right-alt, .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .dashicons-arrow-left-alt{ color: {$bump_blinking_arrow_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-cb-button, .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-cb-button{ background: {$bump_button_color}; color: {$bump_button_text_color}; border-width: {$bump_button_border_width}px; border-style: {$bump_button_border_style}; border-color: {$bump_button_border_color}; border-radius: {$bump_button_border_radius}px; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-4 .wcf-bump-order-content .wcf-bump-order-cb-button:hover, .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-5 .wcf-bump-order-content .wcf-bump-order-cb-button:hover{ background: {$bump_button_hover_color}; color: {$bump_button_text_hover_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-action:not(.wcf-ob-action-button){ border-style: {$label_border_style}; border-width: {$label_border_width}px; border-radius: {$label_border_radius}px; border-color: {$label_border_color}; } .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-label label{ color: {$bump_title_color}; } .wcf-bump-order-wrap.wcf-{$order_bump_position}.wcf-bump-order-{$ob_id} .wcf-bump-order-image { max-width: {$bump_image_width}px; } img.emoji, img.wp-smiley {} "; if ( ! empty( $bump_label_bg_color ) ) { $ob_css .= " .wcf-bump-order-wrap.wcf-bump-order-{$ob_id}.wcf-bump-order-style-5 .wcf-bump-order-field-wrap .wcf-bump-order-action:not(.wcf-ob-action-button){ padding: 5px 10px; } "; } if ( 'yes' === $enabled_bump_image_mobile ) { $ob_css .= " @media only screen and (max-width: 520px){ .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-image { display: block; width:100%; } } "; } else { $ob_css .= " @media only screen and (max-width: 768px){ .wcf-embed-checkout-form .wcf-bump-order-wrap.wcf-bump-order-{$ob_id} .wcf-bump-order-image { display: none; } } "; } } modules/checkout/includes/pre-checkout-offer-dynamic-css.php000064400000004553147600244370020256 0ustar00
    get_order_bump_hidden_data( $product_id, $order_bump_checked ); ?>
    - +
    get_order_bump_hidden_data( $product_id, $order_bump_checked ); ?>
    - +
    - +
    get_order_bump_hidden_data( $product_id, $order_bump_checked ); ?>
    data-ob_data="">
    data-ob_data="">
    data-ob_data="">
    - +
    data-ob_data="">
    - +
    data-ob_data="">
    get_order_bump_hidden_data( $product_id, $order_bump_checked ); ?>
    - +
    data-ob_data="" data-add="" data-remove="">
    data-ob_data="" data-add="" data-remove="">
    - +
    get_order_bump_hidden_data( $product_id, $order_bump_checked ); ?>
    - +
    data-ob_data="">
    data-ob_data="" data-add="" data-remove="">
    - +
    data-ob_data="">
    data-ob_data="" data-add="" data-remove="">
    get_order_bump_hidden_data( $product_id, $order_bump_checked ); ?>
     
    cart->get_cart() as $cart_item_key => $cart_item ) { $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) { ?> cart->get_coupons() as $code => $coupon ) : ?> cart->needs_shipping() && WC()->cart->show_shipping() ) : $shipping_method = WC()->session->get( 'chosen_shipping_methods' ); $shipping_method = isset( $shipping_method[0] ) ? $shipping_method[0] : ''; $currency = get_woocommerce_currency_symbol(); $shipping_cost = ''; foreach ( WC()->shipping->get_packages() as $key => $package ) { $cost = $shipping_method && $package['rates'][ $shipping_method ] ? $package['rates'][ $shipping_method ]->get_cost() : ''; $cost = $cost ? $currency . $cost : ''; $shipping_label = $shipping_method && isset( $package['rates'][ $shipping_method ] ) ? $package['rates'][ $shipping_method ] : ''; $shipping_label = $shipping_label ? $shipping_label->get_label() : ''; $shipping_cost = $shipping_label . ' ' . $cost; } ?> cart->get_fees() as $fee ) : ?> cart->display_prices_including_tax() ) : ?> cart->get_tax_totals() as $code => $tax ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
    get_name(), $cart_item, $cart_item_key ) ) . ' '; ?> ' . sprintf( '× %s', $cart_item['quantity'] ) . '', $cart_item, $cart_item_key ) ); ?> cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ) ); ?>
    name ); ?>
    label ); ?> formatted_amount ); ?>
    countries->tax_or_vat() ); ?>
    modules/checkout/templates/checkout-button/checkout-button.php000064400000000711147600244370020772 0ustar00' . esc_html( $order_button_text ) . '' ) ); modules/checkout/templates/pre-checkout-offer/pre-checkout-offer.php000064400000006402147600244370021721 0ustar00

    modules/checkout/templates/quick-view/quick-view-product-image.php000064400000002326147600244370021450 0ustar00
    get_gallery_image_ids(); $props = wc_get_product_attachment_props( get_post_thumbnail_id(), $post ); $image = get_the_post_thumbnail( $post->ID, 'shop_single', array( 'title' => $props['title'], 'alt' => $props['alt'], ) ); echo sprintf( '', wp_kses_post( $image ) ); if ( ! empty( $attachment_ids ) ) { $loop = 0; foreach ( $attachment_ids as $attachment_id ) { $props = wc_get_product_attachment_props( $attachment_id, $post ); if ( ! $props['url'] ) { continue; } echo sprintf( '
  10. %s
  11. ', wp_get_attachment_image( $attachment_id, 'shop_single', 0, $props ) ); $loop++; } } } else { echo sprintf( '
  12. %s
  13. ', esc_url( wc_placeholder_img_src() ), esc_html__( 'Placeholder', 'cartflows-pro' ) ); } ?>
    modules/checkout/templates/quick-view/quick-view-product.php000064400000003634147600244370020373 0ustar00get_stock_status(); if ( $product->is_on_sale() ) { $classes[] = 'sale'; } if ( $product->is_featured() ) { $classes[] = 'featured'; } if ( $product->is_downloadable() ) { $classes[] = 'downloadable'; } if ( $product->is_virtual() ) { $classes[] = 'virtual'; } if ( $product->is_sold_individually() ) { $classes[] = 'sold-individually'; } if ( $product->is_taxable() ) { $classes[] = 'taxable'; } if ( $product->is_shipping_taxable() ) { $classes[] = 'shipping-taxable'; } if ( $product->is_purchasable() ) { $classes[] = 'purchasable'; } if ( $product->get_type() ) { $classes[] = 'product-type-' . $product->get_type(); } if ( $product->is_type( 'variable' ) ) { if ( ! $product->get_default_attributes() ) { $classes[] = 'has-default-attributes'; } if ( $product->has_child() ) { $classes[] = 'has-children'; } } } $key = array_search( 'hentry', $classes, true ); if ( false !== $key ) { unset( $classes[ $key ] ); } ?>
    >
    modules/checkout/templates/your-product/item-image.php000064400000001003147600244370017223 0ustar00
    get_image() ); ?>
    modules/checkout/templates/your-product/item-price.php000064400000000423147600244370017250 0ustar00
    modules/checkout/templates/your-product/item-quantity.php000064400000003776147600244370020042 0ustar00is_sold_individually() ? 'true' : 'false'; $variation_id = $rc_product_id; if ( 'true' === $is_sold_individually ) { $title_attr = __( 'This product is set to purchase only 1 item per order.', 'cartflows-pro' ); $readonly = 'readonly'; } // Get the maximum purchase quantity. $max_quantity = 0; if ( $product ) { if ( $product->is_type( 'variable' ) ) { $variation_obj = wc_get_product( $variation_id ); if ( $variation_obj ) { $max_quantity = $variation_obj->get_max_purchase_quantity(); } } else { $max_quantity = $product->get_max_purchase_quantity(); } } // Set the max quantity HTML attribute. $max_quantity_html = ( $max_quantity > 0 ) ? 'max=' . $max_quantity : ''; ?>
    title="" > +
    modules/checkout/templates/your-product/item-radio-selector.php000064400000001017147600244370021062 0ustar00
    >
    modules/checkout/templates/your-product/item-subtext.php000064400000001370147600244370017646 0ustar00
    ' . $price_sel_data['quantity'] . '', '' . $price_sel_data['save_value'] . '', '' . $price_sel_data['save_percent'] . '', ); $subtext = str_replace( $to_replace, $with_replace, $data['product_subtext'] ); echo wp_kses_post( $subtext ); ?>
    modules/checkout/templates/your-product/item-title.php000064400000005665147600244370017304 0ustar00
    get_name(); $display_title = ''; if ( ! empty( $data['product_name'] ) ) { $display_title = $data['product_name']; } else { $display_title = '{{product_name}}{{quantity}}'; } if ( $data['variable'] ) { $actual_product_name = $current_product->get_name(); $attribute_data = $this->get_selected_attributes( $current_product, $rc_product_obj ); if ( is_array( $attribute_data ) && ! empty( $attribute_data ) ) { $display_title .= '
    '; foreach ( $attribute_data as $att_slug => $att_data ) { $att_value = $att_data['value']; if ( empty( $att_value ) ) { $att_value = '' . __( 'Select', 'cartflows-pro' ) . ''; } $display_title .= ''; $display_title .= $att_data['label'] . ': ' . $att_value; $display_title .= ','; $display_title .= ''; } $display_title .= '
    '; } } if ( in_array( $price_sel_data['type'], array( 'subscription', 'variable-subscription', 'subscription_variation' ), true ) ) { $product = $rc_product_obj; if ( isset( $data['variable-subscription'] ) && $data['variable-subscription'] ) { $product = wc_get_product( $price_sel_data['variation_id'] ); } $display_title .= '
    '; $display_title .= '' . wc_price( $price_sel_data['subscription_price'] * $price_sel_data['quantity'] ) . ''; $display_title .= wcf_pro()->is_wcs_active ? '' . __( ' every ', 'cartflows-pro' ) . wcs_get_subscription_period_strings( WC_Subscriptions_Product::get_interval( $product ), WC_Subscriptions_Product::get_period( $product ) ) . '' : ''; $display_title .= '' . $price_sel_data['trial_period_string'] . ''; if ( ! empty( $price_sel_data['sign_up_fee'] ) ) { $display_title .= '' . __( ' and a ', 'cartflows-pro' ); $display_title .= '' . wc_price( $price_sel_data['sign_up_fee'] * $price_sel_data['quantity'] ) . ''; $display_title .= __( ' sign-up fee ', 'cartflows-pro' ) . ''; } $display_title .= '
    '; } $to_replace = array( '{{product_name}}', '{{quantity}}', ); $with_replace = array( '' . $actual_product_name . '', '' . $data['quantity'] . '', ); echo wp_kses_post( str_replace( $to_replace, $with_replace, $display_title ) ); ?>
    modules/checkout/templates/your-product/item-variation-inline-selector.php000064400000001067147600244370023241 0ustar00
    >
    modules/checkout/templates/your-product/item-variation-popup-selector.php000064400000000643147600244370023125 0ustar00 modules/checkout/templates/your-product/normal-product-markup.php000064400000002571147600244370021463 0ustar00is_in_stock() ) { $highlight_data = $this->get_product_highlight_data( $data ); $product_id = $current_product->get_id(); $checked = ( isset( self::$cart_items[ $data['cart_item_key'] ] ) ) ? 'checked' : ''; $price_data = $this->your_product_price( $current_product, $data, 0 ); $price_sel_data = $price_data['sel_data']; $rc_product_obj = $current_product; $rc_product_id = $product_id; $rc_sel_data = wp_json_encode( $price_sel_data ); $rc_sel_data = is_string( $rc_sel_data ) ? $rc_sel_data : ''; ?>
    modules/checkout/templates/your-product/variation-product-markup.php000064400000003044147600244370022163 0ustar00is_in_stock() && 'publish' === $single_variation->get_status() ) { $highlight_data = $this->get_product_highlight_data( $data ); $parent_id = $current_product->get_id(); $variation_id = $single_variation->get_id(); $checked = ( isset( self::$cart_products[ $variation_id ] ) && isset( self::$cart_items[ $data['cart_item_key'] ] ) ) ? 'checked' : ''; $price_data = $this->your_product_price( $current_product, $data, $single_variation ); $price_sel_data = $price_data['sel_data']; $rc_product_obj = $single_variation; $rc_product_id = $variation_id; $rc_sel_data = wp_json_encode( $price_sel_data ); $rc_sel_data = is_string( $rc_sel_data ) ? $rc_sel_data : ''; ?>

    product_option_title() ); ?>

    $p_data ) { $current_product = wc_get_product( $p_data['product_id'] ); // Reason for PHPCS ignore: The data is being escaped inside the functions and the templates used below. if ( 'force-all' === $type ) { echo $this->force_all_product_markup( $current_product, $p_data ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( 'single-selection' === $type ) { echo $this->single_sel_product_markup( $current_product, $p_data ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } else { echo $this->multiple_sel_product_markup( $current_product, $p_data ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } ?>
    modules/checkout/class-cartflows-pro-checkout.php000064400000002334147600244370016253 0ustar00 'failed', 'redirect' => '#', 'message' => __( 'Order does not exist', 'cartflows-pro' ), ); if ( $order_id && $product_id ) { $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Downsell Payment Failed', 'cartflows-pro' ), ); $order = wc_get_order( $order_id ); $extra_data = array( 'order_id' => $order_id, 'product_id' => $product_id, 'variation_id' => $variation_id, 'input_qty' => $input_qty, 'order_key' => $order_key, 'template_type' => 'downsell', 'action' => 'wcf_downsell_accepted', ); $result = $this->offer_accepted( $step_id, $extra_data, $result ); } // send json. wp_send_json( $result ); } /** * Process down sell rejected. */ public function process_downsell_rejected() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_downsell_rejected' ) ) { return; } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Current Step Not Found', 'cartflows-pro' ), ); if ( $step_id ) { $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Order does not exist', 'cartflows-pro' ), ); if ( $order_id ) { $extra_data = array( 'action' => 'offer_rejected', 'order_id' => $order_id, 'order_key' => $order_key, 'template_type' => 'downsell', ); } $result = $this->offer_rejected( $step_id, $extra_data, $result ); } // send json. wp_send_json( $result ); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Downsell_Markup::get_instance(); modules/downsell/class-cartflows-pro-downsell.php000064400000001643147600244370016321 0ustar00start_controls_section( 'section_two_step_section_fields', array( 'label' => __( 'Two Step', 'cartflows-pro' ), 'condition' => array( 'layout' => 'two-step', ), ) ); $elementor->add_control( 'enable_note', array( 'label' => __( 'Enable Checkout Note', 'cartflows-pro' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'YES', 'cartflows-pro' ), 'label_off' => __( 'NO', 'cartflows-pro' ), 'return_value' => 'yes', 'default' => 'yes', ) ); $elementor->add_control( 'note_text', array( 'label' => __( 'Note Text', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => __( 'Get Your FREE copy of CartFlows in just few steps.', 'cartflows-pro' ), 'default' => __( 'Get Your FREE copy of CartFlows in just few steps.', 'cartflows-pro' ), 'label_block' => false, 'condition' => array( 'enable_note' => 'yes', ), ) ); $elementor->add_control( 'two_step_section_heading', array( 'label' => __( 'Steps', 'cartflows-pro' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ) ); $elementor->add_control( 'step_one_title_text', array( 'label' => __( 'Step One Title', 'cartflows-pro' ), 'default' => __( 'Shipping', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => __( 'Shipping', 'cartflows-pro' ), ) ); $elementor->add_control( 'step_one_sub_title_text', array( 'label' => __( 'Step One Sub Title', 'cartflows-pro' ), 'default' => __( 'Where to ship it?', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => __( 'Where to ship it?', 'cartflows-pro' ), ) ); $elementor->add_control( 'step_two_title_text', array( 'label' => __( 'Step Two Title', 'cartflows-pro' ), 'default' => __( 'Payment', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => __( 'Payment', 'cartflows-pro' ), ) ); $elementor->add_control( 'step_two_sub_title_text', array( 'label' => __( 'Step Two Sub Title', 'cartflows-pro' ), 'default' => __( 'Of your order', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => __( 'Of your order', 'cartflows-pro' ), ) ); $elementor->add_control( 'offer_button_section', array( 'label' => __( 'Offer Button', 'cartflows-pro' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ) ); $elementor->add_control( 'offer_button_title_text', array( 'label' => __( 'Offer Button Title', 'cartflows-pro' ), 'default' => __( 'For Special Offer Click Here', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => __( 'For Special Offer Click Here', 'cartflows-pro' ), ) ); $elementor->add_control( 'offer_button_subtitle_text', array( 'label' => __( 'Offer Button Sub Title', 'cartflows-pro' ), 'default' => __( 'Yes! I want this offer!', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => __( 'Yes! I want this offer!', 'cartflows-pro' ), ) ); $elementor->end_controls_section(); } /** * Register Two Step style Controls. * * @param array $elementor element data. * @param array $args data. * * @since 1.6.13 * @access protected */ public function register_two_step_style_controls( $elementor, $args ) { $elementor->start_controls_section( 'section_two_step_style_fields', array( 'label' => __( 'Two Step', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'enable_note' => 'yes', 'layout' => 'two-step', ), ) ); $elementor->add_control( 'note_text_color', array( 'label' => __( 'Note Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note' => 'color: {{VALUE}};', ), 'condition' => array( 'enable_note' => 'yes', 'layout' => 'two-step', ), ) ); $elementor->add_control( 'note_bg_color', array( 'label' => __( 'Note Background Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note ' => 'background-color: {{VALUE}} !important; border-color: {{VALUE}};', '{{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note:before' => 'border-top-color: {{VALUE}};', ), 'condition' => array( 'enable_note' => 'yes', 'layout' => 'two-step', ), ) ); $elementor->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'note_typography', 'label' => __( 'Note Typography', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .wcf-embed-checkout-form-two-step .wcf-embed-checkout-form-note', 'condition' => array( 'enable_note' => 'yes', 'layout' => 'two-step', ), ) ); $elementor->end_controls_section(); } /** * Register product option section Controls. * * @param object $elementor element data. * @param array $args data. * * @since 1.6.13 * @access protected */ public function register_product_option_section_controls( $elementor, $args ) { $checkout_id = get_the_id(); $show_product_options = Cartflows_Pro_Helper::is_show_product_options_settings( $checkout_id ); if ( $show_product_options ) { $is_enabled = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); $elementor->start_controls_section( 'section_product_option_section_fields', array( 'label' => __( 'Product Options', 'cartflows-pro' ), ) ); if ( 'yes' === $is_enabled ) { $elementor->add_control( 'product_options_position', array( 'label' => __( 'Position', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => array( 'before-customer' => __( 'Before Checkout', 'cartflows-pro' ), 'after-customer' => __( 'After Customer Details', 'cartflows-pro' ), 'before-order' => __( 'Before Order Review', 'cartflows-pro' ), ), ) ); $elementor->add_control( 'product_options_skin', array( 'label' => __( 'Skin', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => array( 'classic' => __( 'Classic', 'cartflows-pro' ), 'cards' => __( 'Cards', 'cartflows-pro' ), ), ) ); $elementor->add_control( 'product_options_images', array( 'label' => __( 'Show Product Images', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => array( 'yes' => __( 'Yes', 'cartflows-pro' ), 'no' => __( 'No', 'cartflows-pro' ), ), ) ); $elementor->add_control( 'product_option_section_title_text', array( 'label' => __( 'Section Title Text', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'placeholder' => __( 'Your Products', 'cartflows-pro' ), ) ); } else { $license_status = cartflows_pro_is_active_license(); $row_html = ''; $content_classes = ''; if ( ! $license_status ) { $row_html = wcf_pro()->utils->get_license_restriction_template( array( 'title' => __( 'Explore Product Options', 'cartflows-pro' ), 'messages' => array( __( 'Easily customize and select multiple products during checkout to match your preferences and needs.', 'cartflows-pro' ), ), ) ); } else { $row_html = wp_kses_post( sprintf( /* translators: %1$1s, %2$2s Link to meta */ __( 'Please enable "Product Options" from %1$1smeta settings%2$2s to edit options.', 'cartflows-pro' ), '', '' ) ); $content_classes = 'elementor-panel-alert elementor-panel-alert-warning'; } $elementor->add_control( 'product_option_disabled', array( 'type' => Controls_Manager::RAW_HTML, 'raw' => $row_html, 'content_classes' => $content_classes, ) ); } $elementor->end_controls_section(); } } /** * Register product options Style Controls. * * @param object $elementor element data. * @param array $args data. * * @since 1.6.13 */ public function register_product_options_style_controls( $elementor, $args ) { $checkout_id = get_the_id(); $show_product_options = Cartflows_Pro_Helper::is_show_product_options_settings( $checkout_id ); if ( $show_product_options ) { $is_enabled = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); $elementor->start_controls_section( 'product_options_style_fields', array( 'label' => __( 'Product Options', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); if ( 'yes' === $is_enabled ) { $elementor->add_control( 'product_text_color', array( 'label' => __( 'Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row' => 'color: {{VALUE}};', ), ) ); $elementor->add_control( 'product_bg_color', array( 'label' => __( 'Background Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap.wcf-yp-skin-classic .wcf-qty-options' => 'background-color: {{VALUE}};', '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap.wcf-yp-skin-cards .wcf-qty-options .wcf-qty-row' => 'background-color: {{VALUE}};', ), ) ); $elementor->add_control( 'product_option_border_style', array( 'label' => __( 'Border Style', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'label_block' => false, 'default' => '', 'options' => array( '' => __( 'Default', 'cartflows-pro' ), 'solid' => __( 'Solid', 'cartflows-pro' ), 'double' => __( 'Double', 'cartflows-pro' ), 'dotted' => __( 'Dotted', 'cartflows-pro' ), 'dashed' => __( 'Dashed', 'cartflows-pro' ), ), 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wcf-el-checkout-form .wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row:not(.wcf-qty-table-titles)' => 'border-style: {{VALUE}} none {{VALUE}} none', ), ) ); $elementor->add_control( 'product_option_border_size', array( 'label' => __( 'Border Width', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px' ), 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wcf-el-checkout-form .wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row:not(.wcf-qty-table-titles)' => 'border-width: {{TOP}}{{UNIT}} 0 {{BOTTOM}}{{UNIT}} 0;', ), ) ); $elementor->add_control( 'product_option_border_color', array( 'label' => __( 'Border Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options, {{WRAPPER}} .wcf-el-checkout-form .wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row:not(.wcf-qty-table-titles)' => 'border-color: {{VALUE}};', ), ) ); $elementor->add_control( 'product_option_border_radius', array( 'label' => __( 'Rounded Corners', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em', '%' ), 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); // Highlight Product CSS options. $elementor->add_control( 'highlight_product', array( 'label' => __( 'Highlight Product', 'cartflows-pro' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ) ); $elementor->add_control( 'highlight_product_bg_color', array( 'label' => __( 'Background Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight' => 'background-color: {{VALUE}};', ), ) ); $elementor->add_control( 'highlight_product_text_color', array( 'label' => __( 'Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight' => 'color: {{VALUE}};', ), ) ); $elementor->add_control( 'highlight_product_option_border_style', array( 'label' => __( 'Border Style', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'label_block' => false, 'default' => '', 'options' => array( '' => __( 'Default', 'cartflows-pro' ), 'solid' => __( 'Solid', 'cartflows-pro' ), 'double' => __( 'Double', 'cartflows-pro' ), 'dotted' => __( 'Dotted', 'cartflows-pro' ), 'dashed' => __( 'Dashed', 'cartflows-pro' ), ), 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight, .wcf-el-checkout-form .wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row.wcf-highlight' => 'border-style: {{VALUE}};', ), ) ); $elementor->add_control( 'highlight_product_border_size', array( 'label' => __( 'Border Width', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px' ), 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight, .wcf-el-checkout-form .wcf-embed-checkout-form-modern-checkout .wcf-qty-options .wcf-qty-row.wcf-highlight' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $elementor->add_control( 'highlight_box_border_color', array( 'label' => __( 'Border Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight' => 'border-color: {{VALUE}};', ), ) ); $elementor->add_control( 'highlight_product_border_radius', array( 'label' => __( 'Rounded Corners', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em', '%' ), 'selectors' => array( '.wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $elementor->add_control( 'highlight_flag_text_color', array( 'label' => __( 'Highlight Flag Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight .wcf-highlight-head' => 'color: {{VALUE}};', ), ) ); $elementor->add_control( 'highlight_flag_bg_color', array( 'label' => __( 'Highlight Flag Background Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .wcf-el-checkout-form .wcf-product-option-wrap .wcf-qty-options .wcf-qty-row.wcf-highlight .wcf-highlight-head' => 'background-color: {{VALUE}};', ), ) ); } else { $license_status = cartflows_pro_is_active_license(); $row_html = ''; $content_classes = ''; if ( ! $license_status ) { $row_html = wcf_pro()->utils->get_license_restriction_template( array( 'title' => __( 'Explore Product Options', 'cartflows-pro' ), 'messages' => array( __( 'Easily customize and select multiple products during checkout to match your preferences and needs.', 'cartflows-pro' ), ), ) ); } else { $row_html = wp_kses_post( sprintf( /* translators: %1$1s, %2$2s Link to meta */ __( 'Please enable "Product Options" from %1$1smeta settings%2$2s to apply styles.', 'cartflows-pro' ), '', '' ) ); $content_classes = 'elementor-panel-alert elementor-panel-alert-warning'; } $elementor->add_control( 'product_option_style_disabled', array( 'type' => Controls_Manager::RAW_HTML, 'raw' => $row_html, 'content_classes' => $content_classes, ) ); } $elementor->end_controls_section(); } } /** * Added dynamic filter. * * @param array $settings settings data. * * @since 1.6.13 */ public function dynamic_filters( $settings ) { self::$settings = $settings; $checkout_id = get_the_id(); $enable_product_options = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-enable-product-options' ); $enable_checkout_offer = wcf()->options->get_checkout_meta_value( $checkout_id, 'wcf-pre-checkout-offer' ); if ( 'yes' === $enable_checkout_offer ) { self::$checkout_settings = array( 'enable_checkout_offer' => $enable_checkout_offer, ); add_filter( 'cartflows_elementor_checkout_settings', function ( $data_settings ) { $data_settings = self::$checkout_settings; return $data_settings; }, 10, 1 ); } $checkout_fields = array( // Two step texts. array( 'filter_slug' => 'wcf-checkout-step-one-title', 'setting_name' => 'step_one_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-one-sub-title', 'setting_name' => 'step_one_sub_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-two-title', 'setting_name' => 'step_two_title_text', ), array( 'filter_slug' => 'wcf-checkout-step-two-sub-title', 'setting_name' => 'step_two_sub_title_text', ), array( 'filter_slug' => 'wcf-checkout-offer-button-title', 'setting_name' => 'offer_button_title_text', ), array( 'filter_slug' => 'wcf-checkout-offer-button-sub-title', 'setting_name' => 'offer_button_subtitle_text', ), ); if ( isset( $checkout_fields ) && is_array( $checkout_fields ) ) { foreach ( $checkout_fields as $key => $field ) { $setting_name = $field['setting_name']; if ( '' !== self::$settings[ $setting_name ] ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_name ) { $value = self::$settings[ $setting_name ]; return $value; }, 10, 1 ); } } } add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note', function ( $is_note_enabled ) { $is_note_enabled = ( 'yes' === self::$settings['enable_note'] ) ? 'yes' : 'no'; return $is_note_enabled; }, 10, 1 ); if ( 'yes' === self::$settings['enable_note'] && '' !== self::$settings['note_text'] ) { add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note-text', function ( $checkout_note_text ) { $checkout_note_text = self::$settings['note_text']; return $checkout_note_text; }, 10, 1 ); } // Product options. if ( 'yes' === $enable_product_options ) { $product_options_fields = array( array( 'filter_slug' => 'wcf-product-options-skin', 'setting_name' => 'product_options_skin', ), array( 'filter_slug' => 'wcf-show-product-images', 'setting_name' => 'product_options_images', ), array( 'filter_slug' => 'wcf-product-opt-title', 'setting_name' => 'product_option_section_title_text', ), array( 'filter_slug' => 'wcf-your-products-position', 'setting_name' => 'product_options_position', ), ); if ( isset( $product_options_fields ) && is_array( $product_options_fields ) ) { foreach ( $product_options_fields as $key => $field ) { $setting_name = $field['setting_name']; if ( isset( self::$settings[ $setting_name ] ) && '' !== self::$settings[ $setting_name ] ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_name ) { $value = self::$settings[ $setting_name ]; return $value; }, 10, 1 ); } } } } } } /** * Initiate the class. */ Cartflows_Pro_Checkout_Form_Extend::get_instance(); modules/elementor/widgets/class-cartflows-pro-el-offer-action-button.php000064400000044541147600244370022572 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-yes-no-button'; } /** * Retrieve the widget title. * * @since x.x.x * * @access public * * @return string Widget title. */ public function get_title() { return __( 'Offer Yes/No Button', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-yes-no-button'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'offer button', 'yes', 'no', 'button' ); } /** * Retrieve Offer Yes/No Button sizes. * * @since x.x.x * @access public * * @return array Offer Yes/No Button Sizes. */ public static function get_button_sizes() { return Widget_Button::get_button_sizes(); } /** * Register Offer Yes/No Button controls controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Content Tab. $this->register_button_content_controls(); // Style Tab. $this->register_button_style_controls(); $this->register_button_content_style_controls(); } /** * Register Offer Yes/No Button General Controls. * * @since x.x.x * @access protected */ protected function register_button_content_controls() { $this->start_controls_section( 'button_content_fields', array( 'label' => __( 'General', 'cartflows-pro' ), ) ); $this->add_control( 'offer_action', array( 'label' => __( 'Offer Action', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => 'accept_offer', 'options' => array( 'accept_offer' => __( 'Accept Offer', 'cartflows-pro' ), 'reject_offer' => __( 'Reject Offer', 'cartflows-pro' ), ), ) ); $this->add_control( 'title', array( 'label' => __( 'Title', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Offer Action', 'cartflows-pro' ), ) ); $this->add_control( 'sub_title', array( 'label' => __( 'Sub Title', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, ) ); $this->add_control( 'icon', array( 'label' => __( 'Icon', 'cartflows-pro' ), 'type' => Controls_Manager::ICONS, ) ); $this->add_control( 'icon_position', array( 'label' => __( 'Icon Position', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => 'before_title', 'options' => array( 'before_title' => __( 'Before Title', 'cartflows-pro' ), 'after_title' => __( 'After Title', 'cartflows-pro' ), 'before_title_sub_title' => __( 'Before Title & Sub Title', 'cartflows-pro' ), 'after_title_sub_title' => __( 'After Title & Sub Title', 'cartflows-pro' ), ), 'condition' => array( 'icon[value]!' => '', ), ) ); $this->add_control( 'icon_vertical_align', array( 'label' => __( 'Icon Vertical Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'center', 'options' => array( 'flex-start' => array( 'title' => __( 'Top', 'cartflows-pro' ), 'icon' => 'eicon-v-align-top', ), 'center' => array( 'title' => __( 'Middle', 'cartflows-pro' ), 'icon' => 'eicon-v-align-middle', ), ), 'condition' => array( 'icon_position' => array( 'before_title_sub_title', 'after_title_sub_title' ), 'icon[value]!' => '', ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-icon-wrap' => 'align-self: {{VALUE}};', ), ) ); $this->add_control( 'icon_spacing', array( 'label' => __( 'Icon Spacing', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-title-wrap .cartflows-pro-elementor__before_title, {{WRAPPER}} .cartflows-pro-elementor__before_title_sub_title' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-title-wrap .cartflows-pro-elementor__after_title, {{WRAPPER}} .cartflows-pro-elementor__after_title_sub_title' => 'margin-left: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'icon[value]!' => '', ), ) ); $this->add_responsive_control( 'icon_size', array( 'label' => __( 'Icon Size', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-wrap i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-wrap svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'icon[value]!' => '', ), ) ); $this->end_controls_section(); } /** * Register Offer Yes/No Button Styling Controls. * * @since x.x.x * @access protected */ protected function register_button_style_controls() { $this->start_controls_section( 'offer_yes_no_button_styling', array( 'label' => __( 'General', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), 'justify' => array( 'title' => __( 'Justify', 'cartflows-pro' ), 'icon' => 'fa fa-align-justify', ), ), 'default' => 'left', 'prefix_class' => 'elementor%s-align-', ) ); $this->add_control( 'button_size', array( 'label' => __( 'Button Size', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => 'md', 'options' => self::get_button_sizes(), ) ); $this->add_responsive_control( 'padding', array( 'label' => __( 'Padding', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', 'em', '%' ), 'selectors' => array( '{{WRAPPER}} .elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->start_controls_tabs( 'offer_yes_no_button_style' ); $this->start_controls_tab( 'offer_yes_no_button_normal', array( 'label' => __( 'Normal', 'cartflows-pro' ), ) ); $this->add_control( 'text_color', array( 'label' => __( 'Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} a.cartflows-pro-elementor__offer-yes-no-button-link' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'all_background_color', 'label' => __( 'Background Color', 'cartflows-pro' ), 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} a.elementor-button', 'fields_options' => array( 'background' => array( 'default' => 'classic', ), 'color' => array( 'global' => array( 'default' => Global_Colors::COLOR_ACCENT, ), ), ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'all_border', 'label' => __( 'Border', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .elementor-button', ) ); $this->add_control( 'all_border_radius', array( 'label' => __( 'Rounded Corners', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'offer_yes_no_button_hover', array( 'label' => __( 'Hover', 'cartflows-pro' ), ) ); $this->add_control( 'hover_text_color', array( 'label' => __( 'Hover Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} a.cartflows-pro-elementor__offer-yes-no-button-link:hover' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'hover_background_color', 'label' => __( 'Hover Background Color', 'cartflows-pro' ), 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} a.elementor-button:hover', 'fields_options' => array( 'background' => array( 'default' => 'classic', ), 'color' => array( 'global' => array( 'default' => Global_Colors::COLOR_ACCENT, ), ), ), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Register Button Content Styling Controls. * * @since x.x.x * @access protected */ protected function register_button_content_style_controls() { $this->start_controls_section( 'button_content_styling', array( 'label' => __( 'Content', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'text_align', array( 'label' => __( 'Text Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), ), 'default' => 'center', 'toggle' => false, 'selectors' => array( '{{WRAPPER}} a.elementor-button' => 'text-align: {{VALUE}};', ), 'condition' => array( 'align' => 'justify', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'title_typography', 'label' => __( 'Title Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_TEXT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-title', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'sub_title_typography', 'label' => __( 'Sub Title Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_TEXT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-sub-title', 'condition' => array( 'sub_title!' => '', ), ) ); $this->add_control( 'title_sub_title_spacing', array( 'label' => __( 'Title and Sub Title Spacing', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 50, ), ), 'default' => array( 'unit' => 'px', 'size' => 10, ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-button-sub-title' => 'margin-top: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'sub_title!' => '', ), ) ); } /** * Render Offer Yes/No Button icon. * * @since x.x.x * @param string $position Icon position. * @param array $settings settings. * @access protected */ protected function render_button_icon( $position, $settings ) { $icon = esc_attr( $settings['icon']['value'] ); $icon_position_class = esc_attr( 'cartflows-pro-elementor__' . $settings['icon_position'] ); if ( '' !== $icon && $position === $settings['icon_position'] ) { ?> 'true' ) ); ?> get_settings_for_display(); $button_size = esc_attr( $settings['button_size'] ); $title = esc_html( $settings['title'] ); $sub_title = esc_html( $settings['sub_title'] ); $step_type = get_post_meta( get_the_ID(), 'wcf-step-type', true ); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { $accept_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-yes' : '?class=wcf-down-offer-yes'; $reject_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-no' : '?class=wcf-down-offer-no'; } $action_link = 'accept_offer' === $settings['offer_action'] ? $accept_offer_link : $reject_offer_link; ?> <# function render_icon(position) { var iconHTML = elementor.helpers.renderIcon( view, settings.icon, {}, 'i' , 'object' ); var icon_position_class = 'cartflows-pro-elementor__'+settings.icon_position; if( '' !== settings.icon.value && position === settings.icon_position ){ #> {{ iconHTML.value }} <#} } #> render_offer_action_button(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-action-link.php000064400000025106147600244370022210 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-yes-no-link'; } /** * Retrieve the widget title. * * @since x.x.x * * @access public * * @return string Widget title. */ public function get_title() { return __( 'Offer Yes/No Link', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-yes-no-link'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'offer link', 'yes', 'no' ); } /** * Register Offer Yes/No Link controls controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Content Tab. $this->register_link_content_controls(); // Style Tab. $this->register_link_style_controls(); } /** * Register Offer Yes/No Link General Controls. * * @since x.x.x * @access protected */ protected function register_link_content_controls() { $this->start_controls_section( 'link_content_fields', array( 'label' => __( 'General', 'cartflows-pro' ), ) ); $this->add_control( 'offer_action', array( 'label' => __( 'Offer Action', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => 'accept_offer', 'options' => array( 'accept_offer' => __( 'Accept Offer', 'cartflows-pro' ), 'reject_offer' => __( 'Reject Offer', 'cartflows-pro' ), ), ) ); $this->add_control( 'link_text', array( 'label' => __( 'Link Text', 'cartflows-pro' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Offer Action', 'cartflows-pro' ), ) ); $this->add_control( 'icon', array( 'label' => __( 'Icon', 'cartflows-pro' ), 'type' => Controls_Manager::ICONS, ) ); $this->add_control( 'icon_position', array( 'label' => __( 'Icon Position', 'cartflows-pro' ), 'type' => Controls_Manager::SELECT, 'default' => 'before_link', 'options' => array( 'before_link' => __( 'Before Link', 'cartflows-pro' ), 'after_link' => __( 'After Link', 'cartflows-pro' ), ), 'condition' => array( 'icon[value]!' => '', ), ) ); $this->add_control( 'icon_spacing', array( 'label' => __( 'Icon Spacing', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-link .cartflows-pro-elementor__before_link' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-link .cartflows-pro-elementor__after_link' => 'margin-left: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'icon[value]!' => '', ), ) ); $this->add_responsive_control( 'icon_size', array( 'label' => __( 'Icon Size', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-link i' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-link svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'icon[value]!' => '', ), ) ); $this->end_controls_section(); } /** * Register Offer Yes/No Link Styling Controls. * * @since x.x.x * @access protected */ protected function register_link_style_controls() { $this->start_controls_section( 'offer_yes_no_button_styling', array( 'label' => __( 'General', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), 'justify' => array( 'title' => __( 'Justify', 'cartflows-pro' ), 'icon' => 'fa fa-align-justify', ), ), 'default' => 'left', 'prefix_class' => 'elementor%s-align-', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'link_typography', 'label' => __( 'Link Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_ACCENT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-yes-no-link-text-wrap', ) ); $this->start_controls_tabs( 'offer_yes_no_link_style' ); $this->start_controls_tab( 'offer_yes_no_link_normal', array( 'label' => __( 'Normal', 'cartflows-pro' ), ) ); $this->add_control( 'link_color', array( 'label' => __( 'Link Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} a.cartflows-pro-elementor__offer-yes-no-link-text-wrap' => 'color: {{VALUE}};', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'offer_yes_no_link_hover', array( 'label' => __( 'Hover', 'cartflows-pro' ), ) ); $this->add_control( 'hover_link_color', array( 'label' => __( 'Hover Link Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} a.cartflows-pro-elementor__offer-yes-no-link-text-wrap:hover' => 'color: {{VALUE}};', ), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Render Offer Yes/No Link icon. * * @since x.x.x * @param string $position Icon position. * @param array $settings settings. * @access protected */ protected function render_link_icon( $position, $settings ) { $icon = esc_attr( $settings['icon']['value'] ); $icon_position_class = 'cartflows-pro-elementor__' . $settings['icon_position']; if ( '' !== $icon && $position === $settings['icon_position'] ) { ?> 'true' ) ); ?> get_settings_for_display(); $link_text = esc_html( $settings['link_text'] ); $step_type = get_post_meta( get_the_ID(), 'wcf-step-type', true ); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { $accept_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-yes' : '?class=wcf-down-offer-yes'; $reject_offer_link = 'upsell' === $step_type ? '?class=wcf-up-offer-no' : '?class=wcf-down-offer-no'; } $action_link = 'accept_offer' === $settings['offer_action'] ? $accept_offer_link : $reject_offer_link; ?> <# function render_icon(position) { var iconHTML = elementor.helpers.renderIcon( view, settings.icon, {}, 'i' , 'object' ); var icon_position_class = 'cartflows-pro-elementor__'+settings.icon_position; if( '' !== settings.icon.value && position === settings.icon_position ){ #> {{ iconHTML.value }} <#} } #> render_offer_action_link(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-product-description.php000064400000014224147600244370024000 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-product-description'; } /** * Retrieve the widget description. * * @since x.x.x * * @access public * * @return string Widget description. */ public function get_title() { return __( 'Offer Product Description', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-offer-product-description'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'description', 'short description' ); } /** * Register Offer Product Description controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Style Tab. $this->register_product_description_style_controls(); } /** * Register Offer Product Description Styling Controls. * * @since x.x.x * @access protected */ protected function register_product_description_style_controls() { $this->start_controls_section( 'offer_product_description_styling', array( 'label' => __( 'Offer Product Description', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'short_description', array( 'label' => __( 'Short Description', 'cartflows-pro' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'cartflows-pro' ), 'label_off' => __( 'Hide', 'cartflows-pro' ), 'return_value' => 'yes', 'default' => 'no', ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), 'justify' => array( 'title' => __( 'Justify', 'cartflows-pro' ), 'icon' => 'fa fa-align-justify', ), ), 'default' => 'left', 'prefix_class' => 'elementor%s-align-', ) ); $this->add_control( 'text_color', array( 'label' => __( 'Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-description' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_TEXT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-description', ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'text_shadow', 'label' => __( 'Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-description', ) ); $this->end_controls_section(); } /** * Render Offer Product Description output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since x.x.x * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
    <# if( 'yes' === settings.short_description ) { #> <# } else { #> <# } #>
    render_offer_product_description(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-product-image.php000064400000017117147600244370022543 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-product-image'; } /** * Retrieve the widget Image. * * @since x.x.x * * @access public * * @return string Widget Image. */ public function get_title() { return __( 'Offer Product Image', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-offer-product-image'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'image' ); } /** * Register Offer Product Image controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Style Tab. $this->register_product_image_style_controls(); $this->register_product_thumbnails_style_controls(); } /** * Register Offer Product Image Style Controls. * * @since x.x.x * @access protected */ protected function register_product_image_style_controls() { $this->start_controls_section( 'offer_product_image_styling', array( 'label' => __( 'Offer Product Image', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), ), 'default' => 'center', 'selectors' => array( '{{WRAPPER}} .woocommerce-product-gallery .woocommerce-product-gallery__image' => 'text-align: {{VALUE}};', ), ) ); $this->add_control( 'image_bottom_spacing', array( 'label' => __( 'Image bottom Spacing', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 500, ), ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper' => 'margin-bottom: {{SIZE}}{{UNIT}};', ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'label' => __( 'Image Border', 'cartflows-pro' ), 'show_label' => true, 'label_block' => true, 'name' => 'image_border', 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img', ) ); $this->add_control( 'image_border_radius', array( 'label' => __( 'Image Rounded Corners', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-image .woocommerce-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_section(); } /** * Register Offer Product Image Style Controls. * * @since x.x.x * @access protected */ protected function register_product_thumbnails_style_controls() { $this->start_controls_section( 'offer_thumbnails_styling', array( 'label' => __( 'Thumbnails', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'thumbnail_spacing', array( 'label' => __( 'Spacing between Thumbnails', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( 'px' => array( 'max' => 100, ), ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-image .woocommerce-product-gallery ol li:not(:last-child)' => 'margin: 0px {{SIZE}}{{UNIT}} {{SIZE}}{{UNIT}} 0px;', ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'label' => __( 'Thumbnail Border', 'cartflows-pro' ), 'show_label' => true, 'label_block' => true, 'name' => 'thumbnail_border', 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-image .woocommerce-product-gallery ol li img', ) ); $this->add_control( 'thumbnail_border_radius', array( 'label' => __( 'Thumbnail Rounded Corners', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-image .woocommerce-product-gallery ol li img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->end_controls_section(); } /** * Render Offer Product Image output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since x.x.x * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
    render_offer_product_image(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-product-price.php000064400000015017147600244370022560 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-product-price'; } /** * Retrieve the widget price. * * @since x.x.x * * @access public * * @return string Widget price. */ public function get_title() { return __( 'Offer Product Price', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-offer-product-price'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'price' ); } /** * Register Offer Product Price controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Style Tab. $this->register_product_price_style_controls(); } /** * Register Offer Product Price Style Controls. * * @since x.x.x * @access protected */ protected function register_product_price_style_controls() { $this->start_controls_section( 'offer_product_price_styling', array( 'label' => __( 'Offer Product Price', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), 'justify' => array( 'title' => __( 'Justify', 'cartflows-pro' ), 'icon' => 'fa fa-align-justify', ), ), 'default' => 'left', 'prefix_class' => 'elementor%s-align-', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_ACCENT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-price .wcf-offer-price', ) ); $this->start_controls_tabs( 'offer_product_title_style' ); $this->start_controls_tab( 'offer_product_title_normal', array( 'label' => __( 'Normal', 'cartflows-pro' ), ) ); $this->add_control( 'text_color', array( 'label' => __( 'Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-price .wcf-offer-price' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'text_shadow', 'label' => __( 'Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-price .wcf-offer-price', ) ); $this->end_controls_tab(); $this->start_controls_tab( 'offer_product_title_hover', array( 'label' => __( 'Hover', 'cartflows-pro' ), ) ); $this->add_control( 'hover_text_color', array( 'label' => __( 'Hover Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-price .wcf-offer-price:hover' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'hover_text_shadow', 'label' => __( 'Hover Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-price .wcf-offer-price:hover', ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Render Offer Product Price output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since x.x.x * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
    render_offer_product_price(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-product-quantity.php000064400000017004147600244370023332 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-product-quantity'; } /** * Retrieve the widget Quantity. * * @since x.x.x * * @access public * * @return string Widget Quantity. */ public function get_title() { return __( 'Offer Product Quantity', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-offer-product-quantity'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'quantity' ); } /** * Register Offer Product Quantity controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Style Tab. $this->register_product_quantity_style_controls(); } /** * Register Offer Product Quantity Style Controls. * * @since x.x.x * @access protected */ protected function register_product_quantity_style_controls() { $this->start_controls_section( 'offer_product_quantity_styling', array( 'label' => __( 'Offer Product Quantity', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), ), 'prefix_class' => 'cartflows-elementor__offer-product-quantity_align-', ) ); $this->add_control( 'section_order_review_width', array( 'label' => __( 'Width(%)', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( '%' => array( 'max' => 100, ), ), 'default' => array( 'unit' => '%', ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity' => 'max-width: {{SIZE}}{{UNIT}};', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_ACCENT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .screen-reader-text, {{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .input-text.qty.text', ) ); $this->add_control( 'label_color', array( 'label' => __( 'Label Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .screen-reader-text' => 'color: {{VALUE}};', ), ) ); $this->add_control( 'text_color', array( 'label' => __( 'Input Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .input-text.qty.text' => 'color: {{VALUE}};', ), ) ); $this->add_control( 'bg_color', array( 'label' => __( 'Background Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .input-text.qty.text' => 'background-color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'label' => __( 'Border', 'cartflows-pro' ), 'show_label' => true, 'label_block' => true, 'name' => 'border', 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .input-text.qty.text', ) ); $this->add_control( 'border_radius', array( 'label' => __( 'Rounded Corners', 'cartflows-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .input-text.qty.text' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'text_shadow', 'label' => __( 'Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .screen-reader-text, {{WRAPPER}} .cartflows-pro-elementor__offer-product-quantity .quantity .input-text.qty.text', ) ); $this->end_controls_section(); } /** * Render Offer Product Quantity output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since x.x.x * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
    render_offer_product_quantity(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-product-title.php000064400000014676147600244370022611 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-product-title'; } /** * Retrieve the widget title. * * @since x.x.x * * @access public * * @return string Widget title. */ public function get_title() { return __( 'Offer Product Title', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-offer-product-title'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'title' ); } /** * Register Offer Product Title controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Style Tab. $this->register_product_title_style_controls(); } /** * Register Offer Product Title Styling Controls. * * @since x.x.x * @access protected */ protected function register_product_title_style_controls() { $this->start_controls_section( 'offer_product_title_styling', array( 'label' => __( 'Offer Product Title', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), 'justify' => array( 'title' => __( 'Justify', 'cartflows-pro' ), 'icon' => 'fa fa-align-justify', ), ), 'default' => 'left', 'prefix_class' => 'elementor%s-align-', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-title', ) ); $this->start_controls_tabs( 'offer_product_title_style' ); $this->start_controls_tab( 'offer_product_title_normal', array( 'label' => __( 'Normal', 'cartflows-pro' ), ) ); $this->add_control( 'text_color', array( 'label' => __( 'Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-title' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'text_shadow', 'label' => __( 'Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-title', ) ); $this->end_controls_tab(); $this->start_controls_tab( 'offer_product_title_hover', array( 'label' => __( 'Hover', 'cartflows-pro' ), ) ); $this->add_control( 'hover_text_color', array( 'label' => __( 'Hover Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-title:hover' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'hover_text_shadow', 'label' => __( 'Hover Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-title:hover', ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Render Offer Product Title output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since x.x.x * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
    render_offer_product_title(); } } modules/elementor/widgets/class-cartflows-pro-el-offer-product-variation.php000064400000015137147600244370023455 0ustar00is_woo_active ) { return true; } return false; } /** * Retrieve the widget name. * * @since x.x.x * * @access public * * @return string Widget name. */ public function get_name() { return 'offer-product-variation'; } /** * Retrieve the widget Variation. * * @since x.x.x * * @access public * * @return string Widget Variation. */ public function get_title() { return __( 'Offer Product Variation', 'cartflows-pro' ); } /** * Retrieve the widget icon. * * @since x.x.x * * @access public * * @return string Widget icon. */ public function get_icon() { return 'wcf-brand-icon wcf-pro-el-icon-offer-product-variations'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since x.x.x * * @access public * * @return array Widget categories. */ public function get_categories() { return array( 'cartflows-widgets' ); } /** * Retrieve Widget Keywords. * * @since x.x.x * @access public * * @return string Widget keywords. */ public function get_keywords() { return array( 'cartflows', 'offer', 'product', 'variation' ); } /** * Register Offer Product Variation controls. * * @since x.x.x * @access protected */ protected function register_controls() { // Style Tab. $this->register_product_variation_style_controls(); } /** * Register Offer Product Variation Style Controls. * * @since x.x.x * @access protected */ protected function register_product_variation_style_controls() { $this->start_controls_section( 'offer_product_variation_styling', array( 'label' => __( 'Offer Product Variation', 'cartflows-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_responsive_control( 'align', array( 'label' => __( 'Alignment', 'cartflows-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'cartflows-pro' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'cartflows-pro' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'cartflows-pro' ), 'icon' => 'fa fa-align-right', ), ), 'prefix_class' => 'cartflows-elementor__offer-product-variation_align%s-', ) ); $this->add_control( 'section_order_review_width', array( 'label' => __( 'Width(%)', 'cartflows-pro' ), 'type' => Controls_Manager::SLIDER, 'range' => array( '%' => array( 'max' => 100, ), ), 'default' => array( 'unit' => '%', ), 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-variation .wcf-embeded-product-variation-wrap .variations' => 'max-width: {{SIZE}}{{UNIT}};', ), ) ); $this->add_control( 'label_color', array( 'label' => __( 'Label Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-variation label' => 'color: {{VALUE}};', ), ) ); $this->add_control( 'text_color', array( 'label' => __( 'Input Text Color', 'cartflows-pro' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => array( '{{WRAPPER}} .cartflows-pro-elementor__offer-product-variation .wcf-embeded-product-variation-wrap .variations .value select' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'typography', 'label' => __( 'Typography', 'cartflows-pro' ), 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_ACCENT, ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-variation, {{WRAPPER}} .cartflows-pro-elementor__offer-product-variation .wcf-embeded-product-variation-wrap .variations .value select, {{WRAPPER}} .cartflows-pro-elementor__offer-product-variation .label label', ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'text_shadow', 'label' => __( 'Text Shadow', 'cartflows-pro' ), 'selector' => '{{WRAPPER}} .cartflows-pro-elementor__offer-product-variation, {{WRAPPER}} .cartflows-pro-elementor__offer-product-variation .wcf-embeded-product-variation-wrap .variations .value select, {{WRAPPER}} .cartflows-pro-elementor__offer-product-variation label', ) ); $this->end_controls_section(); } /** * Render Offer Product Variation output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since x.x.x * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
    render_offer_product_variation(); } } modules/elementor/widgets/class-cartflows-pro-el-optin-form-extend.php000064400000001731147600244370022256 0ustar00=' ) ) ? 'register' : 'widgets_registered'; // Register widgets. add_action( 'elementor/widgets/' . $action_name, array( $this, 'register_widgets' ) ); add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'admin_enqueue_styles' ) ); } $this->widget_extend_files(); } /** * Enqueue admin scripts * * @since 1.6.13 * @param string $hook Current page hook. * @access public */ public function admin_enqueue_styles( $hook ) { // Register the icons styles. wp_register_style( 'cartflows-elementor-pro-icons-style', CARTFLOWS_PRO_URL . 'assets/elementor-assets/css/style.css', array(), CARTFLOWS_PRO_VER ); wp_enqueue_style( 'cartflows-elementor-pro-icons-style' ); } /** * Extend widget with pro functionality. * * @since 1.6.13 */ public function widget_extend_files() { require_once CARTFLOWS_PRO_DIR . 'modules/elementor/widgets/class-cartflows-pro-el-checkout-form-extend.php'; require_once CARTFLOWS_PRO_DIR . 'modules/elementor/widgets/class-cartflows-pro-el-optin-form-extend.php'; } /** * Returns Script array. * * @return array() * @since 1.6.13 */ public static function get_widget_list() { $widget_list = array( 'offer-action-button', 'offer-product-description', 'offer-action-link', 'offer-product-title', 'offer-product-price', 'offer-product-quantity', 'offer-product-variation', 'offer-product-image', ); return $widget_list; } /** * Include Widgets files * * Load widgets files * * @since 1.6.13 * @access public */ public function include_widgets_files() { $widget_list = $this->get_widget_list(); if ( ! empty( $widget_list ) ) { foreach ( $widget_list as $handle => $data ) { $file_path = CARTFLOWS_PRO_DIR . 'modules/elementor/widgets/class-cartflows-pro-el-' . $data . '.php'; if ( file_exists( $file_path ) ) { require_once $file_path; } } } // Enqueue the widgets style. wp_enqueue_style( 'cartflows-pro-elementor-style', CARTFLOWS_PRO_URL . 'modules/elementor/widgets-css/frontend.css', array(), CARTFLOWS_PRO_VER ); if ( \Elementor\Plugin::instance()->preview->is_preview_mode() ) { global $post; $step_type = get_post_meta( $post->ID, 'wcf-step-type', true ); if ( 'upsell' === $step_type || 'downsell' === $step_type ) { wp_enqueue_style( 'wcf-pro-flexslider', wcf_pro()->utils->get_css_url( 'flexslider' ), array(), CARTFLOWS_PRO_VER ); wp_enqueue_script( 'flexslider' ); } } } /** * Register Widgets * * Register new Elementor widgets. * * @since 1.6.13 * @access public */ public function register_widgets() { global $post; if ( ! isset( $post ) ) { return; } $post_type = $post->post_type; $step_type = get_post_meta( $post->ID, 'wcf-step-type', true ); if ( 'cartflows_step' === $post_type && class_exists( '\Elementor\Plugin' ) ) { // Its is now safe to include Widgets files. $this->include_widgets_files(); $widget_list = $this->get_widget_list(); $widget_manager = \Elementor\Plugin::$instance->widgets_manager; $fn_name = ( true === version_compare( ELEMENTOR_VERSION, '3.5.0', '>=' ) ) ? 'register' : 'register_widget_type'; foreach ( $widget_list as $widget ) { $widget = str_replace( '-', ' ', $widget ); $class_name = 'Cartflows_Pro_' . str_replace( ' ', '_', ucwords( $widget ) ); if ( $class_name::is_enable( $step_type ) ) { $widget_manager->{ $fn_name }( new $class_name() ); } } } } } /** * Initiate the class. */ Cartflows_Pro_Widgets_Loader::get_instance(); modules/gateways/class-cartflows-pro-api-base.php000064400000036372147600244370016157 0ustar00reset_response(); // save the request object $this->request = $request; $start_time = microtime( true ); // perform the request $response = $this->do_remote_request( $this->get_request_uri(), $this->get_request_args() ); // calculate request duration $this->request_duration = round( microtime( true ) - $start_time, 5 ); try { // parse & validate response $response = $this->handle_response( $response ); } catch ( Exception $e ) { // alert other actors that a request has been made $this->broadcast_request(); throw $e; } return $response; } /** * Simple wrapper for wp_remote_request() so child classes can override this * and provide their own transport mechanism if needed, e.g. a custom * cURL implementation * * @since 2.2.0 * * @param string $request_uri * @param string $request_args * * @return array|WP_Error */ protected function do_remote_request( $request_uri, $request_args ) { return wp_safe_remote_request( $request_uri, $request_args ); } /** * Handle and parse the response * * @since 2.2.0 * * @param array|WP_Error $response response data * * @throws Exception network issues, timeouts, API errors, etc * @return object request class instance that implements SV_WC_API_Request */ protected function handle_response( $response ) { // check for WP HTTP API specific errors (network timeout, etc) if ( is_wp_error( $response ) ) { throw new Exception( $response->get_error_message(), (int) $response->get_error_code() ); } // set response data $this->response_code = wp_remote_retrieve_response_code( $response ); $this->response_message = wp_remote_retrieve_response_message( $response ); $this->response_headers = wp_remote_retrieve_headers( $response ); $this->raw_response_body = wp_remote_retrieve_body( $response ); // allow child classes to validate response prior to parsing -- this is useful // for checking HTTP status codes, etc. $this->do_pre_parse_response_validation(); // parse the response body and tie it to the request $this->response = $this->get_parsed_response( $this->raw_response_body ); // allow child classes to validate response after parsing -- this is useful // for checking error codes/messages included in a parsed response $this->do_post_parse_response_validation(); // fire do_action() so other actors can act on request/response data, // primarily used for logging $this->broadcast_request(); return $this->response; } /** * Allow child classes to validate a response prior to instantiating the * response object. Useful for checking response codes or messages, e.g. * throw an exception if the response code is not 200. * * A child class implementing this method should simply return true if the response * processing should continue, or throw a \SV_WC_API_Exception with a * relevant error message & code to stop processing. * * Note: Child classes *must* sanitize the raw response body before throwing * an exception, as it will be included in the broadcast_request() method * which is typically used to log requests. * * @since 2.2.0 */ protected function do_pre_parse_response_validation() { // stub method } /** * Allow child classes to validate a response after it has been parsed * and instantiated. This is useful for check error codes or messages that * exist in the parsed response. * * A child class implementing this method should simply return true if the response * processing should continue, or throw an Exception with a * relevant error message & code to stop processing. * * Note: Response body sanitization is handled automatically * * @since 2.2.0 */ protected function do_post_parse_response_validation() { // stub method } /** * Return the parsed response object for the request * * @since 2.2.0 * * @param string $raw_response_body * * @return object response class instance which implements SV_WC_API_Request */ protected function get_parsed_response( $raw_response_body ) { /** * @todo do parsing if necessary */ return $raw_response_body; } /** * Alert other actors that a request has been performed. This is primarily used * for request logging. * * @since 2.2.0 */ protected function broadcast_request() { $request_data = array( 'method' => $this->get_request_method(), 'uri' => $this->get_request_uri(), 'user-agent' => $this->get_request_user_agent(), 'headers' => $this->get_sanitized_request_headers(), 'body' => $this->request->body, 'duration' => $this->get_request_duration() . 's', // seconds ); $response_data = array( 'code' => $this->get_response_code(), 'message' => $this->get_response_message(), 'headers' => $this->get_response_headers(), 'body' => $this->get_sanitized_response_body() ? $this->get_sanitized_response_body() : $this->get_raw_response_body(), ); do_action( 'wc_' . $this->get_api_id() . '_api_request_performed', $request_data, $response_data, $this ); } /** * Reset the API response members to their * * @since 1.0.0 */ protected function reset_response() { $this->response_code = null; $this->response_message = null; $this->response_headers = null; $this->raw_response_body = null; $this->response = null; $this->request_duration = null; } /** Request Getters *******************************************************/ /** * Get the request URI * * @since 2.2.0 * @return string */ protected function get_request_uri() { // API base request URI + any request-specific path $uri = $this->request_uri . ( $this->get_request() ? $this->get_request()->path : '' ); /** * Request URI Filter. * * Allow actors to filter the request URI. Note that child classes can override * this method, which means this filter may be invoked prior to the overridden * method. * * @since 4.1.0 * * @param string $uri current request URI * @param \Cartflows_Pro_Api_Base class instance */ return apply_filters( 'wc_' . $this->get_api_id() . '_api_request_uri', $uri, $this ); } /** * Get the request arguments in the format required by wp_remote_request() * * @since 2.2.0 * @return mixed|void */ protected function get_request_args() { $args = array( 'method' => $this->get_request_method(), 'timeout' => MINUTE_IN_SECONDS, 'redirection' => 0, 'httpversion' => $this->get_request_http_version(), 'sslverify' => true, 'blocking' => true, 'user-agent' => $this->get_request_user_agent(), 'headers' => $this->get_request_headers(), 'body' => $this->get_request()->body, 'cookies' => array(), ); /** * Request arguments. * * Allow other actors to filter the request arguments. Note that * child classes can override this method, which means this filter may * not be invoked, or may be invoked prior to the overridden method * * @since 2.2.0 * * @param array $args request arguments * @param \Cartflows_Pro_Api_Base class instance */ return apply_filters( 'wc_' . $this->get_api_id() . '_http_request_args', $args, $this ); } /** * Get the request method, POST by default * * @since 2.2.0 * @return string */ protected function get_request_method() { // if the request object specifies the method to use, use that, otherwise use the API default return $this->get_request() && $this->get_request()->method ? $this->get_request()->method : $this->request_method; } /** * Get the request HTTP version, 1.1 by default * * @since 2.2.0 * @return string */ protected function get_request_http_version() { return $this->request_http_version; } /** * Get the request headers * * @since 2.2.0 * @return array */ protected function get_request_headers() { return $this->request_headers; } /** * Get sanitized request headers suitable for logging, stripped of any * confidential information * * The `Authorization` header is sanitized automatically. * * Child classes that implement any custom authorization headers should * override this method to perform sanitization. * * @since 2.2.0 * @return array */ protected function get_sanitized_request_headers() { $headers = $this->get_request_headers(); if ( ! empty( $headers['Authorization'] ) ) { $headers['Authorization'] = str_repeat( '*', strlen( $headers['Authorization'] ) ); } return $headers; } /** * Get the request user agent, defaults to: * * Dasherized-Plugin-Name/Plugin-Version (WooCommerce/WC-Version; WordPress/WP-Version) * * @since 2.2.0 * @return string */ protected function get_request_user_agent() { return ''; return sprintf( '%s/%s (WooCommerce/%s; WordPress/%s)', str_replace( ' ', '-', $this->get_plugin()->get_plugin_name() ), $this->get_plugin()->get_version(), WC_VERSION, $GLOBALS['wp_version'] ); } /** * Get the request duration in seconds, rounded to the 5th decimal place * * @since 2.2.0 * @return string */ protected function get_request_duration() { return $this->request_duration; } /** Response Getters ******************************************************/ /** * Get the response handler class name * * @since 2.2.0 * @return string */ protected function get_response_handler() { return $this->response_handler; } /** * Get the response code * * @since 2.2.0 * @return string */ protected function get_response_code() { return $this->response_code; } /** * Get the response message * * @since 2.2.0 * @return string */ protected function get_response_message() { return $this->response_message; } /** * Get the response headers * * @since 2.2.0 * @return array */ protected function get_response_headers() { return $this->response_headers; } /** * Get the raw response body, prior to any parsing or sanitization * * @since 2.2.0 * @return string */ protected function get_raw_response_body() { return $this->raw_response_body; } /** * Get the sanitized response body, provided by the response class * to_string_safe() method * * @since 2.2.0 * @return string|null */ protected function get_sanitized_response_body() { return is_callable( array( $this->get_response(), 'to_string_safe' ) ) ? $this->get_response()->to_string_safe() : null; } /** Misc Getters ******************************************************/ /** * Returns the most recent request object * * @since 2.2.0 * @see \SV_WC_API_Request * @return object the most recent request object */ public function get_request() { return $this->request; } /** * Returns the most recent response object * * @since 2.2.0 * @see \SV_WC_API_Response * @return object the most recent response object */ public function get_response() { return $this->response; } /** * Get the ID for the API, used primarily to namespace the action name * for broadcasting requests * * @since 2.2.0 * @return string */ protected function get_api_id() { return 'wcf'; } /** Setters ***************************************************************/ /** * Set a header request * * @since 2.2.0 * * @param string $name header name * @param string $value header value * * @return string */ protected function set_request_header( $name, $value ) { $this->request_headers[ $name ] = $value; } /** * Set HTTP basic auth for the request * * Since 2.2.0 * * @param string $username * @param string $password */ protected function set_http_basic_auth( $username, $password ) { $this->request_headers['Authorization'] = sprintf( 'Basic %s', base64_encode( "{$username}:{$password}" ) ); } /** * Set the Content-Type request header * * @since 2.2.0 * * @param string $content_type */ protected function set_request_content_type_header( $content_type ) { $this->request_headers['content-type'] = $content_type; } /** * Set the Accept request header * * @since 2.2.0 * * @param string $type the request accept type */ protected function set_request_accept_header( $type ) { $this->request_headers['accept'] = $type; } /** * Set the response handler class name. This class will be instantiated * to parse the response for the request. * * Note the class should implement SV_WC_API * * @since 2.2.0 * * @param string $handler handle class name * * @return array */ protected function set_response_handler( $handler ) { $this->response_handler = $handler; } } modules/gateways/class-cartflows-pro-cpsw-stripe-gateway-helper.php000064400000006002147600244370021655 0ustar00logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); $is_offer_supported = true; $payment_method = isset( $_POST['payment_method'] ) ? sanitize_text_field( $_POST['payment_method'] ) : '';//phpcs:ignore WordPress.Security.NonceVerification.Missing if ( 'cpsw_stripe_element' === $payment_method ) { $selected_payment_type = isset( $_POST['selected_payment_type'] ) ? sanitize_text_field( $_POST['selected_payment_type'] ) : '';//phpcs:ignore WordPress.Security.NonceVerification.Missing // Check if selected payment type is supported for offers, using an array for future extensibility. $is_offer_supported = $selected_payment_type && in_array( $selected_payment_type, array( 'card' ) ); } if ( $checkout_id && $flow_id && $is_offer_supported && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $save_source = true; wcf()->logger->log( 'Force save source enabled' ); } wcf()->logger->log( 'Ended : ' . __CLASS__ . '::' . __FUNCTION__ ); return $save_source; } /** * Redirection to order received URL. * * @param array $url response data. * @param WC_Order $order The WooCommerce order object. */ public function redirect_using_wc_function( $url, $order ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( did_action( 'cartflows_order_started' ) ) { $url = $order->get_checkout_order_received_url(); } return $url; } /** * Setup the Payment data for Stripe's Automatic Subscription. * * @param object $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta( $subscription, $order, $offer_product ) { if ( 'cpsw_stripe' === $order->get_payment_method() || 'cpsw_stripe_element' === $order->get_payment_method() ) { $subscription->update_meta_data( '_cpsw_source_id', $order->get_meta( '_cpsw_source_id', true ) ); $subscription->update_meta_data( '_cpsw_customer_id', $order->get_meta( '_cpsw_customer_id', true ) ); $subscription->save(); } } /** * Allow scripts on offer pages. * * @param bool $is_exclude is allowed scripts. */ public function allow_cpsw_scripts_on_offer_pages( $is_exclude ) { global $post; if ( $post && wcf()->utils->check_is_offer_page( $post->ID ) ) { $is_exclude = false; } return $is_exclude; } } modules/gateways/class-cartflows-pro-gateway-admin.php000064400000003076147600244370017220 0ustar00is_woo_active ) { return $localize; } if ( ! class_exists( 'Cartflows_Pro_Gateways' ) ) { return $localize; } $supported_gateways = Cartflows_Pro_Gateways::get_instance()->get_supported_gateways(); $woo_available_gateways = WC()->payment_gateways->get_available_payment_gateways(); $available_gateways = array(); foreach ( $woo_available_gateways as $key => $value ) { $available_gateways[ $key ]['method_title'] = $value->method_title; } $localize['supported_payment_gateways'] = $supported_gateways; $localize['available_payment_gateways'] = $available_gateways; return $localize; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Admin' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Admin::get_instance(); modules/gateways/class-cartflows-pro-gateway-authorize-net.php000064400000077074147600244370020737 0ustar00key . '_tokenization_forced', array( $this, 'maybe_force_tokenization' ) ); /** * Create token for non logged-in user and authorize version greater than 3.0.0. * Force guest tokenization when needed for upsell/doownsell */ add_filter( 'wc_payment_gateway_' . $this->key . '_process_payment', array( $this, 'create_token_process_payment' ), 10, 3 ); /** * * Send the data for the refund request. */ add_filter( 'wc_authorize_net_cim_api_request_data', array( $this, 'offer_refund_request_data' ), 10, 3 ); add_action( 'cartflows_offer_subscription_created', array( $this, 'add_subscription_payment_meta_for_authorize_net' ), 10, 3 ); } /** * Forces tokenization for upsell/downsells. * * @since 1.5.0 * * @param bool $force_tokenization whether tokenization should be forced. * @return bool */ public function maybe_force_tokenization( $force_tokenization ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( isset( $_POST['post_data'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $post_data = array(); $post_raw_data = sanitize_text_field( wp_unslash( $_POST['post_data'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Missing parse_str( $post_raw_data, $post_data ); $checkout_id = wcf_pro()->utils->get_checkout_id_from_data( $post_data ); $flow_id = wcf_pro()->utils->get_flow_id_from_data( $post_data ); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $force_tokenization = true; wcf()->logger->log( 'Force save source enabled' ); } } wcf()->logger->log( $force_tokenization ); return $force_tokenization; } /** * Create token for non logged-in user and authorize version greater than 3.0.0 * Forces guest tokenization for upsell/downsells. * * @since 1.5.0 * * @param array $result gateway data. * @param int $order_id order id. * @param object $anet_obj class instance. * @return array */ public function create_token_process_payment( $result, $order_id, $anet_obj ) { $create_token = false; $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $create_token = true; } $order = $this->get_wc_gateway()->get_order( $order_id ); $get_user_id = $order->get_user_id(); if ( $create_token && empty( $get_user_id ) ) { try { // Check if token is already exist. if ( isset( $order->payment->token ) && $order->payment->token ) { $this->get_wc_gateway()->add_transaction_data( $order ); } else { // else create new token. $order_for_shipping = $order; try { $order = $this->get_wc_gateway()->get_payment_tokens_handler()->create_token( $order ); } catch ( Exception $e ) { $re = '/[0-9]+/'; $str = $e->getMessage(); preg_match_all( $re, $str, $matches, PREG_SET_ORDER, 0 ); if ( $matches && is_array( $matches ) && isset( $matches[0][0] ) && '00039' === $matches[0][0] ) { $get_order_by_meta = new WP_Query( array( 'post_type' => 'shop_order', 'post_status' => 'any', 'meta_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query array( 'key' => '_wc_authorize_net_cim_credit_card_customer_id', 'value' => $matches[1][0], 'compare' => '=', ), ), 'fields' => 'ids', 'order' => 'ASC', ) ); if ( is_array( $get_order_by_meta->posts ) && count( $get_order_by_meta->posts ) > 0 ) { $this->extra_data['authorize_net_cim_order_id'] = $get_order_by_meta->posts[0]; $order_for_shipping = $this->get_wc_gateway()->get_order( $get_order_by_meta->posts[0] ); $this->extra_data['authorize_net_cim_customer_id'] = $matches[1][0]; } } } // otherwise tokenize the payment method. $this->unset_opaque_value = true; $order = $this->get_order( $order ); $this->get_wc_gateway()->add_transaction_data( $order ); /** * We need to create shipping ID for the current user on Authorize.Net CIM API * As ShippingAddressID is important for the cases when business owner has shipping-filters enabled in their merchant account. */ try { /** * When we are in a case when there is a returning user & not logged in then in this case there are chances that shipping API request might fail. * In this case we need to try and get shipping ID from the order meta and set this up for further. */ $response = $this->get_wc_gateway()->get_api()->create_shipping_address( $order ); } catch ( Exception $e ) { $response = intval( $order_for_shipping->get_meta( '_authorize_cim_shipping_address_id' ) ); } $shipping_address_id = is_numeric( $response ) ? $response : $response->get_shipping_address_id(); $order->payment->shipping_address_id = $shipping_address_id; $this->get_wc_gateway()->add_transaction_data( $order ); $this->do_main_transaction( $order ); } $result = array( 'result' => 'success', 'redirect' => $this->get_wc_gateway()->get_return_url( $order ), ); } catch ( Exception $e ) { $result = array( 'result' => 'failure', 'message' => $e->getMessage(), ); } } return $result; } /** * Get current site name. * * @return string */ public function get_current_site_name() { return ( is_multisite() ) ? get_blog_details()->blogname : get_bloginfo( 'name' ); } /** * Get order. * * @param object $order order object. * @return object. */ public function get_order( $order ) { if ( $order instanceof WC_Order && $this->key === $order->get_payment_method() ) { if ( $this->has_token( $order ) && ! is_checkout_pay_page() ) { $order_id = $order->get_id(); // retrieve the payment token. $order->payment->token = $this->get_wc_gateway()->get_order_meta( $order_id, 'payment_token' ); $token_from_gateway = $this->get_token( $order ); if ( empty( $order->payment->token ) && ! empty( $token_from_gateway ) ) { $order->payment->token = $token_from_gateway; } // retrieve the optional customer id. $order->customer_id = $this->get_wc_gateway()->get_order_meta( $order_id, 'customer_id' ); /* May be we need customer id from session */ $customer_id_from_session = isset( $this->extra_data['authorize_net_cim_customer_id'] ) ? $this->extra_data['authorize_net_cim_customer_id'] : ''; if ( empty( $order->customer_id ) && ! empty( $customer_id_from_session ) ) { $order->customer_id = $customer_id_from_session; } // set token data on order. if ( $this->get_wc_gateway()->get_payment_tokens_handler()->user_has_token( $order->get_user_id(), $order->payment->token ) ) { // an existing registered user with a saved payment token. $token = $this->get_wc_gateway()->get_payment_tokens_handler()->get_token( $order->get_user_id(), $order->payment->token ); // account last four. $order->payment->account_number = $token->get_last_four(); if ( $this->get_wc_gateway()->is_credit_card_gateway() ) { // card type. $order->payment->card_type = $token->get_card_type(); // exp month/year. $order->payment->exp_month = $token->get_exp_month(); $order->payment->exp_year = $token->get_exp_year(); } elseif ( $this->get_wc_gateway()->is_echeck_gateway() ) { // account type (checking/savings). $order->payment->account_type = $token->get_account_type(); } } else { // a guest user means that token data must be set from the original order. // account number. $order->payment->account_number = $this->get_wc_gateway()->get_order_meta( $order_id, 'account_four' ); if ( $this->get_wc_gateway()->is_credit_card_gateway() ) { // card type. $order->payment->card_type = $this->get_wc_gateway()->get_order_meta( $order_id, 'card_type' ); // expiry date. $expiry_date = $this->get_wc_gateway()->get_order_meta( $order_id, 'card_expiry_date' ); if ( ! empty( $expiry_date ) ) { list( $exp_year, $exp_month ) = explode( '-', $expiry_date ); $order->payment->exp_month = $exp_month; $order->payment->exp_year = $exp_year; } } elseif ( $this->get_wc_gateway()->is_echeck_gateway() ) { // account type. $order->payment->account_type = $this->get_wc_gateway()->get_order_meta( $order_id, 'account_type' ); } } } $response = intval( $order->get_meta( '_authorize_cim_shipping_address_id' ) ); if ( ! empty( $response ) ) { $order->payment->shipping_address_id = $response; } if ( true === $this->unset_opaque_value && isset( $order->payment->opaque_value ) ) { unset( $order->payment->opaque_value ); } } return $order; } /** * We cloned the function that we need to fire main transaction in the case when accept.js in is action and user is not logged in. * * @param object $order order object. * @throws Exception Token exception. */ private function do_main_transaction( $order ) { try { // order description. /* translators: %1s Release payment */ $order->description = sprintf( __( '%1$s - Release Payment for Order %2$s', 'cartflows-pro' ), esc_html( $this->get_current_site_name() ), $order->get_order_number() ); // token is required. if ( ! $order->payment->token ) { throw new Exception( __( 'Payment token missing/invalid.', 'cartflows-pro' ) ); } // perform the transaction. if ( $this->get_wc_gateway()->is_credit_card_gateway() ) { if ( $this->get_wc_gateway()->perform_credit_card_charge( $order ) ) { $response = $this->get_wc_gateway()->get_api()->credit_card_charge( $order ); } else { $response = $this->get_wc_gateway()->get_api()->credit_card_authorization( $order ); } } elseif ( $this->get_wc_gateway()->is_echeck_gateway() ) { $response = $this->get_wc_gateway()->get_api()->check_debit( $order ); } // success! update order record. if ( $response->transaction_approved() ) { $last_four = substr( $order->payment->account_number, - 4 ); // order note based on gateway type. if ( $this->get_wc_gateway()->is_credit_card_gateway() ) { /* translators: %1s payment released */ $message = sprintf( __( '%1$s %2$s Release Payment Approved: %3$s ending in %4$s (expires %5$s)', 'cartflows-pro' ), $this->get_wc_gateway()->get_method_title(), $this->get_wc_gateway()->perform_credit_card_authorization( $order ) ? 'Authorization' : 'Charge', ! empty( $order->payment->card_type ) ? $order->payment->card_type : 'card', $last_four, ( ! empty( $order->payment->exp_month ) && ! empty( $order->payment->exp_year ) ? $order->payment->exp_month . '/' . substr( $order->payment->exp_year, - 2 ) : 'n/a' ) ); } // adds the transaction id (if any) to the order note. if ( $response->get_transaction_id() ) { /* translators: %1s transaction id */ $message .= ' ' . sprintf( __( '(Transaction ID %s)', 'cartflows-pro' ), $response->get_transaction_id() ); } $order->add_order_note( $message ); } if ( $response->transaction_approved() || $response->transaction_held() ) { // add the standard transaction data. $this->get_wc_gateway()->add_transaction_data( $order, $response ); // allow the concrete class to add any gateway-specific transaction data to the order. $this->get_wc_gateway()->add_payment_gateway_transaction_data( $order, $response ); // if the transaction was held (ie fraud validation failure) mark it as such. if ( $response->transaction_held() || ( $this->get_wc_gateway()->supports( 'authorization' ) && $this->get_wc_gateway()->perform_credit_card_authorization( $order ) ) ) { $this->get_wc_gateway()->mark_order_as_held( $order, $this->get_wc_gateway()->supports( 'authorization' ) && $this->get_wc_gateway()->perform_credit_card_authorization( $order ) ? __( 'Authorization only transaction', 'cartflows-pro' ) : $response->get_status_message(), $response ); wc_reduce_stock_levels( $order->get_id() ); } else { // otherwise complete the order. $order->payment_complete(); } } else { // failure. throw new Exception( sprintf( '%s: %s', $response->get_status_code(), $response->get_status_message() ) ); } } catch ( Exception $e ) { // Mark order as failed. /* translators: %1s payment failed message */ $this->get_wc_gateway()->mark_order_as_failed( $order, sprintf( __( 'Pre-Order Release Payment Failed: %s', 'cartflows-pro' ), $e->getMessage() ) ); } } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /********************************** Helper Function Start *********************************/ /** * Truncates a given string. The total length of return string will not exceed the given length. * The given length will include omission string * * @param string $string text to truncate. * @param int $length total desired length of string, including omission. * @param string $omission omission text, defaults to '...'. * * @return string * @since 1.5.0 */ public function string_truncate( $string, $length, $omission = '...' ) { if ( extension_loaded( 'mbstring' ) ) { if ( mb_strlen( $string, $this->mb_encoding ) <= $length ) { return $string; } $length -= mb_strlen( $omission, $this->mb_encoding ); return mb_substr( $string, 0, $length, $this->mb_encoding ) . $omission; } else { $string = $this->str_to_ascii( $string ); if ( strlen( $string ) <= $length ) { return $string; } $length -= strlen( $omission ); return substr( $string, 0, $length ) . $omission; } } /********************************** Helper Function End *********************************/ /** * Get the token from order if availble. * * @param object $order order object. * @return bool */ public function has_token( $order ) { $token = $order->get_meta( '_wc_' . $this->key . '_payment_token' ); if ( ! empty( $token ) ) { return true; } /* Fallback */ if ( isset( $this->extra_data['authorize_net_cim_order_id'] ) ) { $fallback_order_id = $this->extra_data['authorize_net_cim_order_id']; $fallback_order = wc_get_order( $fallback_order_id ); $token = $fallback_order->get_meta( '_wc_' . $this->key . '_payment_token' ); if ( ! empty( $token ) ) { if ( $order ) { $order->update_meta_data( '_wc_' . $this->key . '_payment_token', $token ); $order->save(); } return true; } } return false; } /** * Get the token from order if availble. * * @param object $order order object. * @return string */ public function get_token( $order ) { $token = $order->get_meta( '_wc_' . $this->key . '_payment_token' ); if ( ! empty( $token ) ) { return $token; } return ''; } /** * Get customer id by order * * @param object $order order object. * * @return string customer id */ public function get_customer_id( $order ) { $customer_id = $order->get_meta( '_wc_' . $this->key . '_customer_id' ); if ( ! empty( $customer_id ) ) { return $customer_id; } return ''; } /** * Order items. * * @return array * @since 1.5.0 */ protected function get_line_items() { $line_items = array(); $offer_product = $this->offer_product; if ( isset( $offer_product['id'] ) && $offer_product['id'] > 0 ) { $line_items[] = array( 'itemId' => $this->string_truncate( $offer_product['id'], 31 ), 'name' => $this->string_truncate( $offer_product['name'], 31 ), 'description' => $this->string_truncate( $offer_product['desc'], 255 ), 'quantity' => $offer_product['qty'], 'unitPrice' => number_format( (float) $offer_product['total'], 2, '.', '' ), ); } return $line_items; } /** * Request attributes. * * @param array $request request data. * @return array * @since 1.5.0 */ public function get_request_attributes( $request ) { return array( 'method' => 'POST', 'timeout' => MINUTE_IN_SECONDS, 'redirection' => 0, 'httpversion' => '1.0', 'sslverify' => true, 'blocking' => true, 'headers' => array( 'content-type' => 'application/json', 'accept' => 'application/json', ), 'body' => wp_json_encode( $request ), 'cookies' => array(), ); } /** * After payment process. * * @param array $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { $is_successful = false; // Assign offer product. $this->offer_product = $product; if ( ! $this->has_token( $order ) ) { wcf()->logger->log( 'Authorize payment : No token found' ); return $is_successful; } try { $gateway = $this->get_wc_gateway(); $api = $gateway->get_api(); $environment = $gateway->get_environment(); $url = ( 'production' === $environment ) ? $api::PRODUCTION_ENDPOINT : $api::TEST_ENDPOINT; /** * Get order object and modify according to your need of token and other details. */ add_filter( 'wc_payment_gateway_' . $this->key . '_get_order', array( $this, 'get_update_order' ), 999 ); $new_order = $gateway->get_order( $order ); $request = $this->create_transaction_request( 'capture', $new_order ); $attributes = $this->get_request_attributes( $request ); $response = wp_safe_remote_request( $url, $attributes ); $body = wp_remote_retrieve_body( $response ); $body = preg_replace( '/[\x00-\x1F\x80-\xFF]/', '', $body ); $result = json_decode( $body, true ); if ( is_wp_error( $response ) ) { wcf()->logger->log( 'Authorize Net WP Error : ' . wcf_print_r( $response, true ) ); } else { if ( isset( $result['messages'] ) && isset( $result['messages']['message'][0]['code'] ) && 'I00001' === $result['messages']['message'][0]['code'] ) { $is_successful = true; /* Get transaction id here transaction_id */ $trasaction_id = $this->get_offer_transaction_id( $result['directResponse'] ); $response_data = array( 'id' => $trasaction_id, ); $this->store_offer_transaction( $order, $response_data, $product ); } else { wcf()->logger->log( 'Authorize Net Response Error : ' . wcf_print_r( $result, true ) ); /* translators: %1s error message */ $order_note = sprintf( __( 'Authorize.net CIM Transaction Failed (%s)', 'cartflows-pro' ), $result['messages']['message'][0]['text'] ); $order->add_order_note( $order_note ); } } } catch ( Exception $e ) { // todo Show actual error if any. wcf()->logger->log( 'Authorize Net exception catch : ' . wcf_print_r( $e, true ) ); /* translators: %1s site name */ $note = sprintf( __( 'Authorize.Net CIM Transaction Failed (%s)', 'cartflows-pro' ), $e->getMessage() ); $order->add_order_note( $note ); } return $is_successful; } /** * Set upsell/downsell offer order. * * @param object $order order data. * @return object */ public function get_update_order( $order ) { if ( $order instanceof WC_Order && $this->key === $order->get_payment_method() ) { if ( $this->has_token( $order ) && ! is_checkout_pay_page() ) { $order_id = $order->get_id(); // retrieve the payment token. $order->payment->token = $this->get_wc_gateway()->get_order_meta( $order_id, 'payment_token' ); $token_from_gateway = $this->get_token( $order ); if ( empty( $order->payment->token ) && ! empty( $token_from_gateway ) ) { $order->payment->token = $token_from_gateway; } // retrieve the optional customer id. $order->customer_id = $this->get_wc_gateway()->get_order_meta( $order_id, 'customer_id' ); // set token data on order. if ( $this->get_wc_gateway()->get_payment_tokens_handler()->user_has_token( $order->get_user_id(), $order->payment->token ) ) { // an existing registered user with a saved payment token. $token = $this->get_wc_gateway()->get_payment_tokens_handler()->get_token( $order->get_user_id(), $order->payment->token ); // account last four. $order->payment->account_number = $token->get_last_four(); if ( $this->get_wc_gateway()->is_credit_card_gateway() ) { // card type. $order->payment->card_type = $token->get_card_type(); // exp month/year. $order->payment->exp_month = $token->get_exp_month(); $order->payment->exp_year = $token->get_exp_year(); } elseif ( $this->get_wc_gateway()->is_echeck_gateway() ) { // account type (checking/savings). $order->payment->account_type = $token->get_account_type(); } } else { // a guest user means that token data must be set from the original order. // account number. $order->payment->account_number = $this->get_wc_gateway()->get_order_meta( $order_id, 'account_four' ); if ( $this->get_wc_gateway()->is_credit_card_gateway() ) { // card type. $order->payment->card_type = $this->get_wc_gateway()->get_order_meta( $order_id, 'card_type' ); // expiry date. $expiry_date = $this->get_wc_gateway()->get_order_meta( $order_id, 'card_expiry_date' ); if ( ! empty( $expiry_date ) ) { list( $exp_year, $exp_month ) = explode( '-', $expiry_date ); $order->payment->exp_month = $exp_month; $order->payment->exp_year = $exp_year; } } elseif ( $this->get_wc_gateway()->is_echeck_gateway() ) { // account type. $order->payment->account_type = $this->get_wc_gateway()->get_order_meta( $order_id, 'account_type' ); } } } $response = intval( $order->get_meta( '_authorize_cim_shipping_address_id' ) ); if ( ! empty( $response ) ) { $order->payment->shipping_address_id = $response; } if ( true === $this->unset_opaque_value && isset( $order->payment->opaque_value ) ) { unset( $order->payment->opaque_value ); } } return $order; } /** * Set upsell/downsell offer order. * * @param string $type transactin type. * @param object $new_order order data. * @return object */ protected function create_transaction_request( $type, $new_order ) { $order = $new_order; $transaction_type = ( 'auth_only' === $type ) ? 'profileTransAuthOnly' : 'profileTransAuthCapture'; $offer_product = $this->offer_product; /** * We need to create shipping ID for the current user on Authorize.Net CIM API * As ShippingAddressID is important for the cases when business owner has shipping-filters enabled in their merchant account. */ if ( isset( $order->payment ) && isset( $order->payment->shipping_address_id ) && ! empty( $order->payment->shipping_address_id ) ) { $shipping_address_id = $order->payment->shipping_address_id; } else { $response = $this->get_wc_gateway()->get_api()->create_shipping_address( $order ); $shipping_address_id = is_numeric( $response ) ? $response : $response->get_shipping_address_id(); } return array( 'createCustomerProfileTransactionRequest' => array( 'merchantAuthentication' => array( 'name' => wc_clean( $this->get_wc_gateway()->get_api_login_id() ), 'transactionKey' => wc_clean( $this->get_wc_gateway()->get_api_transaction_key() ), ), 'refId' => $order->get_id() . '_' . $offer_product['step_id'], 'transaction' => array( $transaction_type => array( 'amount' => number_format( (float) $offer_product['total'], 2, '.', '' ), 'tax' => array(), 'shipping' => array(), 'lineItems' => $this->get_line_items(), 'customerProfileId' => $this->get_customer_id( $order ), 'customerPaymentProfileId' => $this->get_token( $order ), 'customerShippingAddressId' => $shipping_address_id, 'order' => array( 'invoiceNumber' => $order->get_id() . '_' . $offer_product['step_id'], 'description' => $this->string_truncate( $offer_product['desc'], 255 ), 'purchaseOrderNumber' => $this->string_truncate( preg_replace( '/\W/', '', $order->payment->po_number ), 25 ), ), ), ), /* * Extra Option if any * 'extraOptions' get_extra_options */ ), ); } /** * Creating refund request data. * * @param array $request_data request data. * @param object $order order object. * @param string $gateway gateway. * * @return array */ public function offer_refund_request_data( $request_data, $order, $gateway ) { //phpcs:disable WordPress.Security.NonceVerification.Missing if ( isset( $_POST['cartflows_refund'] ) ) { $order_id = $order->get_id(); $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $offer_id = isset( $_POST['offer_id'] ) ? intval( $_POST['offer_id'] ) : 0; if ( isset( $request_data['createCustomerProfileTransactionRequest'] ) && isset( $request_data['createCustomerProfileTransactionRequest']['refId'] ) ) { $request_data['createCustomerProfileTransactionRequest']['refId'] = $order_id . '_' . $step_id; } if ( isset( $request_data['createCustomerProfileTransactionRequest'] ) && isset( $request_data['createCustomerProfileTransactionRequest']['transaction'] ) && isset( $request_data['createCustomerProfileTransactionRequest']['transaction']['profileTransRefund'] ) && isset( $request_data['createCustomerProfileTransactionRequest']['transaction']['profileTransRefund']['order'] ) && isset( $request_data['createCustomerProfileTransactionRequest']['transaction']['profileTransRefund']['order']['invoiceNumber'] ) ) { $request_data['createCustomerProfileTransactionRequest']['transaction']['profileTransRefund']['order']['invoiceNumber'] = $order_id . '_' . $step_id; } } return $request_data; //phpcs:enable WordPress.Security.NonceVerification.Missing } /** * Process offer refund. * * @param object $order the order object. * @param array $offer_data offer data. * * @return bool */ public function process_offer_refund( $order, $offer_data ) { $order_id = $offer_data['order_id']; $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $gateway = $this->get_wc_gateway(); $api = $gateway->get_api(); $response_id = false; $order->refund = new stdClass(); $order->refund->trans_id = $transaction_id; $order->refund->amount = number_format( $refund_amount, 2, '.', '' ); $order->refund->reason = $refund_reason; // profile refund/void. $order->refund->customer_profile_id = $gateway->get_order_meta( $order, 'customer_id' ); $order->refund->customer_payment_profile_id = $gateway->get_order_meta( $order, 'payment_token' ); $response = $api->refund( $order ); $response_id = $response->get_transaction_id(); if ( ! $response_id ) { $response = $api->void( $order ); $response_id = $response->get_transaction_id(); } return $response_id; } /** * Is gateway support offer refund? * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { $order_id = $order->get_id(); wcf()->logger->log( 'Authorize Net : Offer Transaction :: Transaction ID = ' . $response['id'] . ' Captured' ); $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response['id'] ); $order->save(); } /** * Setup the Payment data for Authorize.net Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_authorize_net( $subscription, $order, $offer_product ) { if ( 'authorize_net_cim_credit_card' === $order->get_payment_method() ) { $subscription->update_meta_data( '_wc_authorize_net_cim_credit_card_customer_id', $order->get_meta( '_wc_authorize_net_cim_credit_card_customer_id', true ) ); $subscription->update_meta_data( '_wc_authorize_net_cim_credit_card_payment_token', $order->get_meta( '_wc_authorize_net_cim_credit_card_payment_token', true ) ); $subscription->save(); } } /** * Get Offer Transaction ID. * * @param object $response The response that is send from the payment gateway. * @return string */ private function get_offer_transaction_id( $response ) { $response = explode( ',', $response ); if ( empty( $response ) ) { return ''; } // offset array by 1 to match Authorize.Net's order, mainly for readability. array_unshift( $response, null ); $new_direct_response = array(); // direct response fields are URL encoded, but we currently do not use any fields. // (e.g. billing/shipping details) that would be affected by that. $response_fields = array( 'response_code' => 1, 'response_subcode' => 2, 'response_reason_code' => 3, 'response_reason_text' => 4, 'authorization_code' => 5, 'avs_response' => 6, 'transaction_id' => 7, 'amount' => 10, 'account_type' => 11, // CC or ECHECK. 'transaction_type' => 12, // AUTH_ONLY or AUTH_CAPTUREVOID probably. 'csc_response' => 39, 'cavv_response' => 40, 'account_last_four' => 51, 'card_type' => 52, ); foreach ( $response_fields as $field => $order ) { $new_direct_response[ $field ] = ( isset( $response[ $order ] ) ) ? $response[ $order ] : ''; } return isset( $new_direct_response['transaction_id'] ) && '' !== $new_direct_response['transaction_id'] ? $new_direct_response['transaction_id'] : ''; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Authorize_Net' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Authorize_Net::get_instance(); modules/gateways/class-cartflows-pro-gateway-bacs.php000064400000006275147600244370017044 0ustar00get_payment_method(); if ( $this->key !== $gateway ) { return false; } if ( $order->has_status( 'on-hold' ) ) { if ( $this->get_wc_gateway()->instructions ) { echo wp_kses_post( wpautop( wptexturize( $this->get_wc_gateway()->instructions ) ) . PHP_EOL ); } add_action( 'woocommerce_bacs_accounts', array( $this, 'modify_bank_details' ) ); } } /** * Pass Bank Details to the WC emails as it received from the order. * * @param array $bank_details Bank Details. * @return array Bank Details. */ public function modify_bank_details( $bank_details ) { return $bank_details; } /** * Setup upsell bacs. * * @since 1.0.0 * @param string $order_status order status. * @param array $order order data. * @return string */ public function maybe_setup_upsell_bacs( $order_status, $order ) { wcf()->logger->log( 'BACS Process payment order status called woocommerce_cod_process_payment_order_status' ); // Set upsell and get new status based on condition. $order_status = wcf_pro()->front->set_upsell_return_new_order_status( $order_status, $order ); return $order_status; } /** * Process offer payment * * @since 1.0.0 * @param array $order order data. * @param array $product product data. * @return bool */ public function process_offer_payment( $order, $product ) { return true; } /** * Is gateway support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Bacs' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Bacs::get_instance(); modules/gateways/class-cartflows-pro-gateway-cod.php000064400000003364147600244370016675 0ustar00logger->log( 'COD Process payment order status called woocommerce_cod_process_payment_order_status' ); // Set upsell and get new status based on condition. $order_status = wcf_pro()->front->set_upsell_return_new_order_status( $order_status, $order ); return $order_status; } /** * Process offer payment * * @since 1.0.0 * @param array $order order data. * @param array $product product data. * @return bool */ public function process_offer_payment( $order, $product ) { return true; } /** * Is gateway support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Cod' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Cod::get_instance(); modules/gateways/class-cartflows-pro-gateway-cppw-paypal.php000064400000027540147600244370020367 0ustar00key, array( $this, 'add_required_meta_to_child_order' ), 10, 3 ); } /** * Handle payment type of checkout plugin paypal. * * @param string $paypal_order_id paypal order id. * @param array $payment_source_body payment source body. * * @return object */ public function handle_payment_type_request( $paypal_order_id, $payment_source_body ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $gateway = $this->get_wc_gateway(); $paypal_type = $gateway->paypal_type; wcf()->logger->log( 'PayPal Type: ' . $paypal_type ); if ( 'capture' === $paypal_type ) { return $gateway->capture_order_request( $paypal_order_id, $payment_source_body ); } if ( 'authorize' === $paypal_type ) { return $gateway->authorize_order_request( $paypal_order_id, $payment_source_body ); } wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return bool */ public function process_offer_payment( $order, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $is_successful = false; $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, $product['action'] ) ) { wcf()->logger->log( 'Nonce verification failed. ' . __CLASS__ . '::' . __FUNCTION__ ); return $is_successful; } // Confirm if same transaction id then only create Woo Offer order. $offer_order_tr_id = $order->get_meta( 'cartflows_offer_txn_resp_' . $product['step_id'] ); $received_tr_id = isset( $_POST['transaction_id'] ) ? sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ) : ''; if ( $offer_order_tr_id === $received_tr_id ) { $is_successful = true; } wcf()->logger->log( 'Payment Status: ' . $is_successful ); wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $is_successful; } /** * Verify 3DS and create intent accordingly. * * @return void */ public function create_payment_order() { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_cppw_create_paypal_order' ) ) { wp_send_json( array( 'result' => 'fail', 'message' => 'Nonce verification failed.', ) ); } $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) && ! empty( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order = wc_get_order( $order_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wcf()->logger->log( 'Zero value product selected' ); wp_send_json( array( 'result' => 'fail', 'message' => '0 value product', ) ); } else { wcf()->logger->log( 'Creating paypal order.' ); $gateway = $this->get_wc_gateway(); // Create paypal order from paypal end. $paypal_order = $gateway->create_paypal_order_of_wc( $order, number_format( (float) $offer_product['total'], 2, '.', '' ) ); if ( empty( $paypal_order['id'] ) ) { wcf()->logger->log( 'No paypal order created.' ); } wcf()->logger->log( 'Paypal Order Response: ' . wcf_print_r( $paypal_order, true ) ); // Capture newly created paypal order based on billing agreement id. $billing_agreement_id = $order->get_meta( CPPW_SUB_AGREEMENT_ID ); wcf()->logger->log( 'Billing Agreement ID: ' . $billing_agreement_id ); $payment_source_body = $gateway->generate_payment_source_body( $billing_agreement_id ); wcf()->logger->log( 'Payment Source Body: ' . wcf_print_r( $payment_source_body, true ) ); // Handle payment request created above. $capture_payment = $this->handle_payment_type_request( $paypal_order['id'], $payment_source_body ); // Retrive transaction id of offer prder and save it. $transaction_id = $gateway->get_transaction_id( $capture_payment ); wcf()->logger->log( 'Captured Paypal Order: ' . wcf_print_r( $capture_payment, true ) ); if ( isset( $capture_payment['status'] ) && 'COMPLETED' === $capture_payment['status'] ) { if ( 'capture' === $gateway->paypal_type ) { $price_breakdown = ! empty( $capture_payment['purchase_units'][0]['payments']['captures'][0]['seller_receivable_breakdown'] ) ? $capture_payment['purchase_units'][0]['payments']['captures'][0]['seller_receivable_breakdown'] : false; // Save offer order paypal fee & other data in main order meta. Will update it later in clid order. $this->add_fee_net_amount( $order, $price_breakdown, $step_id ); } $order->update_meta_data( 'cartflows_offer_txn_resp_' . $step_id, $transaction_id ); $order->update_meta_data( 'cartflows_offer' . CPPW_SUB_AGREEMENT_ID . '_' . $step_id, $billing_agreement_id ); $order->save(); wcf()->logger->log( 'Transaction ID: ' . $transaction_id ); wp_send_json( array( 'status' => 'succeeded', 'transaction_id' => $transaction_id, ) ); } else { wcf()->logger->log( 'Creating a PayPal order failed due to the order not captured.' ); wp_send_json( array( 'status' => 'fail', 'message' => 'Payment Failed', ) ); } } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Add paypal fee * * @param object $order Add order paypal fee. * @param mixed $price_breakdown Fee amount's breakdown. * @param int $step_id step id. * * @return void */ public static function add_fee_net_amount( $order, $price_breakdown, $step_id ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( ! empty( $price_breakdown['paypal_fee']['value'] ) ) { $order->update_meta_data( 'cartflows_offer' . CPPW_PAYPAL_FEE . '_' . $step_id, $price_breakdown['paypal_fee']['value'] ); } if ( ! empty( $price_breakdown['net_amount']['value'] ) ) { $order->update_meta_data( 'cartflows_offer' . CPPW_PAYPAL_NET . '_' . $step_id, $price_breakdown['net_amount']['value'] ); } wcf()->logger->log( 'Paypal Fee ' . $price_breakdown['paypal_fee']['value'] ); wcf()->logger->log( 'Paypal Net Amount ' . $price_breakdown['net_amount']['value'] ); wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Tokenize to save source of payment if required * * @param bool $save_source force save source. * * @return bool */ public function tokenize_if_required( $save_source ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $checkout_id = _get_wcf_checkout_id(); $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id ); if ( ! $checkout_id ) { $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); } if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $save_source = true; wcf()->logger->log( 'Force save source enabled' ); } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $save_source; } /** * Get WooCommerce payment geteway. * * @return object */ public function get_wc_gateway() { $gateways = wc()->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return bool. */ public function process_offer_refund( $order, $offer_data ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $response = false; $refund_amount = strval( $offer_data['refund_amount'] ); $refund_reason = $offer_data['refund_reason']; $gateway = $this->get_wc_gateway(); $is_refund_success = $gateway->process_refund( $order->get_id(), $refund_amount, $refund_reason ); if ( $is_refund_success ) { $response = true; } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $response; } /** * Setup the Payment data for Stripe's Automatic Subscription. * * @param WC_Subscription|WC_Order $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. * * @return void */ public function add_subscription_payment_meta( $subscription, $order, $offer_product ) { if ( 'cppw_paypal' === $order->get_payment_method() ) { $subscription->update_meta_data( CPPW_SUB_AGREEMENT_ID, $order->get_meta( CPPW_SUB_AGREEMENT_ID ) ); $subscription->save(); } } /** * Save the parent payment meta to child order. * * @param object $parent_order Object of order. * @param object $child_order Object of order. * @param int $transaction_id transaction id. * * @return void */ public function add_required_meta_to_child_order( $parent_order, $child_order, $transaction_id ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $offer_step_id = $child_order->get_meta( '_cartflows_offer_step_id' ); $child_order->update_meta_data( CPPW_PAYPAL_TRANSACTION_ID, $parent_order->get_meta( 'cartflows_offer_txn_resp_' . $offer_step_id ) ); $child_order->update_meta_data( CPPW_SUB_AGREEMENT_ID, $parent_order->get_meta( 'cartflows_offer' . CPPW_SUB_AGREEMENT_ID . '_' . $offer_step_id ) ); $child_order->update_meta_data( CPPW_PAYPAL_FEE, $parent_order->get_meta( 'cartflows_offer' . CPPW_PAYPAL_FEE . '_' . $offer_step_id ) ); $child_order->update_meta_data( CPPW_PAYPAL_NET, $parent_order->get_meta( 'cartflows_offer' . CPPW_PAYPAL_NET . '_' . $offer_step_id ) ); $child_order->save(); wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); } } /** * Prepare if class 'Cartflows_Pro_Gateway_Cppw_Paypal' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Cppw_Paypal::get_instance(); modules/gateways/class-cartflows-pro-gateway-cpsw-stripe-element.php000064400000026620147600244370022037 0ustar00key, array( $this, 'add_required_meta_to_child_order' ), 10, 3 ); add_filter( 'cpsw_exclude_frontend_scripts', array( $this, 'allow_cpsw_scripts_on_offer_pages' ), 10, 1 ); // Allow stripe JS on CartFlows pages. add_action( 'woocommerce_checkout_create_order', array( $this, 'save_selected_payment_type' ), 10, 1 ); } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return bool */ public function process_offer_payment( $order, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $is_successful = false; $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, $product['action'] ) ) { wcf()->logger->log( 'Security nonce verification is : ' . $is_successful ); return $is_successful; } if ( isset( $_POST['cpsw_intent_id'] ) ) { $stored_intent_id = $order->get_meta( 'wcf_cpsw_intent_id_' . $product['step_id'] ); $intent_id = isset( $_POST['cpsw_intent_id'] ) ? sanitize_text_field( wp_unslash( $_POST['cpsw_intent_id'] ) ) : ''; wcf()->logger->log( 'Posted Intent ID : ' . $intent_id . 'Stored Intent ID : ' . $stored_intent_id ); $confirm_intent = ( $intent_id === $stored_intent_id ) ? true : false; if ( $confirm_intent ) { $is_successful = true; $payment_method = isset( $_POST['cpsw_payment_method'] ) ? sanitize_text_field( wp_unslash( $_POST['cpsw_payment_method'] ) ) : ''; $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $intent_id ); $order->update_meta_data( '_cartflows_offer_txn_cpsw_source_id_' . $product['step_id'], $payment_method ); $order->update_meta_data( '_cartflows_offer_txn_cpsw_customer_id_' . $product['step_id'], $order->get_meta( '_cpsw_customer_id', true ) ); $order->save(); if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $this->update_payout_details( $order, $intent_id, true ); } } } wcf()->logger->log( 'Ended : ' . __CLASS__ . '::' . __FUNCTION__ ); return $is_successful; } /** * Verify 3DS and create intent accordingly. * * @return void */ public function create_payment_intent() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_cpsw_create_element_payment_intent' ) ) { return; } wcf()->logger->log( 'Started : ' . __CLASS__ . '::' . __FUNCTION__ ); $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order = wc_get_order( $order_id ); if ( ! $order instanceof WC_Order ) { wp_send_json( array( 'result' => 'fail', 'message' => 'Order not found', ) ); } $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wcf()->logger->log( 'Zero value product added' ); wp_send_json( array( 'result' => 'fail', 'message' => '0 value product', ) ); } else { $gateway = $this->get_wc_gateway(); $request = $this->create_payment_intent_request_args( $order, $offer_product ); $response = $gateway->create_payment_for_saved_payment_method( $request ); wcf()->logger->log( 'Gateway Object : ' . wcf_print_r( $gateway, true ) ); wcf()->logger->log( 'CPSW Stripe payment intent api response ' . wcf_print_r( $response, true ) ); if ( $response['success'] && isset( $response['data'] ) ) { $response = $response['data']; $order->update_meta_data( 'wcf_cpsw_intent_id_' . $step_id, $response->id ); $order->save(); $client_secret = $response->client_secret; $payment_mode = get_option( 'cpsw_mode', 'test' ); $livemode = $payment_mode && 'live' === $payment_mode ? true : false; $publishable_key = $livemode ? get_option( 'cpsw_pub_key' ) : get_option( 'cpsw_test_pub_key' ); wcf()->logger->log( 'CPSW Stripe payment intent client secret key ' . $client_secret ); wp_send_json( array( 'result' => 'success', 'client_secret' => $client_secret, 'cpsw_pk' => $publishable_key, ) ); } else { wp_send_json( array( 'result' => 'fail', 'message' => 'Payment Failed', ) ); } } } /** * Create payment intent args. * * @param WC_Order|WC_Order_Refund $order The order that is being paid for. * @param array $product The product data. * @return array */ public function create_payment_intent_request_args( $order, $product ) { wcf()->logger->log( 'Started : ' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'CPSW create_payment_intent_request_args : ' . wcf_print_r( $order, true ) ); $gateway = $this->get_wc_gateway(); $order_source_id = $order->get_meta( '_cpsw_source_id' ); $order_customer_id = $order->get_meta( '_cpsw_customer_id' ); if ( empty( $order_source_id ) || empty( $order_customer_id ) ) { $order_source = $gateway->prepare_order_source( $order ); wcf()->logger->log( 'CPSW Newly Prepared Order Source : ' . wcf_print_r( $order_source, true ) ); $order_source_id = $order_source->source; $order_customer_id = $order_source->customer; } wcf()->logger->log( 'CPSW Order Source ID : ' . $order_source_id ); wcf()->logger->log( 'CPSW Customer ID : ' . $order_customer_id ); /* translators: %1s site name */ $description = sprintf( __( '%1$s - Order %2$s_%3$s - One Click Payment', 'cartflows-pro' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_id(), $product['step_id'] ); /* translators: %1s order number */ $statement_descriptor = apply_filters( 'cartflows_offer_' . $this->key . '_statement_descriptor', sprintf( __( 'Order %1$s_%2$s OTO', 'cartflows-pro' ), $order->get_order_number(), $product['step_id'] ) ); wcf()->logger->log( 'Ended : ' . __CLASS__ . '::' . __FUNCTION__ ); return array( 'payment_method' => $order_source_id, 'payment_method_types' => array( 'card' ), 'amount' => $gateway->get_formatted_amount( $product['price'] ), 'currency' => strtolower( $order->get_currency() ), 'description' => $description, 'statement_descriptor' => $gateway->clean_statement_descriptor( $statement_descriptor ), 'statement_descriptor_suffix' => $gateway->clean_statement_descriptor( $statement_descriptor ), 'customer' => $order_customer_id, ); } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return (bool) $this->is_api_refund; } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { $response_id = false; $gateway = $this->get_wc_gateway(); $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $response = $gateway->create_refund_request( $order, $refund_amount, $refund_reason, $transaction_id ); if ( isset( $response['success'] ) && $response['success'] ) { $response_id = $response['data']->id; $this->update_payout_details( $order, $transaction_id, false ); } return $response_id; } /** * Get WooCommerce payment geteway. * * @return object */ public function get_wc_gateway() { $gateways = wc()->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Save the parent payment meta to child order. * * @param object $order Object of order. * @param string|int $intent_id id. * @param bool $initiate is intent initiate call. * @return void */ public function update_payout_details( $order, $intent_id, $initiate = false ) { $gateway = $this->get_wc_gateway(); $gateway->update_stripe_balance( $order, $intent_id, $initiate ); } /** * Save the parent payment meta to child order. * * @param object $parent_order Object of order. * @param object $child_order Object of order. * @param int $transaction_id transaction id. * @return void */ public function add_required_meta_to_child_order( $parent_order, $child_order, $transaction_id ) { // In order to refund the upsell childe order, stripe checks if charge is captured or not.Hence need to add below key. $child_order->update_meta_data( '_cpsw_charge_captured', 'yes' ); $intent_secret = array( 'id' => $transaction_id, ); $child_order->update_meta_data( '_cpsw_intent_secret', $intent_secret ); $child_order->save(); $this->update_payout_details( $child_order, $transaction_id, true ); } /** * Save selected payment type of payment element to order meta. * * @param WC_Order $order Order object. * @return void */ public function save_selected_payment_type( $order ) { if ( isset( $_POST['selected_payment_type'] ) && '' !== $_POST['selected_payment_type'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing $order->update_meta_data( 'wcf_cpsw_selected_payment_type', sanitize_text_field( wp_unslash( $_POST['selected_payment_type'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing $order->save(); } } } /** * Prepare if class 'Cartflows_Pro_Gateway_Cpsw_Stripe_Element' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Cpsw_Stripe_Element::get_instance(); modules/gateways/class-cartflows-pro-gateway-cpsw-stripe.php000064400000025352147600244370020411 0ustar00key, array( $this, 'add_required_meta_to_child_order' ), 10, 3 ); add_filter( 'cpsw_exclude_frontend_scripts', array( $this, 'allow_cpsw_scripts_on_offer_pages' ), 10, 1 ); // Allow stripe JS on CartFlows pages. } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $is_successful = false; $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, $product['action'] ) ) { return $is_successful; } if ( isset( $_POST['cpsw_intent_id'] ) ) { $stored_intent_id = $order->get_meta( 'wcf_cpsw_intent_id_' . $product['step_id'] ); $intent_id = isset( $_POST['cpsw_intent_id'] ) ? sanitize_text_field( wp_unslash( $_POST['cpsw_intent_id'] ) ) : ''; wcf()->logger->log( 'Posted Intent ID : ' . $intent_id . 'Stored Intent ID : ' . $stored_intent_id ); $confirm_intent = ( $intent_id === $stored_intent_id ) ? true : false; if ( $confirm_intent ) { $is_successful = true; $payment_method = isset( $_POST['cpsw_payment_method'] ) ? sanitize_text_field( wp_unslash( $_POST['cpsw_payment_method'] ) ) : ''; $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $intent_id ); $order->update_meta_data( '_cartflows_offer_txn_cpsw_source_id_' . $product['step_id'], $payment_method ); $order->update_meta_data( '_cartflows_offer_txn_cpsw_customer_id_' . $product['step_id'], $order->get_meta( '_cpsw_customer_id', true ) ); $order->save(); if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $this->update_payout_details( $order, $intent_id, true ); } } } wcf()->logger->log( 'Ended : ' . __CLASS__ . '::' . __FUNCTION__ ); return $is_successful; } /** * Verify 3DS and create intent accordingly. * * @return bool */ public function create_payment_intent() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_cpsw_create_payment_intent' ) ) { return; } wcf()->logger->log( 'Started : ' . __CLASS__ . '::' . __FUNCTION__ ); $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order = wc_get_order( $order_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wcf()->logger->log( 'Zero value product added' ); wp_send_json( array( 'result' => 'fail', 'message' => '0 value product', ) ); } else { $gateway = $this->get_wc_gateway(); $request = $this->create_payment_intent_request_args( $order, $offer_product ); $response = $gateway->create_payment_for_saved_payment_method( $request ); wcf()->logger->log( 'Gateway Object : ' . wcf_print_r( $gateway, true ) ); wcf()->logger->log( 'CPSW Stripe payment intent api response ' . wcf_print_r( $response, true ) ); if ( $response['success'] && isset( $response['data'] ) ) { $response = $response['data']; if ( $order ) { $order->update_meta_data( 'wcf_cpsw_intent_id_' . $step_id, $response->id ); $order->save(); } $client_secret = $response->client_secret; $payment_mode = get_option( 'cpsw_mode', 'test' ); $livemode = $payment_mode && 'live' === $payment_mode ? true : false; $publishable_key = $livemode ? get_option( 'cpsw_pub_key' ) : get_option( 'cpsw_test_pub_key' ); wcf()->logger->log( 'CPSW Stripe payment intent client secret key ' . $client_secret ); wp_send_json( array( 'result' => 'success', 'client_secret' => $client_secret, 'cpsw_pk' => $publishable_key, ) ); } else { wp_send_json( array( 'result' => 'fail', 'message' => 'Payment Failed', ) ); } } wcf()->logger->log( 'Ended : ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Check if token is present. * * @param object $order order data. */ public function has_token( $order ) { $token = $order->get_meta( '_cpsw_source_id' ); if ( ! empty( $token ) ) { return true; } return false; } /** * Get WooCommerce payment geteway. * * @return object */ public function get_wc_gateway() { $gateways = wc()->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Create payment intent args. * * @param WC_Order $order The order that is being paid for. * @param array $product The product data. */ public function create_payment_intent_request_args( $order, $product ) { wcf()->logger->log( 'Started : ' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'CPSW create_payment_intent_request_args : ' . wcf_print_r( $order, true ) ); $gateway = $this->get_wc_gateway(); $order_source_id = $order->get_meta( '_cpsw_source_id' ); $order_customer_id = $order->get_meta( '_cpsw_customer_id' ); if ( empty( $order_source_id ) || empty( $order_customer_id ) ) { $order_source = $gateway->prepare_order_source( $order ); wcf()->logger->log( 'CPSW Newly Prepared Order Source : ' . wcf_print_r( $order_source, true ) ); $order_source_id = $order_source->source; $order_customer_id = $order_source->customer; } wcf()->logger->log( 'CPSW Order Source ID : ' . $order_source_id ); wcf()->logger->log( 'CPSW Customer ID : ' . $order_customer_id ); /* translators: %1s site name */ $description = sprintf( __( '%1$s - Order %2$s_%3$s - One Click Payment', 'cartflows-pro' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_id(), $product['step_id'] ); /* translators: %1s order number */ $statement_descriptor = apply_filters( 'cartflows_offer_' . $this->key . '_statement_descriptor', sprintf( __( 'Order %1$s_%2$s OTO', 'cartflows-pro' ), $order->get_order_number(), $product['step_id'] ) ); wcf()->logger->log( 'Ended : ' . __CLASS__ . '::' . __FUNCTION__ ); return array( 'payment_method' => $order_source_id, 'payment_method_types' => array( 'card' ), 'amount' => $gateway->get_formatted_amount( $product['price'] ), 'currency' => strtolower( $order->get_currency() ), 'description' => $description, 'statement_descriptor' => $gateway->clean_statement_descriptor( $statement_descriptor ), 'statement_descriptor_suffix' => $gateway->clean_statement_descriptor( $statement_descriptor ), 'customer' => $order_customer_id, 'confirm' => false, 'capture_method' => $gateway->capture_method, ); } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { $response_id = false; $gateway = $this->get_wc_gateway(); $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $response = $gateway->create_refund_request( $order, $refund_amount, $refund_reason, $transaction_id ); if ( isset( $response['success'] ) && $response['success'] ) { $response_id = $response['data']->id; $this->update_payout_details( $order, $transaction_id, false ); } return $response_id; } /** * Save the parent payment meta to child order. * * @param object $order Object of order. * @param string|int $intent_id id. * @param bool $initiate is intent initiate call. * @return void */ public function update_payout_details( $order, $intent_id, $initiate = false ) { $gateway = $this->get_wc_gateway(); $gateway->update_stripe_balance( $order, $intent_id, $initiate ); } /** * Save the parent payment meta to child order. * * @param object $parent_order Object of order. * @param object $child_order Object of order. * @param int $transaction_id transaction id. * @return void */ public function add_required_meta_to_child_order( $parent_order, $child_order, $transaction_id ) { // In order to refund the upsell childe order, stripe checks if charge is captured or not.Hence need to add below key. $child_order->update_meta_data( '_cpsw_charge_captured', 'yes' ); $intent_secret = array( 'id' => $transaction_id, ); $child_order->update_meta_data( '_cpsw_intent_secret', $intent_secret ); $child_order->save(); $this->update_payout_details( $child_order, $transaction_id, true ); } } /** * Prepare if class 'Cartflows_Pro_Gateway_Cpsw_Stripe' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Cpsw_Stripe::get_instance(); modules/gateways/class-cartflows-pro-gateway-mollie-credit-card.php000064400000023175147600244370021572 0ustar00plugin_id . '_customer_return_payment_success', array( $this, 'maybe_setup_upsell' ), 5 ); /* Create mollie customer id for non logged-in user - Credit card */ add_filter( 'woocommerce_mollie_wc_gateway_creditcard_args', array( $this, 'maybe_create_mollie_customer_id' ), 10, 2 ); add_action( 'wp_ajax_wcf_mollie_creditcard_process', array( $this, 'process_credit_card' ) ); add_action( 'wp_ajax_nopriv_wcf_mollie_creditcard_process', array( $this, 'process_credit_card' ) ); /** * Mollie CC webhook while creating payment */ add_action( 'woocommerce_api_cartflows_mollie_cc_webhook', array( $this, 'maybe_handle_mollie_cc_webhook' ) ); add_action( 'cartflows_offer_child_order_created_' . $this->key, array( $this, 'store_mollie_meta_keys_for_refund' ), 10, 3 ); add_action( 'cartflows_offer_subscription_created', array( $this, 'add_subscription_payment_meta_for_mollie' ), 10, 3 ); } /** * May be setup upsell. * * @param object $order Order object. * * @return void */ public function maybe_setup_upsell( $order ) { Cartflows_Pro_Frontend::get_instance()->start_the_upsell_flow( $order ); } /** * Get webhook url. * * @param int $step_id step id. * @param int $order_id order id. * @param string $order_key order key. * * @return string */ public function get_webhook_url( $step_id, $order_id, $order_key ) { $url = WC()->api_request_url( 'cartflows_mollie_cc_webhook' ); $args = array( 'step_id' => $step_id, 'order_id' => $order_id, 'order_key' => $order_key, ); return add_query_arg( $args, $url ); } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { $is_successful = false; $tr_id = $order->get_meta( '_' . $product['step_id'] . '_tr_id', true ); $response_data = array( 'id' => $tr_id, ); $this->store_offer_transaction( $order, $response_data, $product ); if ( '' !== $tr_id ) { $is_successful = true; } return $is_successful; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { wcf()->logger->log( 'Mollie Credit Card : Offer Transaction :: Transaction ID = ' . $response['id'] . ' Captured' ); $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response['id'] ); $order->save(); } /** * Process credit card upsell payment. * * @return bool */ public function process_credit_card() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_mollie_creditcard_process' ) ) { return; } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $session_key = isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ? sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) : ''; //phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE $order = wc_get_order( $order_id ); $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) && ! empty( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } // May need to update the data if variation and quantity changes using offer shortcodes ). $product_data = array( 'variation_id' => $variation_id, 'input_qty' => $input_qty, ); $order->update_meta_data( 'wcf_offer_product_data_' . $step_id, $product_data ); $order->save(); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wp_send_json( array( 'result' => 'fail', 'message' => __( '0 value product', 'cartflows-pro' ), ) ); } else { $api_key = $this->get_mollie_api_key(); $customer_id = $this->get_user_mollie_customer_id( $order ); if ( $customer_id ) { $data = array( 'amount' => array( 'currency' => $order->get_currency(), 'value' => $this->format_currency_value( $offer_product['price'], $order->get_currency() ), ), 'description' => "One-click payment {$order_id}_{$step_id}", 'redirectUrl' => $this->get_return_url( $step_id, $order_id, $order_key, $session_key ), 'webhookUrl' => $this->get_webhook_url( $step_id, $order_id, $order_key ), 'method' => 'creditcard', 'metadata' => array( 'order_id' => $order_id, ), 'customerId' => $customer_id, ); $arguments = array( 'method' => 'POST', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), 'body' => wp_json_encode( $data ), ); $payment_object = $this->get_mollie_api_response_body( $this->create_payment_api, $arguments ); if ( $payment_object ) { wp_send_json( array( 'result' => 'success', 'redirect' => $this->get_process_payment_redirect( $payment_object ), ) ); } } wp_send_json( array( 'result' => 'fail', 'message' => __( 'Customer id not found. Payment failed', 'cartflows-pro' ), ) ); } } /** * Handle mollie payment webhook. * * @return void */ public function maybe_handle_mollie_cc_webhook() { //phpcs:disable WordPress.Security.NonceVerification // Webhook test by Mollie. if ( isset( $_GET['testByMollie'] ) ) { wcf()->logger->log( __METHOD__ . ': Webhook tested by Mollie.' ); return; } if ( empty( $_GET['order_id'] ) || empty( $_GET['order_key'] ) || empty( $_GET['step_id'] ) ) { $this->set_http_response_code( 400 ); wcf()->logger->log( __METHOD__ . ': No order ID or order key provided.' ); return; } $step_id = sanitize_text_field( wp_unslash( $_GET['step_id'] ) ); $order_id = sanitize_text_field( wp_unslash( $_GET['order_id'] ) ); $order_key = sanitize_text_field( wp_unslash( $_GET['order_key'] ) ); $order = wc_get_order( $order_id ); if ( ! $order ) { $this->set_http_response_code( 404 ); wcf()->logger->log( __METHOD__ . ": Could not find order $order_id." ); return; } if ( ! $order->key_is_valid( $order_key ) ) { $this->set_http_response_code( 401 ); wcf()->logger->log( __METHOD__ . ": Invalid key key for order $order_id." ); return; } // No Mollie payment id provided. if ( empty( $_POST['id'] ) ) { $this->set_http_response_code( 400 ); wcf()->logger->log( __METHOD__ . ': No payment object ID provided.' ); return; } $payment_object_id = sanitize_text_field( wp_unslash( $_POST['id'] ) ); $get_payment = $this->get_payment_api . $payment_object_id; $api_key = $this->get_mollie_api_key(); $arguments = array( 'method' => 'GET', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), ); // Load the payment from Mollie, do not use cache. try { $payment = $this->get_mollie_api_response_body( $get_payment, $arguments ); } catch ( Exception $e ) { $this->set_http_response_code( 400 ); return; } // Payment not found. if ( ! $payment ) { $this->set_http_response_code( 404 ); wcf()->logger->log( __METHOD__ . ": payment object $payment_object_id not found." ); return; } if ( $order_id != $payment->metadata->order_id ) { $this->set_http_response_code( 400 ); wcf()->logger->log( __METHOD__ . ": Order ID does not match order_id in payment metadata. Payment ID {$payment->id}, order ID $order_id" ); return; } $order->update_meta_data( '_' . $step_id . '_tr_id', $payment_object_id ); $order->save(); $order->add_order_note( __( 'Mollie credit card payment processed.', 'cartflows-pro' ) ); //phpcs:enable WordPress.Security.NonceVerification } /** * Is gateway support offer refund? * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Mollie_Credit_Card' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Mollie_Credit_Card::get_instance(); modules/gateways/class-cartflows-pro-gateway-mollie-ideal.php000064400000024636147600244370020472 0ustar00plugin_id . '_customer_return_payment_success', array( $this, 'maybe_setup_upsell' ), 5 ); /* Create mollie customer id for non logged-in user - Ideal */ add_filter( 'woocommerce_mollie_wc_gateway_ideal_args', array( $this, 'maybe_create_mollie_customer_id' ), 10, 2 ); add_action( 'wp_ajax_wcf_mollie_ideal_process', array( $this, 'process_ideal_payment' ) ); add_action( 'wp_ajax_nopriv_wcf_mollie_ideal_process', array( $this, 'process_ideal_payment' ) ); /** * Mollie ideal webhook while creating payment */ add_action( 'woocommerce_api_cartflows_mollie_ideal_webhook', array( $this, 'maybe_handle_mollie_ideal_webhook' ) ); add_action( 'cartflows_offer_child_order_created_' . $this->key, array( $this, 'store_mollie_meta_keys_for_refund' ), 10, 3 ); add_action( 'cartflows_offer_subscription_created', array( $this, 'add_subscription_payment_meta_for_mollie' ), 10, 3 ); } /** * May be setup upsell. * * @param object $order Order object. * * @return void */ public function maybe_setup_upsell( $order ) { Cartflows_Pro_Frontend::get_instance()->start_the_upsell_flow( $order ); } /** * Get webhook url. * * @param int $step_id step id. * @param int $order_id order id. * @param string $order_key order key. * * @return string */ public function get_webhook_url( $step_id, $order_id, $order_key ) { $url = WC()->api_request_url( 'cartflows_mollie_ideal_webhook' ); $args = array( 'step_id' => $step_id, 'order_id' => $order_id, 'order_key' => $order_key, ); return add_query_arg( $args, $url ); } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { $is_successful = false; $tr_id = $order->get_meta( '_' . $product['step_id'] . '_tr_id', true ); $response_data = array( 'id' => $tr_id, ); $this->store_offer_transaction( $order, $response_data, $product ); if ( '' !== $tr_id ) { $is_successful = true; } return $is_successful; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { wcf()->logger->log( 'Mollie Ideal : Offer Transaction :: Transaction ID = ' . $response['id'] . ' Captured' ); $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response['id'] ); $order->save(); } /** * Process credit card upsell payment. * * @return bool */ public function process_ideal_payment() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_mollie_ideal_process' ) ) { return; } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $session_key = isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ? sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) : ''; //phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE $order = wc_get_order( $order_id ); $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) && ! empty( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } // May need to update the data if variation and quantity changes using offer shortcodes ). $product_data = array( 'variation_id' => $variation_id, 'input_qty' => $input_qty, ); $order->update_meta_data( 'wcf_offer_product_data_' . $step_id, $product_data ); $order->save(); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wp_send_json( array( 'result' => 'fail', 'message' => __( '0 value product', 'cartflows-pro' ), ) ); } else { $api_key = $this->get_mollie_api_key(); $customer_id = $this->get_user_mollie_customer_id( $order ); if ( $customer_id ) { $data = array( 'amount' => array( 'currency' => $order->get_currency(), 'value' => $this->format_currency_value( $offer_product['price'], $order->get_currency() ), ), 'description' => "One-click payment {$order_id}_{$step_id}", 'redirectUrl' => $this->get_return_url( $step_id, $order_id, $order_key, $session_key ), 'webhookUrl' => $this->get_webhook_url( $step_id, $order_id, $order_key ), 'method' => 'ideal', 'metadata' => array( 'order_id' => $order_id, ), 'customerId' => $customer_id, ); $arguments = array( 'method' => 'POST', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), 'body' => wp_json_encode( $data ), ); $payment_object = $this->get_mollie_api_response_body( $this->create_payment_api, $arguments ); if ( $payment_object ) { wp_send_json( array( 'result' => 'success', 'redirect' => $this->get_process_payment_redirect( $payment_object ), ) ); } } wp_send_json( array( 'result' => 'fail', 'message' => __( 'Customer id not found. Payment failed', 'cartflows-pro' ), ) ); } } /** * Handle mollie payment webhook. * * @return void */ public function maybe_handle_mollie_ideal_webhook() { wcf()->logger->log( 'Start-' . __CLASS__ . ':' . __METHOD__ . ': Entering' ); //phpcs:disable WordPress.Security.NonceVerification // Webhook test by Mollie. if ( isset( $_GET['testByMollie'] ) ) { wcf()->logger->log( __METHOD__ . ': Webhook tested by Mollie.' ); return; } if ( empty( $_GET['order_id'] ) || empty( $_GET['order_key'] ) || empty( $_GET['step_id'] ) ) { $this->set_http_response_code( 400 ); wcf()->logger->log( __METHOD__ . ': No order ID or order key provided.' ); return; } $step_id = sanitize_text_field( wp_unslash( $_GET['step_id'] ) ); $order_id = sanitize_text_field( wp_unslash( $_GET['order_id'] ) ); $order_key = sanitize_text_field( wp_unslash( $_GET['order_key'] ) ); $order = wc_get_order( $order_id ); if ( ! $order ) { $this->set_http_response_code( 404 ); wcf()->logger->log( __METHOD__ . ": Could not find order $order_id." ); return; } if ( ! $order->key_is_valid( $order_key ) ) { $this->set_http_response_code( 401 ); wcf()->logger->log( __METHOD__ . ": Invalid key key for order $order_id." ); return; } // No Mollie payment id provided. if ( empty( $_POST['id'] ) ) { $this->set_http_response_code( 400 ); wcf()->logger->log( __METHOD__ . ': No payment object ID provided.' ); return; } $payment_object_id = sanitize_text_field( wp_unslash( $_POST['id'] ) ); // Load the payment from Mollie, do not use cache. $get_payment = $this->get_payment_api . $payment_object_id; $api_key = $this->get_mollie_api_key(); $arguments = array( 'method' => 'GET', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), ); try { $payment = $this->get_mollie_api_response_body( $get_payment, $arguments ); } catch ( Exception $e ) { $this->set_http_response_code( 400 ); return; } wcf()->logger->log( 'Processed payment : ' . wcf_print_r( $payment, true ) ); // Payment not found. if ( ! $payment ) { $this->set_http_response_code( 404 ); wcf()->logger->log( __METHOD__ . ": payment object $payment_object_id not found." ); return; } if ( $order_id != $payment->metadata->order_id ) { $this->set_http_response_code( 400 ); wcf()->logger->log( __METHOD__ . ": Order ID does not match order_id in payment metadata. Payment ID {$payment->id}, order ID $order_id" ); return; } // List of order status which needs to be used to confirm the payment is processed successfully or not. $order_statuses = array( 'failed', 'canceled', 'expired' ); // Log the error and return if the order status of the payment is not success or open. if ( in_array( $payment->status, $order_statuses ) ) { $this->set_http_response_code( 204 ); wcf()->logger->log( __METHOD__ . ": Order is not complete for order ID {$order_id}. Received order status: {$payment->status}" ); wcf()->logger->log( 'End-' . __CLASS__ . ':' . __METHOD__ . ': Exiting as order is not complete.' ); return; } $order->update_meta_data( '_' . $step_id . '_tr_id', $payment_object_id ); $order->save(); $order->add_order_note( __( 'Mollie ideal payment processed.', 'cartflows-pro' ) ); //phpcs:enable WordPress.Security.NonceVerification wcf()->logger->log( 'End-' . __CLASS__ . ':' . __METHOD__ . ': Exiting' ); } /** * Is gateway support offer refund? * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Mollie_Credit_Card' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Mollie_Ideal::get_instance(); modules/gateways/class-cartflows-pro-gateway-paypal-express.php000064400000121503147600244370021101 0ustar00key, array( $this, 'store_required_meta_keys_for_refund' ), 10, 3 ); } /** * Load paypal object payment JS. * * @return void */ public function payment_scripts() { if ( _is_wcf_base_offer_type() && ! wcf_pro()->utils->is_reference_transaction() && $this->has_paypal_gateway() ) { wp_enqueue_script( 'wcf-paypal-script', 'https://www.paypalobjects.com/api/checkout.js', array( 'jquery' ), CARTFLOWS_PRO_VER, true ); if ( ! wcf_pro()->utils->is_zero_value_offered_product() ) { $script = $this->generate_script(); wp_add_inline_script( 'wcf-paypal-script', $script ); } } } /** * Check if current order has paypal gatway * * @return bool */ public function has_paypal_gateway() { $order_id = isset( $_GET['wcf-order'] ) ? absint( $_GET['wcf-order'] ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( empty( $order_id ) ) { return false; } $order = wc_get_order( $order_id ); $gateway = $order->get_payment_method(); if ( 'ppec_paypal' === $gateway ) { return true; } return false; } /** * Generate script for paypal payment popup. * * @return string */ public function generate_script() { $environment = $this->wc_gateway()->get_option( 'environment', 'live' ); ob_start(); ?> (function($){ $(function($) { var $wcf_ppec = { init: function () { var getButtons = [ 'wcf-upsell-offer', 'wcf-downsell-offer' ]; $('a[href*="wcf-up-offer-yes"], a[href*="wcf-down-offer-yes"]').each(function(e) { var current_id = $(this).attr('id'); getButtons.push( current_id ); }); window.paypalCheckoutReady = function () { paypal.checkout.setup( 'get_woo_payer_id() ); ?>', { environment: '', buttons: getButtons, locale: 'en_US', click: function () { var variation_id = 0; var input_qty = 0; var variation_wrapper = $('.wcf-offer-product-variation'); if( variation_wrapper.length > 0 ) { var variation_form = variation_wrapper.find('.variations_form'), variation_input = variation_form.find('input.variation_id'); // Set variation id here. variation_id = parseInt( variation_input.val() ); if( $('.var_not_selected').length > 0 || '' === variation_id || 0 === variation_id ){ variation_form.find('.variations select').each(function(){ if( $(this).val().length === 0 ){ $(this).addClass('var_not_selected'); } }); $([ document.documentElement, document.body ]).animate({ scrollTop: variation_form.find('.variations select').offset().top-100 }, 1000); return false; } } var quantity_wrapper = $('.wcf-offer-product-quantity'); if ( quantity_wrapper.length > 0 ) { var quantity_input = quantity_wrapper.find('input[name="quantity"]'); var quantity_value = parseInt( quantity_input.val() ); if( quantity_value > 0 ) { input_qty = quantity_value; } } var postData = { step_id: cartflows.current_step, variation_id: variation_id, input_qty: input_qty, order_id: , order_key: '', session_key: '', action: 'cartflows_front_create_ppec_paypal_checkout_token', security: security: }; paypal.checkout.initXO(); var action = $.post(cartflows.ajax_url, postData); action.done(function (data) { paypal.checkout.startFlow(data.token); }); action.fail(function () { paypal.checkout.closeFlow(); }); } } ); } } }; $wcf_ppec.init(); }); })(jQuery); wc_gateway()->get_option( 'environment', 'live' ); $api_prefix = ''; if ( 'live' !== $environment ) { $api_prefix = 'sandbox_'; } $option_key = 'woocommerce_ppec_payer_id_' . $environment . '_' . md5( $this->wc_gateway()->get_option( $api_prefix . 'api_username' ) . ':' . $this->wc_gateway()->get_option( $api_prefix . 'api_password' ) ); $payer_id = get_option( $option_key ); if ( $payer_id ) { return $payer_id; } else { $result = $this->get_woo_pal_details(); if ( ! empty( $result['PAL'] ) ) { update_option( $option_key, wc_clean( $result['PAL'] ) ); return $payer_id; } } return false; } /** * Get Payer details from option value. * * @return bool */ public function get_woo_pal_details() { $environment = $this->wc_gateway()->get_option( 'environment', 'live' ); $api_prefix = ''; if ( 'live' !== $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_parameter( 'METHOD', 'GetPalDetails' ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Generates express checkout token * * @return void */ public function generate_express_checkout_token() { $nonce = isset( $_POST['security'] ) ? sanitize_text_field( wp_unslash( $_POST['security'] ) ) : ''; $action = isset( $_POST['action'] ) ? sanitize_text_field( wp_unslash( $_POST['action'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, $action ) ) { wp_send_json( array( 'result' => 'error', 'response' => __( 'Nonce verification failed', 'cartflows-pro' ), ) ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $session_key = isset( $_POST['session_key'] ) ? sanitize_text_field( wp_unslash( $_POST['session_key'] ) ) : ''; $variation_id = isset( $_POST['variation_id'] ) ? intval( $_POST['variation_id'] ) : ''; $input_qty = isset( $_POST['input_qty'] ) ? intval( $_POST['input_qty'] ) : ''; $is_valid_order = true; if ( $is_valid_order ) { $order = wc_get_order( $order_id ); $response = $this->initiate_express_checkout_request( array( 'currency' => $order ? $order->get_currency() : get_woocommerce_currency(), 'return_url' => $this->get_callback_url( array( 'action' => 'cartflows_paypal_return', 'step_id' => $step_id, 'order_id' => $order_id, 'order_key' => $order_key, 'session_key' => $session_key, 'variation_id' => $variation_id, 'input_qty' => $input_qty, ) ), 'cancel_url' => $this->get_callback_url( array( 'action' => 'cartflows_paypal_cancel', 'step_id' => $step_id, 'order_id' => $order_id, 'order_key' => $order_key, 'session_key' => $session_key, 'variation_id' => $variation_id, 'input_qty' => $input_qty, ) ), 'notify_url' => $this->get_callback_url( 'notify_url' ), 'order' => $order, 'step_id' => $step_id, 'variation_id' => $variation_id, 'input_qty' => $input_qty, ), true ); wcf()->logger->log( 'Generate express checkout token' ); wcf()->logger->log( wcf_print_r( $response, true ) ); if ( isset( $response['TOKEN'] ) && '' !== $response['TOKEN'] ) { wp_send_json( array( 'result' => 'success', 'token' => $response['TOKEN'], ) ); } } wp_send_json( array( 'result' => 'error', 'response' => $response, ) ); } /** * Initiates express checkout request * * @param array $args arguments. * @param bool $is_upsell is upsell. * @return array */ public function initiate_express_checkout_request( $args, $is_upsell = false ) { $environment = $this->wc_gateway()->get_option( 'environment', 'live' ); $api_prefix = ''; if ( 'live' !== $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_express_checkout_params( $args, $is_upsell ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); $flow_id = wcf()->utils->get_flow_id_from_step_id( $args['step_id'] ); $data = array( 'paypal' => $this->get_parameters(), ); wcf_pro()->session->update_data( $flow_id, $data ); return $this->perform_request( $request ); } /** * Adds express checkout parameters * * @param array $args arguments. * @param bool $is_upsell is upsell. * @return void */ public function add_express_checkout_params( $args, $is_upsell = false ) { // translators: placeholder is blogname. $default_description = sprintf( _x( 'Orders with %s', 'data sent to paypal', 'cartflows-pro' ), get_bloginfo( 'name' ) ); $defaults = array( 'currency' => get_woocommerce_currency(), 'billing_type' => 'MerchantInitiatedBillingSingleAgreement', 'billing_description' => html_entity_decode( apply_filters( 'woocommerce_subscriptions_paypal_billing_agreement_description', $default_description, $args ), ENT_NOQUOTES, 'UTF-8' ), 'maximum_amount' => null, 'no_shipping' => 1, 'page_style' => null, 'brand_name' => html_entity_decode( get_bloginfo( 'name' ), ENT_NOQUOTES, 'UTF-8' ), 'landing_page' => 'login', 'payment_action' => 'Sale', 'custom' => '', ); $args = wp_parse_args( $args, $defaults ); $this->set_method( 'SetExpressCheckout' ); $this->add_parameters( array( 'RETURNURL' => $args['return_url'], 'CANCELURL' => $args['cancel_url'], 'PAGESTYLE' => $args['page_style'], 'BRANDNAME' => $args['brand_name'], 'LANDINGPAGE' => ( 'login' === $args['landing_page'] && false === $is_upsell ) ? 'Login' : 'Billing', 'NOSHIPPING' => $args['no_shipping'], 'MAXAMT' => $args['maximum_amount'], ) ); if ( false === $is_upsell ) { $this->add_parameter( 'L_BILLINGTYPE0', $args['billing_type'] ); $this->add_parameter( 'L_BILLINGAGREEMENTDESCRIPTION0', get_bloginfo( 'name' ) ); $this->add_parameter( 'L_BILLINGAGREEMENTCUSTOM0', '' ); } // Add payment parameters. if ( isset( $args['order'] ) ) { if ( true === $is_upsell ) { $this->add_payment_params( $args['order'], $args['step_id'], $args['payment_action'], false, true, $args['variation_id'], $args['input_qty'] ); } else { $this->add_payment_params( $args['order'], $args['step_id'], $args['payment_action'], false, false ); } } $set_express_checkout_params = apply_filters( 'cartflows_gateway_paypal_param_setexpresscheckout', $this->get_parameters(), $is_upsell ); $this->clean_params(); $this->add_parameters( $set_express_checkout_params ); } /** * Get callback URL for paypal payment API request. * * @param array $args arguments. * @return string */ public function get_callback_url( $args ) { $api_request_url = WC()->api_request_url( 'cartflows_ppec_paypal' ); if ( is_array( $args ) ) { return add_query_arg( $args, $api_request_url ); } else { return add_query_arg( 'action', $args, $api_request_url ); } } /** * Get WooCommerce payment geteways. * * @return array */ public function wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Clean params. * * @return void */ public function clean_params() { $this->parameters = array(); } /** * Return the parsed response object for the request * * @since 1.0.0 * * @param string $raw_response_body response body. * * @return object */ protected function get_parsed_response( $raw_response_body ) { wp_parse_str( urldecode( $raw_response_body ), $this->response_params ); return $this->response_params; } /** * Modify paypal arguements to set paramters before checkout express. * * @param array $data parameters array. * @return array */ public function modify_paypal_arguments( $data ) { wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Entering ' ); //phpcs:disable WordPress.Security.NonceVerification.Missing if ( true === wcf_pro()->utils->is_reference_transaction() ) { // translators: blog name. $description = sprintf( _x( 'Orders with %s', 'data sent to PayPal', 'cartflows-pro' ), get_bloginfo( 'name' ) ); $description = html_entity_decode( $description, ENT_NOQUOTES, 'UTF-8' ); if ( $data && isset( $data['METHOD'] ) && 'SetExpressCheckout' == $data['METHOD'] && ! isset( $data['L_BILLINGTYPE0'] ) ) { $data['RETURNURL'] = add_query_arg( array( 'create-billing-agreement' => true ), $data['RETURNURL'] ); $data['L_BILLINGTYPE0'] = 'MerchantInitiatedBillingSingleAgreement'; $data['L_BILLINGAGREEMENTDESCRIPTION0'] = $description; $data['L_BILLINGAGREEMENTCUSTOM0'] = ''; } if ( $data && isset( $data['METHOD'] ) && 'DoReferenceTransaction' == $data['METHOD'] ) { $step_id = isset( $_POST['step_id'] ) ? (int) $_POST['step_id'] : 0; $order_id = isset( $_POST['order_id'] ) ? (int) $_POST['order_id'] : 0; // Return if the step id is not in the query string. if ( $step_id < 1 ) { return $data; } // Return if the order id is not in the query string. if ( $order_id < 1 ) { return $data; } $order = wc_get_order( $order_id ); $variation_id = isset( $_POST['variation_id'] ) ? intval( $_POST['variation_id'] ) : ''; $input_qty = isset( $_POST['input_qty'] ) ? intval( $_POST['input_qty'] ) : ''; $offer_package = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); $data['AMT'] = $offer_package['total']; $data['ITEMAMT'] = $offer_package['total']; // shippingamt shoud be 0. if ( ( isset( $offer_package['shipping'] ) && isset( $offer_package['shipping']['diff'] ) ) && 0 < $offer_package['shipping']['diff'] ) { $data['SHIPPINGAMT'] = 0; $data['SHIPDISCAMT'] = ( isset( $offer_package['shipping'] ) && isset( $offer_package['shipping']['diff'] ) ) ? $offer_package['shipping']['diff']['cost'] : 0; } else { $data['SHIPPINGAMT'] = ( isset( $offer_package['shipping'] ) && isset( $offer_package['shipping']['diff'] ) ) ? $offer_package['shipping']['diff']['cost'] : 0; $data['SHIPDISCAMT'] = 0; } $data['TAXAMT'] = ( isset( $offer_package['taxes'] ) ) ? $offer_package['taxes'] : 0; $data['INVNUM'] = 'WC-' . $order_id . '_' . $step_id; $data['INSURANCEAMT'] = 0; $data['HANDLINGAMT'] = 0; $data = $this->remove_previous_line_items( $data ); $data['L_NAME0'] = $offer_package['name']; $data['L_DESC0'] = $offer_package['desc']; $data['L_AMT0'] = wc_format_decimal( $offer_package['unit_price_tax'], 2 ); $data['L_QTY0'] = $offer_package['qty']; $item_amt = $offer_package['total']; $data['ITEMAMT'] = $item_amt; } if ( isset( $data['METHOD'] ) && 'DoExpressCheckoutPayment' == $data['METHOD'] ) { if ( isset( $data['PAYMENTREQUEST_0_CUSTOM'] ) ) { $get_custom_attrs = json_decode( $data['PAYMENTREQUEST_0_CUSTOM'] ); if ( isset( $get_custom_attrs->order_id ) ) { $get_order = wc_get_order( $get_custom_attrs->order_id ); try { $checkout = wc_gateway_ppec()->checkout; $checkout_details = $checkout->get_checkout_details( $data['TOKEN'] ); $checkout->create_billing_agreement( $get_order, $checkout_details ); $token = $get_order->get_meta( '_ppec_billing_agreement_id' ); if ( ! empty( $token ) ) { // Saving meta by our own. $get_order->update_meta_data( '_ppec_billing_agreement_id', $token ); } } catch ( Exception $e ) { wcf()->logger->log( 'Order #' . $get_custom_attrs->order_id . ': Unable to create a token for express checkout for order' ); wcf()->logger->log( 'Details Below: ' . wcf_print_r( $e->getMessage(), true ) ); } } } } } return $data; //phpcs:enable WordPress.Security.NonceVerification.Missing } /** * Create billing agreement for future reference transaction. * * @throws Exception Billing agreement errors. */ public function create_billing_agreement() { //phpcs:disable WordPress.Security.NonceVerification.Recommended if ( ! isset( $_GET['action'] ) ) { return; } switch ( $_GET['action'] ) { // create billing agreement for reference transaction. case 'cartflows_ppec_paypal_create_billing_agreement': // bail if no token. if ( ! isset( $_GET['token'] ) ) { return; } // get token to retrieve checkout details with. $token = esc_attr( sanitize_text_field( wp_unslash( $_GET['token'] ) ) ); $order_id = isset( $_GET['order_id'] ) ? intval( $_GET['order_id'] ) : 0; $step_id = isset( $_GET['step_id'] ) ? intval( $_GET['step_id'] ) : 0; try { $express_checkout_details_response = $this->perform_express_checkout_details_request( $token ); // Make sure the billing agreement was accepted. if ( 1 == $express_checkout_details_response['BILLINGAGREEMENTACCEPTEDSTATUS'] ) { $order = wc_get_order( $order_id ); if ( is_null( $order ) ) { throw new Exception( __( 'Unable to find order for PayPal billing agreement.', 'cartflows-pro' ) ); } // we need to process an initial payment. if ( $order->get_total() > 0 ) { $billing_agreement_response = $this->perform_express_checkout_request( $token, $order, array( 'payment_action' => 'Sale', 'payer_id' => $this->get_value_from_response( $express_checkout_details_response, 'PAYERID' ), 'step_id' => $step_id, ) ); } else { $redirect_url = add_query_arg( 'utm_nooverride', '1', $order->get_checkout_order_received_url() ); // redirect customer to order received page. wp_safe_redirect( esc_url_raw( $redirect_url ) ); exit; } if ( $this->has_error_api_response( $billing_agreement_response ) ) { $redirect_url = add_query_arg( 'utm_nooverride', '1', $order->get_checkout_order_received_url() ); // redirect customer to order received page. wp_safe_redirect( esc_url_raw( $redirect_url ) ); exit; } $order->set_payment_method( 'paypal' ); // Store the billing agreement ID on the order and subscriptions. $order->update_meta_data( '_paypal_subscription_id', $this->get_value_from_response( $billing_agreement_response, 'BILLINGAGREEMENTID' ) ); $order->save(); $order->payment_complete( $billing_agreement_response['PAYMENTINFO_0_TRANSACTIONID'] ); $redirect_url = add_query_arg( 'utm_nooverride', '1', $order->get_checkout_order_received_url() ); // redirect customer to order received page. wp_safe_redirect( esc_url_raw( $redirect_url ) ); exit; } else { wp_safe_redirect( wc_get_cart_url() ); exit; } } catch ( Exception $e ) { wc_add_notice( __( 'An error occurred, please try again or try an alternate form of payment.', 'cartflows-pro' ), 'error' ); wp_safe_redirect( wc_get_cart_url() ); exit; } } //phpcs:enable WordPress.Security.NonceVerification.Recommended } /** * Performs express checkout request * * @param string $token token string. * @param array $order Order data. * @param array $args arguments data. * * @return object */ public function perform_express_checkout_request( $token, $order, $args ) { $environment = $this->wc_gateway()->get_option( 'environment', 'live' ); $api_prefix = ''; if ( 'live' !== $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_do_express_checkout_params( $token, $order, $args ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Sets up DoExpressCheckoutPayment API Call arguments * * @param string $token Unique token of the payment initiated. * @param WC_Order $order order data. * @param array $args arguments data. */ public function add_do_express_checkout_params( $token, $order, $args ) { $this->set_method( 'DoExpressCheckoutPayment' ); // set base params. $this->add_parameters( array( 'TOKEN' => $token, 'PAYERID' => $args['payer_id'], 'BUTTONSOURCE' => 'WooThemes_Cart', 'RETURNFMFDETAILS' => 1, ) ); $this->add_payment_params( $order, $args['step_id'], $args['payment_action'], false, false ); } /** * Request to get express checkout details. * * @param string $token token. * * @return object */ public function perform_express_checkout_details_request( $token ) { $environment = $this->wc_gateway()->get_option( 'environment', 'live' ); $api_prefix = ''; if ( 'live' !== $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->set_express_checkout_method( $token ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Set methods and token paramter. * * @param string $token Token string. */ public function set_express_checkout_method( $token ) { $this->set_method( 'GetExpressCheckoutDetails' ); $this->add_parameter( 'TOKEN', $token ); } /** * Processes API calls. * * @return void */ public function process_api_calls() { //phpcs:disable WordPress.Security.NonceVerification.Recommended if ( ! isset( $_GET['action'] ) ) { return; } $step_id = isset( $_GET['step_id'] ) ? intval( $_GET['step_id'] ) : 0; $order_id = isset( $_GET['order_id'] ) ? intval( $_GET['order_id'] ) : 0; $order_key = isset( $_GET['order_key'] ) ? sanitize_text_field( wp_unslash( $_GET['order_key'] ) ) : ''; $session_key = isset( $_GET['session_key'] ) ? sanitize_text_field( wp_unslash( $_GET['session_key'] ) ) : ''; $variation_id = isset( $_GET['variation_id'] ) ? intval( $_GET['variation_id'] ) : ''; $input_qty = isset( $_GET['input_qty'] ) ? intval( $_GET['input_qty'] ) : ''; $order = wc_get_order( $order_id ); switch ( $_GET['action'] ) { case 'cartflows_paypal_return': $flow_id = wcf()->utils->get_flow_id_from_step_id( $step_id ); $data = wcf_pro()->session->get_data( $flow_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $_GET['token'] ) && ! empty( $_GET['token'] ) ) { /** * Setting up necessary data for this api call. */ $api_response_result = false; /** * Get the data we saved while calling setExpressCheckout call. */ $get_paypal_data = array(); if ( isset( $data['paypal'] ) ) { $get_paypal_data = $data['paypal']; } $express_checkout_details_response = $this->perform_express_checkout_details_request( sanitize_text_field( wp_unslash( $_GET['token'] ) ) ); wcf()->logger->log( 'Express checkout token return request' ); wcf()->logger->log( wcf_print_r( $express_checkout_details_response, true ) ); /** * Check if product total is greater than 0. */ if ( $offer_product['total'] > 0 ) { /** * Prepare DoExpessCheckout Call to finally charge the user. */ $do_express_checkout_data = array( 'TOKEN' => $express_checkout_details_response['TOKEN'], 'PAYERID' => $express_checkout_details_response['PAYERID'], 'METHOD' => 'DoExpressCheckoutPayment', ); $do_express_checkout_data = wp_parse_args( $do_express_checkout_data, $get_paypal_data ); $environment = $this->wc_gateway()->get_option( 'environment', 'live' ); $api_prefix = ''; if ( 'live' !== $environment ) { $api_prefix = 'sandbox_'; } /** * Setup & perform DoExpressCheckout API Call. */ $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_parameters( $do_express_checkout_data ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); $response_checkout = $this->perform_request( $request ); wcf()->logger->log( 'Express $response_checkout checkout token charge' ); wcf()->logger->log( wcf_print_r( $response_checkout, true ) ); if ( false === $this->has_error_api_response( $response_checkout ) ) { $api_response_result = true; // Store transaction ID for the CartFlows offer. $this->store_offer_transaction( $order, $response_checkout, $offer_product ); } } else { $api_response_result = true; // Store transaction ID for the CartFlows offer. $this->store_offer_transaction( $order, $response_checkout, $offer_product ); } /**** DoExpressCheckout Call Completed */ /** * Allow our subscription addon to make subscription request. */ $api_response_result = apply_filters( 'cartflows_gateway_in_offer_transaction_paypal_after_express_checkout_response', $api_response_result, $express_checkout_details_response['TOKEN'], $express_checkout_details_response['PAYERID'], $this ); $result = wcf_pro()->flow->after_offer_charge( $step_id, $order_id, $order_key, $api_response_result, $variation_id, $input_qty ); wp_safe_redirect( $result['redirect'] ); exit; } else { $result = wcf_pro()->flow->after_offer_charge( $step_id, $order_id, $order_key, $api_response_result, $variation_id, $input_qty ); wp_safe_redirect( $result['redirect'] ); exit; } break; case 'cartflows_paypal_cancel': $url = get_permalink( $step_id ); $args = array( 'wcf-order' => $order_id, 'wcf-key' => $order_key, 'wcf-sk' => $session_key, ); $url = add_query_arg( $args, $url ); wp_safe_redirect( $url ); exit; } //phpcs:enable WordPress.Security.NonceVerification.Recommended } /** * Processes offer payment. * This will be executed if the reference transaction setting is disabled. * * @param array $order order details. * @param array $product product details. * @return bool */ public function process_offer_payment( $order, $product ) { $is_successful = false; try { $ppec_client = wc_gateway_ppec()->client; $order_id = $order->get_id(); $args = $ppec_client->get_do_reference_transaction_params( array( 'reference_id' => $this->get_token( $order ), 'amount' => 0, 'order_id' => $order_id, 'wcf_pay_type' => 'offer', ) ); if ( false === $order->has_shipping_address() ) { unset( $args['SHIPTONAME'] ); unset( $args['SHIPTOSTREET'] ); unset( $args['SHIPTOSTREET2'] ); unset( $args['SHIPTOCITY'] ); unset( $args['SHIPTOSTATE'] ); unset( $args['SHIPTOZIP'] ); unset( $args['SHIPTOCOUNTRY'] ); } $response = $ppec_client->do_reference_transaction( $args ); if ( $this->has_error_api_response( $response ) ) { wcf()->logger->log( 'PayPal DoReferenceTransactionCall Failed' ); wcf()->logger->log( wcf_print_r( $response, true ) ); $is_successful = false; } else { $is_successful = true; $this->store_offer_transaction( $order, $response, $product ); } } catch ( Exception $e ) { // translators: exception message. $order_note = sprintf( __( 'PayPal Exp Transaction Failed (%s)', 'cartflows-pro' ), $e->getMessage() ); } return $is_successful; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product Product data. */ public function store_offer_transaction( $order, $response, $product ) { $order_id = $order->get_id(); $txn_id = ''; if ( ! isset( $response['PAYMENTINFO_0_TRANSACTIONID'] ) ) { $txn_id = $response['TRANSACTIONID']; $amount = $response['AMT']; $status = $response['PAYMENTSTATUS']; $reason_code = $response['REASONCODE']; } else { $txn_id = $response['PAYMENTINFO_0_TRANSACTIONID']; $amount = $response['PAYMENTINFO_0_AMT']; $status = $response['PAYMENTINFO_0_PAYMENTSTATUS']; $reason_code = $response['PAYMENTINFO_0_REASONCODE']; } if ( wcf_pro()->utils->is_separate_offer_order() ) { // Prepre transaction data to store in Order object requried for refund . $txn_data['refundable_txns'][] = array( 'TRANSACTIONID' => $txn_id, 'amount' => $amount, 'PAYMENTSTATUS' => $status, 'REASONCODE' => $reason_code, 'refunded_amount' => 0, ); $order->update_meta_data( 'cartflows_offer_txn_data_' . $product['step_id'], $txn_data ); } $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $txn_id ); $order->save(); } /** * Charge a payment against a reference token. * * @param string $reference_id the ID of a reference object, e.g. billing agreement ID. * @param WC_Order $order order object. * @param array $offer_product offer product data. * @param array $args arguments data. * @since 1.0.0 */ public function add_reference_trans_args( $reference_id, $order, $offer_product, $args = array() ) { $defaults = array( 'amount' => $offer_product['total'], 'payment_type' => 'Any', 'payment_action' => 'Sale', 'return_fraud_filters' => 1, 'notify_url' => WC()->api_request_url( 'WC_Gateway_Paypal' ), 'invoice_number' => $order->get_id() . '-' . $offer_product['step_id'], ); $args = wp_parse_args( $args, $defaults ); $this->set_method( 'DoReferenceTransaction' ); // Set base params. $this->add_parameters( array( 'REFERENCEID' => $reference_id, 'BUTTONSOURCE' => 'WooThemes_Cart', 'RETURNFMFDETAILS' => $args['return_fraud_filters'], ) ); $this->add_payment_params( $order, $offer_product['step_id'], $args['payment_action'], true, true, $args['variation_id'], $args['input_qty'] ); } /** * Limits description to 120 characters. * * @param string $description limit description. * @return string * @since 1.0.0 */ private function limit_description( $description ) { $description = substr( $description, 0, 120 ); return $description; } /** * Get billing agreement ID for paypal express. * * @since 1.0.0 * * @param object $order order data. * * @return string */ public function get_token( $order ) { $get_id = $order->get_id(); $token = $order->get_meta( '_ppec_billing_agreement_id' ); if ( '' == $token ) { $token = get_post_meta( $get_id, '_ppec_billing_agreement_id', true ); } if ( ! empty( $token ) ) { return $token; } return false; } /** * Remove line items * * @since 1.0.0 * * @param array $array object. * * @return array */ public function remove_previous_line_items( $array ) { if ( is_array( $array ) && count( $array ) > 0 ) { foreach ( $array as $key => $val ) { if ( false !== strpos( strtoupper( $key ), 'L_' ) ) { unset( $array[ $key ] ); } } } return $array; } /** * Is gateway support offer refund? * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Process offer refund. * * @param object $order the order object. * @param array $offer_data offer data. * * @return bool */ public function process_offer_refund( $order, $offer_data ) { $order_id = $offer_data['order_id']; $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $response_id = false; if ( ! is_null( $refund_amount ) && class_exists( 'WC_Gateway_Paypal' ) ) { $available_gateways = WC()->payment_gateways->payment_gateways(); if ( isset( $available_gateways['paypal'] ) ) { if ( ! class_exists( 'WC_Gateway_Paypal_API_Handler' ) ) { include_once wc()->plugin_path() . '/includes/gateways/paypal/includes/class-wc-gateway-paypal-api-handler.php'; } $environment = $this->get_wc_gateway()->get_option( 'environment', 'live' ); $test_mode = ( 'live' !== $environment ); WC_Gateway_Paypal_API_Handler::$api_username = $test_mode ? $this->get_wc_gateway()->get_option( 'sandbox_api_username' ) : $this->get_wc_gateway()->get_option( 'api_username' ); WC_Gateway_Paypal_API_Handler::$api_password = $test_mode ? $this->get_wc_gateway()->get_option( 'sandbox_api_password' ) : $this->get_wc_gateway()->get_option( 'api_password' ); WC_Gateway_Paypal_API_Handler::$api_signature = $test_mode ? $this->get_wc_gateway()->get_option( 'sandbox_api_signature' ) : $this->get_wc_gateway()->get_option( 'api_signature' ); WC_Gateway_Paypal_API_Handler::$sandbox = $test_mode; $result = WC_Gateway_Paypal_API_Handler::refund_transaction( $order, $refund_amount, $refund_reason ); if ( is_wp_error( $result ) ) { wcf()->logger->log( "Paypal offer refund failed. Order: {$order_id}, Error: " . wp_json_encode( $result->get_error_message() ) ); } else { // Ignoring naming conventions for response variables. switch ( strtolower( $result->ACK ) ) { //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase case 'success': case 'successwithwarning': $response_id = $result->REFUNDTRANSACTIONID; //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } } if ( isset( $result->L_LONGMESSAGE0 ) ) { //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase wcf()->logger->log( 'Paypal Express Checkout offer refund error message: ' . wp_json_encode( $result->L_LONGMESSAGE0 ) //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase ); } } wcf()->logger->log( 'Paypal Express Checkout offer refund response id: ' . $response_id ); } return $response_id; } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Setup the Payment data for Paypal Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_ppec( $subscription, $order, $offer_product ) { if ( 'ppec_paypal' === $order->get_payment_method() ) { $subscription->update_meta_data( '_ppec_billing_agreement_id', $order->get_meta( '_ppec_billing_agreement_id', true ) ); $subscription->save(); } } /** * Modify offer refund data. * * @param array $request request. * @param object $order the order object. * @param float $amount refund amount. * * @return object */ public function offer_refund_request_data( $request, $order, $amount ) { if ( isset( $_POST['cartflows_refund'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $payment_method = $order->get_payment_method(); if ( $this->key === $payment_method ) { wcf()->logger->log( 'Paypal Express Refund Request: ' . wp_json_encode( $request ) ); if ( isset( $_POST['transaction_id'] ) && ! empty( $_POST['transaction_id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $request['TRANSACTIONID'] = sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Missing $environment = $this->get_wc_gateway()->get_option( 'environment', 'live' ); if ( 'live' === $environment ) { $request['USER'] = $this->get_wc_gateway()->get_option( 'api_username' ); $request['PWD'] = $this->get_wc_gateway()->get_option( 'api_password' ); $request['SIGNATURE'] = $this->get_wc_gateway()->get_option( 'api_signature' ); } else { $request['USER'] = $this->get_wc_gateway()->get_option( 'sandbox_api_username' ); $request['PWD'] = $this->get_wc_gateway()->get_option( 'sandbox_api_password' ); $request['SIGNATURE'] = $this->get_wc_gateway()->get_option( 'sandbox_api_signature' ); } } wcf()->logger->log( 'Paypal Express Modified Refund Request: ' . wp_json_encode( $request ) ); } } return $request; } /** * Save required meta keys to refund seperate order. * * @param object $parent_order Parent order Object. * @param object $child_order Child order Object. * @param string $transaction_id id. */ public function store_required_meta_keys_for_refund( $parent_order, $child_order, $transaction_id ) { if ( ! empty( $transaction_id ) ) { $step_id = $child_order->get_meta( '_cartflows_offer_step_id' ); $txn_data = $parent_order->get_meta( 'cartflows_offer_txn_data_' . $step_id ); if ( ! empty( $txn_data ) ) { $child_order->update_meta_data( '_woo_pp_txnData', $txn_data ); } $child_order->save(); } } } /** * Prepare if class 'Cartflows_Pro_Gateway_Paypal_Express' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Paypal_Express::get_instance(); modules/gateways/class-cartflows-pro-gateway-paypal-payments.php000064400000050013147600244370021245 0ustar00key, array( $this, 'store_required_meta_keys_for_refund' ), 10, 3 ); add_action( 'wp_ajax_wcf_create_paypal_payments_order', array( $this, 'create_paypal_order' ) ); add_action( 'wp_ajax_nopriv_wcf_create_paypal_payments_order', array( $this, 'create_paypal_order' ) ); add_action( 'wp_ajax_wcf_capture_paypal_order', array( $this, 'capture_paypal_order' ) ); add_action( 'wp_ajax_nopriv_wcf_capture_paypal_order', array( $this, 'capture_paypal_order' ) ); } /** * Retrieves token for payment. * * @param object $order order details. * * @return string */ public function get_token( $order ) { $token = ''; $bearer = get_option( '_transient_ppcp-paypal-bearerppcp-bearer' ); if ( ! empty( $bearer ) ) { $bearer = json_decode( $bearer ); $token = $bearer->access_token; } // Generate new token if token does not exists. if ( empty( $token ) ) { $payment_env = $order->get_meta( '_ppcp_paypal_payment_mode' ); $ppcp_settings = get_option( 'woocommerce-ppcp-settings' ); $client_id = $ppcp_settings['client_id']; $secret_key = $ppcp_settings['client_secret']; $api_url_base = 'sandbox' === $payment_env ? CARTFLOWS_PAYPAL_PAYMENTS_SANDBOX_API_URL : CARTFLOWS_PAYPAL_PAYMENTS_API_URL; $url = $api_url_base . '/v1/oauth2/token?grant_type=client_credentials'; $args = array( 'method' => 'POST', 'headers' => array( // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode 'Authorization' => 'Basic ' . base64_encode( $client_id . ':' . $secret_key ), ), ); $response = wp_remote_get( $url, $args ); if ( ! is_wp_error( $response ) ) { $res_body = json_decode( $response['body'] ); $token = $res_body->access_token; } } return $token; } /** * Checks the paypal payment mode. * * @param object $order WC Order. * * @return string Payment mode. */ public function get_ppcp_meta( $order ) { $paypal_settings = get_option( 'woocommerce-ppcp-settings' ); $gateway_environment = $order->get_meta( '_ppcp_paypal_payment_mode' ) ? $order->get_meta( '_ppcp_paypal_payment_mode' ) : ''; return array( 'environment' => $order->get_meta( '_ppcp_paypal_payment_mode' ), 'api_base_url' => 'sandbox' === $gateway_environment ? CARTFLOWS_PAYPAL_PAYMENTS_SANDBOX_API_URL : CARTFLOWS_PAYPAL_PAYMENTS_API_URL, 'intent' => $order->get_meta( '_ppcp_paypal_intent' ), 'merchant_email' => $paypal_settings['merchant_email'], 'merchant_id' => $paypal_settings['merchant_id'], 'invoice_prefix' => $paypal_settings['prefix'], ); } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return bool */ public function process_offer_payment( $order, $product ) { $is_successful = false; $txn_id = ''; $txn_id = $order->get_meta( 'cartflows_offer_paypal_txn_id_' . $order->get_id() ); if ( empty( $txn_id ) ) { wcf()->logger->log( 'PayPal order captured but no txn ID found, so order is failed.' ); $is_successful = false; } else { $is_successful = true; $response = array( 'id' => $txn_id, ); $this->store_offer_transaction( $order, $response, $product ); } return $is_successful; } /** * Capture PayPal Order for PayPal Payments Gateway. * * @return json */ public function create_paypal_order() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_create_paypal_order' ) ) { return; } $data = array(); $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $flow_id = isset( $_POST['flow_id'] ) ? intval( $_POST['flow_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $session_key = isset( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ? sanitize_text_field( wp_unslash( $_COOKIE[ CARTFLOWS_SESSION_COOKIE . $flow_id ] ) ) : ''; //phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE $order = wc_get_order( $order_id ); $variation_id = ''; $input_qty = ''; $invoice_id = ''; $args = array( 'step_id' => $step_id, 'flow_id' => $flow_id, 'order_id' => $order_id, 'order_key' => $order_key, 'order_currency' => wcf_pro()->wc_common->get_currency( $order ), 'ppcp_data' => $this->get_ppcp_meta( $order ), ); $token = $this->get_token( $order ); if ( isset( $_POST['variation_id'] ) && ! empty( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wcf()->logger->log( "Cannot create PayPal Payments Order. The selected product's price is zero. Order: {$order_id}" ); wp_send_json( array( 'result' => 'fail', 'message' => __( 'Cannot make the Payment for Zero value product', 'cartflows-pro' ), ) ); } else { $data = array( 'intent' => $args['ppcp_data']['intent'], 'purchase_units' => $this->get_purchase_units( $order, $offer_product, $args ), 'application_context' => array( 'user_action' => 'CONTINUE', 'landing_page' => 'LOGIN', 'brand_name' => html_entity_decode( get_bloginfo( 'name' ), ENT_NOQUOTES, 'UTF-8' ), 'return_url' => $this->get_return_or_cancel_url( $args, $session_key ), 'cancel_url' => $this->get_return_or_cancel_url( $args, $session_key, true ), ), 'payment_method' => array( 'payee_preferred' => 'UNRESTRICTED', 'payer_selected' => 'PAYPAL', ), 'payment_instruction' => array( 'disbursement_mode' => 'INSTANT', 'platform_fees' => array( array( 'amount' => array( 'currency_code' => $order->get_currency(), 'value' => wcf_float_to_string( $offer_product['unit_price_tax'] ), ), ), ), ), ); $arguments = array( 'method' => 'POST', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $token, 'PayPal-Partner-Attribution-Id' => 'Wcf_Woo_PPCP', ), 'body' => wp_json_encode( $data ), ); // Refer https://developer.paypal.com/docs/api/orders/v2/ documentation to generate create order endpoint. $url = $args['ppcp_data']['api_base_url'] . '/v2/checkout/orders'; $ppcp_resp = wp_remote_get( $url, $arguments ); if ( is_wp_error( $ppcp_resp ) ) { $json_response = array( 'status' => false, 'message' => $ppcp_resp->get_error_message(), 'paypal_order_id' => '', 'redirect_url' => '', 'response' => $ppcp_resp, ); wcf()->logger->log( "PayPal order is not created. Order: {$order_id}, Error: " . wp_json_encode( $ppcp_resp->get_error_message() ) ); return wp_send_json( $json_response ); } else { $retrived_body = wp_remote_retrieve_body( $ppcp_resp ); $response = json_decode( $retrived_body ); $json_response = array( 'result' => false, 'message' => __( 'PayPal order is not created', 'cartflows-pro' ), 'paypal_order_id' => '', 'redirect_url' => '', 'response' => $response, ); if ( isset( $response->status ) && 'CREATED' === $response->status ) { $approve_link = $response->links[1]->href; // Update Order Creared ID (PayPal Order ID) in the order. $order->update_meta_data( 'cartflows_paypal_order_id_' . $order->get_id(), $response->id ); $order->save(); wcf()->logger->log( "Order Created for WC-Order: {$order_id}" ); $json_response = array( 'status' => 'success', 'message' => __( 'Order created successfully', 'cartflows-pro' ), 'paypal_order_id' => $response->id, 'redirect' => $approve_link, 'response' => $response, ); } } return wp_send_json( $json_response ); } } /** * Capture PayPal Order for PayPal Payments Gateway. * * @return json */ public function capture_paypal_order() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_capture_paypal_order' ) ) { return; } $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $order = wc_get_order( $order_id ); $token = $this->get_token( $order ); $paypal_order_id = $order->get_meta( 'cartflows_paypal_order_id_' . $order->get_id() ); $api_base_url = 'sandbox' === $order->get_meta( '_ppcp_paypal_payment_mode' ) ? CARTFLOWS_PAYPAL_PAYMENTS_SANDBOX_API_URL : CARTFLOWS_PAYPAL_PAYMENTS_API_URL; $capture_args = array( 'method' => 'POST', 'headers' => array( 'Authorization' => 'Bearer ' . $token, 'Content-Type' => 'application/json', 'Prefer' => 'return=representation', 'PayPal-Partner-Attribution-Id' => 'Wcf_Woo_PPCP', ), ); $capture_url = $api_base_url . '/v2/checkout/orders/' . $paypal_order_id . '/capture'; $captured_resp = wp_remote_get( $capture_url, $capture_args ); if ( is_wp_error( $captured_resp ) ) { $json_response = array( 'status' => false, 'message' => $captured_resp->get_error_message(), 'paypal_order_id' => '', 'redirect_url' => '', 'response' => $captured_resp, ); wcf()->logger->log( "Order Created but not captured. For WC-Order: {$order_id}, Error: " . wp_json_encode( $captured_resp->get_error_message() ) ); } else { $retrived_body = wp_remote_retrieve_body( $captured_resp ); $resp_body = json_decode( $retrived_body ); $json_response = array( 'result' => false, 'message' => __( 'PayPal order is not created', 'cartflows-pro' ), 'paypal_order_id' => '', 'redirect_url' => '', 'response' => $resp_body, ); if ( 'COMPLETED' === $resp_body->status ) { $txn_id = $resp_body->purchase_units[0]->payments->captures[0]->id; // Update Order Captured Txn ID (PayPal Txn ID) in the order. $order->update_meta_data( 'cartflows_offer_paypal_txn_id_' . $order->get_id(), $txn_id ); $order->save(); wcf()->logger->log( "Order Created and captured. Order: {$order_id}" ); $json_response = array( 'status' => 'success', 'message' => __( 'Order Captured successfully', 'cartflows-pro' ), 'paypal_order_id' => $resp_body->id, 'response' => $resp_body, ); } } return wp_send_json( $json_response ); } /** * Create purchase unite for create order. * * @param object $order WC Order. * @param array $offer_product upsell/downsell product. * @param object $args Posted and payment gateway setting data. * * @return array $purchase_unit. */ public function get_purchase_units( $order, $offer_product, $args ) { $invoice_id = $args['ppcp_data']['invoice_prefix'] . '-wcf-' . $args['order_id'] . '_' . $args['step_id']; $purchase_unit = array( 'reference_id' => 'default', 'amount' => array( 'currency_code' => $args['order_currency'], 'value' => wcf_float_to_string( $offer_product['total'] ), 'breakdown' => $this->get_item_breakdown( $order, $offer_product ), ), /* translators: %s order id. */ 'description' => sprintf( __( 'One Time Offer - %s', 'cartflows-pro' ), $order->get_id() ), 'items' => array( $this->add_offer_item_data( $order, $offer_product ), ), 'payee' => array( 'email_address' => $args['ppcp_data']['merchant_email'], 'merchant_id' => $args['ppcp_data']['merchant_id'], ), 'shipping' => array( 'name' => array( 'full_name' => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(), ), ), 'custom_id' => $invoice_id, 'invoice_id' => $invoice_id, ); return array( $purchase_unit ); } /** * Create breakdown for item amount. * * @param object $order WC Order. * @param array $offer_product upsell/downsell product. * * @return array $breakdown item amount breakdown. */ public function get_item_breakdown( $order, $offer_product ) { $breakdown = array(); $breakdown['item_total'] = array( 'currency_code' => wcf_pro()->wc_common->get_currency( $order ), 'value' => wcf_float_to_string( $offer_product['total'] ), ); if ( ! empty( $offer_product['amount_diff'] ) ) { $breakdown['discount'] = array( 'currency_code' => wcf_pro()->wc_common->get_currency( $order ), 'value' => wcf_float_to_string( $offer_product['amount_diff'] ), ); } if ( ! empty( $offer_product['shipping_fee'] ) ) { $breakdown['shipping'] = array( 'currency_code' => wcf_pro()->wc_common->get_currency( $order ), 'value' => wcf_float_to_string( $offer_product['shipping_fee_tax'] ), ); } return $breakdown; } /** * Add product's item data. * * @param object $order WC Order. * @param array $offer_product upsell/downsell product. * * @return array $offer_items item data. */ public function add_offer_item_data( $order, $offer_product ) { $product_desc = wp_strip_all_tags( $offer_product['desc'] ); // Truncate the description to match the max allowed length by PayPal that is of 127 chars. $product_desc = ( strlen( $product_desc ) > 125 ) ? substr( $product_desc, 0, 125 ) . '..' : $product_desc; $offer_items = array( 'name' => $offer_product['name'], 'unit_amount' => array( 'currency_code' => wcf_pro()->wc_common->get_currency( $order ), 'value' => wcf_float_to_string( $offer_product['total'] ), ), 'quantity' => $offer_product['qty'], 'description' => $product_desc, ); return $offer_items; } /** * Get return url. * * @param array $args required arguments. * @param string $session_key session key. * @param bool $cancel key for action. * * @return string */ public function get_return_or_cancel_url( $args, $session_key, $cancel = false ) { $url = get_permalink( $args['step_id'] ); $args = array( 'wcf-order' => $args['order_id'], 'wcf-key' => $args['order_key'], 'wcf-sk' => $session_key, ); if ( $cancel ) { $args['wcf-ppcp-cancel'] = true; } else { $args['wcf-ppcp-return'] = true; } return add_query_arg( $args, $url ); } /** * Is gateway support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product Product data. */ public function store_offer_transaction( $order, $response, $product ) { wcf()->logger->log( 'PayPal Payments : Store Offer Transaction :: Transaction ID = ' . $response['id'] . ' Captured' ); $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response['id'] ); $order->save(); } /** * Modify argument for offer refund * * @param array $request request. * @param object $order the order object. * @param string $amount refund amount. * @param string $reason refund reason. * * @return object */ public function offer_refund_request_data( $request, $order, $amount, $reason ) { //phpcs:disable WordPress.Security.NonceVerification.Missing if ( isset( $_POST['cartflows_refund'] ) ) { $payment_method = $order->get_payment_method(); if ( $this->key === $payment_method ) { if ( isset( $_POST['transaction_id'] ) && ! empty( $_POST['transaction_id'] ) ) { $request['TRANSACTIONID'] = sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ); } } } return $request; //phpcs:enable WordPress.Security.NonceVerification.Missing } /** * Process offer refund. * * @param WC_Order $order order data. * @param array $offer_data offer data. * * @return bool */ public function process_offer_refund( $order, $offer_data ) { $order_id = $offer_data['order_id']; $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $response = false; $gateway = $this->get_wc_gateway(); if ( $this->is_api_refund ) { $result = $gateway->process_refund( $order->get_id(), $refund_amount, $refund_reason ); if ( is_wp_error( $result ) ) { wcf()->logger->log( "Paypal offer refund failed. Order: {$order_id}, Error: " . wcf_print_r( $result->get_error_message(), true ) ); } elseif ( $result ) { $response = $result; } } return $response; } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Setup the Payment data for Paypal Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_paypal( $subscription, $order, $offer_product ) { if ( 'ppcp-gateway' === $order->get_payment_method() ) { $subscription->update_meta_data( '_ppcp_paypal_order_id', $order->get_meta( '_ppcp_paypal_order_id', true ) ); $subscription->update_meta_data( 'payment_token_id', $order->get_meta( 'payment_token_id', true ) ); $subscription->save(); } } /** * Save required keys in child order for refund purpose. * * @param object $parent_order parent order object. * @param object $child_order child order object. * @param string $transaction_id child order trandaction id. */ public function store_required_meta_keys_for_refund( $parent_order, $child_order, $transaction_id ) { if ( ! empty( $transaction_id ) ) { $paypal_order_id = $parent_order->get_meta( 'cartflows_paypal_order_id_' . $parent_order->get_id() ); $child_order->update_meta_data( '_ppcp_paypal_order_id', $paypal_order_id ); $child_order->update_meta_data( '_ppcp_paypal_intent', 'CAPTURE' ); $child_order->save(); } } } /** * Prepare if class 'Cartflows_Pro_Gateway_Paypal_Payments' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Paypal_Payments::get_instance(); modules/gateways/class-cartflows-pro-gateway-paypal-standard.php000064400000116107147600244370021214 0ustar00logger->log( 'Data collected from IPN' . wcf_print_r( $posted, true ) ); $custom = json_decode( $posted['custom'] ); if ( $custom && is_object( $custom ) ) { $order_id = $custom->order_id; } $order = wc_get_order( $order_id ); if ( $order && $order instanceof WC_Order && isset( $posted['payment_status'] ) ) { $order->update_meta_data( '_wcf_paypal_ipn_status', $posted['payment_status'] ); $order->save_meta_data(); } } /** * Modify order status from ipn status retrieved from order meta. * * @param string $status order status. * @param WC_Order $order order data. */ public function modify_order_status( $status, $order ) { $get_meta = $order->get_meta( '_wcf_paypal_ipn_status', true ); if ( empty( $get_meta ) ) { $get_meta = $order->get_meta( '_paypal_status', true ); } if ( empty( $get_meta ) ) { return $status; } switch ( $get_meta ) { case 'Completed': case 'completed': case 'pending': case 'Pending': return $order->needs_processing() ? 'processing' : 'completed'; case 'failed': case 'Failed': case 'denied': case 'Denied': case 'Expired': case 'expired': return 'failed'; } return $status; } /** * Modify WooCommerce paypal arguments. * * @param array $args argumenets for payment. * @param WC_Order $order order data. * @return array */ public function modify_paypal_args( $args, $order ) { wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Entering ' ); $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); if ( ! $checkout_id ) { return $args; } wcf()->logger->log( ' Is reference - ' . wcf_pro()->utils->is_reference_transaction() ); if ( ! wcf_pro()->utils->is_reference_transaction() ) { $is_upsell = false; if ( wcf_pro()->flow->check_if_next_step_is_offer( $order, $flow_id, $checkout_id ) ) { wcf()->logger->log( 'Offer page found.' ); if ( $this->has_api_details() ) { $is_upsell = true; } } if ( $is_upsell ) { wcf()->logger->log( 'Reference transaction disabled' ); $order_id = wcf_pro()->wc_common->get_order_id( $order ); wcf_pro()->front->setup_upsell( $order_id ); if ( did_action( 'cartflows_order_started' ) && ( ! wcf_pro()->utils->is_separate_offer_order() ) ) { $order_status = $order->get_status(); $new_status = wcf_pro()->order->get_order_status_slug(); /** * $new_status = our new status. * $order_status = default status change. */ do_action( 'cartflows_order_status_change_to_main_order', $new_status, $order_status, $order ); remove_filter( 'woocommerce_payment_complete_order_status', array( wcf_pro()->order, 'maybe_set_completed_order_status' ), 999 ); $order->update_status( 'wcf-main-order' ); } $args['return'] = $this->wc_gateway()->get_return_url( $order ); wcf()->logger->log( 'Paypal Return URL' ); wcf()->logger->log( $args['return'] ); } } else { // Initiate express checkout request. $response = $this->initiate_express_checkout_request( array( 'currency' => $args['currency_code'], 'return_url' => $this->get_callback_url( array( 'action' => 'cartflows_paypal_create_billing_agreement', 'step_id' => $checkout_id, 'order_id' => wcf_pro()->wc_common->get_order_id( $order ), ) ), 'cancel_url' => $args['cancel_return'], 'notify_url' => $args['notify_url'], 'custom' => $args['custom'], 'order' => $order, 'step_id' => $checkout_id, ) ); if ( ! isset( $response['TOKEN'] ) || '' === $response['TOKEN'] ) { wcf()->logger->log( 'Switching back to paypal Standard: Reason: Unable to set Express checkout' ); wcf()->logger->log( 'Result For setExpressCheckout' . wcf_print_r( $response, true ) ); return $args; } $paypal_args = array( 'cmd' => '_express-checkout', 'token' => $response['TOKEN'], ); return $paypal_args; } wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Leaving ' ); return $args; } /** * Check if gateway has API details. * * @return bool */ public function has_api_details() { $has_credentials = false; $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } if ( '' !== $this->wc_gateway()->get_option( $api_prefix . 'api_username' ) && '' !== $this->wc_gateway()->get_option( $api_prefix . 'api_password' ) && '' !== $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ) { $has_credentials = true; } return $has_credentials; } /** * Get Payer ID from option value. * * @return bool */ public function get_woo_payer_id() { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } $option_key = 'woocommerce_ppec_payer_id_' . $environment . '_' . md5( $this->wc_gateway()->get_option( $api_prefix . 'api_username' ) . ':' . $this->wc_gateway()->get_option( $api_prefix . 'api_password' ) ); $payer_id = get_option( $option_key ); if ( $payer_id ) { return $payer_id; } else { $result = $this->get_woo_pal_details(); if ( ! empty( $result['PAL'] ) ) { update_option( $option_key, wc_clean( $result['PAL'] ) ); return $payer_id; } } return false; } /** * Get Payer details from option value. * * @return bool */ public function get_woo_pal_details() { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_parameter( 'METHOD', 'GetPalDetails' ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Load paypal object payment JS. * * @return void */ public function payment_scripts() { if ( _is_wcf_base_offer_type() && ! wcf_pro()->utils->is_reference_transaction() && $this->has_paypal_gateway() ) { wp_enqueue_script( 'wcf-paypal-script', 'https://www.paypalobjects.com/api/checkout.js', array( 'jquery' ), CARTFLOWS_PRO_VER, true ); if ( ! wcf_pro()->utils->is_zero_value_offered_product() ) { $script = $this->generate_script(); wp_add_inline_script( 'wcf-paypal-script', $script ); } } } /** * Check if current order has paypal gatway * * @return bool */ public function has_paypal_gateway() { $order_id = isset( $_GET['wcf-order'] ) ? absint( $_GET['wcf-order'] ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( empty( $order_id ) ) { return false; } $order = wc_get_order( $order_id ); $gateway = $order->get_payment_method(); if ( 'paypal' === $gateway ) { return true; } return false; } /** * Generate script for paypal payment popup. * * @return string */ public function generate_script() { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; ob_start(); ?> (function($){ $( function($) { var $wcf_ppec = { init: function () { var getButtons = [ 'wcf-upsell-offer', 'wcf-downsell-offer' ]; $('a[href*="wcf-up-offer-yes"], a[href*="wcf-down-offer-yes"]').each(function(e) { var current_id = $(this).attr('id'); getButtons.push( current_id ); }); window.paypalCheckoutReady = function () { paypal.checkout.setup( 'get_woo_payer_id() ); ?>', { environment: '', buttons: getButtons, locale: 'en_US', click: function () { var variation_id = 0; var input_qty = 0; var variation_wrapper = $('.wcf-offer-product-variation'); if( variation_wrapper.length > 0 ) { var variation_form = variation_wrapper.find('.variations_form'), variation_input = variation_form.find('input.variation_id'); // Set variation id here. variation_id = parseInt( variation_input.val() ); if( $('.var_not_selected').length > 0 || '' === variation_id || 0 === variation_id ){ variation_form.find('.variations select').each(function(){ if( $(this).val().length === 0 ){ $(this).addClass('var_not_selected'); } }); $([ document.documentElement, document.body ]).animate({ scrollTop: variation_form.find('.variations select').offset().top-100 }, 1000); return false; } } var quantity_wrapper = $('.wcf-offer-product-quantity'); if ( quantity_wrapper.length > 0 ) { var quantity_input = quantity_wrapper.find('input[name="quantity"]'); var quantity_value = parseInt( quantity_input.val() ); if( quantity_value > 0 ) { input_qty = quantity_value; } } var postData = { step_id: cartflows.current_step, order_id: , order_key: '', session_key: '', variation_id: variation_id, input_qty: input_qty, action: 'cartflows_front_create_express_checkout_token', security: }; paypal.checkout.initXO(); var action = $.post(cartflows.ajax_url, postData); action.done(function (data) { paypal.checkout.startFlow(data.token); }); action.fail(function () { paypal.checkout.closeFlow(); }); } } ); } } }; $wcf_ppec.init(); }); })(jQuery); 'error', 'response' => __( 'Nonce verification failed', 'cartflows-pro' ), ) ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $session_key = isset( $_POST['session_key'] ) ? sanitize_text_field( wp_unslash( $_POST['session_key'] ) ) : ''; $variation_id = isset( $_POST['variation_id'] ) ? intval( $_POST['variation_id'] ) : ''; $input_qty = isset( $_POST['input_qty'] ) ? intval( $_POST['input_qty'] ) : ''; $is_valid_order = true; if ( $is_valid_order ) { $order = wc_get_order( $order_id ); $response = $this->initiate_express_checkout_request( array( 'currency' => $order ? $order->get_currency() : get_woocommerce_currency(), 'return_url' => $this->get_callback_url( array( 'action' => 'cartflows_paypal_return', 'step_id' => $step_id, 'order_id' => $order_id, 'order_key' => $order_key, 'session_key' => $session_key, 'variation_id' => $variation_id, 'input_qty' => $input_qty, ) ), 'cancel_url' => $this->get_callback_url( array( 'action' => 'cartflows_paypal_cancel', 'step_id' => $step_id, 'order_id' => $order_id, 'order_key' => $order_key, 'session_key' => $session_key, 'variation_id' => $variation_id, 'input_qty' => $input_qty, ) ), 'notify_url' => $this->get_callback_url( 'notify_url' ), 'order' => $order, 'step_id' => $step_id, 'variation_id' => $variation_id, 'input_qty' => $input_qty, ), true ); wcf()->logger->log( 'Generate standard checkout token' ); wcf()->logger->log( wcf_print_r( $response, true ) ); if ( isset( $response['TOKEN'] ) && '' !== $response['TOKEN'] ) { wp_send_json( array( 'result' => 'success', 'token' => $response['TOKEN'], ) ); } } wp_send_json( array( 'result' => 'error', 'response' => $response, ) ); } /** * Initiates express checkout request * * @param array $args arguments. * @param bool $is_upsell is upsell. * @return array */ public function initiate_express_checkout_request( $args, $is_upsell = false ) { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_express_checkout_params( $args, $is_upsell ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); $flow_id = wcf()->utils->get_flow_id_from_step_id( $args['step_id'] ); $data = array( 'paypal' => $this->get_parameters(), ); wcf_pro()->session->update_data( $flow_id, $data ); return $this->perform_request( $request ); } /** * Adds express checkout parameters * * @param array $args arguments. * @param bool $is_upsell is upsell. * @return void */ public function add_express_checkout_params( $args, $is_upsell = false ) { // translators: placeholder is blogname. $default_description = sprintf( _x( 'Orders with %s', 'data sent to paypal', 'cartflows-pro' ), get_bloginfo( 'name' ) ); $defaults = array( 'currency' => get_woocommerce_currency(), 'billing_type' => 'MerchantInitiatedBillingSingleAgreement', 'billing_description' => html_entity_decode( apply_filters( 'woocommerce_subscriptions_paypal_billing_agreement_description', $default_description, $args ), ENT_NOQUOTES, 'UTF-8' ), 'maximum_amount' => null, 'no_shipping' => 1, 'page_style' => null, 'brand_name' => html_entity_decode( get_bloginfo( 'name' ), ENT_NOQUOTES, 'UTF-8' ), 'landing_page' => 'login', 'payment_action' => 'Sale', 'custom' => '', ); $args = wp_parse_args( $args, $defaults ); $this->set_method( 'SetExpressCheckout' ); $this->add_parameters( array( 'RETURNURL' => $args['return_url'], 'CANCELURL' => $args['cancel_url'], 'PAGESTYLE' => $args['page_style'], 'BRANDNAME' => $args['brand_name'], 'LANDINGPAGE' => ( 'login' === $args['landing_page'] && false === $is_upsell ) ? 'Login' : 'Billing', 'NOSHIPPING' => $args['no_shipping'], 'MAXAMT' => $args['maximum_amount'], ) ); if ( false === $is_upsell ) { $this->add_parameter( 'L_BILLINGTYPE0', $args['billing_type'] ); $this->add_parameter( 'L_BILLINGAGREEMENTDESCRIPTION0', get_bloginfo( 'name' ) ); $this->add_parameter( 'L_BILLINGAGREEMENTCUSTOM0', '' ); } // Add payment parameters. if ( isset( $args['order'] ) ) { if ( true === $is_upsell ) { $this->add_payment_params( $args['order'], $args['step_id'], $args['payment_action'], false, true, $args['variation_id'], $args['input_qty'] ); } else { $this->add_payment_params( $args['order'], $args['step_id'], $args['payment_action'], false, false ); } } $set_express_checkout_params = apply_filters( 'cartflows_gateway_paypal_param_setexpresscheckout', $this->get_parameters(), $is_upsell ); $this->clean_params(); $this->add_parameters( $set_express_checkout_params ); } /** * Get callback URL for paypal payment API request. * * @param array $args arguments. * @return string */ public function get_callback_url( $args ) { $api_request_url = WC()->api_request_url( 'cartflows_paypal' ); if ( is_array( $args ) ) { return add_query_arg( $args, $api_request_url ); } else { return add_query_arg( 'action', $args, $api_request_url ); } } /** * Get WooCommerce payment geteways. * * @return array */ public function wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Clean params. * * @return void */ public function clean_params() { $this->parameters = array(); } /** * Return the parsed response object for the request * * @since 1.0.0 * * @param string $raw_response_body response body. * * @return object */ protected function get_parsed_response( $raw_response_body ) { wp_parse_str( urldecode( $raw_response_body ), $this->response_params ); return $this->response_params; } /** * Set methods and token paramter. * * @param string $token Token string. */ public function set_express_checkout_method( $token ) { $this->set_method( 'GetExpressCheckoutDetails' ); $this->add_parameter( 'TOKEN', $token ); } /** * Request to get express checkout details. * * @param string $token token. * * @return object */ public function perform_express_checkout_details_request( $token ) { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->set_express_checkout_method( $token ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Retrieves token for payment. * * @param object $order order details. * * @return string */ public function get_token( $order ) { if ( false == is_null( $this->token ) ) { return $this->token; } $this->token = $order->get_meta( '_paypal_subscription_id' ); if ( '' == $this->token ) { $this->token = $order->get_meta( '_paypal_subscription_id' ); } if ( ! empty( $this->token ) ) { return $this->token; } return apply_filters( 'cartflows_front_gateway_integration_get_token', false, $this ); } /** * After payment process. * * @param array $order order data. * @param array $product product data. * @return bool */ public function process_offer_payment( $order, $product ) { $is_successful = false; try { $response = $this->process_reference_transaction( $this->get_token( $order ), $order, array(), $product ); if ( $this->has_error_api_response( $response ) ) { wcf()->logger->log( 'PayPal DoReferenceTransactionCall Failed' ); wcf()->logger->log( wcf_print_r( $response, true ) ); $is_successful = false; } else { $is_successful = true; $this->store_offer_transaction( $order, $response, $product ); } } catch ( Exception $e ) { wcf()->logger->log( 'PayPal DoReferenceTransactionCall Failed' ); wcf()->logger->log( wcf_print_r( $response, true ) ); } return $is_successful; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product Product data. */ public function store_offer_transaction( $order, $response, $product ) { $order_id = $order->get_id(); $txn_id = ''; if ( ! isset( $response['PAYMENTINFO_0_TRANSACTIONID'] ) ) { $txn_id = $response['TRANSACTIONID']; } else { $txn_id = $response['PAYMENTINFO_0_TRANSACTIONID']; } $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $txn_id ); $order->save(); } /** * Sets up arguments and performs DoReferenceTransaction call * * @param int $billing_agreement_id agreement ID. * @param array $order order data. * @param array $args arguments. * @param array $product product details. * * @return object */ public function process_reference_transaction( $billing_agreement_id, $order, $args, $product ) { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_reference_trans_args( $billing_agreement_id, $order, $product, $args ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Charge a payment against a reference token * * @param string $reference_id the ID of a reference object, e.g. billing agreement ID. * @param WC_Order $order order object. * @param array $offer_product offer product data. * @param array $args arguments. * * @since 1.0.0 */ public function add_reference_trans_args( $reference_id, $order, $offer_product, $args = array() ) { $defaults = array( 'amount' => $offer_product['total'], 'payment_type' => 'Any', 'payment_action' => 'Sale', 'return_fraud_filters' => 1, 'notify_url' => WC()->api_request_url( 'WC_Gateway_Paypal' ), 'invoice_number' => $order->get_id() . '-' . $offer_product['step_id'], ); $args = wp_parse_args( $args, $defaults ); $this->set_method( 'DoReferenceTransaction' ); // Set base params. $this->add_parameters( array( 'REFERENCEID' => $reference_id, 'BUTTONSOURCE' => 'WooThemes_Cart', 'RETURNFMFDETAILS' => $args['return_fraud_filters'], ) ); $this->add_payment_params( $order, $offer_product['step_id'], $args['payment_action'], true, true, $offer_product['id'], $offer_product['qty'] ); } /** * Processes API calls. * This function will be executed if reference Trasaction is disabled. * * @return void */ public function process_api_calls() { //phpcs:disable WordPress.Security.NonceVerification.Recommended if ( ! isset( $_GET['action'] ) ) { return; } $step_id = isset( $_GET['step_id'] ) ? intval( $_GET['step_id'] ) : 0; $order_id = isset( $_GET['order_id'] ) ? intval( $_GET['order_id'] ) : 0; $order_key = isset( $_GET['order_key'] ) ? sanitize_text_field( wp_unslash( $_GET['order_key'] ) ) : ''; $session_key = isset( $_GET['session_key'] ) ? sanitize_text_field( wp_unslash( $_GET['session_key'] ) ) : ''; $variation_id = isset( $_GET['variation_id'] ) ? intval( $_GET['variation_id'] ) : ''; $input_qty = isset( $_GET['input_qty'] ) ? intval( $_GET['input_qty'] ) : ''; switch ( $_GET['action'] ) { case 'cartflows_paypal_return': $flow_id = wcf()->utils->get_flow_id_from_step_id( $step_id ); $data = wcf_pro()->session->get_data( $flow_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); $order = wc_get_order( $order_id ); if ( isset( $_GET['token'] ) && ! empty( $_GET['token'] ) ) { /** * Setting up necessary data for this api call. */ $api_response_result = false; /** * Get the data we saved while calling setExpressCheckout call. */ $get_paypal_data = array(); if ( isset( $data['paypal'] ) ) { $get_paypal_data = $data['paypal']; } // Using WooCommerce function for sanitizing token. $express_checkout_details_response = $this->perform_express_checkout_details_request( wc_clean( wp_unslash( $_GET['token'] ) ) ); wcf()->logger->log( 'Standard checkout token return request' ); wcf()->logger->log( wcf_print_r( $express_checkout_details_response, true ) ); /** * Check if product total is greater than 0. */ if ( $offer_product['total'] > 0 ) { /** * Prepare DoExpessCheckout Call to finally charge the user. */ $do_express_checkout_data = array( 'TOKEN' => $express_checkout_details_response['TOKEN'], 'PAYERID' => $express_checkout_details_response['PAYERID'], 'METHOD' => 'DoExpressCheckoutPayment', ); $do_express_checkout_data = wp_parse_args( $do_express_checkout_data, $get_paypal_data ); $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } /** * Setup & perform DoExpressCheckout API Call. */ $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_parameters( $do_express_checkout_data ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); $response_checkout = $this->perform_request( $request ); wcf()->logger->log( 'Standard $response_checkout checkout token charge' ); wcf()->logger->log( wcf_print_r( $response_checkout, true ) ); if ( false === $this->has_error_api_response( $response_checkout ) ) { $api_response_result = true; // Store transaction ID for the CartFlows offer. $this->store_offer_transaction( $order, $response_checkout, $offer_product ); } } else { $api_response_result = true; // Store transaction ID for the CartFlows offer. $this->store_offer_transaction( $order, $response_checkout, $offer_product ); } /**** DoExpressCheckout Call Completed */ /** * Allow our subscription addon to make subscription request. */ $api_response_result = apply_filters( 'cartflows_gateway_in_offer_transaction_paypal_after_express_checkout_response', $api_response_result, $express_checkout_details_response['TOKEN'], $express_checkout_details_response['PAYERID'], $this ); $result = wcf_pro()->flow->after_offer_charge( $step_id, $order_id, $order_key, $api_response_result, $variation_id, $input_qty ); wp_safe_redirect( $result['redirect'] ); exit; } else { $result = wcf_pro()->flow->after_offer_charge( $step_id, $order_id, $order_key, $api_response_result, $variation_id, $input_qty ); wp_safe_redirect( $result['redirect'] ); exit; } break; case 'cartflows_paypal_cancel': $url = get_permalink( $step_id ); $args = array( 'wcf-order' => $order_id, 'wcf-key' => $order_key, 'wcf-sk' => $session_key, ); $url = add_query_arg( $args, $url ); wp_safe_redirect( $url ); exit; } //phpcs:enable WordPress.Security.NonceVerification.Recommended } /** * Performs express checkout request * * @param string $token token string. * @param array $order Order data. * @param array $args arguments data. * * @return object */ public function perform_express_checkout_request( $token, $order, $args ) { $environment = ( true === $this->wc_gateway()->testmode ) ? 'sandbox' : 'live'; $api_prefix = ''; if ( 'sandbox' === $environment ) { $api_prefix = 'sandbox_'; } $this->setup_api_vars( $this->key, $environment, $this->wc_gateway()->get_option( $api_prefix . 'api_username' ), $this->wc_gateway()->get_option( $api_prefix . 'api_password' ), $this->wc_gateway()->get_option( $api_prefix . 'api_signature' ) ); $this->add_do_express_checkout_params( $token, $order, $args ); $this->add_credentials_param( $this->api_username, $this->api_password, $this->api_signature, 124 ); $request = new stdClass(); $request->path = ''; $request->method = 'POST'; $request->body = $this->to_string(); return $this->perform_request( $request ); } /** * Sets up DoExpressCheckoutPayment API Call arguments * * @param string $token Unique token of the payment initiated. * @param WC_Order $order order data. * @param array $args arguments data. */ public function add_do_express_checkout_params( $token, $order, $args ) { $this->set_method( 'DoExpressCheckoutPayment' ); // set base params. $this->add_parameters( array( 'TOKEN' => $token, 'PAYERID' => $args['payer_id'], 'BUTTONSOURCE' => 'WooThemes_Cart', 'RETURNFMFDETAILS' => 1, ) ); $this->add_payment_params( $order, $args['step_id'], $args['payment_action'], false, false ); } /** * Create billing agreement for future reference transaction. * * @throws Exception Billing agreement errors. */ public function create_billing_agreement() { //phpcs:disable WordPress.Security.NonceVerification.Recommended if ( ! isset( $_GET['action'] ) ) { return; } switch ( $_GET['action'] ) { // create billing agreement for reference transaction. case 'cartflows_paypal_create_billing_agreement': // bail if no token. if ( ! isset( $_GET['token'] ) ) { return; } // get token to retrieve checkout details with. $token = esc_attr( sanitize_text_field( wp_unslash( $_GET['token'] ) ) ); $order_id = isset( $_GET['order_id'] ) ? intval( $_GET['order_id'] ) : 0; $step_id = isset( $_GET['step_id'] ) ? intval( $_GET['step_id'] ) : 0; try { $express_checkout_details_response = $this->perform_express_checkout_details_request( $token ); // Make sure the billing agreement was accepted. if ( 1 == $express_checkout_details_response['BILLINGAGREEMENTACCEPTEDSTATUS'] ) { $order = wc_get_order( $order_id ); if ( is_null( $order ) ) { throw new Exception( __( 'Unable to find order for PayPal billing agreement.', 'cartflows-pro' ) ); } // we need to process an initial payment. if ( $order->get_total() > 0 ) { $billing_agreement_response = $this->perform_express_checkout_request( $token, $order, array( 'payment_action' => 'Sale', 'payer_id' => $this->get_value_from_response( $express_checkout_details_response, 'PAYERID' ), 'step_id' => $step_id, ) ); } else { $redirect_url = add_query_arg( 'utm_nooverride', '1', $order->get_checkout_order_received_url() ); // redirect customer to order received page. wp_safe_redirect( esc_url_raw( $redirect_url ) ); exit; } if ( $this->has_error_api_response( $billing_agreement_response ) ) { $redirect_url = add_query_arg( 'utm_nooverride', '1', $order->get_checkout_order_received_url() ); // redirect customer to order received page. wp_safe_redirect( esc_url_raw( $redirect_url ) ); exit; } $order->set_payment_method( 'paypal' ); // Store the billing agreement ID on the order and subscriptions. $order->update_meta_data( '_paypal_subscription_id', $this->get_value_from_response( $billing_agreement_response, 'BILLINGAGREEMENTID' ) ); $order->save(); $order->payment_complete( $billing_agreement_response['PAYMENTINFO_0_TRANSACTIONID'] ); $redirect_url = add_query_arg( 'utm_nooverride', '1', $order->get_checkout_order_received_url() ); // redirect customer to order received page. wp_safe_redirect( esc_url_raw( $redirect_url ) ); exit; } else { wp_safe_redirect( wc_get_cart_url() ); exit; } } catch ( Exception $e ) { wc_add_notice( __( 'An error occurred, please try again or try an alternate form of payment.', 'cartflows-pro' ), 'error' ); wp_safe_redirect( wc_get_cart_url() ); exit; } exit; } //phpcs:enable WordPress.Security.NonceVerification.Recommended } /** * Is gateway support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Modify argument for offer refund * * @param array $request request. * @param object $order the order object. * @param string $amount refund amount. * @param string $reason refund reason. * * @return object */ public function offer_refund_request_data( $request, $order, $amount, $reason ) { //phpcs:disable WordPress.Security.NonceVerification.Missing if ( isset( $_POST['cartflows_refund'] ) ) { $payment_method = $order->get_payment_method(); if ( $this->key === $payment_method ) { if ( isset( $_POST['transaction_id'] ) && ! empty( $_POST['transaction_id'] ) ) { $request['TRANSACTIONID'] = sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ); } } } return $request; //phpcs:enable WordPress.Security.NonceVerification.Missing } /** * Process offer refund. * * @param WC_Order $order order data. * @param array $offer_data offer data. * * @return bool */ public function process_offer_refund( $order, $offer_data ) { $order_id = $offer_data['order_id']; $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $response = false; if ( ! is_null( $refund_amount ) && class_exists( 'WC_Gateway_Paypal' ) ) { $paypal = $this->get_wc_gateway(); if ( $this->is_api_refund ) { if ( ! class_exists( 'WC_Gateway_Paypal_API_Handler' ) ) { include_once wc()->plugin_path() . '/includes/gateways/paypal/includes/class-wc-gateway-paypal-api-handler.php'; //phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomFunction } WC_Gateway_Paypal_API_Handler::$api_username = $paypal->testmode ? $paypal->get_option( 'sandbox_api_username' ) : $paypal->get_option( 'api_username' ); WC_Gateway_Paypal_API_Handler::$api_password = $paypal->testmode ? $paypal->get_option( 'sandbox_api_password' ) : $paypal->get_option( 'api_password' ); WC_Gateway_Paypal_API_Handler::$api_signature = $paypal->testmode ? $paypal->get_option( 'sandbox_api_signature' ) : $paypal->get_option( 'api_signature' ); WC_Gateway_Paypal_API_Handler::$sandbox = $paypal->testmode; $result = WC_Gateway_Paypal_API_Handler::refund_transaction( $order, $refund_amount, $refund_reason ); if ( is_wp_error( $result ) ) { wcf()->logger->log( "Paypal offer refund failed. Order: {$order_id}, Error: " . wcf_print_r( $result->get_error_message(), true ) ); } else { switch ( strtolower( $result->ACK ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase case 'success': case 'successwithwarning': $response = $result->REFUNDTRANSACTIONID; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } } if ( isset( $result->L_LONGMESSAGE0 ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase wcf()->logger->log( 'Paypal offer refund error message: ' . wcf_print_r( $result->L_LONGMESSAGE0, true ) ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } } } return $response ? $response : false; } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Setup the Payment data for Paypal Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_paypal( $subscription, $order, $offer_product ) { if ( 'paypal' === $order->get_payment_method() ) { $subscription->update_meta_data( '_paypal_subscription_id', $order->get_meta( '_paypal_subscription_id', true ) ); $subscription->save(); } } } /** * Prepare if class 'Cartflows_Pro_Gateway_Paypal_Standard' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Paypal_Standard::get_instance(); modules/gateways/class-cartflows-pro-gateway-square-old.php000064400000034314147600244370020203 0ustar00key . '_payment_form_tokenization_forced', array( $this, 'maybe_force_tokenization' ), 10, 2 ); add_filter( 'wc_payment_gateway_' . $this->key . '_process_payment', array( $this, 'create_token_process_payment' ), 10, 3 ); add_filter( 'wc_payment_gateway_' . $this->key . '_get_order', array( $this, 'square_get_order_to_add_token' ), 10, 2 ); add_action( 'cartflows_offer_child_order_created_' . $this->key, array( $this, 'store_square_meta_keys_for_refund' ), 10, 3 ); add_action( 'cartflows_offer_subscription_created', array( $this, 'add_subscription_payment_meta_for_square' ), 10, 3 ); add_action( 'cartflows_offer_accepted', array( $this, 'may_reduce_the_offer_product_stock' ), 10, 2 ); } /** * Forces tokenization for upsell/downsells. * * @since 1.5.0 * * @param bool $force_tokenization whether tokenization should be forced. * @return bool */ public function maybe_force_tokenization( $force_tokenization ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( isset( $_POST['post_data'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $post_data = array(); $post_raw_data = sanitize_text_field( wp_unslash( $_POST['post_data'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Missing parse_str( $post_raw_data, $post_data ); $checkout_id = wcf_pro()->utils->get_checkout_id_from_data( $post_data ); $flow_id = wcf_pro()->utils->get_flow_id_from_data( $post_data ); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $force_tokenization = true; wcf()->logger->log( 'Force save source enabled' ); } } wcf()->logger->log( $force_tokenization ); return $force_tokenization; } /** * Add token to order. * * @param object $order order data. * @param object $gateway class instance. */ public function square_get_order_to_add_token( $order, $gateway ) { if ( $this->key === $gateway->id ) { $this->set_square_gateway_config(); if ( empty( $order->payment->token ) ) { $order->payment->token = $order->get_meta( '_wc_square_credit_card_payment_token' ); } } return $order; } /** * Create token. * * @since 1.5.0 * * @param array $process_payment gateway data. * @param int $order_id order id. * @param object $gateway class instance. * @return array */ public function create_token_process_payment( $process_payment, $order_id, $gateway ) { $order = wc_get_order( $order_id ); if ( $this->key === $order->get_payment_method() ) { $this->set_square_gateway_config(); $order = $this->get_wc_gateway()->get_order( $order ); if ( empty( $order->payment->token ) && $order->get_customer_id() < 1 ) { try { $this->get_wc_gateway()->get_payment_tokens_handler()->create_token( $order ); } catch ( Exception $e ) { wcf()->logger->log( '\n ==== Exception Occured ==== \n Can not create the token.' ); } } } return $process_payment; } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * After payment process. * * @param array $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { $is_successful = false; // set up the square configuration. $this->set_square_gateway_config(); $fields = $this->prepare_order_data( $order, $product ); // API call for create payment. $payment_api = new PaymentsApi( $this->api_client ); $response = $payment_api->createPayment( $fields ); if ( empty( $response['error'] ) && isset( $response['payment'] ) ) { $payment_data = $response['payment']; $transaction_id = $payment_data['id']; $order_id = $order->get_id(); $order->update_status( 'processing' ); $this->store_offer_transaction( $order, $transaction_id, $product ); $is_successful = true; } else { wcf()->logger->log( '\n ==== Product Start ==== \n' . wcf_print_r( $product, true ) . '==== Product End ==== \n ==== Error Response start ==== \n' . wcf_print_r( $response, true ) . '==== Error Response end ====\n' ); } return $is_successful; } /** * Prepare data for payment. * * @param object $order order data. * @param array $product product data. * @return array */ public function prepare_order_data( $order, $product ) { $idempotency_key = strval( $order->get_id() . '_' . $product['step_id'] ); $location_id = $this->location_id; $currency = $order->get_currency(); $customer_id = $order->get_customer_id(); $_customer_user = $order->get_meta( '_customer_user' ); $customer_card_id = $order->get_meta( '_wc_square_credit_card_payment_token' ); $square_customer_id = $order->get_meta( '_wc_square_credit_card_customer_id' ); if ( empty( $square_customer_id ) ) { $square_customer_id = $order->get_meta( '_square_customer_id' ); } $shipping_address = array( 'address_line_1' => $order->get_shipping_address_1() ? $order->get_shipping_address_1() : $order->get_billing_address_1(), 'address_line_2' => $order->get_shipping_address_2() ? $order->get_shipping_address_2() : $order->get_billing_address_2(), 'locality' => $order->get_shipping_city() ? $order->get_shipping_city() : $order->get_billing_city(), 'administrative_district_level_1' => $order->get_shipping_state() ? $order->get_shipping_state() : $order->get_billing_state(), 'postal_code' => $order->get_shipping_postcode() ? $order->get_shipping_postcode() : $order->get_billing_postcode(), 'country' => $order->get_shipping_country() ? $order->get_shipping_country() : $order->get_billing_country(), ); $billing_address = array( 'address_line_1' => $order->get_billing_address_1(), 'address_line_2' => $order->get_billing_address_2(), 'locality' => $order->get_billing_city(), 'administrative_district_level_1' => $order->get_billing_state(), 'postal_code' => $order->get_billing_postcode(), 'country' => $order->get_billing_country() ? $order->get_billing_country() : $order->get_shipping_country(), ); $fields = array( 'idempotency_key' => $idempotency_key, 'location_id' => $location_id, 'amount_money' => array( 'amount' => (int) $this->format_amount( $product['total'], $currency ), 'currency' => $currency, ), 'source_id' => $customer_card_id, 'customer_id' => $square_customer_id, 'shipping_address' => $shipping_address, 'billing_address' => $billing_address, 'reference_id' => (string) $order->get_id(), /* translators: %1$s: site name, %2$s: order id, %3$s: step id */ 'note' => sprintf( __( '%1$s - Order %2$s_%3$s - One Click Payment', 'cartflows-pro' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_id(), $product['step_id'] ), ); return $fields; } /** * Process amount to be passed to Square payment API. * * @param int $total order total. * @param string $currency currancy. */ public function format_amount( $total, $currency = '' ) { if ( ! $currency ) { $currency = get_woocommerce_currency(); } switch ( strtoupper( $currency ) ) { // Zero decimal currencies. case 'BIF': case 'CLP': case 'DJF': case 'GNF': case 'JPY': case 'KMF': case 'KRW': case 'MGA': case 'PYG': case 'RWF': case 'VND': case 'VUV': case 'XAF': case 'XOF': case 'XPF': $total = absint( $total ); break; default: $total = round( $total, 2 ) * 100; // In cents. break; } return $total; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response ); $order->save(); } /** * Set up the required configuration for payment. */ public function set_square_gateway_config() { // Set the access tokan. $this->access_token = $this->get_wc_gateway()->get_plugin()->get_settings_handler()->get_access_token(); $this->access_token = empty( $this->access_token ) ? $this->get_wc_gateway()->get_plugin()->get_settings_handler()->get_option( 'sandbox_token' ) : $this->access_token; // Set the location id. $this->location_id = $this->get_wc_gateway()->get_plugin()->get_settings_handler()->get_location_id(); // Set host. $this->api_config = new Configuration(); $this->api_config->setHost( 'https://connect.squareup.com' ); $mode = get_option( 'wc_square_settings' ); if ( 'yes' === $mode['enable_sandbox'] ) { $this->api_config->setHost( 'https://connect.squareupsandbox.com' ); } $this->api_config->setAccessToken( $this->access_token ); $this->api_client = new ApiClient( $this->api_config ); } /** * Save required meta keys to refund seperate order. * * @param object $parent_order Parent order Object. * @param object $child_order Child order Object. * @param string $transaction_id id. */ public function store_square_meta_keys_for_refund( $parent_order, $child_order, $transaction_id ) { if ( ! empty( $transaction_id ) ) { $child_order->update_meta_data( '_wc_square_credit_card_square_location_id', $parent_order->get_meta( '_wc_square_credit_card_square_location_id', true ) ); $child_order->update_meta_data( '_wc_square_credit_card_authorization_code', $transaction_id ); $child_order->update_meta_data( '_wc_square_credit_card_customer_id', $parent_order->get_meta( '_wc_square_credit_card_customer_id', true ) ); $child_order->update_meta_data( '_wc_square_credit_card_square_order_id', $transaction_id ); $child_order->update_meta_data( '_wc_square_credit_card_trans_id', $transaction_id ); $child_order->update_meta_data( '_wc_square_credit_card_charge_captured', 'yes' ); $child_order->save(); } } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { // set up the square configuration. $this->set_square_gateway_config(); $currancy = $order->get_currency(); $response_id = false; if ( ! is_null( $offer_data['refund_amount'] ) ) { $fields = array( 'idempotency_key' => strval( $offer_data['order_id'] ), 'amount_money' => array( 'amount' => (int) $this->format_amount( $offer_data['refund_amount'], $currancy ), 'currency' => $currancy, ), 'payment_id' => $offer_data['transaction_id'], 'reason' => $offer_data['refund_reason'], ); // API call for refund payment. $refund_api = new RefundsApi( $this->api_client ); $response = $refund_api->refundPayment( $fields ); if ( empty( $response['error'] ) && isset( $response['refund'] ) ) { $refund_data = $response['refund']; $response_id = $refund_data['id']; } } return $response_id; } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Setup the Payment data for Square's Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_square( $subscription, $order, $offer_product ) { if ( 'square_credit_card' === $order->get_payment_method() ) { $subscription->update_meta_data( '_wc_square_credit_card_payment_token', $order->get_meta( '_wc_square_credit_card_payment_token', true ) ); $subscription->update_meta_data( '_wc_square_credit_card_customer_id', $order->get_meta( '_wc_square_credit_card_customer_id', true ) ); $subscription->save(); } } /** * Reduce the offer product stock. * * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function may_reduce_the_offer_product_stock( $order, $offer_product ) { // Do not update the quantity if the page gateway is not the one which is required. if ( 'square_credit_card' !== $order->get_payment_method() ) { return; } $product = wc_get_product( $offer_product['id'] ); if ( ! wcf_pro()->utils->is_separate_offer_order() && $product->managing_stock() ) { $new_stock = wc_update_product_stock( $offer_product['id'], $offer_product['qty'], 'decrease' ); $changes[] = array( 'product' => $product, 'from' => $new_stock + intval( $offer_product['qty'] ), 'to' => $new_stock, ); wc_trigger_stock_change_notifications( $order, $changes ); } } } /** * Prepare if class 'Cartflows_Pro_Gateway_Square_Old' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Square_Old::get_instance(); modules/gateways/class-cartflows-pro-gateway-square.php000064400000045707147600244370017437 0ustar00key . '_payment_form_tokenization_forced', array( $this, 'maybe_force_tokenization' ), 10, 2 ); add_filter( 'wc_' . $this->key . '_payment_form_tokenization_allowed', array( $this, 'maybe_force_tokenization' ), 10, 2 ); // Create payment token for the order if not available. add_filter( 'wc_payment_gateway_' . $this->key . '_process_payment', array( $this, 'create_token_process_payment' ), 10, 3 ); add_filter( 'wc_payment_gateway_' . $this->key . '_get_order', array( $this, 'square_get_order_to_add_token' ), 10, 2 ); add_action( 'cartflows_offer_child_order_created_' . $this->key, array( $this, 'store_square_meta_keys_for_refund' ), 10, 3 ); add_action( 'cartflows_offer_subscription_created', array( $this, 'add_subscription_payment_meta_for_square' ), 10, 3 ); add_action( 'cartflows_offer_accepted', array( $this, 'may_reduce_the_offer_product_stock' ), 10, 2 ); } /** * Forces tokenization for upsell/downsells. * * @since 1.5.0 * * @param bool $force_tokenization whether tokenization should be forced. * @return bool */ public function maybe_force_tokenization( $force_tokenization ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( isset( $_POST['post_data'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $post_data = array(); $post_raw_data = sanitize_text_field( wp_unslash( $_POST['post_data'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Missing parse_str( $post_raw_data, $post_data ); $checkout_id = wcf_pro()->utils->get_checkout_id_from_data( $post_data ); $flow_id = wcf_pro()->utils->get_flow_id_from_data( $post_data ); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $force_tokenization = true; wcf()->logger->log( 'Force save source enabled' ); } } wcf()->logger->log( $force_tokenization ); wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $force_tokenization; } /** * Add token to order. * * @param object $order order data. * @param object $gateway class instance. */ public function square_get_order_to_add_token( $order, $gateway ) { if ( $this->key === $gateway->id ) { $this->set_square_gateway_config(); if ( empty( $order->payment->token ) ) { $order->payment->token = $order->get_meta( '_wc_square_credit_card_payment_token' ); } } return $order; } /** * Create token. * * @since 1.5.0 * * @param array $process_payment gateway data. * @param int $order_id order id. * @param object $gateway class instance. * @return array */ public function create_token_process_payment( $process_payment, $order_id, $gateway ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $order = wc_get_order( $order_id ); $flow_id = wcf()->utils->get_flow_id_from_order( $order ); $checkout_id = wcf()->utils->get_checkout_id_from_order( $order ); wcf()->logger->log( 'Flow ID: ' . $flow_id . ' Checkout ID : ' . $checkout_id ); if ( ! empty( $order ) && $this->key === $order->get_payment_method() && ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) ) { wcf()->logger->log( 'Upsell exists in the flow. Let\'s add the token to the order.' ); $this->set_square_gateway_config(); $order = $this->get_wc_gateway()->get_order( $order ); try { if ( isset( $order->payment->token ) && ! empty( $order->payment->token ) ) { wcf()->logger->log( 'Token Found : ' . $order->payment->token ); $gateway->add_transaction_data( $order ); // otherwise tokenize. } else { wcf()->logger->log( 'Token Not Found. Creating one' ); $order = $this->update_order_with_payment_info( $order ); $order = $gateway->get_payment_tokens_handler()->create_token( $order ); wcf()->logger->log( 'Updated order after creation token : ' . wp_json_encode( $order ) ); } } catch ( Exception $e ) { wcf()->logger->log( 'Order Details: ' . wcf_print_r( $order, true ) ); wcf()->logger->log( '\n ==== Exception Occurred ==== \n Can not create the token. Error Response: ' . $e->getMessage() ); } } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $process_payment; } /** * Get WooCommerce payment geteways. * * @return object */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $is_successful = false; // set up the square configuration. $this->set_square_gateway_config(); $fields = $this->prepare_order_data( $order, $product ); $amount_to_pay = Money_Utility::amount_to_money( $product['total'], $fields['amount_money']['currency'] ); // Create payment request for the offer. $request = new CreatePaymentRequest( $fields['source_id'], $fields['idempotency_key'], $amount_to_pay ); $request->setNote( (string) apply_filters( 'cartflows_' . $this->key . 'offer_statement_descriptor', $fields['note'] ) ); $request->setAutocomplete( true ); $request->setCustomerId( $fields['customer_id'] ); $request->setLocationId( $fields['location_id'] ); $request->setBillingAddress( $fields['billing_address'] ); // Get billing address from the main order and append as it is. $request->setShippingAddress( $fields['shipping_address'] ); // Default to null from the gateway side. // Process actual payment against the offer. $response = $this->api_client->getPaymentsApi()->createPayment( $request ); // Evaluate the API call for error findings. $errors = Cartflows_Pro_Helper::is_api_errors( $response ); if ( $errors['is_error'] ) { wcf()->logger->log( '==== API Error: ====' . PHP_EOL . wcf_print_r( $errors, true ) . PHP_EOL . '==== Gateway Response start ====' . PHP_EOL . wcf_print_r( $response, true ) . PHP_EOL . '==== Error Gateway response end ====' ); } else { $transaction_id = $response->getResult()->getPayment()->getId(); $order->update_status( 'processing' ); $this->store_offer_transaction( $order, $transaction_id, $product ); $is_successful = true; } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $is_successful; } /** * Prepare data for payment. * * @param object $order order data. * @param array $product product data. * @return array */ public function prepare_order_data( $order, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $idempotency_key = wc_square()->get_idempotency_key( $order->unique_transaction_ref, false ); $location_id = $this->location_id; $currency = $order->get_currency(); $shipping_address = null; $customer_card_id = $order->get_meta( '_wc_square_credit_card_payment_token' ); $square_customer_id = $order->get_meta( '_wc_square_credit_card_customer_id' ); if ( empty( $square_customer_id ) ) { $square_customer_id = $order->get_meta( '_square_customer_id' ); } // Prepare Billing address for the order. $billing_address = new Address(); $billing_address->setFirstName( $order->get_billing_first_name() ); $billing_address->setLastName( $order->get_billing_last_name() ); $billing_address->setAddressLine1( $order->get_billing_address_1() ); $billing_address->setAddressLine2( $order->get_billing_address_2() ); $billing_address->setLocality( $order->get_billing_city() ); $billing_address->setAdministrativeDistrictLevel1( $order->get_billing_state() ); $billing_address->setPostalCode( $order->get_billing_postcode() ); $billing_address->setCountry( $order->get_billing_country() ? $order->get_billing_country() : $order->get_shipping_country() ); // Prepare Shipping address for the order. if ( $order->get_shipping_address_1( 'edit' ) || $order->get_shipping_address_2( 'edit' ) ) { $shipping_address = new Address(); $shipping_address->setFirstName( $order->get_shipping_first_name() ); $shipping_address->setLastName( $order->get_shipping_last_name() ); $shipping_address->setAddressLine1( $order->get_shipping_address_1() ? $order->get_shipping_address_1() : $order->get_billing_address_1() ); $shipping_address->setAddressLine2( $order->get_shipping_address_2() ? $order->get_shipping_address_2() : $order->get_billing_address_2() ); $shipping_address->setLocality( $order->get_shipping_city() ? $order->get_shipping_city() : $order->get_billing_city() ); $shipping_address->setAdministrativeDistrictLevel1( $order->get_shipping_state() ? $order->get_shipping_state() : $order->get_billing_state() ); $shipping_address->setPostalCode( $order->get_shipping_postcode() ? $order->get_shipping_postcode() : $order->get_billing_postcode() ); $shipping_address->setCountry( $order->get_shipping_country() ? $order->get_shipping_country() : $order->get_billing_country() ); } $fields = array( 'idempotency_key' => $idempotency_key, 'location_id' => $location_id, 'amount_money' => array( 'amount' => (int) $this->format_amount( $product['total'], $currency ), 'currency' => $currency, ), 'source_id' => $customer_card_id, 'customer_id' => $square_customer_id, 'shipping_address' => $shipping_address, 'billing_address' => $billing_address, 'reference_id' => (string) $order->get_id(), /* translators: %1$s: site name, %2$s: order id, %3$s: step id */ 'note' => sprintf( __( '%1$s - Order %2$s_%3$s - One Click Payment', 'cartflows-pro' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_id(), $product['step_id'] ), ); wcf()->logger->log( 'Offer Order Data: ' . wp_json_encode( $fields ) ); wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $fields; } /** * Process amount to be passed to Square payment API. * * @param int $total order total. * @param string $currency currancy. */ public function format_amount( $total, $currency = '' ) { if ( ! $currency ) { $currency = get_woocommerce_currency(); } switch ( strtoupper( $currency ) ) { // Zero decimal currencies. case 'BIF': case 'CLP': case 'DJF': case 'GNF': case 'JPY': case 'KMF': case 'KRW': case 'MGA': case 'PYG': case 'RWF': case 'VND': case 'VUV': case 'XAF': case 'XOF': case 'XPF': $total = absint( $total ); break; default: $total = round( $total, 2 ) * 100; // In cents. break; } return $total; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response ); $order->save(); } /** * Set up the required configuration for payment. */ public function set_square_gateway_config() { // Set the access tokan. $this->access_token = $this->get_wc_gateway()->get_plugin()->get_settings_handler()->get_access_token(); $this->access_token = empty( $this->access_token ) ? $this->get_wc_gateway()->get_plugin()->get_settings_handler()->get_option( 'sandbox_token' ) : $this->access_token; // Set the location id. $this->location_id = $this->get_wc_gateway()->get_plugin()->get_settings_handler()->get_location_id(); $this->api_client = new SquareClient( array( 'accessToken' => $this->access_token, 'environment' => wc_square()->get_settings_handler()->get_environment(), ) ); } /** * Save required meta keys to refund seperate order. * * @param object $parent_order Parent order Object. * @param object $child_order Child order Object. * @param string $transaction_id id. */ public function store_square_meta_keys_for_refund( $parent_order, $child_order, $transaction_id ) { if ( ! empty( $transaction_id ) ) { $child_order->update_meta_data( '_wc_square_credit_card_square_location_id', $parent_order->get_meta( '_wc_square_credit_card_square_location_id', true ) ); $child_order->update_meta_data( '_wc_square_credit_card_customer_id', $parent_order->get_meta( '_wc_square_credit_card_customer_id', true ) ); $child_order->update_meta_data( '_wc_square_credit_card_authorization_code', $transaction_id ); $child_order->update_meta_data( '_wc_square_credit_card_square_order_id', $transaction_id ); $child_order->update_meta_data( '_wc_square_credit_card_trans_id', $transaction_id ); $child_order->update_meta_data( '_wc_square_credit_card_charge_captured', 'yes' ); $child_order->update_meta_data( '_wc_square_credit_card_square_version', $parent_order->get_meta( '_wc_square_credit_card_square_version', true ) ); $child_order->save(); } } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { // set up the square configuration. $this->set_square_gateway_config(); $currancy = $order->get_currency(); $response_id = false; if ( ! is_null( $offer_data['refund_amount'] ) ) { // Refund data. $fields = array( 'idempotency_key' => strval( $offer_data['order_id'] ), 'amount_money' => Money_Utility::amount_to_money( $offer_data['refund_amount'], $currancy ), 'payment_id' => $offer_data['transaction_id'], 'reason' => $offer_data['refund_reason'], ); // Create refund request. $refund_request = new RefundPaymentRequest( $fields['idempotency_key'], $fields['amount_money'], $fields['payment_id'] ); // API call to initiate refund payment. $refund_response = $this->api_client->getRefundsApi()->refundPayment( $refund_request ); $errors = Cartflows_Pro_Helper::is_api_errors( $refund_response ); if ( $errors['is_error'] ) { // For support team, then can ask the user to set WP_DEBUG to true to log the error message. if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { // Using it for debugging purpose. error_log( 'CartFlows Square gateway refund failed: Response: ' . PHP_EOL . wcf_print_r( $errors, true ) ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log } } else { $response_id = $refund_response->getResult()->getRefund()->getId(); } } return $response_id; } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Setup the Payment data for Square's Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_square( $subscription, $order, $offer_product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( 'square_credit_card' === $order->get_payment_method() ) { $subscription->update_meta_data( '_wc_square_credit_card_payment_token', $order->get_meta( '_wc_square_credit_card_payment_token', true ) ); $subscription->update_meta_data( '_wc_square_credit_card_customer_id', $order->get_meta( '_wc_square_credit_card_customer_id', true ) ); $subscription->save(); wcf()->logger->log( 'Subscription meta added' ); } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Reduce the offer product stock. * * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function may_reduce_the_offer_product_stock( $order, $offer_product ) { // Do not update the quantity if the page gateway is not the one which is required. if ( 'square_credit_card' !== $order->get_payment_method() ) { return; } $product = wc_get_product( $offer_product['id'] ); if ( ! wcf_pro()->utils->is_separate_offer_order() && $product->managing_stock() ) { $new_stock = wc_update_product_stock( $offer_product['id'], $offer_product['qty'], 'decrease' ); $changes[] = array( 'product' => $product, 'from' => $new_stock + intval( $offer_product['qty'] ), 'to' => $new_stock, ); wc_trigger_stock_change_notifications( $order, $changes ); } } /** * Return order information for creating customer response * * @param object $order Object of current order. * * @return object|\WC_Order * @since 1.6.4 */ public function update_order_with_payment_info( $order ) { if ( is_numeric( $order ) ) { $order = wc_get_order( $order ); } $order->payment = new \stdClass(); if ( empty( $order->payment->token ) ) { $order->payment->nonce = Square_Helper::get_post( 'wc-square-credit-card-payment-nonce' ); $order->payment->card_type = Payment_Gateway_Helper::normalize_card_type( Square_Helper::get_post( 'wc-square-credit-card-card-type' ) ); $order->payment->account_number = substr( Square_Helper::get_post( 'wc-square-credit-card-last-four' ), -4 ); $order->payment->last_four = substr( Square_Helper::get_post( 'wc-square-credit-card-last-four' ), -4 ); $order->payment->exp_month = Square_Helper::get_post( 'wc-square-credit-card-exp-month' ); $order->payment->exp_year = Square_Helper::get_post( 'wc-square-credit-card-exp-year' ); $order->payment->postcode = Square_Helper::get_post( 'wc-square-credit-card-payment-postcode' ); } return $order; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Square' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Square::get_instance(); modules/gateways/class-cartflows-pro-gateway-stripe.php000064400000056721147600244370017443 0ustar00key, array( $this, 'add_required_meta_to_child_order' ), 10, 3 ); add_action( 'woocommerce_checkout_after_order_review', array( $this, 'add_stripe_hidden_input_field' ), 99 ); } /** * Verify 3DS and create intent accordingly. * * @return bool */ public function check_stripe_sca() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_stripe_sca_check' ) ) { return; } $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $offer_type = isset( $_POST['offer_type'] ) ? sanitize_text_field( wp_unslash( $_POST['offer_type'] ) ) : ''; $offer_action = isset( $_POST['offer_action'] ) ? sanitize_text_field( wp_unslash( $_POST['offer_action'] ) ) : ''; $order = wc_get_order( $order_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) >= floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wp_send_json( array( 'result' => 'fail', 'message' => '0 value product', ) ); } else { $gateway = $this->get_wc_gateway(); if ( $gateway ) { $order_source = $gateway->prepare_order_source( $order ); $is_3ds = isset( $order_source->source_object->card->three_d_secure ) ? $order_source->source_object->card->three_d_secure : false; // Check if 3DS required. if ( isset( $is_3ds ) && 'optional' !== $is_3ds && 'yes' === $offer_action ) { $intent = $this->create_intent( $order, $order_source, $offer_product ); if ( ! empty( $intent->error ) ) { wp_send_json( array( 'result' => 'fail', 'message' => $intent->error, ) ); } if ( empty( $intent->error ) ) { // Confirm the intent. $intent = $this->confirm_payment_intent( $intent, $order, $order_source, $offer_product ); } // Process as there is no need to confirm the intent as it is not 3Ds enabled. $main_settings = get_option( 'woocommerce_stripe_settings' ); $testmode = ( ! empty( $main_settings['testmode'] ) && 'yes' === $main_settings['testmode'] ) ? true : false; if ( $testmode ) { $publishable_key = ! empty( $main_settings['test_publishable_key'] ) ? $main_settings['test_publishable_key'] : ''; } else { $publishable_key = ! empty( $main_settings['publishable_key'] ) ? $main_settings['publishable_key'] : ''; } /** * Proceed and check intent status */ if ( ! empty( $intent ) ) { // Save the intent ID to the order. if ( $order ) { $step_id = filter_input( INPUT_POST, 'step_id', FILTER_VALIDATE_INT ); $order->update_meta_data( '_stripe_intent_id_' . $step_id, $intent->id ); $order->save(); } // If the intent requires a 3DS flow, redirect to it. if ( 'requires_action' === $intent->status ) { /** * Return the intent_secret so that it can be authenticated by the client. */ wp_send_json( array( 'result' => 'success', 'intent_secret' => $intent->client_secret, 'stripe_pk' => $publishable_key, ) ); } // Process the order as the intent does not needs any manual 3ds authentication. wp_send_json( array( 'result' => 'success', 'redirect' => $gateway->get_return_url( $order ), 'intent_secret' => $intent->client_secret, 'stripe_pk' => $publishable_key, ) ); } } } wp_send_json( array( 'result' => 'fail', 'message' => 'No 3ds payment', ) ); } } /** * Tokenize to save source of payment if required * * @param bool $save_source force save source. */ public function tokenize_if_required( $save_source ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $save_source = true; wcf()->logger->log( 'Force save source enabled' ); } return $save_source; } /** * Save 3d source. * * @param array $post_data Threads data. * @param object $order order data. */ public function save_3ds_source_for_later( $post_data, $order ) { if ( $order && wcf_pro()->flow->check_if_next_step_is_offer( $order ) ) { $order->update_meta_data( '_cartflows_stripe_source_id', $post_data['three_d_secure']['card'] ); $order->save(); wcf()->logger->log( '3ds source saved for later use' ); } return $post_data; } /** * Redirection to order received URL. * * @param array $response response data. * @param object $order order data. */ public function redirect_using_wc_function( $response, $order ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( 1 === did_action( 'cartflows_order_started' ) && 1 === did_action( 'wc_gateway_stripe_process_redirect_payment' ) ) { $get_url = $order->get_checkout_order_received_url(); wp_safe_redirect( $get_url ); exit(); } } /** * Check if token is present. * * @param object $order order data. */ public function has_token( $order ) { $token = $order->get_meta( '_cartflows_stripe_source_id' ); if ( empty( $token ) ) { $token = $order->get_meta( '_stripe_source_id' ); } if ( ! empty( $token ) ) { return true; } return false; } /** * Get WooCommerce payment getaways. * * @return object Requested Payment Gateway Object. */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { $is_successful = false; $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, $product['action'] ) ) { return $is_successful; } if ( ! $this->has_token( $order ) ) { return $is_successful; } // Verification of 3DS. $skip_payment = filter_input( INPUT_POST, 'stripe_sca_payment', FILTER_VALIDATE_BOOLEAN ); if ( $skip_payment ) { $_stripe_intent_id = $order->get_meta( '_stripe_intent_id_' . $product['step_id'] ); $intent_id = isset( $_POST['stripe_intent_id'] ) ? sanitize_text_field( wp_unslash( $_POST['stripe_intent_id'] ) ) : ''; $confirm_skip_payment = ( $intent_id === $_stripe_intent_id ) ? true : false; if ( $confirm_skip_payment ) { $is_successful = true; // Retrive Charge ID for current product purchase. $charge_response = WC_Stripe_API::retrieve( 'charges?payment_intent=' . $intent_id ); $charge_data = reset( $charge_response->data ); $this->update_stripe_payout_details( $order, $charge_data ); $this->store_offer_transaction( $order, $charge_data, $product ); } } else { try { $gateway = $this->get_wc_gateway(); $order_source = $gateway->prepare_order_source( $order ); $response = WC_Stripe_API::request( $this->generate_payment_request( $order, $order_source, $product ) ); if ( ! is_wp_error( $response ) ) { if ( ! empty( $response->error ) ) { wcf()->logger->log( '\n ==== Product Start ==== \n' . wcf_print_r( $product, true ) . '==== Product End ==== \n ==== Error Response start ==== \n' . wcf_print_r( $response, true ) . '==== Error Response end ====\n' ); $is_successful = false; } else { /** '_transaction_id', $response->id */ $is_successful = true; $this->update_stripe_payout_details( $order, $response ); $this->store_offer_transaction( $order, $response, $product ); } } // @todo Show actual error if any. } catch ( Exception $e ) { // @todo Exception catch to show actual error. $is_successful = false; } } return $is_successful; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response->id ); $order->save(); } /** * Update Stripe Payout for the Offers. * * @param WC_Order $order The order that is being paid for. * @param object $response The response that is send from the payment gateway. */ public function update_stripe_payout_details( $order, $response ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $fee = ! empty( $response->balance_transaction->fee ) ? WC_Stripe_Helper::format_balance_fee( $response->balance_transaction, 'fee' ) : 0; $net = ! empty( $response->balance_transaction->net ) ? WC_Stripe_Helper::format_balance_fee( $response->balance_transaction, 'net' ) : 0; $fee = $fee + floatval( WC_Stripe_Helper::get_stripe_fee( $order ) ); $net = $net + floatval( WC_Stripe_Helper::get_stripe_net( $order ) ); WC_Stripe_Helper::update_stripe_fee( $order, $fee ); WC_Stripe_Helper::update_stripe_net( $order, $net ); wcf()->logger->log( 'Stripe Payout updated.' ); wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Create a new PaymentIntent. * * @param WC_Order $order The order that is being paid for. * @param object $prepared_source The source that is used for the payment. * @param object $product offer product. * @return object An intent or an error. */ public function create_intent( $order, $prepared_source, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); // The request for a charge contains metadata for the intent. $full_request = $this->generate_payment_request( $order, $prepared_source, $product ); $request = array( 'amount' => WC_Stripe_Helper::get_stripe_amount( $product['price'] ), 'currency' => strtolower( $order->get_currency() ), 'description' => $full_request['description'], 'metadata' => $full_request['metadata'], 'statement_descriptor' => WC_Stripe_Helper::clean_statement_descriptor( $full_request['statement_descriptor'] ), 'statement_descriptor_suffix' => WC_Stripe_Helper::clean_statement_descriptor( $full_request['statement_descriptor'] ), 'capture_method' => ( 'true' === $full_request['capture'] ) ? 'automatic' : 'manual', 'payment_method_types' => array( 'card', ), 'customer' => $prepared_source->customer, ); $request = WC_Stripe_Helper::add_payment_method_to_request_array( $prepared_source->source, $request ); if ( $prepared_source->customer ) { $request['customer'] = $prepared_source->customer; } wcf()->logger->log( 'Create Intent request : ' . wcf_print_r( $request, true ) ); // Create an intent that awaits an action. $intent = WC_Stripe_API::request( $request, 'payment_intents' ); if ( ! empty( $intent->error ) ) { $intent_id = $order->get_meta( '_stripe_intent_id' ); if ( $intent_id ) { $intent = $this->retrieve_intent( 'payment_intents', sanitize_text_field( $intent_id ) ); if ( ! empty( $intent->error ) ) { wcf()->logger->log( 'Create Intent request Error: ' . wcf_print_r( $intent, true ) ); return $intent; } } } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $intent; } /** * Retrieves an intent from Stripe API by intent type and ID. * * @param string $intent_type The type of intent to retrieve. Can be 'payment_intents' or 'setup_intents'. * @param string $intent_id The ID of the intent to retrieve. * @return object|bool Returns the intent object if successful, otherwise returns false. * @throws \Exception Throws an exception if the intent type is not allowed. */ public function retrieve_intent( $intent_type, $intent_id ) { if ( ! in_array( $intent_type, array( 'payment_intents', 'setup_intents' ), true ) ) { throw new Exception( "Invalid intent type: $intent_type." ); } $response = WC_Stripe_API::request( array(), "$intent_type/$intent_id?expand[]=payment_method", 'GET' ); if ( $response && isset( $response->error ) ) { return false; } return $response; } /** * Confirm the payment intent for the upsell offer. * * This check is been added and made compulsory by the WooCommerce Stripe. * As they have changed the method from Source API to Payment Methods API. * * @param object $intent The offer payment intent object. * @param object $order The main/parent order object. * @param object $prepared_source The payment source used in the main/primary order. * @param array $offer_product The product data selected on the offer pages. * * @return object $confirmed_intent The payment intent which is now, confirmed for use. * * @since 2.0.10 */ public function confirm_payment_intent( $intent, $order, $prepared_source, $offer_product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'Intent Status : ' . $intent->status ); if ( 'requires_confirmation' !== $intent->status ) { return $intent; } $confirmed_intent = ''; // Confirm the intent & capture the payment charges. $confirm_intent_request = WC_Stripe_Helper::add_payment_method_to_request_array( $prepared_source->source, array() ); $offer_product_data = array( 'merchant_reference' => (string) $order->get_order_number() . '_' . $offer_product['id'] . '_' . $offer_product['step_id'], 'shipping_amount' => WC_Stripe_Helper::get_stripe_amount( (float) $offer_product['shipping_fee_tax'], $order->get_currency() ), 'line_items' => (object) array( 'product_code' => (string) substr( $offer_product['name'], 0, 12 ), 'product_description' => substr( $offer_product['desc'], 0, 26 ), 'unit_cost' => WC_Stripe_Helper::get_stripe_amount( $offer_product['unit_price'], $order->get_currency() ), 'quantity' => $offer_product['qty'], 'tax_amount' => ! empty( $offer_product['unit_price_tax'] ) ? ( $offer_product['unit_price_tax'] - $offer_product['unit_price'] ) : 0, 'discount_amount' => WC_Stripe_Helper::get_stripe_amount( $offer_product['original_price'] - $offer_product['price'], $order->get_currency() ), ), ); wcf()->logger->log( 'Confirm Intent Request : ' . wcf_print_r( $confirm_intent_request, true ) ); $confirmed_intent = WC_Stripe_API::request_with_level3_data( $confirm_intent_request, "payment_intents/$intent->id/confirm", $offer_product_data, $order ); if ( ! empty( $confirmed_intent->error ) ) { wcf()->logger->log( 'Confirm Intent Request Error : ' . wcf_print_r( $confirmed_intent, true ) ); return $confirmed_intent; } wcf()->logger->log( 'Confirmed Intent Status : ' . $confirmed_intent->status . ' For Order ID : ' . $order->get_id() ); wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $confirmed_intent; } /** * Generate payment request. * * @param object $order order data. * @param object $order_source order source. * @param array $product product data. * @return array */ protected function generate_payment_request( $order, $order_source, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $main_settings = get_option( 'woocommerce_stripe_settings', array() ); $post_data = array(); $post_data['currency'] = strtolower( $order ? $order->get_currency() : get_woocommerce_currency() ); $post_data['amount'] = WC_Stripe_Helper::get_stripe_amount( $product['price'], $post_data['currency'] ); /* translators: %1s site name */ $post_data['description'] = sprintf( __( '%1$s - Order %2$s - One Time offer', 'cartflows-pro' ), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $order->get_order_number() ); /* translators: %1s order number */ $post_data['statement_descriptor'] = sprintf( __( 'Order %1$s-OTO', 'cartflows-pro' ), $order->get_order_number() ); $capture = is_array( $main_settings ) && ! empty( $main_settings['capture'] ) && 'yes' === $main_settings['capture'] ? true : false; if ( WC_Stripe_Helper::payment_method_allows_manual_capture( $order->get_payment_method() ) ) { $post_data['capture'] = $capture ? 'true' : 'false'; } $billing_first_name = $order->get_billing_first_name(); $billing_last_name = $order->get_billing_last_name(); $billing_email = $order->get_billing_email(); if ( ! empty( $billing_email ) && apply_filters( 'wc_stripe_send_stripe_receipt', false ) ) { $post_data['receipt_email'] = $billing_email; } $metadata = array( __( 'customer_name', 'cartflows-pro' ) => sanitize_text_field( $billing_first_name ) . ' ' . sanitize_text_field( $billing_last_name ), __( 'customer_email', 'cartflows-pro' ) => sanitize_email( $billing_email ), 'order_id' => $order->get_order_number() . '_' . $product['id'] . '_' . $product['step_id'], ); $post_data['expand[]'] = 'balance_transaction'; $post_data['metadata'] = apply_filters( 'wc_stripe_payment_metadata', $metadata, $order, $order_source ); if ( $order_source->customer ) { $post_data['customer'] = $order_source->customer; } if ( $order_source->source ) { $source_3ds = $order->get_meta( '_cartflows_stripe_source_id', true ); $post_data['source'] = ( '' !== $source_3ds ) ? $source_3ds : $order_source->source; } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return apply_filters( 'wc_stripe_generate_payment_request', $post_data, $order, $order_source ); } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $order_currency = $order->get_currency( $order ); $request = array(); $response_id = false; if ( ! is_null( $refund_amount ) && class_exists( 'WC_Stripe_Helper' ) && class_exists( 'WC_Stripe_API' ) ) { $request['amount'] = WC_Stripe_Helper::get_stripe_amount( $refund_amount, $order_currency ); $request['charge'] = $transaction_id; $response = WC_Stripe_API::request( $request, 'refunds' ); if ( ! empty( $response->error ) || ! $response ) { $response_id = false; } else { /** * Update sripe transaction amounts */ $this->get_wc_gateway()->update_fees( $order, $response->balance_transaction ); $response_id = isset( $response->id ) ? $response->id : true; } } return $response_id; } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Setup the Payment data for Stripe's Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta( $subscription, $order, $offer_product ) { if ( 'stripe' === $order->get_payment_method() ) { $subscription->update_meta_data( '_stripe_source_id', $order->get_meta( '_stripe_source_id', true ) ); $subscription->update_meta_data( '_stripe_customer_id', $order->get_meta( '_stripe_customer_id', true ) ); $subscription->save(); } } /** * Setup the Payment data for Stripe's Automatic Subscription. * * @param object $parent_order Object of order. */ public function remove_the_stripe_refund_action( $parent_order ) { // Stripe refund the order if status is cancelled hence need to avoid it by removing below action. if ( 'stripe' === $parent_order->get_payment_method() ) { remove_action( 'woocommerce_order_status_cancelled', array( WC_Stripe_Order_Handler::get_instance(), 'cancel_payment' ) ); } } /** * Save the parent payment meta to child order. * * @param object $parent_order Object of order. * @param object $child_order Object of order. * @param int $transaction_id transaction id. */ public function add_required_meta_to_child_order( $parent_order, $child_order, $transaction_id ) { // In order to refund the upsell childe order, stripe checks if charge is captured or not.Hence need to add below key. $child_order->update_meta_data( '_stripe_charge_captured', 'yes' ); $child_order->save(); } /** * Add a hidden field for Stripe to create a new payment method. * * If offer exists in the current flow, adds a hidden input * for Stripe to mark the use of a new payment method. * * @return void * @since 2.0.10 */ public function add_stripe_hidden_input_field() { $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); if ( ! $checkout_id ) { $checkout_id = _get_wcf_checkout_id(); } $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id ); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { // Add hidden field for Stripe. echo ''; } } } /** * Prepare if class 'Cartflows_Pro_Gateway_Stripe' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Stripe::get_instance(); modules/gateways/class-cartflows-pro-gateway-woocommerce-payments.php000064400000063412147600244370022305 0ustar00key, array( $this, 'add_required_meta_to_child_order' ), 10, 3 ); add_action( 'cartflows_offer_subscription_created', array( $this, 'add_subscription_payment_meta' ), 10, 3 ); $this->prepare_gateway_objects(); } /** * Prepare the array of all the required classes of payment gateway to use it. * * @return void */ public function prepare_gateway_objects() { $api_client = ''; $api_account_service = ''; $database_cache = ''; $customer_services = ''; $token_service = ''; $api_session_service = ''; if ( class_exists( 'WC_Payments' ) && class_exists( 'WC_Payments_Customer_Service' ) && class_exists( 'WC_Payments_Token_Service' ) ) { $api_client = WC_Payments::get_payments_api_client(); $api_account_service = WC_Payments::get_account_service(); $database_cache = class_exists( 'WCPay\Database_Cache' ) ? WC_Payments::get_database_cache() : null; /** * In the latest version of WooCommerce Payments, they have introduced a new parameter to the WC_Payments_Customer_Service class, * So, adding a backward compatibility for the older version which is less than 6.7.0. */ if ( version_compare( '6.7.1', WCPAY_VERSION_NUMBER, '<=' ) ) { // Execute it for the WCPAY version is greater than 6.7.0. $customer_services = WC_Payments::get_customer_service(); // Fallback if in case the customer service is empty. if ( empty( $customer_services ) ) { $api_session_service = WC_Payments::get_session_service(); $customer_services = new WC_Payments_Customer_Service( $api_client, $api_account_service, $database_cache, $api_session_service ); } } else { // Execute it for the WCPAY version is less than 6.7.0. $customer_services = new WC_Payments_Customer_Service( $api_client, $api_account_service, $database_cache ); } $token_service = new WC_Payments_Token_Service( $api_client, $customer_services ); } $this->gateway_service_objects = array( 'api_client' => $api_client ? $api_client : '', 'api_account_service' => $api_account_service ? $api_account_service : '', 'database_cache' => $database_cache ? $database_cache : '', 'customer_services' => $customer_services ? $customer_services : '', 'token_service' => $token_service ? $token_service : '', ); } /** * Create intent for the offer order. */ public function create_payment_intent() { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $nonce = isset( $_POST['wcf_wc_payment_nonce'] ) && ! empty( $_POST['wcf_wc_payment_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['wcf_wc_payment_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_woop_create_payment_intent' ) ) { $response_data = array( 'message' => __( 'Nonce validation failed', 'cartflows-pro' ) ); wp_send_json_error( $response_data ); } $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : 0; $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); $order = wc_get_order( $order_id ); if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { wp_send_json( array( 'result' => 'fail', 'message' => 'Zero value product', ) ); } else { $gateway = $this->get_wc_gateway(); if ( $gateway ) { wcf()->logger->log( 'Gateway object found : ' . wp_json_encode( $gateway ) ); try { $token = $this->retrieve_token_from_order( $order ); wcf()->logger->log( 'payment_token from order : ' . PHP_EOL . wp_json_encode( $token ) ); $payment_information = new Payment_Information( '', $order, Payment_Type::SINGLE(), $token, Payment_Initiated_By::CUSTOMER(), null, null, '', 'card' ); $response = $this->process_payment_against_intent( $order, $offer_product, $payment_information ); } catch ( Exception $e ) { wcf()->logger->log( '==== Gateway Response start ====' . PHP_EOL . wcf_print_r( $response, true ) . PHP_EOL . '==== Error Gateway response end ====' ); wp_send_json( array( 'result' => 'fail', 'message' => 'Payment Failed', ) ); } // Process the response for the order. if ( ! empty( $response ) ) { $intent_id = $response->get_id() ? $response->get_id() : 0; $status = $response->get_status(); $charge = $response->get_charge(); $charge_id = ! empty( $charge ) ? $charge->get_id() : null; $client_secret = $response->get_client_secret(); wcf()->logger->log( 'Intent i:e Txn response : ' . wp_json_encode( $response ) ); wcf()->logger->log( 'Charge ID : ' . $charge_id ); $extra_data = array( 'step_id' => $step_id, 'order_id' => $order_id, 'intent_id' => $intent_id, 'charge_id' => $charge_id, ); // Save the intent ID to the order. $this->store_order_payment_meta( $order, $payment_information, $extra_data ); wcf()->logger->log( 'Newly generated Intent ID : ' . $intent_id ); wp_send_json( array( 'result' => 'success', 'status' => $status, 'client_secret' => $client_secret, 'client_intend' => $intent_id, ) ); } wcf()->logger->log( 'Final APi response : ' . wp_json_encode( $response ) ); } wp_send_json( array( 'result' => 'fail', 'message' => __( 'No payment. No gateway found', 'cartflows-pro' ), ) ); } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Store the payment meta in the parent order to use it in the child order. * * @param object $order Parent object. * @param object $payment_information Object of payment information with all data. * @param array $extra_data Any extra data that may require. */ public function store_order_payment_meta( $order, $payment_information, $extra_data ) { $payment_method = $payment_information->get_payment_method(); $order_id = $order->get_id(); $step_id = $extra_data['step_id']; $order->update_meta_data( '_wcf_woop_offer_stripe_intent_id_' . $step_id, $extra_data['intent_id'] ); $order->update_meta_data( '_wcf_woop_offer_charge_id_' . $step_id . '_' . $order_id, $extra_data['charge_id'] ); $order->update_meta_data( '_wcf_woop_offer_payment_method_id', $payment_method ); $order->update_meta_data( '_wcf_woop_offer_wcpay_mode', WC_Payments::mode()->is_test() ? 'test' : 'prod' ); $order->save(); } /** * Retrieve the token from the main order. * * @param object $order Object of current order. * @param bool $has_token Separator used to log the logs. * * @return WC_Payment_Tokens|mix $token The retrieved order token on success & false otherwise. */ public function retrieve_token_from_order( $order, $has_token = false ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); if ( $has_token ) { wcf()->logger->log( 'Checking for token in the order to confirm the order' ); } $order_tokens = $order->get_payment_tokens(); $token_id = end( $order_tokens ); $token = $token_id ? WC_Payment_Tokens::get( $token_id ) : null; wcf()->logger->log( 'Tokens found: ' . wp_json_encode( $token ) ); wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); return $token; } /** * Tokenize to save source of payment if required * * @param bool $save_source force save source. * @return bool $save_source modified save value. */ public function tokenize_if_required( $save_source ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); if ( $checkout_id && $flow_id && wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ) ) { $save_source = false; wcf()->logger->log( 'Force save source enabled' ); } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $save_source; } /** * Save 3d source. * * @param int $order_id current order ID. * @return void */ public function save_3ds_source_for_later( $order_id ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $order = wc_get_order( $order_id ); if ( $order && $this->key === $order->get_payment_method() && wcf_pro()->flow->check_if_next_step_is_offer( $order ) ) { try { $payment_method_id = $order->get_meta( '_payment_method_id' ); wcf()->logger->log( '_payment_method_id : ' . $payment_method_id ); // Save the payment method (token) to the user's meta. $token = $this->gateway_service_objects['token_service']->add_payment_method_to_user( $payment_method_id, wp_get_current_user() ); wcf()->logger->log( 'Our Token : ' . PHP_EOL . $token ); // Add the token to the order for safety. $this->get_wc_gateway()->add_token_to_order( $order, $token ); $order->update_meta_data( '_cartflows_' . $this->key . '_source_id', $payment_method_id ); $order->update_meta_data( '_cartflows_' . $this->key . '_token', $token ); // Clear the DB cache if any. $order->read_meta_data( true ); wcf()->logger->log( '3DS source saved for later use' ); } catch ( Exception $e ) { wcf()->logger->log( $order->get_id() . ' Unable to save token for 3ds.' . $e->getMessage() ); } } wcf()->logger->log( 'Leaving: ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Render checkout ID hidden field. * * @param array $checkout checkout session data. * @return void */ public function add_payment_gateway_option_hidden_field( $checkout ) { if ( ! _is_wcf_checkout_type() ) { return; } $available_gateways = array(); foreach ( WC()->payment_gateways->get_available_payment_gateways() as $payment_gateway_id => $payment_gateway_item ) { array_push( $available_gateways, $payment_gateway_id ); } $checkout_id = _get_wcf_checkout_id(); $flow_id = wcf()->utils->get_flow_id_from_step_id( $checkout_id ); $is_upsell = wcf_pro()->flow->is_upsell_exist_in_flow( $flow_id, $checkout_id ); if ( ( is_array( $available_gateways ) && ! in_array( $this->key, $available_gateways, true ) ) || ! $is_upsell ) { return; } echo ''; } /** * Check if token is present. * * @param object $order order data. */ public function has_token( $order ) { $order_id = $order->get_id(); $token = $this->retrieve_token_from_order( $order, true ); if ( empty( $token ) ) { $source_id = $order->get_meta( '_cartflows_' . $this->key . '_source_id' ); $token = $order->get_meta( '_cartflows_' . $this->key . '_token' ); } if ( ! empty( $token ) ) { return true; } return false; } /** * Get WooCommerce payment geteways. * * @return object */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * After payment process. * * @param object $order order data. * @param array $product product data. * @return array */ public function process_offer_payment( $order, $product ) { wcf()->logger->log( 'Started: ' . __CLASS__ . '::' . __FUNCTION__ ); $is_successful = false; $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, $product['action'] ) ) { return $is_successful; } if ( ! $this->has_token( $order ) ) { return $is_successful; } if ( isset( $_POST['woop_intent_id'] ) ) { $stored_intent_id = $order->get_meta( '_wcf_woop_offer_stripe_intent_id_' . $product['step_id'] ); $payment_method = $order->get_meta( '_cartflows_' . $this->key . '_source_id' ); $intent_id = sanitize_text_field( wp_unslash( $_POST['woop_intent_id'] ) ); wcf()->logger->log( 'Intent ID found: ' . $intent_id ); wcf()->logger->log( 'Stored Intent ID found: ' . $stored_intent_id ); $confirm_intent = ( $intent_id === $stored_intent_id ) ? true : false; if ( $confirm_intent ) { wcf()->logger->log( 'Intent ID confirmed' ); $is_successful = true; $data = array( 'id' => $intent_id, 'payment_method' => $payment_method, 'customer' => $order->get_meta( '_stripe_customer_id', true ), ); $this->store_offer_transaction( $order, $data, $product ); } else { wcf()->logger->log( 'Intent ID not matched. Offer order failed ' ); } } wcf()->logger->log( 'Ended: ' . __CLASS__ . '::' . __FUNCTION__ ); return $is_successful; } /** * Store Offer Trxn Charge. * * @param WC_Order $order The order that is being paid for. * @param Object $response The response that is send from the payment gateway. * @param array $product The product data. */ public function store_offer_transaction( $order, $response, $product ) { $order->update_meta_data( 'cartflows_offer_txn_resp_' . $product['step_id'], $response['id'] ); $order->update_meta_data( '_cartflows_offer_txn_stripe_source_id_' . $product['step_id'], $response['payment_method'] ); $order->update_meta_data( '_cartflows_offer_txn_stripe_customer_id_' . $product['step_id'], $response['customer'] ); $order->save(); } /** * Create a new PaymentIntent against the new order. * * @param object $order The order that is being paid for. * @param array $offer_product Offer product. * @param object $payment_information The source that is used for the payment. * @return object $intent An intent or an error. */ public function process_payment_against_intent( $order, $offer_product, $payment_information ) { $f_name = $order->get_billing_first_name(); $l_name = $order->get_billing_last_name(); $email = $order->get_billing_email(); $customer_id = $order->get_meta( '_stripe_customer_id' ); $offer_amount = WC_Payments_Utils::prepare_amount( $offer_product['price'], $order->get_currency() ); $step_id = $offer_product['step_id']; $payment_source = WC_Payments::get_gateway()->get_payment_method_ids_enabled_at_checkout( null, true ); $product = wc_get_product( $offer_product['id'] ); $metadata = array( 'customer_name' => sanitize_text_field( $f_name ) . ' ' . sanitize_text_field( $l_name ), 'customer_email' => sanitize_email( $email ), 'site_url' => esc_url( get_site_url() ), 'payment_type' => $payment_information->get_payment_type(), 'order_number' => $order->get_order_number() . '_' . $offer_product['id'] . '_' . $step_id, 'statement_descriptor' => apply_filters( 'cartflows_' . $this->key . '_offer_statement_descriptor', substr( trim( /* translators: %1s order number */ sprintf( __( 'Order %1$s-OTO', 'cartflows-pro' ), $order->get_order_number() ) ), 0, 22 ) ), ); wcf()->logger->log( 'Current Installed version : ' . WCPAY_VERSION_NUMBER ); /** * Use this in case to add the backward compatibility of the payment gateway. * We don't need to add the backward compatibility as we are adding the support from scratch newly. */ $request = WCPay\Core\Server\Request\Create_And_Confirm_Intention::create(); $request->set_amount( $offer_amount ); $request->set_currency_code( strtolower( $order->get_currency() ) ); $request->set_payment_method( $payment_information->get_payment_method() ); $request->set_customer( $customer_id ); $request->set_capture_method( $payment_information->is_using_manual_capture() ); $request->set_metadata( $metadata ); $request->set_level3( $this->get_level3_data_for_offer_product( $order, $offer_product ) ); $request->set_off_session( $payment_information->is_merchant_initiated() ); $request->set_payment_methods( $payment_source ); $request->set_cvc_confirmation( $payment_information->get_cvc_confirmation() ); // Make sure that setting fingerprint is performed after setting metadata because metadata will override any values you set before for metadata param. $request->set_fingerprint( $payment_information->get_fingerprint() ); $is_subscription_product = $product->is_type( 'subscription' ) || $product->is_type( 'variable-subscription' ) || $product->is_type( 'subscription_variation' ); if ( $is_subscription_product ) { $mandate = $order->get_meta( '_stripe_mandate_id', true ); if ( $mandate ) { $request->set_mandate( $mandate ); } } $request->assign_hook( 'wcpay_create_and_confirm_intent_request' ); $request->set_hook_args( $payment_information ); $intent = $request->send(); return $intent; } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { wcf()->logger->log( 'Start- ' . __CLASS__ . '::' . __FUNCTION__ ); $transaction_id = $offer_data['transaction_id']; $refund_amount = $offer_data['refund_amount']; $refund_reason = $offer_data['refund_reason']; $order_currency = $order->get_currency( $order ); $response_id = false; if ( ! is_null( $refund_amount ) && ! empty( $transaction_id ) ) { $intent = $this->gateway_service_objects['api_client']->get_intent( $transaction_id ); $charge_id = $intent->get_charge()->get_id(); $refund_request = Refund_Charge::create(); $refund_request->set_charge( $charge_id ); if ( null !== $refund_amount ) { $refund_request->set_amount( WC_Payments_Utils::prepare_amount( $refund_amount, $order_currency ) ); } // Specify the refund error if the reason has the following words. This is a requirement from the Stripe. Read more: https://stripe.com/docs/api/refunds/create#create_refund-reason. if ( in_array( $refund_reason, array( 'duplicate', 'fraudulent', 'requested_by_customer' ), true ) ) { $refund_request->set_reason( $refund_reason ); } $response = $refund_request->send(); wcf()->logger->log( 'Refund response : ' . wp_json_encode( $response, true ) ); if ( ! empty( $response->error ) || ! $response ) { $response_id = false; } else { $response_id = isset( $response->id ) ? $response->id : true; wcf()->logger->log( 'Refund response ID: ' . $response_id ); } } wcf()->logger->log( 'Ended- ' . __CLASS__ . '::' . __FUNCTION__ ); return $response_id; } /** * Allow gateways to declare whether they support offer refund * * @return bool */ public function is_api_refund() { return $this->is_api_refund; } /** * Setup the Payment data for Stripe's Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta( $subscription, $order, $offer_product ) { if ( $this->key === $order->get_payment_method() ) { $txn_id = $order->get_meta( 'cartflows_offer_txn_resp_' . $offer_product['step_id'], true ); $intent_id = $order->get_meta( '_wcf_woop_offer_stripe_intent_id_' . $offer_product['step_id'], true ); $subscription->update_meta_data( '_payment_method_id', $txn_id ); $subscription->update_meta_data( '_payment_tokens', $order->get_payment_tokens() ); $subscription->update_meta_data( '_stripe_customer_id', $order->get_meta( '_stripe_customer_id', true ) ); $subscription->update_meta_data( '_charge_id', $order->get_meta( '_wcf_woop_offer_charge_id_' . $offer_product['step_id'] . '_' . $order->get_id(), true ) ); $subscription->update_meta_data( '_intent_id', $intent_id ); $subscription->save_meta_data(); $subscription->save(); } } /** * Save the parent payment meta to child order. * * @param object $parent_order Object of order. * @param object $child_order Object of order. * @param int $transaction_id transaction id. */ public function add_required_meta_to_child_order( $parent_order, $child_order, $transaction_id ) { wcf()->logger->log( 'Start- ' . __CLASS__ . '::' . __FUNCTION__ ); $offer_intent_id = array( 'id' => $transaction_id, ); // Get order/intent/payment data from the parent order object. $step_id = $child_order->get_meta( '_cartflows_offer_step_id', true ); $intent_id = $parent_order->get_meta( '_wcf_woop_offer_stripe_intent_id_' . $step_id, true ); $charge_id = $parent_order->get_meta( '_wcf_woop_offer_charge_id_' . $step_id . '_' . $parent_order->get_id(), true ); $payment_method_id = $parent_order->get_meta( '_wcf_woop_offer_payment_method_id', true ); $payment_mode = $parent_order->get_meta( '_wcf_woop_offer_wcpay_mode', true ); $customer_id = $parent_order->get_meta( '_cartflows_offer_txn_stripe_customer_id_' . $step_id ); $intent = $this->gateway_service_objects['api_client']->get_intent( $intent_id ); $intent_status = $intent->get_status(); // Update order/intent/payment data child order object. This data is required for refund/subscription/cancellation of orders. $child_order->update_meta_data( '_wcf_woop_offer_stripe_intent_id_' . $step_id, $offer_intent_id ); $child_order->set_transaction_id( $intent_id ); $child_order->update_meta_data( '_intent_id', $intent_id ); $child_order->update_meta_data( '_charge_id', $charge_id ); $child_order->update_meta_data( '_intention_status', $intent_status ); $child_order->update_meta_data( '_payment_method_id', $payment_method_id ); $child_order->update_meta_data( '_stripe_customer_id', $customer_id ); WC_Payments_Utils::set_order_intent_currency( $child_order, $intent->get_currency() ); $child_order->save(); wcf()->logger->log( 'Ended- ' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Prepare offer data to sent in the payment request. * * @param object $order Current Order Object. * @param array $offer_product Selected offer Product Data. * * @return array $level3_data modified data for the payment request. */ public function get_level3_data_for_offer_product( $order, $offer_product ) { $level3_data = array( 'merchant_reference' => (string) $order->get_id(), // An alphanumeric string of up to characters in length. This unique value is assigned by the merchant to identify the order. Also known as an “Order IDâ€. 'customer_reference' => (string) $order->get_id(), 'shipping_amount' => WC_Payments_Utils::prepare_amount( (float) $offer_product['shipping_fee_tax'], $order->get_currency() ), // The shipping cost, in cents, as a non-negative integer. 'line_items' => (object) array( 'product_code' => (string) substr( $offer_product['name'], 0, 12 ), // Up to 12 characters that uniquely identify the product. 'product_description' => substr( $offer_product['desc'], 0, 26 ), // Up to 26 characters long describing the product. 'unit_cost' => WC_Payments_Utils::prepare_amount( $offer_product['unit_price'], $order->get_currency() ), // Cost of the product, in cents, as a non-negative integer. 'quantity' => $offer_product['qty'], // The number of items of this type sold, as a non-negative integer. 'tax_amount' => ! empty( $offer_product['unit_price_tax'] ) ? ( $offer_product['unit_price_tax'] - $offer_product['unit_price'] ) : 0, // The amount of tax this item had added to it, in cents, as a non-negative integer. 'discount_amount' => WC_Payments_Utils::prepare_amount( $offer_product['original_price'] - $offer_product['price'], $order->get_currency() ), // The amount an item was discounted—if there was a sale,for example, as a non-negative integer. ), ); return $level3_data; } } /** * Prepare if class 'Cartflows_Pro_Gateway_Woocommerce_Payments' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gateway_Woocommerce_Payments::get_instance(); modules/gateways/class-cartflows-pro-gateway.php000064400000005201147600244370016122 0ustar00load_files(); } /** * Get value from response variable by key. * * @since 1.0.0 * * @param array $response response data. * @param string $key array key item. * * @return string */ public function get_value_from_response( $response, $key ) { if ( $response && isset( $response[ $key ] ) ) { return $response[ $key ]; } } /** * Format prices. * * @since 1.0.0 * * @param float|int $price product price. * @param int $decimals The number of decimal points. * * @return string */ public function price_format( $price, $decimals = 2 ) { return number_format( $price, $decimals, '.', '' ); } /** * Round a float * * @since 1.0.0 * * @param float $number number to round. * @param int $precision Optional. The number of decimal digits to round to. */ public function round( $number, $precision = 2 ) { return round( (float) $number, $precision ); } /** * Helper method to get item description by replacing all tags and limiting to 127 characters * * @param array $item cart or order item. * @param \WC_Product $product product data. * @param bool $is_offer has offer?. * * @return string * @since 1.0.0 */ public function get_item_description( $item, $product, $is_offer = false ) { $item_desc = wp_strip_all_tags( wp_staticize_emoji( $product->get_short_description() ) ); $item_desc = str_replace( "\n", ', ', rtrim( $item_desc ) ); if ( strlen( $item_desc ) > 127 ) { $item_desc = substr( $item_desc, 0, 124 ) . '...'; } return html_entity_decode( $item_desc, ENT_NOQUOTES, 'UTF-8' ); } /** * Load helper files */ public function load_files() { include_once CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-paypal-gateway-helper.php'; include_once CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-mollie-gateway-helper.php'; include_once CARTFLOWS_PRO_DIR . 'modules/gateways/class-cartflows-pro-cpsw-stripe-gateway-helper.php'; } } Cartflows_Pro_Gateway::get_instance(); modules/gateways/class-cartflows-pro-mollie-gateway-helper.php000064400000027557147600244370020700 0ustar00get_customer_id() : ''; $customer_id = ''; if ( empty( $user_id ) ) { wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ': Invalid Order object. Expected object type not received. Customer ID cannot be retried from customer\'s data.' . wcf_print_r( $order, true ) ); } if ( ! empty( $user_id ) ) { $customer = new WC_Customer( intval( $user_id ) ); $customer_id = $customer->get_meta( 'mollie_customer_id' ); } $mollie_customer_id = $order->get_meta( '_wcf_mollie_customer_id', true ); if ( ! $mollie_customer_id ) { $mollie_customer_id = $order->get_meta( '_mollie_customer_id', true ); } return ! empty( $mollie_customer_id ) ? $mollie_customer_id : $customer_id; } /** * Get api key. * * @return string */ public function get_mollie_api_key() { $is_live_mode = 'yes' === get_option( $this->plugin_id . '_test_mode_enabled' ) ? false : true; if ( $is_live_mode ) { $api_key = get_option( $this->plugin_id . '_live_api_key' ); } else { $api_key = get_option( $this->plugin_id . '_test_api_key' ); } return $api_key; } /** * Get return url. * * @param int $step_id step id. * @param int $order_id order id. * @param string $order_key order key. * @param string $session_key session key. * * @return string */ public function get_return_url( $step_id, $order_id, $order_key, $session_key ) { $url = get_permalink( $step_id ); $args = array( 'wcf-order' => $order_id, 'wcf-key' => $order_key, 'wcf-sk' => $session_key, 'wcf-mollie-return' => true, ); return add_query_arg( $args, $url ); } /** * Redirect location after successfully completing process_payment * * @param object $payment_object payment object. * * @return string */ public function get_process_payment_redirect( $payment_object ) { /* * Redirect to payment URL */ return $payment_object->_links->checkout->href; } /** * Get api response body * * @param string $url api url. * @param array $args api arguments. */ public function get_mollie_api_response_body( $url, $args ) { $result = wp_remote_get( $url, $args ); if ( is_wp_error( $result ) ) { return false; } $retrived_body = wp_remote_retrieve_body( $result ); return json_decode( $retrived_body ); } /** * Get WooCommerce payment geteways. * * @return array */ public function get_wc_gateway() { global $woocommerce; $gateways = $woocommerce->payment_gateways->payment_gateways(); return $gateways[ $this->key ]; } /** * Save mollie customer id for order. * * @param object $order order data. * @param string $customer_id customer id. */ public function set_mollie_customer_id( $order, $customer_id ) { if ( ! empty( $customer_id ) ) { try { $order->update_meta_data( '_mollie_customer_id', $customer_id ); $order->update_meta_data( '_wcf_mollie_customer_id', $customer_id ); $order->save(); wcf()->logger->log( __FUNCTION__ . ': Stored Mollie customer ID ' . $customer_id . ' with order ' . $order->get_id() ); } catch ( Exception $e ) { wcf()->logger->log( __FUNCTION__ . ": Couldn't load (and save) WooCommerce customer based on order ID " . $order->get_id() ); } } } /** * Maybe get mollie customer id from prev order for non logged-in user. * * @param string $billing_email user email. * * @return null|string */ public function maybe_get_mollie_customer_id_from_order( $billing_email ) { $mollie_customer_id = null; $prev_orders_by_meta = new WP_Query( array( 'post_type' => 'shop_order', 'post_status' => 'any', 'meta_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query 'relation' => 'AND', array( 'key' => '_billing_email', 'value' => $billing_email, 'compare' => '=', ), array( 'key' => '_mollie_customer_id', 'compare' => 'EXISTS', ), ), 'fields' => 'ids', 'order' => 'ASC', ) ); if ( is_array( $prev_orders_by_meta->posts ) && count( $prev_orders_by_meta->posts ) > 0 ) { $prev_order_id = $prev_orders_by_meta->posts[0]; $prev_order = wc_get_order( $prev_order_id ); $mollie_customer_id = $prev_order->get_meta( '_mollie_customer_id', true ); } return $mollie_customer_id; } /** * Format currency value according to mollie. * * @param string $value Order value. * @param string $currency currency. */ public function format_currency_value( $value, $currency ) { $currencies_with_no_decimals = array( 'JPY', 'ISK' ); if ( in_array( $currency, $currencies_with_no_decimals, true ) ) { return number_format( $value, 0, '.', '' ); } return number_format( $value, 2, '.', '' ); } /** * Set response code. * * @param int $status_code Status code. */ public function set_http_response_code( $status_code ) { if ( PHP_SAPI !== 'cli' && ! headers_sent() ) { if ( function_exists( 'http_response_code' ) ) { http_response_code( $status_code ); } else { header( ' ', true, $status_code ); } } } /** * Save required meta keys to refund seperate order. * * @param object $parent_order Parent order Object. * @param object $child_order Child order Object. * @param string $transaction_id id. */ public function store_mollie_meta_keys_for_refund( $parent_order, $child_order, $transaction_id ) { if ( ! empty( $transaction_id ) ) { $payment_mode = $parent_order->get_meta( '_mollie_payment_mode' ); $child_order->update_meta_data( '_mollie_order_id', $transaction_id ); $child_order->update_meta_data( '_mollie_payment_id', $transaction_id ); $child_order->update_meta_data( '_mollie_payment_mode', $payment_mode ); $child_order->save(); } } /** * Process offer refund * * @param object $order Order Object. * @param array $offer_data offer data. * * @return string/bool. */ public function process_offer_refund( $order, $offer_data ) { $transaction_id = $offer_data['transaction_id']; $refund_amount = number_format( $offer_data['refund_amount'], 2 ); $refund_reason = $offer_data['refund_reason']; $order_currency = $order->get_currency( $order ); $response_id = false; wcf()->logger->log( __FUNCTION__ . ': Transaction ID to refund: ' . $transaction_id . ' & Order id: ' . $order->get_id() ); if ( ! is_null( $refund_amount ) && isset( $transaction_id ) ) { $api_key = $this->get_mollie_api_key(); $get_payment = $this->get_payment_api . $transaction_id; $arguments = array( 'method' => 'GET', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), ); $payment = $this->get_mollie_api_response_body( $get_payment, $arguments ); if ( $payment && null !== $payment->amountRemaining && $payment->amountRemaining->currency === $order_currency && $payment->amountRemaining->value >= $refund_amount ) { //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase // https://docs.mollie.com/reference/v2/refunds-api/create-refund. $refund_api_url = 'https://api.mollie.com/v2/payments/' . $transaction_id . '/refunds'; $refund_args = array( 'amount' => array( 'currency' => $order_currency, 'value' => $refund_amount, ), ); $arguments = array( 'method' => 'POST', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), 'body' => wp_json_encode( $refund_args ), ); $refund_response = $this->get_mollie_api_response_body( $refund_api_url, $arguments ); if ( $refund_response ) { $response_id = $refund_response->id; } } } wcf()->logger->log( __FUNCTION__ . 'Refund ID: ' . $response_id ); return $response_id; } /** * Setup the Payment data for mollie Automatic Subscription. * * @param WC_Subscription $subscription An instance of a subscription object. * @param object $order Object of order. * @param array $offer_product array of offer product. */ public function add_subscription_payment_meta_for_mollie( $subscription, $order, $offer_product ) { if ( in_array( $order->get_payment_method(), array( 'mollie_wc_gateway_creditcard', 'mollie_wc_gateway_ideal' ), true ) ) { $subscription->update_meta_data( '_mollie_payment_id', $order->get_meta( '_mollie_payment_id', true ) ); $subscription->update_meta_data( '_mollie_payment_mode', $order->get_meta( '_mollie_payment_mode', true ) ); $subscription->update_meta_data( '_mollie_customer_id', $order->get_meta( '_mollie_customer_id', true ) ); $subscription->save(); } } /** * Create mollie customer id for non logged-in user. * * @param array $data payment args. * @param object $order order data. * @return array */ public function maybe_create_mollie_customer_id( $data, $order ) { $customer_id = isset( $data['payment']['customerId'] ) && null !== $data['payment']['customerId'] ? $data['payment']['customerId'] : ''; if ( ! empty( $customer_id ) ) { return $data; } elseif ( isset( $data['customerId'] ) && null !== $data['customerId'] ) { return $data; } $checkout_id = wcf()->utils->get_checkout_id_from_post_data(); $flow_id = wcf()->utils->get_flow_id_from_post_data(); if ( $checkout_id && $flow_id ) { // Try to create a new Mollie Customer. try { $billing_first_name = $order->get_billing_first_name(); $billing_last_name = $order->get_billing_last_name(); $billing_email = $order->get_billing_email(); $customer_id = $this->maybe_get_mollie_customer_id_from_order( $billing_email ); if ( null === $customer_id ) { // Get the best name for use as Mollie Customer name. $user_full_name = $billing_first_name . ' ' . $billing_last_name; $api_key = $this->get_mollie_api_key(); $customer_data = array( 'name' => trim( $user_full_name ), 'email' => trim( $billing_email ), 'metadata' => array( 'order_id' => $order->get_id() ), ); $arguments = array( 'method' => 'POST', 'headers' => array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key, ), 'body' => wp_json_encode( $customer_data ), ); $response = $this->get_mollie_api_response_body( $this->create_customer_api, $arguments ); if ( $response && isset( $response->id ) ) { $customer_id = $response->id; } } $this->set_mollie_customer_id( $order, $customer_id ); wcf()->logger->log( __FUNCTION__ . ": Created a Mollie Customer ($customer_id) for order with ID " . $order->get_id() ); } catch ( Exception $e ) { wcf()->logger->log( __FUNCTION__ . ': Could not create Mollie Customer for order with ID ' . $order->get_id() . $e->getMessage() . ' (' . get_class( $e ) . ')' ); } wcf()->logger->log( 'Force save source enabled' ); } return $data; } } modules/gateways/class-cartflows-pro-paypal-gateway-helper.php000064400000036170147600244370020674 0ustar00parameters[ $key ] = $value; } /** * Add multiple parameters. * * @param array $params parameters. */ public function add_parameters( array $params ) { foreach ( $params as $key => $value ) { $this->add_parameter( $key, $value ); } } /** * Add payment parameters * * @param array $params parameters. * * @since 1.0.0 */ private function add_payment_parameters( array $params ) { foreach ( $params as $key => $value ) { $this->add_parameter( "PAYMENTREQUEST_0_{$key}", $value ); } } /** * Set the method for request * * @param string $method request method param. * * @since 1.0.0 */ public function set_method( $method ) { $this->add_parameter( 'METHOD', $method ); } /** * Update payment params * * @since 1.0.0 * * @param WC_Order $order order object. * @param int $step_id step ID. * @param string $type transaction type. * @param bool $use_deprecated_params whether to use deprecated PayPal?. * @param bool $is_offer_charge is offer charge. * @param int $variation_id variation id. * @param int $input_qty input qty. */ public function add_payment_params( WC_Order $order, $step_id, $type, $use_deprecated_params = false, $is_offer_charge = false, $variation_id = '', $input_qty = '' ) { $calculated_total = 0; $order_subtotal = 0; $item_count = 0; $order_items = array(); $offer_package = array(); if ( true === $is_offer_charge ) { $offer_package = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order->get_id() ); if ( $offer_package ) { $order_items[] = array( 'NAME' => $offer_package['name'], 'DESC' => $offer_package['desc'], 'AMT' => $this->round( $offer_package['unit_price_tax'] ), 'QTY' => $offer_package['qty'], 'ITEMURL' => $offer_package['url'], ); $order_subtotal += $offer_package['total_unit_price_amount']; // Update the total if need to replace the main order. Need to update the values to prevent the cart total do not match error. $is_cancal_main_order = get_post_meta( $step_id, 'wcf-replace-main-order', true ); if ( 'yes' === $is_cancal_main_order && $offer_package['cancal_main_order'] ) { $order_subtotal = $offer_package['amount_diff']; $order_items[0]['AMT'] = $offer_package['amount_diff']; } } } else { // Add line items. foreach ( $order->get_items() as $item ) { $product = new WC_Product( $item['product_id'] ); $order_items[] = array( 'NAME' => $product->get_title(), 'DESC' => $this->get_item_description( $item, $product, $is_offer_charge ), 'AMT' => $this->round( $order->get_item_subtotal( $item ) ), 'QTY' => ( ! empty( $item['qty'] ) ) ? absint( $item['qty'] ) : 1, 'ITEMURL' => $product->get_permalink(), ); $order_subtotal += $item['line_total']; } foreach ( $order->get_fees() as $fee ) { $order_items[] = array( 'NAME' => ( $fee['name'] ), 'AMT' => $this->round( $fee['line_total'] ), 'QTY' => 1, ); $order_subtotal += $fee['line_total']; } if ( $order->get_total_discount() > 0 ) { $order_items[] = array( 'NAME' => __( 'Total Discount', 'cartflows-pro' ), 'QTY' => 1, 'AMT' => - $this->round( $order->get_total_discount() ), ); } } if ( true === $is_offer_charge ) { /** Handle paypal data setup for the offers */ /** * Code for reference transaction */ $total_amount = $offer_package['total']; $item_names = array(); foreach ( $order_items as $item ) { $item_names[] = sprintf( '%1$s x %2$s', $item['NAME'], $item['QTY'] ); } $item_count = 0; // Add individual order items. foreach ( $order_items as $item ) { $this->add_litem_params( $item, $item_count ++, $use_deprecated_params ); } if ( $use_deprecated_params ) { $this->add_parameters( array( 'AMT' => $total_amount, 'CURRENCYCODE' => wcf_pro()->wc_common->get_currency( $order ), 'ITEMAMT' => $this->round( $order_subtotal ), 'SHIPPINGAMT' => $offer_package['shipping_fee_tax'], 'INVNUM' => $this->wc_gateway()->get_option( 'invoice_prefix' ) . wcf_pro()->wc_common->get_order_id( $order ) . '_' . $offer_package['step_id'], 'PAYMENTACTION' => $type, 'PAYMENTREQUESTID' => wcf_pro()->wc_common->get_order_id( $order ), 'TAXAMT' => 0, 'CUSTOM' => wp_json_encode( array( '_wcf_order_id' => wcf_pro()->wc_common->get_order_id( $order ), ) ), ) ); } else { $this->add_payment_parameters( array( 'AMT' => $total_amount, 'CURRENCYCODE' => wcf_pro()->wc_common->get_currency( $order ), 'ITEMAMT' => $this->round( $order_subtotal ), 'SHIPPINGAMT' => $offer_package['shipping_fee_tax'], 'INVNUM' => $this->wc_gateway()->get_option( 'invoice_prefix' ) . wcf_pro()->wc_common->get_order_id( $order ) . '_' . $offer_package['step_id'], 'PAYMENTACTION' => $type, 'PAYMENTREQUESTID' => wcf_pro()->wc_common->get_order_id( $order ), 'TAXAMT' => 0, 'CUSTOM' => wp_json_encode( array( '_wcf_order_id' => wcf_pro()->wc_common->get_order_id( $order ), ) ), ) ); } } else { /** Do things for the main order */ if ( $this->skip_line_items( $order, $order_items ) ) { $total_amount = $this->round( $order->get_total() ); // Calculate the total. $calculated_total += $this->round( $order_subtotal + $order->get_cart_tax() ) + $this->round( $order->get_total_shipping() + $order->get_shipping_tax() ); // Calculate order subtotal. if ( $this->price_format( $total_amount ) !== $this->price_format( $calculated_total ) ) { $order_subtotal = $order_subtotal - ( $calculated_total - $total_amount ); } $item_names = array(); foreach ( $order_items as $item ) { $item_names[] = sprintf( '%1$s x %2$s', $item['NAME'], $item['QTY'] ); } // Add line item paramter. $this->add_litem_params( array( // translators: placeholder is blogname. 'NAME' => sprintf( __( '%s - Order', 'cartflows-pro' ), get_option( 'blogname' ) ), 'DESC' => ( implode( ', ', $item_names ) ), 'AMT' => $this->round( $order_subtotal + $order->get_cart_tax() ), 'QTY' => 1, ), 0, $use_deprecated_params ); if ( $use_deprecated_params ) { $this->add_parameters( array( 'AMT' => $total_amount, 'CURRENCYCODE' => wcf_pro()->wc_common->get_currency( $order ), 'ITEMAMT' => $this->round( $order_subtotal + $order->get_cart_tax() ), 'SHIPPINGAMT' => $this->round( $order->get_total_shipping() + $order->get_shipping_tax() ), 'INVNUM' => $this->wc_gateway()->get_option( 'invoice_prefix' ) . wcf_pro()->wc_common->get_order_id( $order ), 'PAYMENTACTION' => $type, 'PAYMENTREQUESTID' => wcf_pro()->wc_common->get_order_id( $order ), 'CUSTOM' => wp_json_encode( array( '_wcf_order_id' => wcf_pro()->wc_common->get_order_id( $order ), ) ), ) ); } else { $this->add_payment_parameters( array( 'AMT' => $total_amount, 'CURRENCYCODE' => wcf_pro()->wc_common->get_currency( $order ), 'ITEMAMT' => $this->round( $order_subtotal + $order->get_cart_tax() ), 'SHIPPINGAMT' => $this->round( $order->get_total_shipping() + $order->get_shipping_tax() ), 'INVNUM' => $this->wc_gateway()->get_option( 'invoice_prefix' ) . wcf_pro()->wc_common->get_order_id( $order ), 'PAYMENTACTION' => $type, 'PAYMENTREQUESTID' => wcf_pro()->wc_common->get_order_id( $order ), 'CUSTOM' => wp_json_encode( array( '_wcf_order_id' => wcf_pro()->wc_common->get_order_id( $order ), ) ), ) ); } } else { // Add individual order items. foreach ( $order_items as $item ) { $this->add_litem_params( $item, $item_count ++, $use_deprecated_params ); } $total_amount = $this->round( $order->get_total() ); // Add order-level parameters. if ( $use_deprecated_params ) { $this->add_parameters( array( 'AMT' => $total_amount, 'CURRENCYCODE' => wcf_pro()->wc_common->get_currency( $order ), 'ITEMAMT' => $this->round( $order_subtotal ), 'SHIPPINGAMT' => $this->round( $order->get_total_shipping() ), 'TAXAMT' => $this->round( $order->get_total_tax() ), 'INVNUM' => $this->wc_gateway()->get_option( 'invoice_prefix' ) . wcf_pro()->wc_common->get_order_id( $order ), 'PAYMENTACTION' => $type, 'PAYMENTREQUESTID' => wcf_pro()->wc_common->get_order_id( $order ), ) ); } else { $this->add_payment_parameters( array( 'AMT' => $total_amount, 'CURRENCYCODE' => wcf_pro()->wc_common->get_currency( $order ), 'ITEMAMT' => $this->round( $order_subtotal ), 'SHIPPINGAMT' => $this->round( $order->get_total_shipping() ), 'TAXAMT' => $this->round( $order->get_total_tax() ), 'INVNUM' => $this->wc_gateway()->get_option( 'invoice_prefix' ) . wcf_pro()->wc_common->get_order_id( $order ), 'PAYMENTACTION' => $type, 'PAYMENTREQUESTID' => wcf_pro()->wc_common->get_order_id( $order ), 'CUSTOM' => wp_json_encode( array( '_wcf_order_id' => wcf_pro()->wc_common->get_order_id( $order ), ) ), ) ); } } } } /** * Adds a line item parameters to the request * * @param array $params paramters. * @param int $item_count current item count. * @param bool $use_deprecated_params whether to use deprecated PayPal?. * @since 1.0.0 */ public function add_litem_params( array $params, $item_count, $use_deprecated_params = false ) { foreach ( $params as $key => $value ) { if ( $use_deprecated_params ) { $this->add_parameter( "L_{$key}{$item_count}", $value ); } else { $this->add_parameter( "L_PAYMENTREQUEST_0_{$key}{$item_count}", $value ); } } } /** * Skip line items and send as single item * * @since 1.0.0 * * @param WC_Order $order Optional. The WC_Order object. Default null. * @param array $order_items Order items. * * @return bool true if line items should be skipped, false otherwise */ public function skip_line_items( $order = null, $order_items = null ) { $skip_line_items = false; if ( true != $skip_line_items && ! is_null( $order ) && ! is_null( $order_items ) ) { $calculated_total = 0; foreach ( $order_items as $item ) { $calculated_total += $this->round( $item['AMT'] * $item['QTY'] ); } $calculated_total += $this->round( $order->get_total_shipping() ) + $this->round( $order->get_total_tax() ); $total_amount = $this->round( $order->get_total() ); if ( $this->price_format( $total_amount ) !== $this->price_format( $calculated_total ) ) { $skip_line_items = true; } } // Filter for line items. return apply_filters( 'wcs_paypal_reference_transaction_skip_line_items', $skip_line_items, $order ); } /** * Convert parameter array to HTTP build string * * @return string */ public function to_string() { wcf()->logger->log( wcf_print_r( $this->get_parameters(), true ) ); return http_build_query( $this->get_parameters(), '', '&' ); } /** * Get payment parameters. * * @return array * @throws Exception Paramter errors. */ public function get_parameters() { /** * Filter PPE request parameters. * * Use this to modify the PayPal request parameters prior to validation * * @param array $parameters * @param Cartflows_Pro_Paypal_Gateway_Helper $instance Class instance */ $instance = new Cartflows_Pro_Paypal_Gateway_Helper(); $this->parameters = apply_filters( 'wcs_paypal_request_params', $this->parameters, $instance ); // validate parameters. foreach ( $this->parameters as $key => $value ) { // remove unused params. if ( '' === $value || is_null( $value ) ) { unset( $this->parameters[ $key ] ); } // format and check amounts. if ( false !== strpos( $key, 'AMT' ) ) { // amounts must be 10,000.00 or less for USD. if ( isset( $this->parameters['PAYMENTREQUEST_0_CURRENCYCODE'] ) && 'USD' == $this->parameters['PAYMENTREQUEST_0_CURRENCYCODE'] && $value > 10000 ) { throw new Exception( sprintf( '%s amount of %s must be less than $10,000.00', $key, $value ) ); } $this->parameters[ $key ] = $this->price_format( $value ); } } return $this->parameters; } /** * Check if api response has error * * @param array $response response object array. * @return bool */ public function has_error_api_response( $response ) { // Consider error when ACK parameter is missing. if ( ! isset( $response['ACK'] ) ) { return true; } // Check if response contains success string. return ( 'Success' !== $this->get_value_from_response( $response, 'ACK' ) && 'SuccessWithWarning' !== $this->get_value_from_response( $response, 'ACK' ) ); } /** * Set variables for API calls * * @param int $gateway_id gateway ID. * @param string $api_env Api enviornment. * @param string $api_usr API username. * @param string $api_pass API password. * @param string $api_sign API signature. */ public function setup_api_vars( $gateway_id, $api_env, $api_usr, $api_pass, $api_sign ) { $this->api_username = $api_usr; $this->api_password = $api_pass; $this->api_signature = $api_sign; $this->gateway_id = $gateway_id; // Rquest URI per enviornment. $this->request_uri = ( 'live' === $api_env ) ? $this->live_api : $this->test_api; // Set HTTP version to 1.1. $this->request_http_version = '1.1'; } /** * Add api credentials parameters * * @param string $api_username API username. * @param string $api_password API password. * @param string $api_signature API signature. * @param string $api_version API version. * @return void */ public function add_credentials_param( $api_username, $api_password, $api_signature, $api_version ) { $this->add_parameters( array( 'USER' => $api_username, 'PWD' => $api_password, 'SIGNATURE' => $api_signature, 'VERSION' => $api_version, ) ); } } modules/gutenberg/assets/css/blocks/next-step-button.css000064400000000602147600244370017524 0ustar00.wp-block-wcfpb-next-step-button .wpcfp__next-step-button-link{display:inline-flex;text-decoration:none}.wp-block-wcfpb-next-step-button .wpcfp__next-step-button-link .wpcfp__next-step-button-content-wrap .wpcfp__next-step-button-title-wrap{display:inline-flex}.wp-block-wcfpb-next-step-button .wpcfp__next-step-button-link .wpcfp__next-step-button-icon{display:flex;align-self:center} modules/gutenberg/assets/css/blocks/offer-product-description.css000064400000000151147600244370021363 0ustar00.block-editor-block-preview__content-iframe .wpcfp__offer-product-description{font-size:20px !important} modules/gutenberg/assets/css/blocks/offer-product-image.css000064400000000000147600244370020113 0ustar00modules/gutenberg/assets/css/blocks/offer-product-price.css000064400000000365147600244370020151 0ustar00.wp-block-wcfpb-offer-product-price .wpcfp__offer-product-price .wcf-offer-price .wcf-offer-price-inner{display:block !important}.block-editor-block-preview__content-iframe .wpcfp__offer-product-price .wcf-offer-price{font-size:30px !important} modules/gutenberg/assets/css/blocks/offer-product-quantity.css000064400000000714147600244370020723 0ustar00.wp-block-wcfpb-offer-product-quantity .wpcfp__offer-product-quantity .quantity .input-text.qty.text{max-width:100%}.wp-block-wcfpb-offer-product-quantity .wpcfp__offer-product-quantity .quantity .screen-reader-text{display:unset}.block-editor-block-preview__content-iframe .wpcfp__offer-product-quantity label{font-size:24px !important}.block-editor-block-preview__content-iframe .wpcfp__offer-product-quantity input{font-size:24px !important;margin-top:5px} modules/gutenberg/assets/css/blocks/offer-product-title.css000064400000000130147600244370020156 0ustar00.block-editor-block-preview__content-iframe .wpcfp__offer-product-title{font-size:24px} modules/gutenberg/assets/css/blocks/offer-product-variation.css000064400000000000147600244370021025 0ustar00modules/gutenberg/assets/css/blocks/offer-yes-no-button.css000064400000001446147600244370020115 0ustar00.wp-block-wcfpb-offer-yes-no-button .wpcfp__offer-yes-no-button-link{display:inline-flex;text-decoration:none}.wp-block-wcfpb-offer-yes-no-button .wpcfp__offer-yes-no-button-link .wpcfp__offer-yes-no-button-content-wrap .wpcfp__offer-yes-no-button-title-wrap{display:inline-flex}.wp-block-wcfpb-offer-yes-no-button .wpcfp__offer-yes-no-button-link .wpcfp__offer-yes-no-button-title{align-self:center}.wp-block-wcfpb-offer-yes-no-button .wpcfp__offer-yes-no-button-link .wpcfp__offer-yes-no-button-icon{display:flex;align-self:center}.block-editor-block-preview__content-iframe .wpcfp__offer-yes-no-button-wrap{font-size:30px;background-color:#abb8c3;padding:10px 30px;text-align:center;width:max-content}.block-editor-block-preview__content-iframe .wpcfp__offer-yes-no-button-wrap a{color:#fff !important} modules/gutenberg/assets/css/blocks/offer-yes-no-link.css000064400000001065147600244370017534 0ustar00.wp-block-wcfpb-offer-yes-no-link .wpcfp__offer-yes-no-link-url{text-decoration:none}.wp-block-wcfpb-offer-yes-no-link .wpcfp__offer-yes-no-link-url .wpcfp__offer-yes-no-link-text-wrap{display:inline-flex}.wp-block-wcfpb-offer-yes-no-link .wpcfp__offer-yes-no-link-url .wpcfp__offer-yes-no-link-text{align-self:center}.wp-block-wcfpb-offer-yes-no-link .wpcfp__offer-yes-no-link-url .wpcfp__offer-yes-no-link-icon{display:flex;align-self:center}.block-editor-block-preview__content-iframe .wpcfp__offer-yes-no-link-text-wrap{font-size:30px;color:#4169E1 !important} modules/gutenberg/assets/css/blocks/pro-checkout-form.css000064400000000000147600244370017620 0ustar00modules/gutenberg/assets/js/editor-helper.js000064400000030172147600244370015227 0ustar00( function ( $ ) { const multistep_checkout_buttons_navigation = function () { let previous_step = 'billing', current_step = 'billing'; // Next button. $( document ).on( 'click', '.wcf-multistep-nav-next-btn', function wcf_show_next_step( e ) { e.preventDefault(); const next_step_element = $( '.wcf-multistep-nav-next-btn' ), next_step_element_target = next_step_element.attr( 'data-target' ); if ( current_step !== next_step_element_target ) { if ( wcf_multistep_field_validations() ) { remove_current_step_class(); previous_step = current_step; current_step = next_step_element_target; if ( 'shipping' === next_step_element_target ) { show_shipping_step(); } else if ( 'payment' === next_step_element_target ) { show_payment_step(); } } } } ); // Back button. $( document ).on( 'click', '.wcf-multistep-nav-back-btn', function wcf_show_previous_step( e ) { e.preventDefault(); const previous_step_element = $( '.wcf-multistep-nav-back-btn' ); previous_step_element_target = previous_step_element.attr( 'data-target' ); if ( current_step !== previous_step_element_target ) { if ( wcf_multistep_field_validations() ) { remove_current_step_class(); previous_step = current_step; current_step = previous_step_element_target; if ( '' === previous_step_element_target ) { previous_step_element.css( 'visibility', 'hidden' ); } else if ( 'shipping' === previous_step_element_target ) { show_shipping_step(); } else if ( 'billing' === previous_step_element_target ) { show_billing_step(); } } } } ); // Breadcrumbs. $( document ).on( 'click', '.wcf-checkout-breadcrumb a', function wcf_show_previous_step( e ) { e.preventDefault(); const breadcrum_tab = $( e.target ).attr( 'data-tab' ); if ( current_step !== breadcrum_tab ) { if ( wcf_multistep_field_validations() ) { previous_step = current_step; current_step = breadcrum_tab; remove_current_step_class(); if ( 'billing' === breadcrum_tab ) { show_billing_step(); } else if ( 'shipping' === breadcrum_tab ) { show_shipping_step(); } else if ( 'payment' === breadcrum_tab ) { show_payment_step(); } } } } ); // Custom sections. $( document ).on( 'click', '.wcf-step-link', function wcf_show_previous_step( e ) { e.preventDefault(); const tab_target = $( e.target ).attr( 'data-target' ); if ( current_step !== tab_target ) { if ( wcf_multistep_field_validations() ) { previous_step = current_step; current_step = tab_target; remove_current_step_class(); if ( 'billing' === tab_target ) { show_billing_step(); } else if ( 'shipping' === tab_target ) { show_shipping_step(); } } } } ); function show_billing_step() { const next_step_element = $( '.wcf-multistep-nav-next-btn' ), previous_step_element = $( '.wcf-multistep-nav-back-btn' ); if ( 'shipping' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-shipping' ); } if ( 'payment' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-payment' ); } $( '.wcf-embed-checkout-form' ).addClass( 'wcf-billing' ); previous_step_element.attr( 'data-target', '' ); next_step_element.attr( 'data-target', 'shipping' ); $( '.wcf-checkout-breadcrumb.information-step a' ).addClass( 'wcf-current-step' ); next_step_element.text( cfp_blocks_info.multistep_buttons_strings.billing ); } function show_shipping_step() { const next_step_element = $( '.wcf-multistep-nav-next-btn' ), previous_step_element = $( '.wcf-multistep-nav-back-btn' ); if ( 'billing' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-billing' ); } if ( 'payment' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-payment' ); } $( '.wcf-embed-checkout-form' ).addClass( 'wcf-shipping' ); next_step_element.attr( 'data-target', 'payment' ); previous_step_element.attr( 'data-target', 'billing' ); $( '.wcf-checkout-breadcrumb.shipping-step a' ).addClass( 'wcf-current-step' ); next_step_element.text( cfp_blocks_info.multistep_buttons_strings.shipping ); } function show_payment_step() { const previous_step_element = $( '.wcf-multistep-nav-back-btn' ); if ( 'shipping' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-shipping' ); } if ( 'billing' === previous_step ) { $( '.wcf-embed-checkout-form' ).removeClass( 'wcf-billing' ); } previous_step_element.attr( 'data-target', 'shipping' ); $( '.wcf-embed-checkout-form' ).addClass( 'wcf-payment' ); $( '.wcf-checkout-breadcrumb.payment-step a' ).addClass( 'wcf-current-step' ); } function remove_current_step_class() { if ( $( '.wcf-current-step' ).length ) { $( '.wcf-current-step' ).removeClass( 'wcf-current-step' ); } } const wcf_multistep_field_validations = function () { //Add focus class on clicked on input types let access = true, field_focus = ''; if ( 'billing' === current_step ) { const $billing_inputs = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-account-fields' ).find( 'input[type="text"], input[type="tel"], input[type="email"], input[type="password"]' ); const $billing_chekboxes = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields, .wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-account-fields' ).find( 'input[type="checkbox"]' ); const $billing_select = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-billing-fields' ).find( '.select2' ); Array.from( $billing_inputs ).forEach( function ( $this ) { const type = $this.type, name = $this.name, field_row = $this.closest( '.form-row' ), field_value = $.trim( $this.value ); let has_class = field_row.classList.contains( 'validate-required' ); // whiteSpace = /\s/g.test(field_value); if ( name === 'account_password' || name === 'account_username' ) { const create_acc_checkbox = document.getElementById( 'createaccount' ); if ( create_acc_checkbox ) { if ( $( create_acc_checkbox ).is( ':checked' ) ) { has_class = true; } else { has_class = false; } } else { has_class = true; } } if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { if ( 'email' === type && false === /^([a-zA-Z0-9_\+\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,14})$/.test( field_value ) ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } $this.classList.remove( 'field-required' ); } } ); Array.from( $billing_chekboxes ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ); let field_value = false; if ( $( $this ).is( ':checked' ) ) { field_value = true; } if ( has_class && false === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); Array.from( $billing_select ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( field_row.querySelector( '.select2-selection__rendered[title]' ) ); //Need to update naming convention. name = field_row.querySelector( 'select' ).name; //eslint-disable-line if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); } if ( 'shipping' === current_step ) { const $shipping_inputs = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields' ).find( 'input[type="text"], input[type="tel"], input[type="email"], input[type="password"]' ); const $shipping_chekboxes = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper' ).find( 'input[type="checkbox"]' ); const $shipping_select = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout .woocommerce-shipping-fields' ).find( '.select2' ); const is_ship_to_diff = $( '.wcf-embed-checkout-form-modern-checkout.wcf-modern-skin-multistep form.woocommerce-checkout' ) .find( 'h3#ship-to-different-address input[type="checkbox"]:checked' ) .val(); if ( '1' === is_ship_to_diff ) { Array.from( $shipping_inputs ).forEach( function ( $this ) { const type = $this.type, field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( $this.value ); if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { if ( 'email' === type && false === /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test( field_value ) ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } $this.classList.remove( 'field-required' ); } } ); Array.from( $shipping_select ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ), field_value = $.trim( field_row.querySelector( '.select2-selection__rendered[title]' ) ); //Need to update naming convention. name = field_row.querySelector( 'select' ).name; //eslint-disable-line if ( has_class && '' === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); Array.from( $shipping_chekboxes ).forEach( function ( $this ) { const field_row = $this.closest( '.form-row' ), has_class = field_row.classList.contains( 'validate-required' ); let field_value = false; if ( $( $this ).is( ':checked' ) ) { field_value = true; } if ( has_class && false === field_value ) { $this.classList.add( 'field-required' ); access = false; if ( '' === field_focus ) { field_focus = $this; } } else { $this.classList.remove( 'field-required' ); } } ); } } // Focus the errored field if ( '' !== field_focus ) { field_focus.focus(); } return access; }; }; $( function () { multistep_checkout_buttons_navigation(); } ); } )( jQuery ); modules/gutenberg/build/blocks.asset.php000064400000000307147600244370014410 0ustar00 array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'c8604e3294e54d1fb6f80b562f5e937e');modules/gutenberg/build/blocks.js000064400006211321147600244370013125 0ustar00/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! \**********************************************************************/ /***/ (function(module) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ "./node_modules/@emotion/hash/dist/hash.esm.js": /*!*****************************************************!*\ !*** ./node_modules/@emotion/hash/dist/hash.esm.js ***! \*****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* eslint-disable */ // murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js function murmurhash2_32_gc(str) { var l = str.length, h = l ^ l, i = 0, k; while (l >= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); k ^= k >>> 24; k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16); h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k; l -= 4; ++i; } switch (l) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); } h ^= h >>> 13; h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16); h ^= h >>> 15; return (h >>> 0).toString(36); } /* harmony default export */ __webpack_exports__["default"] = (murmurhash2_32_gc); /***/ }), /***/ "./node_modules/@emotion/memoize/dist/memoize.esm.js": /*!***********************************************************!*\ !*** ./node_modules/@emotion/memoize/dist/memoize.esm.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function memoize(fn) { var cache = {}; return function (arg) { if (cache[arg] === undefined) cache[arg] = fn(arg); return cache[arg]; }; } /* harmony default export */ __webpack_exports__["default"] = (memoize); /***/ }), /***/ "./node_modules/@emotion/stylis/dist/stylis.esm.js": /*!*********************************************************!*\ !*** ./node_modules/@emotion/stylis/dist/stylis.esm.js ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function stylis_min (W) { function M(d, c, e, h, a) { for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) { g = e.charCodeAt(l); l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++); if (0 === b + n + v + m) { if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) { switch (g) { case 32: case 9: case 59: case 13: case 10: break; default: f += e.charAt(l); } g = 59; } switch (g) { case 123: f = f.trim(); q = f.charCodeAt(0); k = 1; for (t = ++l; l < B;) { switch (g = e.charCodeAt(l)) { case 123: k++; break; case 125: k--; break; case 47: switch (g = e.charCodeAt(l + 1)) { case 42: case 47: a: { for (u = l + 1; u < J; ++u) { switch (e.charCodeAt(u)) { case 47: if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) { l = u + 1; break a; } break; case 10: if (47 === g) { l = u + 1; break a; } } } l = u; } } break; case 91: g++; case 40: g++; case 34: case 39: for (; l++ < J && e.charCodeAt(l) !== g;) { } } if (0 === k) break; l++; } k = e.substring(t, l); 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0)); switch (q) { case 64: 0 < r && (f = f.replace(N, '')); g = f.charCodeAt(1); switch (g) { case 100: case 109: case 115: case 45: r = c; break; default: r = O; } k = M(c, r, k, g, a + 1); t = k.length; 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = '')); if (0 < t) switch (g) { case 115: f = f.replace(da, ea); case 100: case 109: case 45: k = f + '{' + k + '}'; break; case 107: f = f.replace(fa, '$1 $2'); k = f + '{' + k + '}'; k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k; break; default: k = f + k, 112 === h && (k = (p += k, '')); } else k = ''; break; default: k = M(c, X(c, f, I), k, h, a + 1); } F += k; k = I = r = u = q = 0; f = ''; g = e.charCodeAt(++l); break; case 125: case 59: f = (0 < r ? f.replace(N, '') : f).trim(); if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) { case 0: break; case 64: if (105 === g || 99 === g) { G += f + e.charAt(l); break; } default: 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2))); } I = r = u = q = 0; f = ''; g = e.charCodeAt(++l); } } switch (g) { case 13: case 10: 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00'); 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h); z = 1; D++; break; case 59: case 125: if (0 === b + n + v + m) { z++; break; } default: z++; y = e.charAt(l); switch (g) { case 9: case 32: if (0 === n + m + b) switch (x) { case 44: case 58: case 9: case 32: y = ''; break; default: 32 !== g && (y = ' '); } break; case 0: y = '\\0'; break; case 12: y = '\\f'; break; case 11: y = '\\v'; break; case 38: 0 === n + b + m && (r = I = 1, y = '\f' + y); break; case 108: if (0 === n + b + m + E && 0 < u) switch (l - u) { case 2: 112 === x && 58 === e.charCodeAt(l - 3) && (E = x); case 8: 111 === K && (E = K); } break; case 58: 0 === n + b + m && (u = l); break; case 44: 0 === b + v + n + m && (r = 1, y += '\r'); break; case 34: case 39: 0 === b && (n = n === g ? 0 : 0 === n ? g : n); break; case 91: 0 === n + b + v && m++; break; case 93: 0 === n + b + v && m--; break; case 41: 0 === n + b + m && v--; break; case 40: if (0 === n + b + m) { if (0 === q) switch (2 * x + 3 * K) { case 533: break; default: q = 1; } v++; } break; case 64: 0 === b + v + n + m + u + k && (k = 1); break; case 42: case 47: if (!(0 < n + m + v)) switch (b) { case 0: switch (2 * g + 3 * e.charCodeAt(l + 1)) { case 235: b = 47; break; case 220: t = l, b = 42; } break; case 42: 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0); } } 0 === b && (f += y); } K = x; x = g; l++; } t = p.length; if (0 < t) { r = c; if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F; p = r.join(',') + '{' + p + '}'; if (0 !== w * E) { 2 !== w || L(p, 2) || (E = 0); switch (E) { case 111: p = p.replace(ha, ':-moz-$1') + p; break; case 112: p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p; } E = 0; } } return G + p + F; } function X(d, c, e) { var h = c.trim().split(ia); c = h; var a = h.length, m = d.length; switch (m) { case 0: case 1: var b = 0; for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) { c[b] = Z(d, c[b], e, m).trim(); } break; default: var v = b = 0; for (c = []; b < a; ++b) { for (var n = 0; n < m; ++n) { c[v++] = Z(d[n] + ' ', h[b], e, m).trim(); } } } return c; } function Z(d, c, e) { var h = c.charCodeAt(0); 33 > h && (h = (c = c.trim()).charCodeAt(0)); switch (h) { case 38: return c.replace(F, '$1' + d.trim()); case 58: return d.trim() + c.replace(F, '$1' + d.trim()); default: if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim()); } return d + c; } function P(d, c, e, h) { var a = d + ';', m = 2 * c + 3 * e + 4 * h; if (944 === m) { d = a.indexOf(':', 9) + 1; var b = a.substring(d, a.length - 1).trim(); b = a.substring(0, d).trim() + b + ';'; return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b; } if (0 === w || 2 === w && !L(a, 1)) return a; switch (m) { case 1015: return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a; case 951: return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a; case 963: return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a; case 1009: if (100 !== a.charCodeAt(4)) break; case 969: case 942: return '-webkit-' + a + a; case 978: return '-webkit-' + a + '-moz-' + a + a; case 1019: case 983: return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a; case 883: if (45 === a.charCodeAt(8)) return '-webkit-' + a + a; if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a; break; case 932: if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) { case 103: return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a; case 115: return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a; case 98: return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a; } return '-webkit-' + a + '-ms-' + a + a; case 964: return '-webkit-' + a + '-ms-flex-' + a + a; case 1023: if (99 !== a.charCodeAt(8)) break; b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify'); return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a; case 1005: return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a; case 1e3: b = a.substring(13).trim(); c = b.indexOf('-') + 1; switch (b.charCodeAt(0) + b.charCodeAt(c)) { case 226: b = a.replace(G, 'tb'); break; case 232: b = a.replace(G, 'tb-rl'); break; case 220: b = a.replace(G, 'lr'); break; default: return a; } return '-webkit-' + a + '-ms-' + b + a; case 1017: if (-1 === a.indexOf('sticky', 9)) break; case 975: c = (a = d).length - 10; b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim(); switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) { case 203: if (111 > b.charCodeAt(8)) break; case 115: a = a.replace(b, '-webkit-' + b) + ';' + a; break; case 207: case 102: a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a; } return a + ';'; case 938: if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) { case 105: return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a; case 115: return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a; default: return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a; } break; case 973: case 989: if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break; case 931: case 953: if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a; break; case 962: if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a; } return a; } function L(d, c) { var e = d.indexOf(1 === c ? ':' : '{'), h = d.substring(0, 3 !== c ? e : 10); e = d.substring(e + 1, d.length - 1); return R(2 !== c ? h : h.replace(na, '$1'), e, c); } function ea(d, c) { var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2)); return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')'; } function H(d, c, e, h, a, m, b, v, n, q) { for (var g = 0, x = c, w; g < A; ++g) { switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) { case void 0: case !1: case !0: case null: break; default: x = w; } } if (x !== c) return x; } function T(d) { switch (d) { case void 0: case null: A = S.length = 0; break; default: switch (d.constructor) { case Array: for (var c = 0, e = d.length; c < e; ++c) { T(d[c]); } break; case Function: S[A++] = d; break; case Boolean: Y = !!d | 0; } } return T; } function U(d) { d = d.prefix; void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0); return U; } function B(d, c) { var e = d; 33 > e.charCodeAt(0) && (e = e.trim()); V = e; e = [V]; if (0 < A) { var h = H(-1, c, e, e, D, z, 0, 0, 0, 0); void 0 !== h && 'string' === typeof h && (c = h); } var a = M(O, e, c, 0, 0); 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h)); V = ''; E = 0; z = D = 1; return a; } var ca = /^\0+/g, N = /[\0\r\f]/g, aa = /: */g, ka = /zoo|gra/, ma = /([,: ])(transform)/g, ia = /,\r+?/g, F = /([\t\r\n ])*\f?&/g, fa = /@(k\w+)\s*(\S*)\s*/, Q = /::(place)/g, ha = /:(read-only)/g, G = /[svh]\w+-[tblr]{2}/, da = /\(\s*(.*)\s*\)/g, oa = /([\s\S]*?);/g, ba = /-self|flex-/g, na = /[^]*?(:[rp][el]a[\w-]+)[^]*/, la = /stretch|:\s*\w+\-(?:conte|avail)/, ja = /([^-])(image-set\()/, z = 1, D = 1, E = 0, w = 1, O = [], S = [], A = 0, R = null, Y = 0, V = ''; B.use = T; B.set = U; void 0 !== W && U(W); return B; } /* harmony default export */ __webpack_exports__["default"] = (stylis_min); /***/ }), /***/ "./node_modules/@emotion/unitless/dist/unitless.esm.js": /*!*************************************************************!*\ !*** ./node_modules/@emotion/unitless/dist/unitless.esm.js ***! \*************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var unitlessKeys = { animationIterationCount: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; /* harmony default export */ __webpack_exports__["default"] = (unitlessKeys); /***/ }), /***/ "./node_modules/@fonticonpicker/react-fonticonpicker/dist/fonticonpicker.react.js": /*!****************************************************************************************!*\ !*** ./node_modules/@fonticonpicker/react-fonticonpicker/dist/fonticonpicker.react.js ***! \****************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /*! * * React FontIconPicker * * React Component to show a picker element to pick font-icons & svg * * @author Swashata Ghosh * @version 1.2.0 * @link https://github.com/fontIconPicker/react-fonticonpicker * @license MIT * * Copyright (c) 2018 Swashata Ghosh * * This software is released under the MIT License. * https://opensource.org/licenses/MIT * */ !function(e,t){ true?module.exports=t(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"),__webpack_require__(/*! react */ "react"),__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"),__webpack_require__(/*! react-dom */ "react-dom"),__webpack_require__(/*! react-transition-group */ "./node_modules/react-transition-group/index.js")):0}(window,function(e,t,r,n,a){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:null;if(Array.isArray(e))return o(e);if(null!==t)return void 0!==e[t]?o(e[t]):[];var r=[],n=function(e){for(var t=1;tr)return!1;if(n===r)return e===t;e:for(var a=0,o=0;aa-20){var m=y.left+r.props.btnRef.current.offsetWidth-(e+d.left);m+d.left<0&&(m=10-d.left),h.style.left="".concat(m,"px")}t+s-o>l&&y.top-t>0&&("self"===r.state.appendRoot?h.style.top="-".concat(t-g,"px"):h.style.top="".concat(y.top+g-t,"px"))}}),r.state={},r.debouncedSyncPortalPosition=(0,i.debounce)(r.syncPortalPosition,250),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default.PureComponent),f(t,null,[{key:"getDerivedStateFromProps",value:function(e){var r=t.calculateAppendAndClass(e.appendRoot);return{appendRoot:r.appendRoot,portalClasses:r.portalClasses}}},{key:"calculateAppendAndClass",value:function(e){var t="self",r=(0,l.default)({"rfipdropdown--portal":!1!==e});return!1!==e&&(t=document.querySelector(e)),{portalClasses:r,appendRoot:t}}}]),f(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.debouncedSyncPortalPosition),window.addEventListener("scroll",this.debouncedSyncPortalPosition),this.syncPortalPosition()}},{key:"componentDidUpdate",value:function(){this.syncPortalPosition()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.debouncedSyncPortalPosition),window.removeEventListener("scroll",this.debouncedSyncPortalPosition)}},{key:"positionPortal",value:function(){var e=this.props.domRef.current.style.display;this.props.domRef.current.style.display="none";var t=this.props.btnRef.current,r=(0,i.getOffset)(t),n=(0,i.getOffset)(this.state.appendRoot),a=t.offsetHeight;this.props.domRef.current.style.left="".concat(r.left-n.left,"px"),this.props.domRef.current.style.top="".concat(r.top+a,"px"),this.props.domRef.current.style.display=e}},{key:"resetPortalPosition",value:function(){var e=this.props.domRef.current;"self"===this.state.appendRoot?e.style.top="":this.positionPortal()}},{key:"render",value:function(){var e=(0,l.default)(this.props.className,this.state.portalClasses),t=n.default.createElement("div",{className:e,ref:this.props.domRef},this.props.children);return"self"===this.state.appendRoot?t:(0,a.createPortal)(t,this.state.appendRoot)}}]),t}();Object.defineProperty(p,"propTypes",{configurable:!0,enumerable:!0,writable:!0,value:{appendRoot:o.default.oneOfType([o.default.bool,o.default.string]),children:o.default.node.isRequired,domRef:o.default.object.isRequired,btnRef:o.default.object.isRequired,className:o.default.string.isRequired}}),Object.defineProperty(p,"defaultProps",{configurable:!0,enumerable:!0,writable:!0,value:{appendRoot:!1}});var h=p;t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(1)),a=i(r(0)),o=i(r(3)),l=r(2);function i(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:null,a=r.props.currentPage,o=r.state.totalPage;null!==n?"next"===n?a+=1:a-=1:a=parseInt(e.target.value,10)-1,a<0&&(a=0),a>o-1&&(a=o-1),t=a+1,null===n&&Number.isNaN(a)&&(a=0,t=""),r.setState({viewPage:t}),r.props.handleChangePage(a)}}),Object.defineProperty(d(r),"handlePageKeyBoard",{configurable:!0,enumerable:!0,writable:!0,value:function(e,t){13!==e.keyCode&&32!==e.keyCode||r.handleChangePage({},t)}}),Object.defineProperty(d(r),"handleChangeValue",{configurable:!0,enumerable:!0,writable:!0,value:function(e){r.props.handleChangeValue(e)}}),Object.defineProperty(d(r),"handleValueKeyboard",{configurable:!0,enumerable:!0,writable:!0,value:function(e,t){13!==e.keyCode&&32!==e.keyCode||r.handleChangeValue(t)}}),r.state={viewPage:r.props.currentPage+1},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default.PureComponent),f(t,null,[{key:"getDerivedStateFromProps",value:function(e,r){var n=t.getCategoryFilteredState(e.currentCategory,e.categories,e.icons),a=t.getCategoryFilteredState(e.currentCategory,e.categories,null===e.search?e.icons:e.search),o=t.getActiveIcons(n,a,e.currentSearch),l=o.activeIcons,i=o.activeTitles,u=e.currentPage,c=e.iconsPerPage,s={iconView:t.getCurrentViewIcons(l,c,u),titleView:t.getCurrentViewIcons(i,c,u),totalPage:Math.ceil(l.length/c)};return""!==r.viewPage&&(s.viewPage=e.currentPage+1),s}},{key:"getActiveIcons",value:function(e,t,r){var n=c(e),a=c(t);if(""===r||null===r)return{activeIcons:n,activeTitles:a};var o=[],i=[];return n.forEach(function(e,n){(0,l.fuzzySearch)(r,t[n])&&(o.push(e),i.push(t[n]))}),{activeIcons:o,activeTitles:i}}},{key:"getCategoryFilteredState",value:function(e,t,r){var n=null,a=(0,l.getSourceType)(r);if(Array.isArray(t)){if("object"!==a)throw new l.InvalidSourceException(a,"object")}else if("array"!==a)throw new l.InvalidSourceException(a,"array");return 0!==e&&Array.isArray(t)&&(n=t[e]||null),(0,l.flattenPossiblyCategorizedSource)(r,n)}},{key:"getCurrentViewIcons",value:function(e,t,r){var n=r*t,a=(r+1)*t;return e.slice(n,a)}}]),f(t,[{key:"renderPager",value:function(){var e=this;if(this.state.totalPage<1)return null;var t=this.props.currentPage>0?n.default.createElement("span",{className:"rfipicons__left",role:"button",tabIndex:0,onKeyDown:function(t){return e.handlePageKeyBoard(t,"prev")},onClick:function(t){return e.handleChangePage(t,"prev")}},n.default.createElement("span",{role:"presentation",className:"rfipicons__label","aria-label":"Left"},n.default.createElement("i",{className:"fipicon-angle-left"}))):null,r=this.props.currentPage0?this.state.iconView.map(function(t,r){var a=(0,o.default)("rfipicons__icon",{"rfipicons__icon--selected":e.props.value===t||Array.isArray(e.props.value)&&e.props.value.includes(t)});return n.default.createElement("span",{className:a,key:t,title:e.state.titleView[r]},n.default.createElement("span",{className:"rfipicons__ibox",tabIndex:0,role:"button",onClick:function(){return e.handleChangeValue(t)},onKeyDown:function(r){return e.handleValueKeyboard(r,t)}},e.props.renderIcon(t)))}):n.default.createElement("span",{className:"rfipicons__icon--error"},n.default.createElement("span",{className:"rfipicons__ibox--error"},this.props.noIconPlaceholder))}},{key:"render",value:function(){return n.default.createElement("div",{className:"rfipicons"},this.renderPager(),n.default.createElement("div",{className:"rfipicons__selector"},this.renderIconView()))}}]),t}();Object.defineProperty(p,"propTypes",{configurable:!0,enumerable:!0,writable:!0,value:{categories:a.default.arrayOf(a.default.string),currentCategory:a.default.number,isMulti:a.default.bool.isRequired,icons:a.default.oneOfType([a.default.arrayOf(a.default.string),a.default.arrayOf(a.default.number),a.default.objectOf(a.default.oneOfType([a.default.arrayOf(a.default.number),a.default.arrayOf(a.default.string)]))]).isRequired,search:a.default.oneOfType([a.default.objectOf(a.default.arrayOf(a.default.string)),a.default.arrayOf(a.default.string)]),value:a.default.oneOfType([a.default.number,a.default.string,a.default.arrayOf(a.default.oneOfType([a.default.number,a.default.string]))]).isRequired,currentSearch:a.default.string.isRequired,handleChangeValue:a.default.func.isRequired,currentPage:a.default.number.isRequired,iconsPerPage:a.default.number.isRequired,handleChangePage:a.default.func.isRequired,renderIcon:a.default.func.isRequired,noIconPlaceholder:a.default.string.isRequired}}),Object.defineProperty(p,"defaultProps",{configurable:!0,enumerable:!0,writable:!0,value:{categories:null,currentCategory:null,search:null}});var h=p;t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),a=o(r(0));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){return n.default.createElement("div",{className:"rfipsearch"},n.default.createElement("input",{type:"text",className:"rfipsearch__input",value:e.value,onChange:e.handleSearch,placeholder:e.placeholder}))};l.propTypes={handleSearch:a.default.func.isRequired,value:a.default.string.isRequired,placeholder:a.default.string.isRequired};var i=l;t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),a=o(r(0));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],a={isOpen:e};return a.elemClass=t.getDerivedClassName("rfip",r.props.theme,r.props.isMulti,e),a.btnClass=t.getDerivedClassName("rfipbtn",r.props.theme,r.props.isMulti,e),a.ddClass=t.getDerivedClassName("rfipdropdown",r.props.theme,r.props.isMulti,e),n&&r.setState(a),a}}),Object.defineProperty(g(r),"handleChangeValue",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var t;r.props.isMulti?(t=p(r.state.value)).includes(e)?(t=t.filter(function(t){return t!==e})).length||(t=m):t.push(e):t=e===r.state.value?v:e,r.setState({value:t,isOpen:!r.props.closeOnSelect}),r.props.onChange(t)}}),Object.defineProperty(g(r),"handleDeleteValue",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var n;n=r.props.isMulti?r.state.value.filter(function(t){return t!==e}):t.getDerivedValue(n,r.props.isMulti),r.setState({value:n}),r.props.onChange(n)}}),Object.defineProperty(g(r),"handleChangePage",{configurable:!0,enumerable:!0,writable:!0,value:function(e){r.setState({currentPage:e})}}),Object.defineProperty(g(r),"handleChangeCategory",{configurable:!0,enumerable:!0,writable:!0,value:function(e){r.setState({currentCategory:e,currentPage:0})}}),Object.defineProperty(g(r),"handleChangeSearch",{configurable:!0,enumerable:!0,writable:!0,value:function(e){r.setState({currentSearch:e,currentPage:0})}}),Object.defineProperty(g(r),"resetPortalStyle",{configurable:!0,enumerable:!0,writable:!0,value:function(e){["maxHeight","paddingTop","paddingBottom"].forEach(function(t){e.style[t]=null})}}),Object.defineProperty(g(r),"handlePortalEnter",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var t=e.childNodes[0];r.resetPortalStyle(t);var n=getComputedStyle(t);r.fipPortalComputedStyle={height:n.height,paddingTop:n.paddingTop,paddingBottom:n.paddingBottom},["maxHeight","paddingTop","paddingBottom"].forEach(function(e){t.style[e]="0px"})}}),Object.defineProperty(g(r),"handlePortalEntering",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var t=e.childNodes[0];t.style.maxHeight=r.fipPortalComputedStyle.height,t.style.paddingTop=r.fipPortalComputedStyle.paddingTop,t.style.paddingBottom=r.fipPortalComputedStyle.paddingBottom}}),Object.defineProperty(g(r),"handlePortalEntered",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var t=e.childNodes[0];r.resetPortalStyle(t),r.props.showSearch&&void 0===window.orientation&&-1===navigator.userAgent.indexOf("IEMobile")&&t.querySelector(".rfipsearch__input").focus()}}),Object.defineProperty(g(r),"handlePortalExit",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var t=e.childNodes[0];r.resetPortalStyle(t);var n=getComputedStyle(t).height;t.style.maxHeight=n}}),Object.defineProperty(g(r),"handlePortalExiting",{configurable:!0,enumerable:!0,writable:!0,value:function(e){var t=e.childNodes[0];t.style.maxHeight="0px",t.style.paddingTop="0px",t.style.paddingBottom="0px"}}),Object.defineProperty(g(r),"renderIcon",{configurable:!0,enumerable:!0,writable:!0,value:function(e){if("function"==typeof r.props.renderFunc)return r.props.renderFunc(e);if("class"===r.props.renderUsing)return n.default.createElement("i",{className:e});var t=h({},r.props.renderUsing,r.props.convertHex?(0,s.convertToHex)(e):e);return n.default.createElement("i",t)}}),r.fipButtonRef=n.default.createRef(),r.fipDropDownRef=n.default.createRef(),r.state={currentCategory:0,currentPage:0,isOpen:!1,currentSearch:""},r.fipPortalComputedStyle=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n.default.PureComponent),b(t,null,[{key:"getDerivedStateFromProps",value:function(e,r){var n={};return n.elemClass=t.getDerivedClassName("rfip",e.theme,e.isMulti,r.isOpen),n.btnClass=t.getDerivedClassName("rfipbtn",e.theme,e.isMulti,r.isOpen),n.ddClass=t.getDerivedClassName("rfipdropdown",e.theme,e.isMulti,r.isOpen),n.value=t.getDerivedValue(e.value,e.isMulti),e.showCategory||(n.currentCategory=0,n.currentPage=0),e.showSearch||(n.currentSearch="",n.currentPage=0),n}},{key:"getDerivedClassName",value:function(e,t,r,n){return(0,o.default)(e,"".concat(e,"--").concat(t),h({},"".concat(e,"--multi"),r),"".concat(e,"--").concat(n?"open":"close"))}},{key:"getDerivedValue",value:function(e,t){var r=e;return t?r=Array.isArray(e)?p(e):m:"number"!=typeof e&&"string"!=typeof e&&(r=v),r}}]),b(t,[{key:"componentDidMount",value:function(){var e=this;["click"].forEach(function(t){document.addEventListener(t,e.handleOuterClick,!1)}),document.addEventListener("keydown",this.handleEscapeKeyboard,!1),this.props.onChange(this.state.value)}},{key:"componentWillUnmount",value:function(){var e=this;["click"].forEach(function(t){document.removeEventListener(t,e.handleOuterClick,!1)}),document.removeEventListener("keydown",this.handleEscapeKeyboard,!1)}},{key:"render",value:function(){var e={currentCategory:this.state.currentCategory,currentPage:this.state.currentPage,currentSearch:this.state.currentSearch,value:this.state.value,isMulti:this.props.isMulti,icons:this.props.icons,search:this.props.search,showCategory:this.props.showCategory,showSearch:this.props.showSearch,iconsPerPage:this.props.iconsPerPage,allCatPlaceholder:this.props.allCatPlaceholder,searchPlaceholder:this.props.searchPlaceholder,noIconPlaceholder:this.props.noIconPlaceholder,renderIcon:this.renderIcon,handleChangeValue:this.handleChangeValue,handleChangeCategory:this.handleChangeCategory,handleChangePage:this.handleChangePage,handleChangeSearch:this.handleChangeSearch};return n.default.createElement("div",{className:this.state.elemClass,ref:this.fipRef},n.default.createElement(i.default,{className:this.state.btnClass,isOpen:this.state.isOpen,onClick:this.handleToggle,domRef:this.fipButtonRef,isMulti:this.props.isMulti,value:this.state.value,renderIcon:this.renderIcon,handleDeleteValue:this.handleDeleteValue,noSelectedPlaceholder:this.props.noSelectedPlaceholder}),n.default.createElement(l.CSSTransition,{classNames:"fipappear",timeout:300,in:this.state.isOpen,unmountOnExit:!0,onEnter:this.handlePortalEnter,onEntering:this.handlePortalEntering,onEntered:this.handlePortalEntered,onExit:this.handlePortalExit,onExiting:this.handlePortalExiting},n.default.createElement(c.default,{appendRoot:this.props.appendTo,domRef:this.fipDropDownRef,btnRef:this.fipButtonRef,className:this.state.ddClass},n.default.createElement(u.default,e))))}}]),t}();Object.defineProperty(P,"propTypes",{configurable:!0,enumerable:!0,writable:!0,value:{icons:a.default.oneOfType([a.default.arrayOf(a.default.string),a.default.arrayOf(a.default.number),a.default.objectOf(a.default.oneOfType([a.default.arrayOf(a.default.number),a.default.arrayOf(a.default.string)]))]).isRequired,search:a.default.oneOfType([a.default.objectOf(a.default.arrayOf(a.default.string)),a.default.arrayOf(a.default.string)]),iconsPerPage:a.default.number,theme:a.default.string,onChange:a.default.func.isRequired,showCategory:a.default.bool,showSearch:a.default.bool,value:a.default.oneOfType([a.default.arrayOf(a.default.string),a.default.arrayOf(a.default.number),a.default.number,a.default.string]),isMulti:a.default.bool,renderUsing:a.default.string,convertHex:a.default.bool,renderFunc:a.default.func,appendTo:a.default.oneOfType([a.default.bool,a.default.string]),allCatPlaceholder:a.default.string,searchPlaceholder:a.default.string,noIconPlaceholder:a.default.string,noSelectedPlaceholder:a.default.string,closeOnSelect:a.default.bool}}),Object.defineProperty(P,"defaultProps",{configurable:!0,enumerable:!0,writable:!0,value:{search:null,iconsPerPage:20,theme:"default",showCategory:!0,showSearch:!0,value:null,isMulti:!1,renderUsing:"class",convertHex:!0,renderFunc:null,appendTo:!1,allCatPlaceholder:"Show from all",searchPlaceholder:"Search Icons",noIconPlaceholder:"No icons found",noSelectedPlaceholder:"Select icon",closeOnSelect:!1}}),Object.defineProperty(P,"displayName",{configurable:!0,enumerable:!0,writable:!0,value:"FontIconPicker"});var O=P;t.default=O},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=((n=r(14))&&n.__esModule?n:{default:n}).default;t.default=a}]).default}); //# sourceMappingURL=fonticonpicker.react.js.map /***/ }), /***/ "./node_modules/classnames/index.js": /*!******************************************!*\ !*** ./node_modules/classnames/index.js ***! \******************************************/ /***/ (function(module, exports) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString === Object.prototype.toString) { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } else { classes.push(arg.toString()); } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ "./node_modules/create-emotion/dist/index.esm.js": /*!*******************************************************!*\ !*** ./node_modules/create-emotion/dist/index.esm.js ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/memoize.esm.js"); /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.esm.js"); /* harmony import */ var _emotion_hash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/hash */ "./node_modules/@emotion/hash/dist/hash.esm.js"); /* harmony import */ var _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/stylis */ "./node_modules/@emotion/stylis/dist/stylis.esm.js"); /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js"); /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4__); var hyphenateRegex = /[A-Z]|^ms/g; var processStyleName = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (styleName) { return styleName.replace(hyphenateRegex, '-$&').toLowerCase(); }); var processStyleValue = function processStyleValue(key, value) { if (value == null || typeof value === 'boolean') { return ''; } if (_emotion_unitless__WEBPACK_IMPORTED_MODULE_1__["default"][key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties !isNaN(value) && value !== 0) { return value + 'px'; } return value; }; if (true) { var contentValuePattern = /(attr|calc|counters?|url)\(/; var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset']; var oldProcessStyleValue = processStyleValue; processStyleValue = function processStyleValue(key, value) { if (key === 'content') { if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) { console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`"); } } return oldProcessStyleValue(key, value); }; } var classnames = function classnames(args) { var len = args.length; var i = 0; var cls = ''; for (; i < len; i++) { var arg = args[i]; if (arg == null) continue; var toAdd = void 0; switch (typeof arg) { case 'boolean': break; case 'function': if (true) { console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\n' + 'Please call the function before passing it to cx.'); } toAdd = classnames([arg()]); break; case 'object': { if (Array.isArray(arg)) { toAdd = classnames(arg); } else { toAdd = ''; for (var k in arg) { if (arg[k] && k) { toAdd && (toAdd += ' '); toAdd += k; } } } break; } default: { toAdd = arg; } } if (toAdd) { cls && (cls += ' '); cls += toAdd; } } return cls; }; var isBrowser = typeof document !== 'undefined'; /* high performance StyleSheet for css-in-js systems - uses multiple style tags behind the scenes for millions of rules - uses `insertRule` for appending in production for *much* faster performance - 'polyfills' on server side // usage import StyleSheet from 'glamor/lib/sheet' let styleSheet = new StyleSheet() styleSheet.inject() - 'injects' the stylesheet into the page (or into memory if on server) styleSheet.insert('#box { border: 1px solid red; }') - appends a css rule into the stylesheet styleSheet.flush() - empties the stylesheet of all its contents */ // $FlowFixMe function sheetForTag(tag) { if (tag.sheet) { // $FlowFixMe return tag.sheet; } // this weirdness brought to you by firefox for (var i = 0; i < document.styleSheets.length; i++) { if (document.styleSheets[i].ownerNode === tag) { // $FlowFixMe return document.styleSheets[i]; } } } function makeStyleTag(opts) { var tag = document.createElement('style'); tag.setAttribute('data-emotion', opts.key || ''); if (opts.nonce !== undefined) { tag.setAttribute('nonce', opts.nonce); } tag.appendChild(document.createTextNode('')) // $FlowFixMe ; (opts.container !== undefined ? opts.container : document.head).appendChild(tag); return tag; } var StyleSheet = /*#__PURE__*/ function () { function StyleSheet(options) { this.isSpeedy = "development" === 'production'; // the big drawback here is that the css won't be editable in devtools this.tags = []; this.ctr = 0; this.opts = options; } var _proto = StyleSheet.prototype; _proto.inject = function inject() { if (this.injected) { throw new Error('already injected!'); } this.tags[0] = makeStyleTag(this.opts); this.injected = true; }; _proto.speedy = function speedy(bool) { if (this.ctr !== 0) { // cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool}) throw new Error("cannot change speedy now"); } this.isSpeedy = !!bool; }; _proto.insert = function insert(rule, sourceMap) { // this is the ultrafast version, works across browsers if (this.isSpeedy) { var tag = this.tags[this.tags.length - 1]; var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { if (true) { console.warn('illegal rule', rule); // eslint-disable-line no-console } } } else { var _tag = makeStyleTag(this.opts); this.tags.push(_tag); _tag.appendChild(document.createTextNode(rule + (sourceMap || ''))); } this.ctr++; if (this.ctr % 65000 === 0) { this.tags.push(makeStyleTag(this.opts)); } }; _proto.flush = function flush() { // $FlowFixMe this.tags.forEach(function (tag) { return tag.parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; // todo - look for remnants in document.styleSheets this.injected = false; }; return StyleSheet; }(); function createEmotion(context, options) { if (context.__SECRET_EMOTION__ !== undefined) { return context.__SECRET_EMOTION__; } if (options === undefined) options = {}; var key = options.key || 'css'; if (true) { if (/[^a-z-]/.test(key)) { throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed"); } } var current; function insertRule(rule) { current += rule; if (isBrowser) { sheet.insert(rule, currentSourceMap); } } var insertionPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_4___default()(insertRule); var stylisOptions; if (options.prefix !== undefined) { stylisOptions = { prefix: options.prefix }; } var caches = { registered: {}, inserted: {}, nonce: options.nonce, key: key }; var sheet = new StyleSheet(options); if (isBrowser) { // 🚀 sheet.inject(); } var stylis = new _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__["default"](stylisOptions); stylis.use(options.stylisPlugins)(insertionPlugin); var currentSourceMap = ''; function handleInterpolation(interpolation, couldBeSelectorInterpolation) { if (interpolation == null) { return ''; } switch (typeof interpolation) { case 'boolean': return ''; case 'function': if (interpolation.__emotion_styles !== undefined) { var selector = interpolation.toString(); if (selector === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') { throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.'); } return selector; } if (this === undefined && "development" !== 'production') { console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`"); } return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation); case 'object': return createStringFromObject.call(this, interpolation); default: var cached = caches.registered[interpolation]; return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation; } } var objectToStringCache = new WeakMap(); function createStringFromObject(obj) { if (objectToStringCache.has(obj)) { // $FlowFixMe return objectToStringCache.get(obj); } var string = ''; if (Array.isArray(obj)) { obj.forEach(function (interpolation) { string += handleInterpolation.call(this, interpolation, false); }, this); } else { Object.keys(obj).forEach(function (key) { if (typeof obj[key] !== 'object') { if (caches.registered[obj[key]] !== undefined) { string += key + "{" + caches.registered[obj[key]] + "}"; } else { string += processStyleName(key) + ":" + processStyleValue(key, obj[key]) + ";"; } } else { if (key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') { throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.'); } if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) { obj[key].forEach(function (value) { string += processStyleName(key) + ":" + processStyleValue(key, value) + ";"; }); } else { string += key + "{" + handleInterpolation.call(this, obj[key], false) + "}"; } } }, this); } objectToStringCache.set(obj, string); return string; } var name; var stylesWithLabel; var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g; var createClassName = function createClassName(styles, identifierName) { return (0,_emotion_hash__WEBPACK_IMPORTED_MODULE_2__["default"])(styles + identifierName) + identifierName; }; if (true) { var oldCreateClassName = createClassName; var sourceMappingUrlPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g; createClassName = function createClassName(styles, identifierName) { return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) { currentSourceMap = sourceMap; return ''; }), identifierName); }; } var createStyles = function createStyles(strings) { var stringMode = true; var styles = ''; var identifierName = ''; if (strings == null || strings.raw === undefined) { stringMode = false; styles += handleInterpolation.call(this, strings, false); } else { styles += strings[0]; } for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { interpolations[_key - 1] = arguments[_key]; } interpolations.forEach(function (interpolation, i) { styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // . ); if (stringMode === true && strings[i + 1] !== undefined) { styles += strings[i + 1]; } }, this); stylesWithLabel = styles; styles = styles.replace(labelPattern, function (match, p1) { identifierName += "-" + p1; return ''; }); name = createClassName(styles, identifierName); return styles; }; if (true) { var oldStylis = stylis; stylis = function stylis(selector, styles) { oldStylis(selector, styles); currentSourceMap = ''; }; } function insert(scope, styles) { if (caches.inserted[name] === undefined) { current = ''; stylis(scope, styles); caches.inserted[name] = current; } } var css = function css() { var styles = createStyles.apply(this, arguments); var selector = key + "-" + name; if (caches.registered[selector] === undefined) { caches.registered[selector] = stylesWithLabel; } insert("." + selector, styles); return selector; }; var keyframes = function keyframes() { var styles = createStyles.apply(this, arguments); var animation = "animation-" + name; insert('', "@keyframes " + animation + "{" + styles + "}"); return animation; }; var injectGlobal = function injectGlobal() { var styles = createStyles.apply(this, arguments); insert('', styles); }; function getRegisteredStyles(registeredStyles, classNames) { var rawClassName = ''; classNames.split(' ').forEach(function (className) { if (caches.registered[className] !== undefined) { registeredStyles.push(className); } else { rawClassName += className + " "; } }); return rawClassName; } function merge(className, sourceMap) { var registeredStyles = []; var rawClassName = getRegisteredStyles(registeredStyles, className); if (registeredStyles.length < 2) { return className; } return rawClassName + css(registeredStyles, sourceMap); } function cx() { for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { classNames[_key2] = arguments[_key2]; } return merge(classnames(classNames)); } function hydrateSingleId(id) { caches.inserted[id] = true; } function hydrate(ids) { ids.forEach(hydrateSingleId); } function flush() { if (isBrowser) { sheet.flush(); sheet.inject(); } caches.inserted = {}; caches.registered = {}; } if (isBrowser) { var chunks = document.querySelectorAll("[data-emotion-" + key + "]"); Array.prototype.forEach.call(chunks, function (node) { // $FlowFixMe sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe node.getAttribute("data-emotion-" + key).split(' ').forEach(hydrateSingleId); }); } var emotion = { flush: flush, hydrate: hydrate, cx: cx, merge: merge, getRegisteredStyles: getRegisteredStyles, injectGlobal: injectGlobal, keyframes: keyframes, css: css, sheet: sheet, caches: caches }; context.__SECRET_EMOTION__ = emotion; return emotion; } /* harmony default export */ __webpack_exports__["default"] = (createEmotion); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-image/editor.lazy.scss": /*!****************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-image/editor.lazy.scss ***! \****************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-product-image .flex-control-thumbs {\n margin-left: unset;\n margin-right: unset;\n margin-bottom: unset;\n padding-left: unset;\n margin-top: 15px; }\n", "",{"version":3,"sources":["webpack://./src/blocks/offer-product-image/editor.lazy.scss"],"names":[],"mappings":"AAAA;;;;EAIE;AACF;EACE,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,mBAAmB;EACnB,gBAAgB,EAAE","sourcesContent":["/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-product-image .flex-control-thumbs {\n margin-left: unset;\n margin-right: unset;\n margin-bottom: unset;\n padding-left: unset;\n margin-top: 15px; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-price/editor.lazy.scss": /*!****************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-price/editor.lazy.scss ***! \****************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-product-price .wpcfp__offer-product-price .wcf-offer-price .wcf-offer-price-inner {\n display: block !important; }\n", "",{"version":3,"sources":["webpack://./src/blocks/offer-product-price/editor.lazy.scss"],"names":[],"mappings":"AAAA;;;;EAIE;AACF;EACE,yBAAyB,EAAE","sourcesContent":["/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-product-price .wpcfp__offer-product-price .wcf-offer-price .wcf-offer-price-inner {\n display: block !important; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-variation/editor.lazy.scss": /*!********************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-variation/editor.lazy.scss ***! \********************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-product-variation .wpcfp__offer-product-variation table,\n.wp-block-wcfpb-offer-product-variation .wpcfp__offer-product-variation td {\n border: unset; }\n", "",{"version":3,"sources":["webpack://./src/blocks/offer-product-variation/editor.lazy.scss"],"names":[],"mappings":"AAAA;;;;EAIE;AACF;;EAEE,aAAa,EAAE","sourcesContent":["/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-product-variation .wpcfp__offer-product-variation table,\n.wp-block-wcfpb-offer-product-variation .wpcfp__offer-product-variation td {\n border: unset; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-yes-no-button/editor.lazy.scss": /*!****************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-yes-no-button/editor.lazy.scss ***! \****************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-yes-no-button .wpcfp__offer-yes-no-button-icon svg {\n width: 20px;\n height: 20px; }\n", "",{"version":3,"sources":["webpack://./src/blocks/offer-yes-no-button/editor.lazy.scss"],"names":[],"mappings":"AAAA;;;;EAIE;AACF;EACE,WAAW;EACX,YAAY,EAAE","sourcesContent":["/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-yes-no-button .wpcfp__offer-yes-no-button-icon svg {\n width: 20px;\n height: 20px; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-yes-no-link/editor.lazy.scss": /*!**************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-yes-no-link/editor.lazy.scss ***! \**************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-yes-no-link .wpcfp__offer-yes-no-link-icon svg {\n width: 20px;\n height: 20px; }\n", "",{"version":3,"sources":["webpack://./src/blocks/offer-yes-no-link/editor.lazy.scss"],"names":[],"mappings":"AAAA;;;;EAIE;AACF;EACE,WAAW;EACX,YAAY,EAAE","sourcesContent":["/**\n * #.# Styles\n *\n * CSS for Backend.\n */\n.wp-block-wcfpb-offer-yes-no-link .wpcfp__offer-yes-no-link-icon svg {\n width: 20px;\n height: 20px; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/pro-checkout-form/editor.lazy.scss": /*!**************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/pro-checkout-form/editor.lazy.scss ***! \**************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, ".cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .wcf-hide-field label,\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .wcf-hide-field span {\n display: block !important; }\n\n.form-row label {\n display: inline-block !important; }\n\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .wcf-hide-field {\n -webkit-box-align: unset;\n -webkit-align-items: unset;\n -moz-box-align: unset;\n -ms-flex-align: unset;\n align-items: unset;\n font-size: 13px; }\n\np#order_comments_field {\n -js-display: unset !important;\n display: unset !important;\n display: unset !important;\n display: unset !important;\n display: unset !important;\n display: unset !important; }\n\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .woocommerce-additional-fields > h3 {\n margin: 0; }\n\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper {\n margin: 0;\n box-sizing: inherit; }\n\nbody .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info {\n display: table-cell; }\n\nbody .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content {\n display: block; }\n\n.woocommerce img,\n.woocommerce-page img {\n height: auto;\n max-width: 100%; }\n\n.wp-block-wcfb-checkout-form .wcf-embed-checkout-form-two-column .woocommerce .wcf-product-option-wrap.wcf-product-option-before-order,\n.wp-block-wcfb-checkout-form .wcf-embed-checkout-form-one-column .woocommerce .col2-set,\n.wp-block-wcfb-checkout-form .wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set {\n width: 100%; }\n\n.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection {\n padding: 0; }\n", "",{"version":3,"sources":["webpack://./src/blocks/pro-checkout-form/editor.lazy.scss"],"names":[],"mappings":"AAAA;;EAEE,yBAAyB,EAAE;;AAE7B;EACE,gCAAgC,EAAE;;AAEpC;EACE,wBAAwB;EACxB,0BAA0B;EAC1B,qBAAqB;EACrB,qBAAqB;EACrB,kBAAkB;EAClB,eAAe,EAAE;;AAEnB;EACE,6BAA6B;EAC7B,yBAAyB;EACzB,yBAAyB;EACzB,yBAAyB;EACzB,yBAAyB;EACzB,yBAAyB,EAAE;;AAE7B;EACE,SAAS,EAAE;;AAEb;;EAEE,SAAS;EACT,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB,EAAE;;AAEvB;EACE,cAAc,EAAE;;AAElB;;EAEE,YAAY;EACZ,eAAe,EAAE;;AAEnB;;;EAGE,WAAW,EAAE;;AAEf;EACE,UAAU,EAAE","sourcesContent":[".cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .wcf-hide-field label,\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .wcf-hide-field span {\n display: block !important; }\n\n.form-row label {\n display: inline-block !important; }\n\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .wcf-hide-field {\n -webkit-box-align: unset;\n -webkit-align-items: unset;\n -moz-box-align: unset;\n -ms-flex-align: unset;\n align-items: unset;\n font-size: 13px; }\n\np#order_comments_field {\n -js-display: unset !important;\n display: unset !important;\n display: unset !important;\n display: unset !important;\n display: unset !important;\n display: unset !important; }\n\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .woocommerce-additional-fields > h3 {\n margin: 0; }\n\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .woocommerce-checkout .col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper,\n.cartflows-gutenberg__checkout-form .wcf-embed-checkout-form .woocommerce-checkout .wcf-col2-set .woocommerce-additional-fields .woocommerce-additional-fields__field-wrapper {\n margin: 0;\n box-sizing: inherit; }\n\nbody .wcf-pre-checkout-offer-wrapper .wcf-pre-checkout-info {\n display: table-cell; }\n\nbody .wcf-pre-checkout-offer-wrapper #wcf-pre-checkout-offer-content {\n display: block; }\n\n.woocommerce img,\n.woocommerce-page img {\n height: auto;\n max-width: 100%; }\n\n.wp-block-wcfb-checkout-form .wcf-embed-checkout-form-two-column .woocommerce .wcf-product-option-wrap.wcf-product-option-before-order,\n.wp-block-wcfb-checkout-form .wcf-embed-checkout-form-one-column .woocommerce .col2-set,\n.wp-block-wcfb-checkout-form .wcf-embed-checkout-form-two-step .woocommerce-checkout .col2-set {\n width: 100%; }\n\n.wcf-yp-skin-classic .wcf-qty-options .wcf-qty-selection {\n padding: 0; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/background/editor.lazy.scss": /*!***********************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/background/editor.lazy.scss ***! \***********************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* stylelint-disable color-hex-case, color-hex-length */\n.uag-bg-select-control .uag-background-color,\n.uag-bg-select-control .uag-background-image,\n.uag-bg-select-control .uag-background-gradient,\n.uag-bg-select-control .uag-background-opacity,\n.uag-bg-select-control .uag-background-video,\n.uag-bg-select-control .uag-background-video-overlay,\n.uag-bg-select-control .uag-background-video-opacity,\n.uag-bg-select-control .uag-background-image-position,\n.uag-bg-select-control .uag-background-image-attachment,\n.uag-bg-select-control .uag-background-image-repeat,\n.uag-bg-select-control .uag-background-image-size,\n.uag-bg-select-control .uag-background-image-overlay-type,\n.uag-bg-select-control .uag-background-image-overlay-color,\n.uag-bg-select-control .uag-background-image-overlay-gradient,\n.uag-bg-select-control .uagb-responsive-select-control {\n margin-top: 25px; }\n .uag-bg-select-control .uag-background-color .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-gradient .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-opacity .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-video .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-video-overlay .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-video-opacity .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-attachment .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-repeat .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-size .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-overlay-type .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-overlay-color .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-overlay-gradient .uagb-size-type-field-tabs,\n .uag-bg-select-control .uagb-responsive-select-control .uagb-size-type-field-tabs {\n display: flex;\n justify-content: space-between; }\n .uag-bg-select-control .uag-background-color .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-gradient .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-opacity .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-video .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-video-overlay .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-video-opacity .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-attachment .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-repeat .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-size .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-overlay-type .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-overlay-color .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-overlay-gradient .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uagb-responsive-select-control .uagb-size-type-field-tabs > .components-base-control {\n width: 45%; }\n\n.uag-bg-select-control .uag-background-image > .uagb-responsive-select-control .uagb-size-type-field-tabs {\n display: block; }\n .uag-bg-select-control .uag-background-image > .uagb-responsive-select-control .uagb-size-type-field-tabs > .components-base-control {\n width: 100%; }\n\n.uag-bg-select-control .uag-responsive-image-select.uagb-responsive-select-control .uagb-size-type-field-tabs .uagb-control__header {\n margin-bottom: 10px; }\n\n.uag-bg-select-control .uag-background-image-overlay-type .components-select-control {\n flex-direction: row;\n align-items: center; }\n .uag-bg-select-control .uag-background-image-overlay-type .components-select-control .components-input-control__container {\n width: 45%;\n flex: unset; }\n\n.uag-bg-select-control .uag-background-image-size .uagb-responsive-control-inner > .components-base-control {\n display: block;\n margin-top: 25px; }\n\n.uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs {\n flex-direction: column;\n align-items: flex-start; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .uagb-control__header {\n margin-bottom: 10px; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control {\n width: 100%; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control .components-focal-point-picker {\n border-radius: 3px;\n border-color: #E6E7E9; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control .components-focal-point-picker img {\n border-radius: 3px; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control .focal-point-picker__controls-position-unit-control {\n width: 115px; }\n", "",{"version":3,"sources":["webpack://./src/components/background/editor.lazy.scss"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;;;;;;;;;;;;;;;EAeE,gBAAgB,EAAE;EAClB;;;;;;;;;;;;;;;IAeE,aAAa;IACb,8BAA8B,EAAE;IAChC;;;;;;;;;;;;;;;MAeE,UAAU,EAAE;;AAElB;EACE,cAAc,EAAE;EAChB;IACE,WAAW,EAAE;;AAEjB;EACE,mBAAmB,EAAE;;AAEvB;EACE,mBAAmB;EACnB,mBAAmB,EAAE;EACrB;IACE,UAAU;IACV,WAAW,EAAE;;AAEjB;EACE,cAAc;EACd,gBAAgB,EAAE;;AAEpB;EACE,sBAAsB;EACtB,uBAAuB,EAAE;EACzB;IACE,mBAAmB,EAAE;EACvB;IACE,WAAW,EAAE;IACb;MACE,kBAAkB;MAClB,qBAAqB,EAAE;MACvB;QACE,kBAAkB,EAAE;IACxB;MACE,YAAY,EAAE","sourcesContent":["/* stylelint-disable color-hex-case, color-hex-length */\n.uag-bg-select-control .uag-background-color,\n.uag-bg-select-control .uag-background-image,\n.uag-bg-select-control .uag-background-gradient,\n.uag-bg-select-control .uag-background-opacity,\n.uag-bg-select-control .uag-background-video,\n.uag-bg-select-control .uag-background-video-overlay,\n.uag-bg-select-control .uag-background-video-opacity,\n.uag-bg-select-control .uag-background-image-position,\n.uag-bg-select-control .uag-background-image-attachment,\n.uag-bg-select-control .uag-background-image-repeat,\n.uag-bg-select-control .uag-background-image-size,\n.uag-bg-select-control .uag-background-image-overlay-type,\n.uag-bg-select-control .uag-background-image-overlay-color,\n.uag-bg-select-control .uag-background-image-overlay-gradient,\n.uag-bg-select-control .uagb-responsive-select-control {\n margin-top: 25px; }\n .uag-bg-select-control .uag-background-color .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-gradient .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-opacity .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-video .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-video-overlay .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-video-opacity .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-attachment .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-repeat .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-size .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-overlay-type .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-overlay-color .uagb-size-type-field-tabs,\n .uag-bg-select-control .uag-background-image-overlay-gradient .uagb-size-type-field-tabs,\n .uag-bg-select-control .uagb-responsive-select-control .uagb-size-type-field-tabs {\n display: flex;\n justify-content: space-between; }\n .uag-bg-select-control .uag-background-color .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-gradient .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-opacity .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-video .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-video-overlay .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-video-opacity .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-attachment .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-repeat .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-size .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-overlay-type .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-overlay-color .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uag-background-image-overlay-gradient .uagb-size-type-field-tabs > .components-base-control,\n .uag-bg-select-control .uagb-responsive-select-control .uagb-size-type-field-tabs > .components-base-control {\n width: 45%; }\n\n.uag-bg-select-control .uag-background-image > .uagb-responsive-select-control .uagb-size-type-field-tabs {\n display: block; }\n .uag-bg-select-control .uag-background-image > .uagb-responsive-select-control .uagb-size-type-field-tabs > .components-base-control {\n width: 100%; }\n\n.uag-bg-select-control .uag-responsive-image-select.uagb-responsive-select-control .uagb-size-type-field-tabs .uagb-control__header {\n margin-bottom: 10px; }\n\n.uag-bg-select-control .uag-background-image-overlay-type .components-select-control {\n flex-direction: row;\n align-items: center; }\n .uag-bg-select-control .uag-background-image-overlay-type .components-select-control .components-input-control__container {\n width: 45%;\n flex: unset; }\n\n.uag-bg-select-control .uag-background-image-size .uagb-responsive-control-inner > .components-base-control {\n display: block;\n margin-top: 25px; }\n\n.uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs {\n flex-direction: column;\n align-items: flex-start; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .uagb-control__header {\n margin-bottom: 10px; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control {\n width: 100%; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control .components-focal-point-picker {\n border-radius: 3px;\n border-color: #E6E7E9; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control .components-focal-point-picker img {\n border-radius: 3px; }\n .uag-bg-select-control .uag-background-image-position .uagb-size-type-field-tabs .components-focal-point-picker-control .focal-point-picker__controls-position-unit-control {\n width: 115px; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/color-control/editor.lazy.scss": /*!**************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/color-control/editor.lazy.scss ***! \**************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-advanced-color-settings-container {\n display: flex;\n align-items: center; }\n .uagb-advanced-color-settings-container .uagb-beside-color-click {\n display: flex;\n align-items: center; }\n .uagb-advanced-color-settings-container .uagb-color-icon-indicate {\n height: auto;\n position: relative;\n transform: scale(1);\n transition: transform 0.1s ease;\n border-radius: 50%;\n padding: 0; }\n .uagb-advanced-color-settings-container .uagb-has-alpha {\n background-image: linear-gradient(45deg, #ddd 25%, transparent 0), linear-gradient(-45deg, #ddd 25%, transparent 0), linear-gradient(45deg, transparent 75%, #ddd 0), linear-gradient(-45deg, transparent 75%, #ddd 0);\n background-size: 10px 10px;\n background-position: 0 0, 0 5px, 5px -5px, -5px 0; }\n .uagb-advanced-color-settings-container .uagb-beside-color-label {\n flex-grow: 1;\n margin: 0; }\n .uagb-advanced-color-settings-container .uagb-color-icon-indicate\n.component-color-indicator.uagb-advanced-color-indicate {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n margin: 0; }\n .uagb-advanced-color-settings-container .uagb-advanced-color-indicate.uag-global-indicator::before {\n content: \"\\f11f\";\n font-family: dashicons;\n position: absolute;\n font-size: 16px;\n top: 6px;\n left: 7px; }\n .uagb-advanced-color-settings-container .uag-global-icon-black::before {\n color: #000; }\n .uagb-advanced-color-settings-container .uag-global-icon-white::before {\n color: #fff; }\n\n.uagb-popover-color .components-popover__content {\n overflow-x: hidden;\n overflow-y: auto; }\n\n.uagb-popover-color .components-circular-option-picker {\n padding: 2px 0 10px 5px; }\n .uagb-popover-color .components-circular-option-picker .components-circular-option-picker__swatches {\n margin-right: 0;\n text-align: left;\n padding-left: 10px; }\n\n.uagb-popover-color .uagb-clear-btn-inside-picker {\n margin: 5px 20px 20px 15px;\n padding: 0 8px;\n border: 1px solid #ccc;\n box-shadow: none; }\n", "",{"version":3,"sources":["webpack://./src/components/color-control/editor.lazy.scss"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;EACE,aAAa;EACb,mBAAmB,EAAE;EACrB;IACE,aAAa;IACb,mBAAmB,EAAE;EACvB;IACE,YAAY;IACZ,kBAAkB;IAClB,mBAAmB;IACnB,+BAA+B;IAC/B,kBAAkB;IAClB,UAAU,EAAE;EACd;IACE,sNAAsN;IACtN,0BAA0B;IAC1B,iDAAiD,EAAE;EACrD;IACE,YAAY;IACZ,SAAS,EAAE;EACb;;IAEE,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,SAAS,EAAE;EACb;IACE,gBAAgB;IAChB,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,QAAQ;IACR,SAAS,EAAE;EACb;IACE,WAAW,EAAE;EACf;IACE,WAAW,EAAE;;AAEjB;EACE,kBAAkB;EAClB,gBAAgB,EAAE;;AAEpB;EACE,uBAAuB,EAAE;EACzB;IACE,eAAe;IACf,gBAAgB;IAChB,kBAAkB,EAAE;;AAExB;EACE,0BAA0B;EAC1B,cAAc;EACd,sBAAsB;EACtB,gBAAgB,EAAE","sourcesContent":["/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-advanced-color-settings-container {\n display: flex;\n align-items: center; }\n .uagb-advanced-color-settings-container .uagb-beside-color-click {\n display: flex;\n align-items: center; }\n .uagb-advanced-color-settings-container .uagb-color-icon-indicate {\n height: auto;\n position: relative;\n transform: scale(1);\n transition: transform 0.1s ease;\n border-radius: 50%;\n padding: 0; }\n .uagb-advanced-color-settings-container .uagb-has-alpha {\n background-image: linear-gradient(45deg, #ddd 25%, transparent 0), linear-gradient(-45deg, #ddd 25%, transparent 0), linear-gradient(45deg, transparent 75%, #ddd 0), linear-gradient(-45deg, transparent 75%, #ddd 0);\n background-size: 10px 10px;\n background-position: 0 0, 0 5px, 5px -5px, -5px 0; }\n .uagb-advanced-color-settings-container .uagb-beside-color-label {\n flex-grow: 1;\n margin: 0; }\n .uagb-advanced-color-settings-container .uagb-color-icon-indicate\n.component-color-indicator.uagb-advanced-color-indicate {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n margin: 0; }\n .uagb-advanced-color-settings-container .uagb-advanced-color-indicate.uag-global-indicator::before {\n content: \"\\f11f\";\n font-family: dashicons;\n position: absolute;\n font-size: 16px;\n top: 6px;\n left: 7px; }\n .uagb-advanced-color-settings-container .uag-global-icon-black::before {\n color: #000; }\n .uagb-advanced-color-settings-container .uag-global-icon-white::before {\n color: #fff; }\n\n.uagb-popover-color .components-popover__content {\n overflow-x: hidden;\n overflow-y: auto; }\n\n.uagb-popover-color .components-circular-option-picker {\n padding: 2px 0 10px 5px; }\n .uagb-popover-color .components-circular-option-picker .components-circular-option-picker__swatches {\n margin-right: 0;\n text-align: left;\n padding-left: 10px; }\n\n.uagb-popover-color .uagb-clear-btn-inside-picker {\n margin: 5px 20px 20px 15px;\n padding: 0 8px;\n border: 1px solid #ccc;\n box-shadow: none; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/gradient-settings/editor.lazy.scss": /*!******************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/gradient-settings/editor.lazy.scss ***! \******************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, ".uagb-gradient-picker .components-custom-gradient-picker__gradient-bar {\n border-radius: 5px;\n height: 30px; }\n .uagb-gradient-picker .components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button {\n top: 9px;\n width: 12px;\n height: 12px; }\n .uagb-gradient-picker .components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point {\n top: 7px; }\n", "",{"version":3,"sources":["webpack://./src/components/gradient-settings/editor.lazy.scss"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,YAAY,EAAE;EACd;IACE,QAAQ;IACR,WAAW;IACX,YAAY,EAAE;EAChB;IACE,QAAQ,EAAE","sourcesContent":[".uagb-gradient-picker .components-custom-gradient-picker__gradient-bar {\n border-radius: 5px;\n height: 30px; }\n .uagb-gradient-picker .components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button {\n top: 9px;\n width: 12px;\n height: 12px; }\n .uagb-gradient-picker .components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point {\n top: 7px; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/icon-picker/editor.lazy.scss": /*!************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/icon-picker/editor.lazy.scss ***! \************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/*#######################################################################################*/\n/**\n * google-material-color v1.2.6\n * https://github.com/danlevan/google-material-color\n */\n.rfipbtn--default {\n background-color: #fff;\n border: 1px solid #e0e0e0; }\n .rfipbtn--default:active, .rfipbtn--default:focus {\n box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.24), 0 1.5px 6px rgba(0, 0, 0, 0.12);\n border: 1px solid #bdbdbd; }\n .rfipbtn--default .rfipbtn__button {\n border: 0 none transparent;\n border-left: 1px solid #e0e0e0;\n background-color: #f5f5f5;\n color: #424242; }\n .rfipbtn--default .rfipbtn__button:hover {\n background-color: #bdbdbd; }\n .rfipbtn--default .rfipbtn__button:active {\n box-shadow: inset 0 0 10px 0 #e0e0e0; }\n .rfipbtn--default .rfipbtn__icon {\n border: 1px solid #eee;\n color: #424242; }\n .rfipbtn--default .rfipbtn__icon--empty {\n color: #e0e0e0; }\n .rfipbtn--default .rfipbtn__del {\n background-color: #eee; }\n .rfipbtn--default .rfipbtn__del:hover {\n background-color: #e0e0e0; }\n .rfipbtn--default .rfipbtn__del:focus, .rfipbtn--default .rfipbtn__del:active {\n outline: 1px solid #e0e0e0; }\n\n.rfipdropdown--default {\n box-shadow: 0 15px 24px rgba(0, 0, 0, 0.22), 0 19px 76px rgba(0, 0, 0, 0.3);\n color: #424242;\n background-color: #fff;\n border: 1px solid #e0e0e0; }\n .rfipdropdown--default input,\n .rfipdropdown--default select {\n color: #424242; }\n .rfipdropdown--default .rfipcategory select {\n background-color: #fff;\n border: 1px solid #bdbdbd;\n transition: box-shadow 250ms, border 250ms; }\n .rfipdropdown--default .rfipcategory select:focus, .rfipdropdown--default .rfipcategory select:active {\n border-color: #9e9e9e;\n box-shadow: 0 0 0 0 #9e9e9e;\n outline: 0 none; }\n .rfipdropdown--default .rfipicons__cp {\n border: 1px solid #bdbdbd;\n transition: box-shadow 250ms, border 250ms; }\n .rfipdropdown--default .rfipicons__cp:focus, .rfipdropdown--default .rfipicons__cp:active {\n border-color: #9e9e9e;\n box-shadow: 0 0 0 0 #9e9e9e;\n outline: 0 none; }\n .rfipdropdown--default .rfipicons__left, .rfipdropdown--default .rfipicons__right {\n background-color: #eee;\n border: 1px solid #eee;\n color: #424242; }\n .rfipdropdown--default .rfipicons__left:hover, .rfipdropdown--default .rfipicons__right:hover {\n background-color: #bdbdbd;\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__left:focus, .rfipdropdown--default .rfipicons__left:active, .rfipdropdown--default .rfipicons__right:focus, .rfipdropdown--default .rfipicons__right:active {\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__ibox {\n background-color: #f5f5f5;\n border: 1px solid #f5f5f5;\n color: #424242; }\n .rfipdropdown--default .rfipicons__ibox:hover {\n background-color: #bdbdbd;\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__ibox:focus, .rfipdropdown--default .rfipicons__ibox:active {\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__ibox--error {\n color: #ef9a9a; }\n .rfipdropdown--default .rfipsearch input {\n border: 1px solid #bdbdbd;\n transition: box-shadow 250ms, border 250ms; }\n .rfipdropdown--default .rfipsearch input:focus, .rfipdropdown--default .rfipsearch input:active {\n border-color: #9e9e9e;\n box-shadow: 0 0 0 0 #9e9e9e;\n outline: 0 none; }\n\n.rfipbtn,\n.rfipdropdown {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n font-size: 14px;\n line-height: 1.71429;\n vertical-align: baseline;\n box-sizing: border-box; }\n .rfipbtn *,\n .rfipdropdown * {\n box-sizing: border-box;\n margin: 0;\n padding: 0; }\n .rfipbtn input,\n .rfipbtn select,\n .rfipdropdown input,\n .rfipdropdown select {\n font-size: 14px; }\n\n.rfip {\n position: relative;\n display: inline-block;\n margin: 8px;\n vertical-align: middle;\n width: 100%; }\n\n.rfipbtn {\n width: 100%;\n display: flex;\n flex-flow: row nowrap;\n min-height: 50px;\n border-radius: 2px;\n cursor: pointer;\n transition: box-shadow 250ms, border-color 250ms;\n outline: 0 none;\n user-select: none; }\n .rfipbtn--open {\n border-radius: 2px 2px 0 0; }\n .rfipbtn__button {\n width: 48px;\n margin-left: auto;\n display: flex;\n align-items: center;\n /* x axis center */\n justify-content: center;\n /* y axis center */\n height: auto;\n /* auto height to fix the flex */\n transition: background 250ms, box-shadow 250ms; }\n .rfipbtn__button i {\n font-size: 32px;\n transition: transform 250ms; }\n .rfipbtn__button--open i {\n transform: rotate(-180deg); }\n .rfipbtn__current {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n flex: 0 0 86px;\n padding: 2px; }\n .rfipbtn--multi {\n width: 258px; }\n .rfipbtn--multi .rfipbtn__current {\n flex-flow: row wrap;\n justify-content: flex-start;\n flex-basis: 212px;\n align-content: center; }\n .rfipbtn__icon {\n margin: 2px;\n padding: 0;\n height: 28px;\n width: 48px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: space-between;\n border-radius: 2px; }\n .rfipbtn__icon--empty {\n font-size: 14px;\n line-height: 16px;\n margin-left: 8px;\n text-align: center;\n text-transform: lowercase;\n font-style: italic; }\n .rfipbtn__elm {\n display: flex;\n height: 28px;\n width: 28px;\n align-items: center;\n justify-content: center;\n font-size: 18px; }\n .rfipbtn__elm img,\n .rfipbtn__elm svg {\n height: 18px;\n width: auto; }\n .rfipbtn__del {\n width: 18px;\n display: flex;\n height: 28px;\n align-items: center;\n justify-content: center;\n transition: background-color 250ms;\n cursor: pointer; }\n\n.rfipcategory {\n width: 100%;\n margin: 0 0 8px;\n position: relative; }\n .rfipcategory select {\n width: 100%;\n display: block;\n height: 32px;\n line-height: 32px;\n border-radius: 0;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n /* remove default arrow */\n transition: border 250ms, box-shadow 250ms;\n background-color: transparent !important; }\n .rfipcategory i {\n position: absolute;\n right: 2px;\n top: 0;\n font-size: 16px;\n line-height: 32px;\n z-index: -1; }\n\n.rfipdropdown {\n width: 352px;\n position: absolute;\n left: 0;\n margin-top: -1px;\n z-index: 100000001;\n border-radius: 0 1px 4px 4px; }\n .rfipdropdown .rfipicons__ibox--error {\n color: #000;\n text-transform: capitalize;\n font-size: 14px;\n font-weight: 500; }\n .rfipdropdown__selector {\n overflow: hidden;\n padding: 16px; }\n .rfipdropdown.fipappear-enter-active .rfipdropdown__selector, .rfipdropdown.fipappear-exit-active .rfipdropdown__selector {\n transition: max-height 300ms ease-out, padding 300ms ease-out;\n padding: 16px; }\n\n.rfipicons__pager {\n display: flex;\n flex-flow: row nowrap;\n height: 24px;\n line-height: 24px;\n align-items: center;\n margin-bottom: 8px; }\n\n.rfipicons__num {\n width: 100px;\n margin-right: auto; }\n\n.rfipicons__cp {\n width: 32px;\n margin-right: 8px;\n height: 24px;\n line-height: 24px;\n text-align: right; }\n\n.rfipicons__sp {\n margin-right: 8px; }\n\n.rfipicons__tp {\n margin-right: 8px; }\n\n.rfipicons__arrow {\n margin-left: auto;\n width: 56px;\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n user-select: none; }\n\n.rfipicons__right {\n margin-left: auto; }\n\n.rfipicons__left, .rfipicons__right {\n cursor: pointer;\n width: 24px;\n height: 24px;\n position: relative;\n transition: background-color 250ms, border 250ms;\n outline: 0 none;\n border-radius: 2px;\n font-size: 18px; }\n\n.rfipicons__label {\n height: 22px;\n width: 22px;\n display: flex;\n align-items: center;\n justify-content: center; }\n .rfipicons__label img {\n height: 18px;\n width: 18px; }\n\n.rfipicons__selector {\n display: flex;\n flex: 1 1 20%;\n flex-flow: row wrap;\n align-content: center;\n justify-content: flex-start; }\n\n.rfipicons__ibox {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n transition: background-color 250ms, border 250ms;\n border-radius: 2px;\n outline: 0 none;\n font-size: 20px; }\n .rfipicons__ibox img,\n .rfipicons__ibox svg {\n max-height: 24px;\n width: auto; }\n .rfipicons__ibox > * {\n transform: scale(1);\n transition: transform 250ms;\n transform-origin: center; }\n .rfipicons__ibox:hover > * {\n transform: scale(1.8); }\n .rfipicons__ibox--error {\n text-transform: lowercase;\n font-style: italic; }\n\n.rfipicons__icon {\n width: 20%;\n height: 64px;\n padding: 1px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer; }\n .rfipicons__icon--error {\n display: block;\n padding: 16px;\n text-align: center;\n font-size: 24px;\n width: 100%;\n line-height: 1; }\n\n.rfipsearch {\n width: 100%;\n margin: 0 0 8px; }\n .rfipsearch input {\n width: 100%;\n display: block;\n height: 32px;\n line-height: 32px; }\n\n.components-panel .rfipdropdown,\n.components-panel .rfipdropdown.rfipdropdown--default.fipappear-enter-done {\n left: 0;\n width: 100%; }\n\n.components-panel .rfipicons__ibox {\n font-size: 15px; }\n\n.components-panel .rfipicons__icon {\n height: 40px; }\n\n.components-panel .rfipicons__ibox:hover > * {\n -webkit-transform: scale(1.45);\n -ms-transform: scale(1.45);\n transform: scale(1.45); }\n\n.rfipdropdown--default .rfipicons__icon--selected .rfipicons__ibox svg {\n fill: #007cba; }\n\n.rfipbtn--default .rfipbtn__icon {\n color: #424242;\n height: 40px;\n border: 0; }\n\n.rfipbtn--default .rfipbtn__del {\n height: 7px;\n background-color: #007cba33;\n color: #007cba;\n font-weight: bold;\n padding: 8px 8px 10px 8px;\n border-radius: 100%;\n margin-left: 10px; }\n\n.rfipdropdown--default .rfipicons__ibox,\n.rfipdropdown--default .rfipicons__ibox:focus,\n.rfipdropdown--default .rfipicons__ibox:active,\n.rfipdropdown--default .rfipicons__ibox:hover {\n color: #424242;\n background-color: transparent;\n border: 0; }\n\n.rfipdropdown--default .rfipicons__icon--selected .rfipicons__ibox svg {\n fill: #007cba; }\n\n.rfipicons__ibox img,\n.rfipicons__ibox svg {\n width: 16px;\n height: 16px;\n max-height: 24px; }\n\n.rfipicons__ibox svg {\n fill: #585858; }\n\n/* Override default CSS - UAG */\n.uag-icon-picker .rfip {\n margin: 4px 0 0; }\n\n.uag-icon-picker .uag-control-label {\n padding-bottom: 4px;\n display: block; }\n", "",{"version":3,"sources":["webpack://./src/components/icon-picker/editor.lazy.scss"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F;;;EAGE;AACF;EACE,sBAAsB;EACtB,yBAAyB,EAAE;EAC3B;IACE,4EAA4E;IAC5E,yBAAyB,EAAE;EAC7B;IACE,0BAA0B;IAC1B,8BAA8B;IAC9B,yBAAyB;IACzB,cAAc,EAAE;IAChB;MACE,yBAAyB,EAAE;IAC7B;MACE,oCAAoC,EAAE;EAC1C;IACE,sBAAsB;IACtB,cAAc,EAAE;IAChB;MACE,cAAc,EAAE;EACpB;IACE,sBAAsB,EAAE;IACxB;MACE,yBAAyB,EAAE;IAC7B;MACE,0BAA0B,EAAE;;AAElC;EACE,2EAA2E;EAC3E,cAAc;EACd,sBAAsB;EACtB,yBAAyB,EAAE;EAC3B;;IAEE,cAAc,EAAE;EAClB;IACE,sBAAsB;IACtB,yBAAyB;IACzB,0CAA0C,EAAE;IAC5C;MACE,qBAAqB;MACrB,2BAA2B;MAC3B,eAAe,EAAE;EACrB;IACE,yBAAyB;IACzB,0CAA0C,EAAE;IAC5C;MACE,qBAAqB;MACrB,2BAA2B;MAC3B,eAAe,EAAE;EACrB;IACE,sBAAsB;IACtB,sBAAsB;IACtB,cAAc,EAAE;IAChB;MACE,yBAAyB;MACzB,yBAAyB,EAAE;IAC7B;MACE,yBAAyB,EAAE;EAC/B;IACE,yBAAyB;IACzB,yBAAyB;IACzB,cAAc,EAAE;IAChB;MACE,yBAAyB;MACzB,yBAAyB,EAAE;IAC7B;MACE,yBAAyB,EAAE;IAC7B;MACE,cAAc,EAAE;EACpB;IACE,yBAAyB;IACzB,0CAA0C,EAAE;IAC5C;MACE,qBAAqB;MACrB,2BAA2B;MAC3B,eAAe,EAAE;;AAEvB;;EAEE,SAAS;EACT,UAAU;EACV,8JAA8J;EAC9J,eAAe;EACf,oBAAoB;EACpB,wBAAwB;EACxB,sBAAsB,EAAE;EACxB;;IAEE,sBAAsB;IACtB,SAAS;IACT,UAAU,EAAE;EACd;;;;IAIE,eAAe,EAAE;;AAErB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,WAAW;EACX,sBAAsB;EACtB,WAAW,EAAE;;AAEf;EACE,WAAW;EACX,aAAa;EACb,qBAAqB;EACrB,gBAAgB;EAChB,kBAAkB;EAClB,eAAe;EACf,gDAAgD;EAChD,eAAe;EACf,iBAAiB,EAAE;EACnB;IACE,0BAA0B,EAAE;EAC9B;IACE,WAAW;IACX,iBAAiB;IACjB,aAAa;IACb,mBAAmB;IACnB,kBAAkB;IAClB,uBAAuB;IACvB,kBAAkB;IAClB,YAAY;IACZ,gCAAgC;IAChC,8CAA8C,EAAE;IAChD;MACE,eAAe;MACf,2BAA2B,EAAE;IAC/B;MACE,0BAA0B,EAAE;EAChC;IACE,aAAa;IACb,qBAAqB;IACrB,mBAAmB;IACnB,uBAAuB;IACvB,cAAc;IACd,YAAY,EAAE;EAChB;IACE,YAAY,EAAE;IACd;MACE,mBAAmB;MACnB,2BAA2B;MAC3B,iBAAiB;MACjB,qBAAqB,EAAE;EAC3B;IACE,WAAW;IACX,UAAU;IACV,YAAY;IACZ,WAAW;IACX,aAAa;IACb,qBAAqB;IACrB,mBAAmB;IACnB,8BAA8B;IAC9B,kBAAkB,EAAE;IACpB;MACE,eAAe;MACf,iBAAiB;MACjB,gBAAgB;MAChB,kBAAkB;MAClB,yBAAyB;MACzB,kBAAkB,EAAE;EACxB;IACE,aAAa;IACb,YAAY;IACZ,WAAW;IACX,mBAAmB;IACnB,uBAAuB;IACvB,eAAe,EAAE;IACjB;;MAEE,YAAY;MACZ,WAAW,EAAE;EACjB;IACE,WAAW;IACX,aAAa;IACb,YAAY;IACZ,mBAAmB;IACnB,uBAAuB;IACvB,kCAAkC;IAClC,eAAe,EAAE;;AAErB;EACE,WAAW;EACX,eAAe;EACf,kBAAkB,EAAE;EACpB;IACE,WAAW;IACX,cAAc;IACd,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,wBAAwB;IACxB,qBAAqB;IACrB,gBAAgB;IAChB,yBAAyB;IACzB,0CAA0C;IAC1C,wCAAwC,EAAE;EAC5C;IACE,kBAAkB;IAClB,UAAU;IACV,MAAM;IACN,eAAe;IACf,iBAAiB;IACjB,WAAW,EAAE;;AAEjB;EACE,YAAY;EACZ,kBAAkB;EAClB,OAAO;EACP,gBAAgB;EAChB,kBAAkB;EAClB,4BAA4B,EAAE;EAC9B;IACE,WAAW;IACX,0BAA0B;IAC1B,eAAe;IACf,gBAAgB,EAAE;EACpB;IACE,gBAAgB;IAChB,aAAa,EAAE;EACjB;IACE,6DAA6D;IAC7D,aAAa,EAAE;;AAEnB;EACE,aAAa;EACb,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,mBAAmB;EACnB,kBAAkB,EAAE;;AAEtB;EACE,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,WAAW;EACX,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;EACjB,iBAAiB,EAAE;;AAErB;EACE,iBAAiB,EAAE;;AAErB;EACE,iBAAiB,EAAE;;AAErB;EACE,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,qBAAqB;EACrB,yBAAyB;EACzB,mBAAmB;EACnB,YAAY;EACZ,iBAAiB,EAAE;;AAErB;EACE,iBAAiB,EAAE;;AAErB;EACE,eAAe;EACf,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,gDAAgD;EAChD,eAAe;EACf,kBAAkB;EAClB,eAAe,EAAE;;AAEnB;EACE,YAAY;EACZ,WAAW;EACX,aAAa;EACb,mBAAmB;EACnB,uBAAuB,EAAE;EACzB;IACE,YAAY;IACZ,WAAW,EAAE;;AAEjB;EACE,aAAa;EACb,aAAa;EACb,mBAAmB;EACnB,qBAAqB;EACrB,2BAA2B,EAAE;;AAE/B;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,YAAY;EACZ,WAAW;EACX,gDAAgD;EAChD,kBAAkB;EAClB,eAAe;EACf,eAAe,EAAE;EACjB;;IAEE,gBAAgB;IAChB,WAAW,EAAE;EACf;IACE,mBAAmB;IACnB,2BAA2B;IAC3B,wBAAwB,EAAE;EAC5B;IACE,qBAAqB,EAAE;EACzB;IACE,yBAAyB;IACzB,kBAAkB,EAAE;;AAExB;EACE,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,eAAe,EAAE;EACjB;IACE,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,cAAc,EAAE;;AAEpB;EACE,WAAW;EACX,eAAe,EAAE;EACjB;IACE,WAAW;IACX,cAAc;IACd,YAAY;IACZ,iBAAiB,EAAE;;AAEvB;;EAEE,OAAO;EACP,WAAW,EAAE;;AAEf;EACE,eAAe,EAAE;;AAEnB;EACE,YAAY,EAAE;;AAEhB;EACE,8BAA8B;EAC9B,0BAA0B;EAC1B,sBAAsB,EAAE;;AAE1B;EACE,aAAa,EAAE;;AAEjB;EACE,cAAc;EACd,YAAY;EACZ,SAAS,EAAE;;AAEb;EACE,WAAW;EACX,2BAA2B;EAC3B,cAAc;EACd,iBAAiB;EACjB,yBAAyB;EACzB,mBAAmB;EACnB,iBAAiB,EAAE;;AAErB;;;;EAIE,cAAc;EACd,6BAA6B;EAC7B,SAAS,EAAE;;AAEb;EACE,aAAa,EAAE;;AAEjB;;EAEE,WAAW;EACX,YAAY;EACZ,gBAAgB,EAAE;;AAEpB;EACE,aAAa,EAAE;;AAEjB,+BAA+B;AAC/B;EACE,eAAe,EAAE;;AAEnB;EACE,mBAAmB;EACnB,cAAc,EAAE","sourcesContent":["/*#######################################################################################*/\n/**\n * google-material-color v1.2.6\n * https://github.com/danlevan/google-material-color\n */\n.rfipbtn--default {\n background-color: #fff;\n border: 1px solid #e0e0e0; }\n .rfipbtn--default:active, .rfipbtn--default:focus {\n box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.24), 0 1.5px 6px rgba(0, 0, 0, 0.12);\n border: 1px solid #bdbdbd; }\n .rfipbtn--default .rfipbtn__button {\n border: 0 none transparent;\n border-left: 1px solid #e0e0e0;\n background-color: #f5f5f5;\n color: #424242; }\n .rfipbtn--default .rfipbtn__button:hover {\n background-color: #bdbdbd; }\n .rfipbtn--default .rfipbtn__button:active {\n box-shadow: inset 0 0 10px 0 #e0e0e0; }\n .rfipbtn--default .rfipbtn__icon {\n border: 1px solid #eee;\n color: #424242; }\n .rfipbtn--default .rfipbtn__icon--empty {\n color: #e0e0e0; }\n .rfipbtn--default .rfipbtn__del {\n background-color: #eee; }\n .rfipbtn--default .rfipbtn__del:hover {\n background-color: #e0e0e0; }\n .rfipbtn--default .rfipbtn__del:focus, .rfipbtn--default .rfipbtn__del:active {\n outline: 1px solid #e0e0e0; }\n\n.rfipdropdown--default {\n box-shadow: 0 15px 24px rgba(0, 0, 0, 0.22), 0 19px 76px rgba(0, 0, 0, 0.3);\n color: #424242;\n background-color: #fff;\n border: 1px solid #e0e0e0; }\n .rfipdropdown--default input,\n .rfipdropdown--default select {\n color: #424242; }\n .rfipdropdown--default .rfipcategory select {\n background-color: #fff;\n border: 1px solid #bdbdbd;\n transition: box-shadow 250ms, border 250ms; }\n .rfipdropdown--default .rfipcategory select:focus, .rfipdropdown--default .rfipcategory select:active {\n border-color: #9e9e9e;\n box-shadow: 0 0 0 0 #9e9e9e;\n outline: 0 none; }\n .rfipdropdown--default .rfipicons__cp {\n border: 1px solid #bdbdbd;\n transition: box-shadow 250ms, border 250ms; }\n .rfipdropdown--default .rfipicons__cp:focus, .rfipdropdown--default .rfipicons__cp:active {\n border-color: #9e9e9e;\n box-shadow: 0 0 0 0 #9e9e9e;\n outline: 0 none; }\n .rfipdropdown--default .rfipicons__left, .rfipdropdown--default .rfipicons__right {\n background-color: #eee;\n border: 1px solid #eee;\n color: #424242; }\n .rfipdropdown--default .rfipicons__left:hover, .rfipdropdown--default .rfipicons__right:hover {\n background-color: #bdbdbd;\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__left:focus, .rfipdropdown--default .rfipicons__left:active, .rfipdropdown--default .rfipicons__right:focus, .rfipdropdown--default .rfipicons__right:active {\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__ibox {\n background-color: #f5f5f5;\n border: 1px solid #f5f5f5;\n color: #424242; }\n .rfipdropdown--default .rfipicons__ibox:hover {\n background-color: #bdbdbd;\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__ibox:focus, .rfipdropdown--default .rfipicons__ibox:active {\n border: 1px solid #bdbdbd; }\n .rfipdropdown--default .rfipicons__ibox--error {\n color: #ef9a9a; }\n .rfipdropdown--default .rfipsearch input {\n border: 1px solid #bdbdbd;\n transition: box-shadow 250ms, border 250ms; }\n .rfipdropdown--default .rfipsearch input:focus, .rfipdropdown--default .rfipsearch input:active {\n border-color: #9e9e9e;\n box-shadow: 0 0 0 0 #9e9e9e;\n outline: 0 none; }\n\n.rfipbtn,\n.rfipdropdown {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n font-size: 14px;\n line-height: 1.71429;\n vertical-align: baseline;\n box-sizing: border-box; }\n .rfipbtn *,\n .rfipdropdown * {\n box-sizing: border-box;\n margin: 0;\n padding: 0; }\n .rfipbtn input,\n .rfipbtn select,\n .rfipdropdown input,\n .rfipdropdown select {\n font-size: 14px; }\n\n.rfip {\n position: relative;\n display: inline-block;\n margin: 8px;\n vertical-align: middle;\n width: 100%; }\n\n.rfipbtn {\n width: 100%;\n display: flex;\n flex-flow: row nowrap;\n min-height: 50px;\n border-radius: 2px;\n cursor: pointer;\n transition: box-shadow 250ms, border-color 250ms;\n outline: 0 none;\n user-select: none; }\n .rfipbtn--open {\n border-radius: 2px 2px 0 0; }\n .rfipbtn__button {\n width: 48px;\n margin-left: auto;\n display: flex;\n align-items: center;\n /* x axis center */\n justify-content: center;\n /* y axis center */\n height: auto;\n /* auto height to fix the flex */\n transition: background 250ms, box-shadow 250ms; }\n .rfipbtn__button i {\n font-size: 32px;\n transition: transform 250ms; }\n .rfipbtn__button--open i {\n transform: rotate(-180deg); }\n .rfipbtn__current {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n flex: 0 0 86px;\n padding: 2px; }\n .rfipbtn--multi {\n width: 258px; }\n .rfipbtn--multi .rfipbtn__current {\n flex-flow: row wrap;\n justify-content: flex-start;\n flex-basis: 212px;\n align-content: center; }\n .rfipbtn__icon {\n margin: 2px;\n padding: 0;\n height: 28px;\n width: 48px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: space-between;\n border-radius: 2px; }\n .rfipbtn__icon--empty {\n font-size: 14px;\n line-height: 16px;\n margin-left: 8px;\n text-align: center;\n text-transform: lowercase;\n font-style: italic; }\n .rfipbtn__elm {\n display: flex;\n height: 28px;\n width: 28px;\n align-items: center;\n justify-content: center;\n font-size: 18px; }\n .rfipbtn__elm img,\n .rfipbtn__elm svg {\n height: 18px;\n width: auto; }\n .rfipbtn__del {\n width: 18px;\n display: flex;\n height: 28px;\n align-items: center;\n justify-content: center;\n transition: background-color 250ms;\n cursor: pointer; }\n\n.rfipcategory {\n width: 100%;\n margin: 0 0 8px;\n position: relative; }\n .rfipcategory select {\n width: 100%;\n display: block;\n height: 32px;\n line-height: 32px;\n border-radius: 0;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n /* remove default arrow */\n transition: border 250ms, box-shadow 250ms;\n background-color: transparent !important; }\n .rfipcategory i {\n position: absolute;\n right: 2px;\n top: 0;\n font-size: 16px;\n line-height: 32px;\n z-index: -1; }\n\n.rfipdropdown {\n width: 352px;\n position: absolute;\n left: 0;\n margin-top: -1px;\n z-index: 100000001;\n border-radius: 0 1px 4px 4px; }\n .rfipdropdown .rfipicons__ibox--error {\n color: #000;\n text-transform: capitalize;\n font-size: 14px;\n font-weight: 500; }\n .rfipdropdown__selector {\n overflow: hidden;\n padding: 16px; }\n .rfipdropdown.fipappear-enter-active .rfipdropdown__selector, .rfipdropdown.fipappear-exit-active .rfipdropdown__selector {\n transition: max-height 300ms ease-out, padding 300ms ease-out;\n padding: 16px; }\n\n.rfipicons__pager {\n display: flex;\n flex-flow: row nowrap;\n height: 24px;\n line-height: 24px;\n align-items: center;\n margin-bottom: 8px; }\n\n.rfipicons__num {\n width: 100px;\n margin-right: auto; }\n\n.rfipicons__cp {\n width: 32px;\n margin-right: 8px;\n height: 24px;\n line-height: 24px;\n text-align: right; }\n\n.rfipicons__sp {\n margin-right: 8px; }\n\n.rfipicons__tp {\n margin-right: 8px; }\n\n.rfipicons__arrow {\n margin-left: auto;\n width: 56px;\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n user-select: none; }\n\n.rfipicons__right {\n margin-left: auto; }\n\n.rfipicons__left, .rfipicons__right {\n cursor: pointer;\n width: 24px;\n height: 24px;\n position: relative;\n transition: background-color 250ms, border 250ms;\n outline: 0 none;\n border-radius: 2px;\n font-size: 18px; }\n\n.rfipicons__label {\n height: 22px;\n width: 22px;\n display: flex;\n align-items: center;\n justify-content: center; }\n .rfipicons__label img {\n height: 18px;\n width: 18px; }\n\n.rfipicons__selector {\n display: flex;\n flex: 1 1 20%;\n flex-flow: row wrap;\n align-content: center;\n justify-content: flex-start; }\n\n.rfipicons__ibox {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n transition: background-color 250ms, border 250ms;\n border-radius: 2px;\n outline: 0 none;\n font-size: 20px; }\n .rfipicons__ibox img,\n .rfipicons__ibox svg {\n max-height: 24px;\n width: auto; }\n .rfipicons__ibox > * {\n transform: scale(1);\n transition: transform 250ms;\n transform-origin: center; }\n .rfipicons__ibox:hover > * {\n transform: scale(1.8); }\n .rfipicons__ibox--error {\n text-transform: lowercase;\n font-style: italic; }\n\n.rfipicons__icon {\n width: 20%;\n height: 64px;\n padding: 1px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer; }\n .rfipicons__icon--error {\n display: block;\n padding: 16px;\n text-align: center;\n font-size: 24px;\n width: 100%;\n line-height: 1; }\n\n.rfipsearch {\n width: 100%;\n margin: 0 0 8px; }\n .rfipsearch input {\n width: 100%;\n display: block;\n height: 32px;\n line-height: 32px; }\n\n.components-panel .rfipdropdown,\n.components-panel .rfipdropdown.rfipdropdown--default.fipappear-enter-done {\n left: 0;\n width: 100%; }\n\n.components-panel .rfipicons__ibox {\n font-size: 15px; }\n\n.components-panel .rfipicons__icon {\n height: 40px; }\n\n.components-panel .rfipicons__ibox:hover > * {\n -webkit-transform: scale(1.45);\n -ms-transform: scale(1.45);\n transform: scale(1.45); }\n\n.rfipdropdown--default .rfipicons__icon--selected .rfipicons__ibox svg {\n fill: #007cba; }\n\n.rfipbtn--default .rfipbtn__icon {\n color: #424242;\n height: 40px;\n border: 0; }\n\n.rfipbtn--default .rfipbtn__del {\n height: 7px;\n background-color: #007cba33;\n color: #007cba;\n font-weight: bold;\n padding: 8px 8px 10px 8px;\n border-radius: 100%;\n margin-left: 10px; }\n\n.rfipdropdown--default .rfipicons__ibox,\n.rfipdropdown--default .rfipicons__ibox:focus,\n.rfipdropdown--default .rfipicons__ibox:active,\n.rfipdropdown--default .rfipicons__ibox:hover {\n color: #424242;\n background-color: transparent;\n border: 0; }\n\n.rfipdropdown--default .rfipicons__icon--selected .rfipicons__ibox svg {\n fill: #007cba; }\n\n.rfipicons__ibox img,\n.rfipicons__ibox svg {\n width: 16px;\n height: 16px;\n max-height: 24px; }\n\n.rfipicons__ibox svg {\n fill: #585858; }\n\n/* Override default CSS - UAG */\n.uag-icon-picker .rfip {\n margin: 4px 0 0; }\n\n.uag-icon-picker .uag-control-label {\n padding-bottom: 4px;\n display: block; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/inspector-tabs/editor.lazy.scss": /*!***************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/inspector-tabs/editor.lazy.scss ***! \***************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, ".components-panel[data-uagb-tab] {\n z-index: 99; }\n .components-panel[data-uagb-tab]:not([data-uagb-tab=\"advance\"]) .components-panel__body.block-editor-block-inspector__advanced,\n .components-panel[data-uagb-tab]:not([data-uagb-tab=\"advance\"]) .components-panel__body.editor-block-inspector__advanced.block-editor-block-inspector__advanced,\n .components-panel[data-uagb-tab]:not([data-uagb-tab=\"advance\"]) .block-editor-block-inspector > div > .components-panel__body {\n display: none; }\n .components-panel[data-uagb-tab] .block-editor-block-card {\n padding-bottom: 25px;\n position: relative;\n z-index: 1;\n overflow: hidden; }\n .components-panel[data-uagb-tab] .block-editor-block-card::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: -16px;\n right: -16px;\n bottom: 0;\n background: #fff;\n z-index: -1; }\n .components-panel[data-uagb-tab] .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card {\n overflow: unset; }\n .components-panel[data-uagb-tab] .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card::before {\n top: -16px; }\n\n.components-panel[data-uagb-tab=\"advance\"] .block-editor-block-inspector__advanced {\n border-color: transparent; }\n\n.uagb-inspector-tabs {\n display: flex;\n position: relative;\n background: #fff;\n z-index: 9; }\n .uagb-inspector-tabs::after {\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n top: 50%;\n right: 0;\n z-index: 0;\n background: #fff;\n pointer-events: none; }\n .uagb-inspector-tabs button {\n flex-grow: 1;\n flex-basis: 0;\n display: inline-flex;\n flex-direction: column;\n height: 65px;\n align-items: center;\n justify-content: center;\n border: none;\n position: relative;\n border-radius: 10px;\n background: #fff;\n cursor: pointer; }\n .uagb-inspector-tabs button::after, .uagb-inspector-tabs button::before {\n z-index: 1;\n content: \"\";\n position: absolute;\n top: 0;\n left: -0.5px;\n right: -0.5px;\n bottom: 50%;\n border: 1px solid transparent;\n border-bottom: none;\n pointer-events: none; }\n .uagb-inspector-tabs button::after {\n top: 50%;\n bottom: 0;\n border-color: #d6d9dd;\n border-bottom: 1px solid #d6d9dd;\n border-top: none; }\n .uagb-inspector-tabs button:not(.uagb-active)::after {\n background: #fff; }\n .uagb-inspector-tabs button.uagb-active {\n background: #fff;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0; }\n .uagb-inspector-tabs button.uagb-active::before {\n border-color: #d6d9dd;\n border-top-color: #0085ba;\n border-top-width: 4px; }\n .uagb-inspector-tabs button.uagb-active::after {\n border-color: transparent; }\n .uagb-inspector-tabs button.uagb-active + button {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 10px; }\n .uagb-inspector-tabs button.uagb-active + button::after {\n border-bottom-right-radius: 0;\n border-right-color: transparent; }\n .uagb-inspector-tabs button.uagb-active + button + button {\n border-bottom-left-radius: 0; }\n .uagb-inspector-tabs button.uagb-active + button + button::after {\n border-bottom-left-radius: 0;\n border-left-color: transparent; }\n .uagb-inspector-tabs button:first-child {\n border-bottom-left-radius: 0; }\n .uagb-inspector-tabs button:first-child::after {\n border-bottom-left-radius: 0;\n border-left-color: transparent; }\n .uagb-inspector-tabs button:first-child.uagb-active::after {\n border-left-color: #d6d9dd; }\n .uagb-inspector-tabs button:first-child::before, .uagb-inspector-tabs button:first-child::after {\n left: -1px; }\n .uagb-inspector-tabs button:last-child {\n border-bottom-right-radius: 0; }\n .uagb-inspector-tabs button:last-child::after {\n border-bottom-right-radius: 0;\n border-right-color: transparent; }\n .uagb-inspector-tabs button:last-child.uagb-active::after {\n border-right-color: #d6d9dd; }\n .uagb-inspector-tabs button:last-child::before, .uagb-inspector-tabs button:last-child::after {\n right: 0; }\n .uagb-inspector-tabs button:focus {\n outline: none; }\n .uagb-inspector-tabs button h5 {\n margin: 6px 0 0;\n font-size: 13px;\n font-weight: 400;\n line-height: 1.2; }\n .uagb-inspector-tabs button h5,\n .uagb-inspector-tabs button svg {\n z-index: 2;\n fill: #585858; }\n .uagb-inspector-tabs button.uagb-active h5 {\n color: #0085ba; }\n .uagb-inspector-tabs button:focus path,\n .uagb-inspector-tabs button.uagb-active path {\n fill: #0085ba; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child {\n border-bottom-right-radius: 0; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child::after {\n border-bottom-right-radius: 0;\n border-right-color: transparent; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child + button {\n border-bottom-left-radius: 0; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child + button::after {\n border-bottom-left-radius: 0;\n border-left-color: transparent; }\n\n.components-panel .components-panel__body .uagb-inspector-tabs-container {\n position: static !important;\n margin-left: -16px;\n margin-right: -16px;\n border-top: 0 !important;\n top: 0 !important; }\n\n.uagb-inspector-tabs-container {\n position: sticky;\n top: -3px;\n z-index: 9;\n border-top: calc(0.1em + 1px) solid #f2f4f5; }\n\n.uagb-inspector-tab .components-panel__body:first-child,\n.edit-post-settings-sidebar__panel-block .uagb-inspector-tab .components-panel__body:first-child {\n margin-top: 0;\n border-top: none !important; }\n", "",{"version":3,"sources":["webpack://./src/components/inspector-tabs/editor.lazy.scss"],"names":[],"mappings":"AAAA;EACE,WAAW,EAAE;EACb;;;IAGE,aAAa,EAAE;EACjB;IACE,oBAAoB;IACpB,kBAAkB;IAClB,UAAU;IACV,gBAAgB,EAAE;IAClB;MACE,WAAW;MACX,kBAAkB;MAClB,MAAM;MACN,WAAW;MACX,YAAY;MACZ,SAAS;MACT,gBAAgB;MAChB,WAAW,EAAE;EACjB;IACE,eAAe,EAAE;IACjB;MACE,UAAU,EAAE;;AAElB;EACE,yBAAyB,EAAE;;AAE7B;EACE,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,UAAU,EAAE;EACZ;IACE,WAAW;IACX,kBAAkB;IAClB,OAAO;IACP,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,oBAAoB,EAAE;EACxB;IACE,YAAY;IACZ,aAAa;IACb,oBAAoB;IACpB,sBAAsB;IACtB,YAAY;IACZ,mBAAmB;IACnB,uBAAuB;IACvB,YAAY;IACZ,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe,EAAE;IACjB;MACE,UAAU;MACV,WAAW;MACX,kBAAkB;MAClB,MAAM;MACN,YAAY;MACZ,aAAa;MACb,WAAW;MACX,6BAA6B;MAC7B,mBAAmB;MACnB,oBAAoB,EAAE;IACxB;MACE,QAAQ;MACR,SAAS;MACT,qBAAqB;MACrB,gCAAgC;MAChC,gBAAgB,EAAE;IACpB;MACE,gBAAgB,EAAE;IACpB;MACE,gBAAgB;MAChB,4BAA4B;MAC5B,6BAA6B,EAAE;MAC/B;QACE,qBAAqB;QACrB,yBAAyB;QACzB,qBAAqB,EAAE;MACzB;QACE,yBAAyB,EAAE;MAC7B;QACE,6BAA6B;QAC7B,+BAA+B,EAAE;QACjC;UACE,6BAA6B;UAC7B,+BAA+B,EAAE;QACnC;UACE,4BAA4B,EAAE;UAC9B;YACE,4BAA4B;YAC5B,8BAA8B,EAAE;IACxC;MACE,4BAA4B,EAAE;MAC9B;QACE,4BAA4B;QAC5B,8BAA8B,EAAE;MAClC;QACE,0BAA0B,EAAE;MAC9B;QACE,UAAU,EAAE;IAChB;MACE,6BAA6B,EAAE;MAC/B;QACE,6BAA6B;QAC7B,+BAA+B,EAAE;MACnC;QACE,2BAA2B,EAAE;MAC/B;QACE,QAAQ,EAAE;IACd;MACE,aAAa,EAAE;IACjB;MACE,eAAe;MACf,eAAe;MACf,gBAAgB;MAChB,gBAAgB,EAAE;IACpB;;MAEE,UAAU;MACV,aAAa,EAAE;IACjB;MACE,cAAc,EAAE;IAClB;;MAEE,aAAa,EAAE;EACnB;IACE,6BAA6B,EAAE;IAC/B;MACE,6BAA6B;MAC7B,+BAA+B,EAAE;IACnC;MACE,4BAA4B,EAAE;MAC9B;QACE,4BAA4B;QAC5B,8BAA8B,EAAE;;AAExC;EACE,2BAA2B;EAC3B,kBAAkB;EAClB,mBAAmB;EACnB,wBAAwB;EACxB,iBAAiB,EAAE;;AAErB;EACE,gBAAgB;EAChB,SAAS;EACT,UAAU;EACV,2CAA2C,EAAE;;AAE/C;;EAEE,aAAa;EACb,2BAA2B,EAAE","sourcesContent":[".components-panel[data-uagb-tab] {\n z-index: 99; }\n .components-panel[data-uagb-tab]:not([data-uagb-tab=\"advance\"]) .components-panel__body.block-editor-block-inspector__advanced,\n .components-panel[data-uagb-tab]:not([data-uagb-tab=\"advance\"]) .components-panel__body.editor-block-inspector__advanced.block-editor-block-inspector__advanced,\n .components-panel[data-uagb-tab]:not([data-uagb-tab=\"advance\"]) .block-editor-block-inspector > div > .components-panel__body {\n display: none; }\n .components-panel[data-uagb-tab] .block-editor-block-card {\n padding-bottom: 25px;\n position: relative;\n z-index: 1;\n overflow: hidden; }\n .components-panel[data-uagb-tab] .block-editor-block-card::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: -16px;\n right: -16px;\n bottom: 0;\n background: #fff;\n z-index: -1; }\n .components-panel[data-uagb-tab] .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card {\n overflow: unset; }\n .components-panel[data-uagb-tab] .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card::before {\n top: -16px; }\n\n.components-panel[data-uagb-tab=\"advance\"] .block-editor-block-inspector__advanced {\n border-color: transparent; }\n\n.uagb-inspector-tabs {\n display: flex;\n position: relative;\n background: #fff;\n z-index: 9; }\n .uagb-inspector-tabs::after {\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n top: 50%;\n right: 0;\n z-index: 0;\n background: #fff;\n pointer-events: none; }\n .uagb-inspector-tabs button {\n flex-grow: 1;\n flex-basis: 0;\n display: inline-flex;\n flex-direction: column;\n height: 65px;\n align-items: center;\n justify-content: center;\n border: none;\n position: relative;\n border-radius: 10px;\n background: #fff;\n cursor: pointer; }\n .uagb-inspector-tabs button::after, .uagb-inspector-tabs button::before {\n z-index: 1;\n content: \"\";\n position: absolute;\n top: 0;\n left: -0.5px;\n right: -0.5px;\n bottom: 50%;\n border: 1px solid transparent;\n border-bottom: none;\n pointer-events: none; }\n .uagb-inspector-tabs button::after {\n top: 50%;\n bottom: 0;\n border-color: #d6d9dd;\n border-bottom: 1px solid #d6d9dd;\n border-top: none; }\n .uagb-inspector-tabs button:not(.uagb-active)::after {\n background: #fff; }\n .uagb-inspector-tabs button.uagb-active {\n background: #fff;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0; }\n .uagb-inspector-tabs button.uagb-active::before {\n border-color: #d6d9dd;\n border-top-color: #0085ba;\n border-top-width: 4px; }\n .uagb-inspector-tabs button.uagb-active::after {\n border-color: transparent; }\n .uagb-inspector-tabs button.uagb-active + button {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 10px; }\n .uagb-inspector-tabs button.uagb-active + button::after {\n border-bottom-right-radius: 0;\n border-right-color: transparent; }\n .uagb-inspector-tabs button.uagb-active + button + button {\n border-bottom-left-radius: 0; }\n .uagb-inspector-tabs button.uagb-active + button + button::after {\n border-bottom-left-radius: 0;\n border-left-color: transparent; }\n .uagb-inspector-tabs button:first-child {\n border-bottom-left-radius: 0; }\n .uagb-inspector-tabs button:first-child::after {\n border-bottom-left-radius: 0;\n border-left-color: transparent; }\n .uagb-inspector-tabs button:first-child.uagb-active::after {\n border-left-color: #d6d9dd; }\n .uagb-inspector-tabs button:first-child::before, .uagb-inspector-tabs button:first-child::after {\n left: -1px; }\n .uagb-inspector-tabs button:last-child {\n border-bottom-right-radius: 0; }\n .uagb-inspector-tabs button:last-child::after {\n border-bottom-right-radius: 0;\n border-right-color: transparent; }\n .uagb-inspector-tabs button:last-child.uagb-active::after {\n border-right-color: #d6d9dd; }\n .uagb-inspector-tabs button:last-child::before, .uagb-inspector-tabs button:last-child::after {\n right: 0; }\n .uagb-inspector-tabs button:focus {\n outline: none; }\n .uagb-inspector-tabs button h5 {\n margin: 6px 0 0;\n font-size: 13px;\n font-weight: 400;\n line-height: 1.2; }\n .uagb-inspector-tabs button h5,\n .uagb-inspector-tabs button svg {\n z-index: 2;\n fill: #585858; }\n .uagb-inspector-tabs button.uagb-active h5 {\n color: #0085ba; }\n .uagb-inspector-tabs button:focus path,\n .uagb-inspector-tabs button.uagb-active path {\n fill: #0085ba; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child {\n border-bottom-right-radius: 0; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child::after {\n border-bottom-right-radius: 0;\n border-right-color: transparent; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child + button {\n border-bottom-left-radius: 0; }\n .uagb-inspector-tabs.advance.uagb-inspector-tabs-count-3 button:first-child + button::after {\n border-bottom-left-radius: 0;\n border-left-color: transparent; }\n\n.components-panel .components-panel__body .uagb-inspector-tabs-container {\n position: static !important;\n margin-left: -16px;\n margin-right: -16px;\n border-top: 0 !important;\n top: 0 !important; }\n\n.uagb-inspector-tabs-container {\n position: sticky;\n top: -3px;\n z-index: 9;\n border-top: calc(0.1em + 1px) solid #f2f4f5; }\n\n.uagb-inspector-tab .components-panel__body:first-child,\n.edit-post-settings-sidebar__panel-block .uagb-inspector-tab .components-panel__body:first-child {\n margin-top: 0;\n border-top: none !important; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/multi-buttons-control/editor.lazy.scss": /*!**********************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/multi-buttons-control/editor.lazy.scss ***! \**********************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* Multi Button Gap */\n/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-multi-button-button-group {\n display: flex;\n width: 100%; }\n .uagb-multi-button-button-group .uagb-multi-button {\n width: 100%;\n justify-content: center;\n height: unset;\n padding: 6px;\n line-height: 16px;\n min-height: 30px; }\n .uagb-multi-button-button-group .uagb-multi-button:first-child {\n -webkit-border-radius: 3px 0 0 3px;\n -moz-border-radius: 3px 0 0 3px;\n border-radius: 3px 0 0 3px; }\n .uagb-multi-button-button-group .uagb-multi-button:last-child {\n -webkit-border-radius: 0 3px 3px 0;\n -moz-border-radius: 0 3px 3px 0;\n border-radius: 0 3px 3px 0; }\n .uagb-multi-button-button-group button.uagb-multi-button.is-secondary {\n color: #50575E;\n box-shadow: inset 0 0 0 1px #E6E7E9; }\n .uagb-multi-button-button-group .uagb-multi-button.is-secondary:hover:not(:disabled),\n .uagb-multi-button-button-group .uagb-multi-button-grou[aria-label=\"Gap\"]\n.uagb-multi-button.is-tertiary:hover:not(:disabled) {\n color: #1D2327;\n box-shadow: inset 0 0 0 1px #E6E7E9; }\n .uagb-multi-button-button-group .uagb-multi-button.is-secondary,\n .uagb-multi-button-button-group .uagb-multi-button.is-tertiary {\n color: #50575E; }\n .uagb-multi-button-button-group .uagb-multi-button.is-secondary:active:not(:disabled),\n .uagb-multi-button-button-group .uagb-multi-button-grou[aria-label=\"Gap\"]\n.uagb-multi-button.is-tertiary:active:not(:disabled) {\n background: #FFFFFF;\n box-shadow: inset 0 0 0 1px #E6E7E9; }\n .uagb-multi-button-button-group button.uagb-multi-button {\n font-size: 13px;\n font-weight: 400; }\n .uagb-multi-button-button-group svg {\n width: 18px;\n fill: #50575E; }\n .uagb-multi-button-button-group svg path {\n fill: inherit; }\n\n.uagb-multi-buttons-control.uag-multibutton-icons .uagb-multi-button {\n padding: 3px; }\n\n.spectra-multi-buttons__color-scheme--primary button.uagb-multi-button.is-primary.is-primary {\n color: #007CBA;\n background-color: #DCF2FF;\n border-color: #CDE9F9;\n box-shadow: inset 0 0 0 1px #CDE9F9; }\n .spectra-multi-buttons__color-scheme--primary button.uagb-multi-button.is-primary.is-primary svg {\n fill: #007CBA; }\n\n.spectra-multi-buttons__color-scheme--secondary button.uagb-multi-button.is-primary.is-primary {\n color: #FFFFFF;\n background-color: #959595;\n border-color: #959595;\n box-shadow: inset 0 0 0 1px #959595; }\n .spectra-multi-buttons__color-scheme--secondary button.uagb-multi-button.is-primary.is-primary svg {\n fill: #FFFFFF; }\n\n.spectra-multi-buttons__layout--inline {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%; }\n .spectra-multi-buttons__layout--inline .uagb-control__header,\n .spectra-multi-buttons__layout--inline .uag-control-label {\n margin-bottom: 0; }\n", "",{"version":3,"sources":["webpack://./src/components/multi-buttons-control/editor.lazy.scss"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,uDAAuD;AACvD;EACE,aAAa;EACb,WAAW,EAAE;EACb;IACE,WAAW;IACX,uBAAuB;IACvB,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,gBAAgB,EAAE;IAClB;MACE,kCAAkC;MAClC,+BAA+B;MAC/B,0BAA0B,EAAE;IAC9B;MACE,kCAAkC;MAClC,+BAA+B;MAC/B,0BAA0B,EAAE;EAChC;IACE,cAAc;IACd,mCAAmC,EAAE;EACvC;;;IAGE,cAAc;IACd,mCAAmC,EAAE;EACvC;;IAEE,cAAc,EAAE;EAClB;;;IAGE,mBAAmB;IACnB,mCAAmC,EAAE;EACvC;IACE,eAAe;IACf,gBAAgB,EAAE;EACpB;IACE,WAAW;IACX,aAAa,EAAE;IACf;MACE,aAAa,EAAE;;AAErB;EACE,YAAY,EAAE;;AAEhB;EACE,cAAc;EACd,yBAAyB;EACzB,qBAAqB;EACrB,mCAAmC,EAAE;EACrC;IACE,aAAa,EAAE;;AAEnB;EACE,cAAc;EACd,yBAAyB;EACzB,qBAAqB;EACrB,mCAAmC,EAAE;EACrC;IACE,aAAa,EAAE;;AAEnB;EACE,mBAAmB;EACnB,aAAa;EACb,8BAA8B,EAAE;EAChC;;IAEE,gBAAgB,EAAE","sourcesContent":["/* Multi Button Gap */\n/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-multi-button-button-group {\n display: flex;\n width: 100%; }\n .uagb-multi-button-button-group .uagb-multi-button {\n width: 100%;\n justify-content: center;\n height: unset;\n padding: 6px;\n line-height: 16px;\n min-height: 30px; }\n .uagb-multi-button-button-group .uagb-multi-button:first-child {\n -webkit-border-radius: 3px 0 0 3px;\n -moz-border-radius: 3px 0 0 3px;\n border-radius: 3px 0 0 3px; }\n .uagb-multi-button-button-group .uagb-multi-button:last-child {\n -webkit-border-radius: 0 3px 3px 0;\n -moz-border-radius: 0 3px 3px 0;\n border-radius: 0 3px 3px 0; }\n .uagb-multi-button-button-group button.uagb-multi-button.is-secondary {\n color: #50575E;\n box-shadow: inset 0 0 0 1px #E6E7E9; }\n .uagb-multi-button-button-group .uagb-multi-button.is-secondary:hover:not(:disabled),\n .uagb-multi-button-button-group .uagb-multi-button-grou[aria-label=\"Gap\"]\n.uagb-multi-button.is-tertiary:hover:not(:disabled) {\n color: #1D2327;\n box-shadow: inset 0 0 0 1px #E6E7E9; }\n .uagb-multi-button-button-group .uagb-multi-button.is-secondary,\n .uagb-multi-button-button-group .uagb-multi-button.is-tertiary {\n color: #50575E; }\n .uagb-multi-button-button-group .uagb-multi-button.is-secondary:active:not(:disabled),\n .uagb-multi-button-button-group .uagb-multi-button-grou[aria-label=\"Gap\"]\n.uagb-multi-button.is-tertiary:active:not(:disabled) {\n background: #FFFFFF;\n box-shadow: inset 0 0 0 1px #E6E7E9; }\n .uagb-multi-button-button-group button.uagb-multi-button {\n font-size: 13px;\n font-weight: 400; }\n .uagb-multi-button-button-group svg {\n width: 18px;\n fill: #50575E; }\n .uagb-multi-button-button-group svg path {\n fill: inherit; }\n\n.uagb-multi-buttons-control.uag-multibutton-icons .uagb-multi-button {\n padding: 3px; }\n\n.spectra-multi-buttons__color-scheme--primary button.uagb-multi-button.is-primary.is-primary {\n color: #007CBA;\n background-color: #DCF2FF;\n border-color: #CDE9F9;\n box-shadow: inset 0 0 0 1px #CDE9F9; }\n .spectra-multi-buttons__color-scheme--primary button.uagb-multi-button.is-primary.is-primary svg {\n fill: #007CBA; }\n\n.spectra-multi-buttons__color-scheme--secondary button.uagb-multi-button.is-primary.is-primary {\n color: #FFFFFF;\n background-color: #959595;\n border-color: #959595;\n box-shadow: inset 0 0 0 1px #959595; }\n .spectra-multi-buttons__color-scheme--secondary button.uagb-multi-button.is-primary.is-primary svg {\n fill: #FFFFFF; }\n\n.spectra-multi-buttons__layout--inline {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%; }\n .spectra-multi-buttons__layout--inline .uagb-control__header,\n .spectra-multi-buttons__layout--inline .uag-control-label {\n margin-bottom: 0; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/range/editor.lazy.scss": /*!******************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/range/editor.lazy.scss ***! \******************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, ".uag-range-control .uagb-range-control__mobile-controls {\n display: flex;\n width: 100%;\n align-items: center; }\n .uag-range-control .uagb-range-control__mobile-controls .components-base-control.components-range-control {\n -webkit-tap-highlight-color: transparent;\n box-sizing: border-box;\n align-items: flex-start;\n -webkit-box-pack: start;\n justify-content: flex-start;\n margin-right: 20px;\n position: relative;\n width: 100%;\n margin-bottom: 0;\n max-height: 30px; }\n .uag-range-control .uagb-range-control__mobile-controls .components-base-control.components-range-control .components-range-control__tooltip {\n left: 45%; }\n .uag-range-control .uagb-range-control__mobile-controls .components-input-control__container {\n flex: 0 0 0%;\n width: 100%; }\n .uag-range-control .uagb-range-control__mobile-controls .components-number-control {\n width: 35%;\n margin-left: 10px; }\n .uag-range-control .uagb-range-control__mobile-controls .components-number-control .components-input-control__input {\n padding: 0 1px 0 8px !important;\n text-align: left;\n font-size: 14px; }\n\n/*.components-panel__body {\n\t.components-font-size-picker__controls {\n\t\talign-items: center;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tmargin-bottom: 0;\n\t\tmax-width: 248px;\n\t}\n\t.components-font-size-picker__select {\n\t\tmargin-bottom: 0 !important;\n\t\twidth: 115px;\n\t}\n\t.components-font-size-picker__select .components-base-control__field {\n\t\tmargin-bottom: 0;\n\t}\n\t.components-font-size-picker__select .components-base-control__field {\n\t\tmargin-bottom: 0;\n\t}\n\t.components-font-size-picker__select .components-base-control__label {\n\t\tdisplay: none;\n\t\tmargin-bottom: 5px;\n\t\tvisibility: hidden;\n\t}\n\tinput[type=\"number\"].uagb-range-control__number {\n\t\tborder-left: 1px solid #d5dadf;\n\t\t-webkit-border-radius: 3px 0 0 3px;\n\t\tborder-right: 1px solid #d5dadf;\n\t\tborder-color: #d5dadf;\n\t}\n}*/\n/*.components-panel__body {\n\t.uagb-range-control__mobile-controls-item {\n\t\tbox-shadow: unset !important;\n\t\tborder-radius: unset;\n\t\t&.uagb-range-control__mobile-controls-item--padding.components-button.is-secondary:active:not(:disabled),\n\t\t.uagb-range-control__mobile-controls-item.uagb-range-control__mobile-controls-item--padding.components-button.is-tertiary:active:not(:disabled) {\n\t\t\tbackground: #fff;\n\t\t\tcolor: black;\n\t\t}\n\t}\n}*/\n", "",{"version":3,"sources":["webpack://./src/components/range/editor.lazy.scss"],"names":[],"mappings":"AAAA;EACE,aAAa;EACb,WAAW;EACX,mBAAmB,EAAE;EACrB;IACE,wCAAwC;IACxC,sBAAsB;IACtB,uBAAuB;IACvB,uBAAuB;IACvB,2BAA2B;IAC3B,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,gBAAgB;IAChB,gBAAgB,EAAE;IAClB;MACE,SAAS,EAAE;EACf;IACE,YAAY;IACZ,WAAW,EAAE;EACf;IACE,UAAU;IACV,iBAAiB,EAAE;IACnB;MACE,+BAA+B;MAC/B,gBAAgB;MAChB,eAAe,EAAE;;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BE;AACF;;;;;;;;;;EAUE","sourcesContent":[".uag-range-control .uagb-range-control__mobile-controls {\n display: flex;\n width: 100%;\n align-items: center; }\n .uag-range-control .uagb-range-control__mobile-controls .components-base-control.components-range-control {\n -webkit-tap-highlight-color: transparent;\n box-sizing: border-box;\n align-items: flex-start;\n -webkit-box-pack: start;\n justify-content: flex-start;\n margin-right: 20px;\n position: relative;\n width: 100%;\n margin-bottom: 0;\n max-height: 30px; }\n .uag-range-control .uagb-range-control__mobile-controls .components-base-control.components-range-control .components-range-control__tooltip {\n left: 45%; }\n .uag-range-control .uagb-range-control__mobile-controls .components-input-control__container {\n flex: 0 0 0%;\n width: 100%; }\n .uag-range-control .uagb-range-control__mobile-controls .components-number-control {\n width: 35%;\n margin-left: 10px; }\n .uag-range-control .uagb-range-control__mobile-controls .components-number-control .components-input-control__input {\n padding: 0 1px 0 8px !important;\n text-align: left;\n font-size: 14px; }\n\n/*.components-panel__body {\n\t.components-font-size-picker__controls {\n\t\talign-items: center;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tmargin-bottom: 0;\n\t\tmax-width: 248px;\n\t}\n\t.components-font-size-picker__select {\n\t\tmargin-bottom: 0 !important;\n\t\twidth: 115px;\n\t}\n\t.components-font-size-picker__select .components-base-control__field {\n\t\tmargin-bottom: 0;\n\t}\n\t.components-font-size-picker__select .components-base-control__field {\n\t\tmargin-bottom: 0;\n\t}\n\t.components-font-size-picker__select .components-base-control__label {\n\t\tdisplay: none;\n\t\tmargin-bottom: 5px;\n\t\tvisibility: hidden;\n\t}\n\tinput[type=\"number\"].uagb-range-control__number {\n\t\tborder-left: 1px solid #d5dadf;\n\t\t-webkit-border-radius: 3px 0 0 3px;\n\t\tborder-right: 1px solid #d5dadf;\n\t\tborder-color: #d5dadf;\n\t}\n}*/\n/*.components-panel__body {\n\t.uagb-range-control__mobile-controls-item {\n\t\tbox-shadow: unset !important;\n\t\tborder-radius: unset;\n\t\t&.uagb-range-control__mobile-controls-item--padding.components-button.is-secondary:active:not(:disabled),\n\t\t.uagb-range-control__mobile-controls-item.uagb-range-control__mobile-controls-item--padding.components-button.is-tertiary:active:not(:disabled) {\n\t\t\tbackground: #fff;\n\t\t\tcolor: black;\n\t\t}\n\t}\n}*/\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/responsive-select/editor.lazy.scss": /*!******************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/responsive-select/editor.lazy.scss ***! \******************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, ".uagb-responsive-select-control .uagb-size-type-field-tabs {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%; }\n .uagb-responsive-select-control .uagb-size-type-field-tabs .uagb-control__header {\n margin-bottom: 0; }\n", "",{"version":3,"sources":["webpack://./src/components/responsive-select/editor.lazy.scss"],"names":[],"mappings":"AAAA;EACE,mBAAmB;EACnB,aAAa;EACb,8BAA8B,EAAE;EAChC;IACE,gBAAgB,EAAE","sourcesContent":[".uagb-responsive-select-control .uagb-size-type-field-tabs {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%; }\n .uagb-responsive-select-control .uagb-size-type-field-tabs .uagb-control__header {\n margin-bottom: 0; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/select-control/editor.lazy.scss": /*!***************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/select-control/editor.lazy.scss ***! \***************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-select-control--layout-inline .components-select-control {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%;\n margin-bottom: 25px;\n color: #50575E; }\n\n.uagb-select-control--layout-inline .uagb-control__header,\n.uagb-select-control--layout-inline .uag-control-label,\n.uagb-select-control--layout-inline .components-select-control label.components-input-control__label {\n margin-bottom: 0; }\n\n.uagb-select-control--layout-inline:last-child .components-select-control {\n margin-bottom: 0; }\n", "",{"version":3,"sources":["webpack://./src/components/select-control/editor.lazy.scss"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;EACE,mBAAmB;EACnB,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,cAAc,EAAE;;AAElB;;;EAGE,gBAAgB,EAAE;;AAEpB;EACE,gBAAgB,EAAE","sourcesContent":["/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-select-control--layout-inline .components-select-control {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%;\n margin-bottom: 25px;\n color: #50575E; }\n\n.uagb-select-control--layout-inline .uagb-control__header,\n.uagb-select-control--layout-inline .uag-control-label,\n.uagb-select-control--layout-inline .components-select-control label.components-input-control__label {\n margin-bottom: 0; }\n\n.uagb-select-control--layout-inline:last-child .components-select-control {\n margin-bottom: 0; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/separator/editor.lazy.scss": /*!**********************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/separator/editor.lazy.scss ***! \**********************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* stylelint-disable color-hex-case, color-hex-length */\n.spectra-separator {\n width: 100%;\n height: 1px;\n margin: 25px 0;\n background-color: #E6E7E9; }\n\n.uagb-inspector-tab .components-panel__body .spectra-separator {\n width: auto;\n margin: 25px -16px; }\n", "",{"version":3,"sources":["webpack://./src/components/separator/editor.lazy.scss"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;EACE,WAAW;EACX,WAAW;EACX,cAAc;EACd,yBAAyB,EAAE;;AAE7B;EACE,WAAW;EACX,kBAAkB,EAAE","sourcesContent":["/* stylelint-disable color-hex-case, color-hex-length */\n.spectra-separator {\n width: 100%;\n height: 1px;\n margin: 25px 0;\n background-color: #E6E7E9; }\n\n.uagb-inspector-tab .components-panel__body .spectra-separator {\n width: auto;\n margin: 25px -16px; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/spacing-control/editor.lazy.scss": /*!****************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/spacing-control/editor.lazy.scss ***! \****************************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-spacing-control {\n position: relative;\n display: inline-block; }\n .uagb-spacing-control .components-base-control__label {\n margin-bottom: 5px; }\n .uagb-spacing-control .components-base-control__help {\n margin-top: -8px; }\n .uagb-spacing-control input[type=\"number\"].uagb-spacing-control__number,\n .uagb-spacing-control .uagb-spacing-control__link {\n border-left: 1px solid;\n border-right: 1px solid;\n border-color: #E6E7E9;\n color: #50575E;\n border-radius: 0;\n box-shadow: none !important;\n height: 30px;\n margin: 0 -1px 0 0;\n padding-right: 1px;\n width: 25%; }\n .uagb-spacing-control input[type=\"number\"].uagb-spacing-control__number:focus {\n z-index: 1;\n outline-offset: -1px;\n outline: 1px solid #CCCCCC; }\n .uagb-spacing-control .uagb-spacing-control__link {\n border: 1px solid #959595;\n background-color: #959595;\n color: #FFFFFF;\n justify-content: center;\n display: flex;\n align-items: center;\n padding: 2px 0;\n font-size: 12px;\n line-height: 28px;\n cursor: pointer;\n transition: none; }\n .uagb-spacing-control .uagb-spacing-control__link.uagb-spacing-control-disconnected {\n border-color: #E6E7E9;\n background-color: #FFFFFF;\n color: #959595; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls button[type=\"button\"] > span {\n cursor: pointer;\n width: 15px;\n height: 15px;\n font-size: 15px; }\n .uagb-spacing-control .uagb-spacing-control__inputs > :first-child.uagb-spacing-control__number {\n -webkit-border-radius: 3px 0 0 3px;\n -moz-border-radius: 3px 0 0 3px;\n border-radius: 3px 0 0 3px; }\n .uagb-spacing-control .uagb-spacing-control__inputs > :last-child {\n -webkit-border-radius: 0 3px 3px 0;\n -moz-border-radius: 0 3px 3px 0;\n border-radius: 0 3px 3px 0; }\n .uagb-spacing-control .uagb-control__actions .components-tab-panel__tabs {\n padding-right: 4px;\n margin-right: 0; }\n .uagb-spacing-control .uagb-spacing-control__inputs {\n display: flex; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item {\n border: 0;\n display: none;\n font-size: 10px;\n height: 30px;\n justify-content: center;\n left: 50px;\n line-height: 12px;\n padding: 0;\n position: absolute;\n text-align: center;\n text-shadow: none;\n top: -5px;\n width: 26px;\n z-index: 1;\n box-shadow: unset;\n border-radius: unset;\n color: unset; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.is-active {\n display: block; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item:focus:enabled {\n box-shadow: inset 0 0 0 1px #fff; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item:focus:enabled svg {\n fill: #fff; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item svg {\n position: relative; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.uagb-spacing-control__mobile-controls-item--spacing.components-button.is-secondary:active:not(:disabled), .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.uagb-spacing-control__mobile-controls-item--spacing.components-button.is-tertiary:active:not(:disabled) {\n background: #fff;\n color: #50575E; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.components-button.is-secondary:hover:not(:disabled), .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.components-button.is-tertiary:hover:not(:disabled) {\n color: unset;\n background: unset;\n box-shadow: unset; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--default svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--desktop svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--tablet svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--mobile svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__input-labels {\n display: flex;\n margin-bottom: -3px; }\n .uagb-spacing-control .uagb-spacing-control__input-labels span {\n text-align: center;\n width: 20%; }\n .uagb-spacing-control .uagb-spacing-control__input-labels .uagb-spacing-control__link-label {\n width: 10%; }\n .uagb-spacing-control .uagb-control__label {\n margin-bottom: 0;\n width: 50%; }\n .uagb-spacing-control .uagb-spacing-control__number-label {\n color: #CCCCCC;\n display: block;\n font-size: 10px;\n margin-top: 5px; }\n\n/*.components-panel .block-editor-block-inspector .uagb-inspector-tab .uagb-spacing-control.components-base-control:last-child{\n\tmargin-bottom: 15px;\n}*/\n", "",{"version":3,"sources":["webpack://./src/components/spacing-control/editor.lazy.scss"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;EACE,kBAAkB;EAClB,qBAAqB,EAAE;EACvB;IACE,kBAAkB,EAAE;EACtB;IACE,gBAAgB,EAAE;EACpB;;IAEE,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,cAAc;IACd,gBAAgB;IAChB,2BAA2B;IAC3B,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,UAAU,EAAE;EACd;IACE,UAAU;IACV,oBAAoB;IACpB,0BAA0B,EAAE;EAC9B;IACE,yBAAyB;IACzB,yBAAyB;IACzB,cAAc;IACd,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,gBAAgB,EAAE;IAClB;MACE,qBAAqB;MACrB,yBAAyB;MACzB,cAAc,EAAE;EACpB;IACE,eAAe;IACf,WAAW;IACX,YAAY;IACZ,eAAe,EAAE;EACnB;IACE,kCAAkC;IAClC,+BAA+B;IAC/B,0BAA0B,EAAE;EAC9B;IACE,kCAAkC;IAClC,+BAA+B;IAC/B,0BAA0B,EAAE;EAC9B;IACE,kBAAkB;IAClB,eAAe,EAAE;EACnB;IACE,aAAa,EAAE;EACjB;IACE,SAAS;IACT,aAAa;IACb,eAAe;IACf,YAAY;IACZ,uBAAuB;IACvB,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,kBAAkB;IAClB,kBAAkB;IAClB,iBAAiB;IACjB,SAAS;IACT,WAAW;IACX,UAAU;IACV,iBAAiB;IACjB,oBAAoB;IACpB,YAAY,EAAE;IACd;MACE,cAAc,EAAE;IAClB;MACE,gCAAgC,EAAE;IACpC;MACE,UAAU,EAAE;IACd;MACE,kBAAkB,EAAE;IACtB;MACE,gBAAgB;MAChB,cAAc,EAAE;IAClB;MACE,YAAY;MACZ,iBAAiB;MACjB,iBAAiB,EAAE;EACvB;IACE,QAAQ,EAAE;EACZ;IACE,QAAQ,EAAE;EACZ;IACE,QAAQ,EAAE;EACZ;IACE,QAAQ,EAAE;EACZ;IACE,aAAa;IACb,mBAAmB,EAAE;IACrB;MACE,kBAAkB;MAClB,UAAU,EAAE;IACd;MACE,UAAU,EAAE;EAChB;IACE,gBAAgB;IAChB,UAAU,EAAE;EACd;IACE,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe,EAAE;;AAErB;;EAEE","sourcesContent":["/* stylelint-disable color-hex-case, color-hex-length */\n.uagb-spacing-control {\n position: relative;\n display: inline-block; }\n .uagb-spacing-control .components-base-control__label {\n margin-bottom: 5px; }\n .uagb-spacing-control .components-base-control__help {\n margin-top: -8px; }\n .uagb-spacing-control input[type=\"number\"].uagb-spacing-control__number,\n .uagb-spacing-control .uagb-spacing-control__link {\n border-left: 1px solid;\n border-right: 1px solid;\n border-color: #E6E7E9;\n color: #50575E;\n border-radius: 0;\n box-shadow: none !important;\n height: 30px;\n margin: 0 -1px 0 0;\n padding-right: 1px;\n width: 25%; }\n .uagb-spacing-control input[type=\"number\"].uagb-spacing-control__number:focus {\n z-index: 1;\n outline-offset: -1px;\n outline: 1px solid #CCCCCC; }\n .uagb-spacing-control .uagb-spacing-control__link {\n border: 1px solid #959595;\n background-color: #959595;\n color: #FFFFFF;\n justify-content: center;\n display: flex;\n align-items: center;\n padding: 2px 0;\n font-size: 12px;\n line-height: 28px;\n cursor: pointer;\n transition: none; }\n .uagb-spacing-control .uagb-spacing-control__link.uagb-spacing-control-disconnected {\n border-color: #E6E7E9;\n background-color: #FFFFFF;\n color: #959595; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls button[type=\"button\"] > span {\n cursor: pointer;\n width: 15px;\n height: 15px;\n font-size: 15px; }\n .uagb-spacing-control .uagb-spacing-control__inputs > :first-child.uagb-spacing-control__number {\n -webkit-border-radius: 3px 0 0 3px;\n -moz-border-radius: 3px 0 0 3px;\n border-radius: 3px 0 0 3px; }\n .uagb-spacing-control .uagb-spacing-control__inputs > :last-child {\n -webkit-border-radius: 0 3px 3px 0;\n -moz-border-radius: 0 3px 3px 0;\n border-radius: 0 3px 3px 0; }\n .uagb-spacing-control .uagb-control__actions .components-tab-panel__tabs {\n padding-right: 4px;\n margin-right: 0; }\n .uagb-spacing-control .uagb-spacing-control__inputs {\n display: flex; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item {\n border: 0;\n display: none;\n font-size: 10px;\n height: 30px;\n justify-content: center;\n left: 50px;\n line-height: 12px;\n padding: 0;\n position: absolute;\n text-align: center;\n text-shadow: none;\n top: -5px;\n width: 26px;\n z-index: 1;\n box-shadow: unset;\n border-radius: unset;\n color: unset; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.is-active {\n display: block; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item:focus:enabled {\n box-shadow: inset 0 0 0 1px #fff; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item:focus:enabled svg {\n fill: #fff; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item svg {\n position: relative; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.uagb-spacing-control__mobile-controls-item--spacing.components-button.is-secondary:active:not(:disabled), .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.uagb-spacing-control__mobile-controls-item--spacing.components-button.is-tertiary:active:not(:disabled) {\n background: #fff;\n color: #50575E; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.components-button.is-secondary:hover:not(:disabled), .uagb-spacing-control .uagb-spacing-control__mobile-controls-item.components-button.is-tertiary:hover:not(:disabled) {\n color: unset;\n background: unset;\n box-shadow: unset; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--default svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--desktop svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--tablet svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__mobile-controls-item--mobile svg {\n top: 3px; }\n .uagb-spacing-control .uagb-spacing-control__input-labels {\n display: flex;\n margin-bottom: -3px; }\n .uagb-spacing-control .uagb-spacing-control__input-labels span {\n text-align: center;\n width: 20%; }\n .uagb-spacing-control .uagb-spacing-control__input-labels .uagb-spacing-control__link-label {\n width: 10%; }\n .uagb-spacing-control .uagb-control__label {\n margin-bottom: 0;\n width: 50%; }\n .uagb-spacing-control .uagb-spacing-control__number-label {\n color: #CCCCCC;\n display: block;\n font-size: 10px;\n margin-top: 5px; }\n\n/*.components-panel .block-editor-block-inspector .uagb-inspector-tab .uagb-spacing-control.components-base-control:last-child{\n\tmargin-bottom: 15px;\n}*/\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/tabs/editor.lazy.scss": /*!*****************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/tabs/editor.lazy.scss ***! \*****************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* Normal & Hover Tabs CSS*/\n/* stylelint-disable color-hex-case, color-hex-length */\n.uag-control-tabs {\n margin: 0 -16px;\n padding: 0 16px; }\n .uag-control-tabs.uag-control-tabs-three-tabs .components-tab-panel__tabs > .components-button {\n width: 31.3%; }\n .uag-control-tabs > .components-tab-panel__tabs {\n justify-content: space-between;\n margin: 0 -16px 25px;\n padding: 0 16px;\n border-bottom: 1px solid #E6E7E9; }\n .uag-control-tabs > .components-tab-panel__tabs > .components-button {\n width: 47%;\n text-align: center;\n justify-content: center;\n border: 1px solid #E6E7E9;\n border-radius: 3px 3px 0 0;\n color: #50575E;\n background-color: #F0F0F1;\n max-height: 30px;\n font-size: 13px;\n border-bottom: 0;\n margin-bottom: -1px; }\n .uag-control-tabs > .components-tab-panel__tabs > .components-button.active-tab {\n color: #007CBA;\n background: #FFFFFF; }\n .uag-control-tabs > .components-tab-panel__tabs > .components-button:focus:not(:disabled) {\n box-shadow: none; }\n .uag-control-tabs .components-base-control {\n margin-bottom: 25px; }\n .uag-control-tabs .components-base-control .components-base-control,\n .uag-control-tabs .components-base-control .components-base-control__field {\n padding-top: 0;\n margin-bottom: 0; }\n .uag-control-tabs .components-base-control:last-child {\n margin-bottom: 0; }\n", "",{"version":3,"sources":["webpack://./src/components/tabs/editor.lazy.scss"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,uDAAuD;AACvD;EACE,eAAe;EACf,eAAe,EAAE;EACjB;IACE,YAAY,EAAE;EAChB;IACE,8BAA8B;IAC9B,oBAAoB;IACpB,eAAe;IACf,gCAAgC,EAAE;IAClC;MACE,UAAU;MACV,kBAAkB;MAClB,uBAAuB;MACvB,yBAAyB;MACzB,0BAA0B;MAC1B,cAAc;MACd,yBAAyB;MACzB,gBAAgB;MAChB,eAAe;MACf,gBAAgB;MAChB,mBAAmB,EAAE;MACrB;QACE,cAAc;QACd,mBAAmB,EAAE;MACvB;QACE,gBAAgB,EAAE;EACxB;IACE,mBAAmB,EAAE;IACrB;;MAEE,cAAc;MACd,gBAAgB,EAAE;IACpB;MACE,gBAAgB,EAAE","sourcesContent":["/* Normal & Hover Tabs CSS*/\n/* stylelint-disable color-hex-case, color-hex-length */\n.uag-control-tabs {\n margin: 0 -16px;\n padding: 0 16px; }\n .uag-control-tabs.uag-control-tabs-three-tabs .components-tab-panel__tabs > .components-button {\n width: 31.3%; }\n .uag-control-tabs > .components-tab-panel__tabs {\n justify-content: space-between;\n margin: 0 -16px 25px;\n padding: 0 16px;\n border-bottom: 1px solid #E6E7E9; }\n .uag-control-tabs > .components-tab-panel__tabs > .components-button {\n width: 47%;\n text-align: center;\n justify-content: center;\n border: 1px solid #E6E7E9;\n border-radius: 3px 3px 0 0;\n color: #50575E;\n background-color: #F0F0F1;\n max-height: 30px;\n font-size: 13px;\n border-bottom: 0;\n margin-bottom: -1px; }\n .uag-control-tabs > .components-tab-panel__tabs > .components-button.active-tab {\n color: #007CBA;\n background: #FFFFFF; }\n .uag-control-tabs > .components-tab-panel__tabs > .components-button:focus:not(:disabled) {\n box-shadow: none; }\n .uag-control-tabs .components-base-control {\n margin-bottom: 25px; }\n .uag-control-tabs .components-base-control .components-base-control,\n .uag-control-tabs .components-base-control .components-base-control__field {\n padding-top: 0;\n margin-bottom: 0; }\n .uag-control-tabs .components-base-control:last-child {\n margin-bottom: 0; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/typography/editor.lazy.scss": /*!***********************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/typography/editor.lazy.scss ***! \***********************************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, "/* Reset Gutenberg Css */\n/* stylelint-disable color-hex-case, color-hex-length */\n.spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select {\n display: flex;\n width: 100%;\n flex-direction: column; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select__wrapper {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%;\n height: 30px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select__wrapper label {\n margin-bottom: 0; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__input input {\n box-shadow: none;\n border: none;\n min-height: 30px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__control {\n cursor: pointer; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__control:hover {\n border: 1px solid #E6E7E9; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__menu {\n z-index: 99999; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__indicators {\n height: 30px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__dropdown-indicator {\n padding-left: 6px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__dropdown-indicator svg {\n fill: #50575E;\n height: 14px;\n width: 14px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__dropdown-indicator:hover {\n color: #50575E; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__value-container {\n top: 0; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__value-container > div {\n margin: 0;\n padding: 0; }\n", "",{"version":3,"sources":["webpack://./src/components/typography/editor.lazy.scss"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,uDAAuD;AACvD;EACE,aAAa;EACb,WAAW;EACX,sBAAsB,EAAE;EACxB;IACE,mBAAmB;IACnB,aAAa;IACb,8BAA8B;IAC9B,YAAY,EAAE;IACd;MACE,gBAAgB,EAAE;EACtB;IACE,gBAAgB;IAChB,YAAY;IACZ,gBAAgB,EAAE;EACpB;IACE,eAAe,EAAE;IACjB;MACE,yBAAyB,EAAE;EAC/B;IACE,cAAc,EAAE;EAClB;IACE,YAAY,EAAE;EAChB;IACE,iBAAiB,EAAE;IACnB;MACE,aAAa;MACb,YAAY;MACZ,WAAW,EAAE;EACjB;IACE,cAAc,EAAE;EAClB;IACE,MAAM,EAAE;IACR;MACE,SAAS;MACT,UAAU,EAAE","sourcesContent":["/* Reset Gutenberg Css */\n/* stylelint-disable color-hex-case, color-hex-length */\n.spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select {\n display: flex;\n width: 100%;\n flex-direction: column; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select__wrapper {\n align-items: center;\n display: grid;\n grid-template-columns: 50% 50%;\n height: 30px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select__wrapper label {\n margin-bottom: 0; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__input input {\n box-shadow: none;\n border: none;\n min-height: 30px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__control {\n cursor: pointer; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__control:hover {\n border: 1px solid #E6E7E9; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__menu {\n z-index: 99999; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__indicators {\n height: 30px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__dropdown-indicator {\n padding-left: 6px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__dropdown-indicator svg {\n fill: #50575E;\n height: 14px;\n width: 14px; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__dropdown-indicator:hover {\n color: #50575E; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__value-container {\n top: 0; }\n .spectra-control-popup__options .spectra-control-popup .uag-font-family-searchable-select .uag-font-family-select__value-container > div {\n margin: 0;\n padding: 0; }\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/runtime/api.js": /*!*****************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/api.js ***! \*****************************************************/ /***/ (function(module) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader // eslint-disable-next-line func-names module.exports = function (cssWithMappingToString) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item); if (item[2]) { return "@media ".concat(item[2], " {").concat(content, "}"); } return content; }).join(""); }; // import a list of modules into the list // eslint-disable-next-line func-names list.i = function (modules, mediaQuery, dedupe) { if (typeof modules === "string") { // eslint-disable-next-line no-param-reassign modules = [[null, modules, ""]]; } var alreadyImportedModules = {}; if (dedupe) { for (var i = 0; i < this.length; i++) { // eslint-disable-next-line prefer-destructuring var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _i = 0; _i < modules.length; _i++) { var item = [].concat(modules[_i]); if (dedupe && alreadyImportedModules[item[0]]) { // eslint-disable-next-line no-continue continue; } if (mediaQuery) { if (!item[2]) { item[2] = mediaQuery; } else { item[2] = "".concat(mediaQuery, " and ").concat(item[2]); } } list.push(item); } }; return list; }; /***/ }), /***/ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js": /*!************************************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/cssWithMappingToString.js ***! \************************************************************************/ /***/ (function(module) { "use strict"; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } module.exports = function cssWithMappingToString(item) { var _item = _slicedToArray(item, 4), content = _item[1], cssMapping = _item[3]; if (!cssMapping) { return content; } if (typeof btoa === "function") { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); var sourceMapping = "/*# ".concat(data, " */"); var sourceURLs = cssMapping.sources.map(function (source) { return "/*# sourceURL=".concat(cssMapping.sourceRoot || "").concat(source, " */"); }); return [content].concat(sourceURLs).concat([sourceMapping]).join("\n"); } return [content].join("\n"); }; /***/ }), /***/ "./node_modules/dom-helpers/class/addClass.js": /*!****************************************************!*\ !*** ./node_modules/dom-helpers/class/addClass.js ***! \****************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); exports.__esModule = true; exports["default"] = addClass; var _hasClass = _interopRequireDefault(__webpack_require__(/*! ./hasClass */ "./node_modules/dom-helpers/class/hasClass.js")); function addClass(element, className) { if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className); } module.exports = exports["default"]; /***/ }), /***/ "./node_modules/dom-helpers/class/hasClass.js": /*!****************************************************!*\ !*** ./node_modules/dom-helpers/class/hasClass.js ***! \****************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = hasClass; function hasClass(element, className) { if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1; } module.exports = exports["default"]; /***/ }), /***/ "./node_modules/dom-helpers/class/removeClass.js": /*!*******************************************************!*\ !*** ./node_modules/dom-helpers/class/removeClass.js ***! \*******************************************************/ /***/ (function(module) { "use strict"; function replaceClassName(origClass, classToRemove) { return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ''); } module.exports = function removeClass(element, className) { if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className)); }; /***/ }), /***/ "./node_modules/emotion/dist/index.esm.js": /*!************************************************!*\ !*** ./node_modules/emotion/dist/index.esm.js ***! \************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "caches": function() { return /* binding */ caches; }, /* harmony export */ "css": function() { return /* binding */ css; }, /* harmony export */ "cx": function() { return /* binding */ cx; }, /* harmony export */ "flush": function() { return /* binding */ flush; }, /* harmony export */ "getRegisteredStyles": function() { return /* binding */ getRegisteredStyles; }, /* harmony export */ "hydrate": function() { return /* binding */ hydrate; }, /* harmony export */ "injectGlobal": function() { return /* binding */ injectGlobal; }, /* harmony export */ "keyframes": function() { return /* binding */ keyframes; }, /* harmony export */ "merge": function() { return /* binding */ merge; }, /* harmony export */ "sheet": function() { return /* binding */ sheet; } /* harmony export */ }); /* harmony import */ var create_emotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! create-emotion */ "./node_modules/create-emotion/dist/index.esm.js"); var context = typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : {}; var _createEmotion = (0,create_emotion__WEBPACK_IMPORTED_MODULE_0__["default"])(context), flush = _createEmotion.flush, hydrate = _createEmotion.hydrate, cx = _createEmotion.cx, merge = _createEmotion.merge, getRegisteredStyles = _createEmotion.getRegisteredStyles, injectGlobal = _createEmotion.injectGlobal, keyframes = _createEmotion.keyframes, css = _createEmotion.css, sheet = _createEmotion.sheet, caches = _createEmotion.caches; /***/ }), /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js": /*!**********************************************************!*\ !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var safeIsNaN = Number.isNaN || function ponyfill(value) { return typeof value === 'number' && value !== value; }; function isEqual(first, second) { if (first === second) { return true; } if (safeIsNaN(first) && safeIsNaN(second)) { return true; } return false; } function areInputsEqual(newInputs, lastInputs) { if (newInputs.length !== lastInputs.length) { return false; } for (var i = 0; i < newInputs.length; i++) { if (!isEqual(newInputs[i], lastInputs[i])) { return false; } } return true; } function memoizeOne(resultFn, isEqual) { if (isEqual === void 0) { isEqual = areInputsEqual; } var lastThis; var lastArgs = []; var lastResult; var calledOnce = false; function memoized() { var newArgs = []; for (var _i = 0; _i < arguments.length; _i++) { newArgs[_i] = arguments[_i]; } if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) { return lastResult; } lastResult = resultFn.apply(this, newArgs); calledOnce = true; lastThis = this; lastArgs = newArgs; return lastResult; } return memoized; } /* harmony default export */ __webpack_exports__["default"] = (memoizeOne); /***/ }), /***/ "./node_modules/object-assign/index.js": /*!*********************************************!*\ !*** ./node_modules/object-assign/index.js ***! \*********************************************/ /***/ (function(module) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /***/ "./node_modules/performance-now/lib/performance-now.js": /*!*************************************************************!*\ !*** ./node_modules/performance-now/lib/performance-now.js ***! \*************************************************************/ /***/ (function(module) { // Generated by CoffeeScript 1.12.2 (function() { var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; if ((typeof performance !== "undefined" && performance !== null) && performance.now) { module.exports = function() { return performance.now(); }; } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { module.exports = function() { return (getNanoSeconds() - nodeLoadTime) / 1e6; }; hrtime = process.hrtime; getNanoSeconds = function() { var hr; hr = hrtime(); return hr[0] * 1e9 + hr[1]; }; moduleLoadTime = getNanoSeconds(); upTime = process.uptime() * 1e9; nodeLoadTime = moduleLoadTime - upTime; } else if (Date.now) { module.exports = function() { return Date.now() - loadTime; }; loadTime = Date.now(); } else { module.exports = function() { return new Date().getTime() - loadTime; }; loadTime = new Date().getTime(); } }).call(this); //# sourceMappingURL=performance-now.js.map /***/ }), /***/ "./node_modules/prop-types/checkPropTypes.js": /*!***************************************************!*\ !*** ./node_modules/prop-types/checkPropTypes.js ***! \***************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var printWarning = function() {}; if (true) { var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"); var loggedTypeFailures = {}; var has = Function.call.bind(Object.prototype.hasOwnProperty); printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (true) { for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { var err = Error( (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' ); err.name = 'Invariant Violation'; throw err; } error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } if (error && !(error instanceof Error)) { printWarning( (componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).' ); } if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; printWarning( 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') ); } } } } } /** * Resets warning cache when testing. * * @private */ checkPropTypes.resetWarningCache = function() { if (true) { loggedTypeFailures = {}; } } module.exports = checkPropTypes; /***/ }), /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js": /*!************************************************************!*\ !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***! \************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js"); var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js"); var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"); var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js"); var has = Function.call.bind(Object.prototype.hasOwnProperty); var printWarning = function() {}; if (true) { printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } function emptyFunctionThatReturnsNull() { return null; } module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), elementType: createElementTypeTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker, exact: createStrictShapeTypeChecker, }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (true) { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } else if ( true && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { printWarning( 'You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunctionThatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createElementTypeTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!ReactIs.isValidElementType(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { if (true) { if (arguments.length > 1) { printWarning( 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' ); } else { printWarning('Invalid argument supplied to oneOf, expected an array.'); } } return emptyFunctionThatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { var type = getPreciseType(value); if (type === 'symbol') { return String(value); } return value; }); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (has(propValue, key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; return emptyFunctionThatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { printWarning( 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' ); return emptyFunctionThatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createStrictShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } // We need to check all keys in case some are required but missing from // props. var allKeys = assign({}, props[propName], shapeTypes); for (var key in allKeys) { var checker = shapeTypes[key]; if (!checker) { return new PropTypeError( 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') ); } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // falsy value can't be a Symbol if (!propValue) { return false; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ "./node_modules/prop-types/index.js": /*!******************************************!*\ !*** ./node_modules/prop-types/index.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js"); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); } else {} /***/ }), /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": /*!*************************************************************!*\ !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! \*************************************************************/ /***/ (function(module) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ "./node_modules/raf/index.js": /*!***********************************!*\ !*** ./node_modules/raf/index.js ***! \***********************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js") , root = typeof window === 'undefined' ? __webpack_require__.g : window , vendors = ['moz', 'webkit'] , suffix = 'AnimationFrame' , raf = root['request' + suffix] , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] for(var i = 0; !raf && i < vendors.length; i++) { raf = root[vendors[i] + 'Request' + suffix] caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix] } // Some versions of FF have rAF but not cAF if(!raf || !caf) { var last = 0 , id = 0 , queue = [] , frameDuration = 1000 / 60 raf = function(callback) { if(queue.length === 0) { var _now = now() , next = Math.max(0, frameDuration - (_now - last)) last = next + _now setTimeout(function() { var cp = queue.slice(0) // Clear queue here to prevent // callbacks from appending listeners // to the current frame's queue queue.length = 0 for(var i = 0; i < cp.length; i++) { if(!cp[i].cancelled) { try{ cp[i].callback(last) } catch(e) { setTimeout(function() { throw e }, 0) } } } }, Math.round(next)) } queue.push({ handle: ++id, callback: callback, cancelled: false }) return id } caf = function(handle) { for(var i = 0; i < queue.length; i++) { if(queue[i].handle === handle) { queue[i].cancelled = true } } } } module.exports = function(fn) { // Wrap in a new function to prevent // `cancel` potentially being assigned // to the native rAF function return raf.call(root, fn) } module.exports.cancel = function() { caf.apply(root, arguments) } module.exports.polyfill = function(object) { if (!object) { object = root; } object.requestAnimationFrame = raf object.cancelAnimationFrame = caf } /***/ }), /***/ "./node_modules/react-input-autosize/lib/AutosizeInput.js": /*!****************************************************************!*\ !*** ./node_modules/react-input-autosize/lib/AutosizeInput.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(/*! react */ "react"); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var sizerStyle = { position: 'absolute', top: 0, left: 0, visibility: 'hidden', height: 0, overflow: 'scroll', whiteSpace: 'pre' }; var INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth']; var cleanInputProps = function cleanInputProps(inputProps) { INPUT_PROPS_BLACKLIST.forEach(function (field) { return delete inputProps[field]; }); return inputProps; }; var copyStyles = function copyStyles(styles, node) { node.style.fontSize = styles.fontSize; node.style.fontFamily = styles.fontFamily; node.style.fontWeight = styles.fontWeight; node.style.fontStyle = styles.fontStyle; node.style.letterSpacing = styles.letterSpacing; node.style.textTransform = styles.textTransform; }; var isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent) : false; var generateId = function generateId() { // we only need an auto-generated ID for stylesheet injection, which is only // used for IE. so if the browser is not IE, this should return undefined. return isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined; }; var AutosizeInput = function (_Component) { _inherits(AutosizeInput, _Component); function AutosizeInput(props) { _classCallCheck(this, AutosizeInput); var _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props)); _this.inputRef = function (el) { _this.input = el; if (typeof _this.props.inputRef === 'function') { _this.props.inputRef(el); } }; _this.placeHolderSizerRef = function (el) { _this.placeHolderSizer = el; }; _this.sizerRef = function (el) { _this.sizer = el; }; _this.state = { inputWidth: props.minWidth, inputId: props.id || generateId() }; return _this; } _createClass(AutosizeInput, [{ key: 'componentDidMount', value: function componentDidMount() { this.mounted = true; this.copyInputStyles(); this.updateInputWidth(); } }, { key: 'UNSAFE_componentWillReceiveProps', value: function UNSAFE_componentWillReceiveProps(nextProps) { var id = nextProps.id; if (id !== this.props.id) { this.setState({ inputId: id || generateId() }); } } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (prevState.inputWidth !== this.state.inputWidth) { if (typeof this.props.onAutosize === 'function') { this.props.onAutosize(this.state.inputWidth); } } this.updateInputWidth(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.mounted = false; } }, { key: 'copyInputStyles', value: function copyInputStyles() { if (!this.mounted || !window.getComputedStyle) { return; } var inputStyles = this.input && window.getComputedStyle(this.input); if (!inputStyles) { return; } copyStyles(inputStyles, this.sizer); if (this.placeHolderSizer) { copyStyles(inputStyles, this.placeHolderSizer); } } }, { key: 'updateInputWidth', value: function updateInputWidth() { if (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') { return; } var newInputWidth = void 0; if (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) { newInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2; } else { newInputWidth = this.sizer.scrollWidth + 2; } // add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI var extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0; newInputWidth += extraWidth; if (newInputWidth < this.props.minWidth) { newInputWidth = this.props.minWidth; } if (newInputWidth !== this.state.inputWidth) { this.setState({ inputWidth: newInputWidth }); } } }, { key: 'getInput', value: function getInput() { return this.input; } }, { key: 'focus', value: function focus() { this.input.focus(); } }, { key: 'blur', value: function blur() { this.input.blur(); } }, { key: 'select', value: function select() { this.input.select(); } }, { key: 'renderStyles', value: function renderStyles() { // this method injects styles to hide IE's clear indicator, which messes // with input size detection. the stylesheet is only injected when the // browser is IE, and can also be disabled by the `injectStyles` prop. var injectStyles = this.props.injectStyles; return isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: { __html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}' } }) : null; } }, { key: 'render', value: function render() { var sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) { if (previousValue !== null && previousValue !== undefined) { return previousValue; } return currentValue; }); var wrapperStyle = _extends({}, this.props.style); if (!wrapperStyle.display) wrapperStyle.display = 'inline-block'; var inputStyle = _extends({ boxSizing: 'content-box', width: this.state.inputWidth + 'px' }, this.props.inputStyle); var inputProps = _objectWithoutProperties(this.props, []); cleanInputProps(inputProps); inputProps.className = this.props.inputClassName; inputProps.id = this.state.inputId; inputProps.style = inputStyle; return _react2.default.createElement( 'div', { className: this.props.className, style: wrapperStyle }, this.renderStyles(), _react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })), _react2.default.createElement( 'div', { ref: this.sizerRef, style: sizerStyle }, sizerValue ), this.props.placeholder ? _react2.default.createElement( 'div', { ref: this.placeHolderSizerRef, style: sizerStyle }, this.props.placeholder ) : null ); } }]); return AutosizeInput; }(_react.Component); AutosizeInput.propTypes = { className: _propTypes2.default.string, // className for the outer element defaultValue: _propTypes2.default.any, // default field value extraWidth: _propTypes2.default.oneOfType([// additional width for input element _propTypes2.default.number, _propTypes2.default.string]), id: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots injectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true inputClassName: _propTypes2.default.string, // className for the input element inputRef: _propTypes2.default.func, // ref callback for the input element inputStyle: _propTypes2.default.object, // css styles for the input element minWidth: _propTypes2.default.oneOfType([// minimum width for input element _propTypes2.default.number, _propTypes2.default.string]), onAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {} onChange: _propTypes2.default.func, // onChange handler: function(event) {} placeholder: _propTypes2.default.string, // placeholder text placeholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder style: _propTypes2.default.object, // css styles for the outer element value: _propTypes2.default.any // field value }; AutosizeInput.defaultProps = { minWidth: 1, injectStyles: true }; exports["default"] = AutosizeInput; /***/ }), /***/ "./node_modules/react-is/cjs/react-is.development.js": /*!***********************************************************!*\ !*** ./node_modules/react-is/cjs/react-is.development.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, exports) { "use strict"; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function() { 'use strict'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary // (unstable) APIs that have been removed. Can we remove the symbols? var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); } function typeOf(object) { if (typeof object === 'object' && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type = object.type; switch (type) { case REACT_ASYNC_MODE_TYPE: case REACT_CONCURRENT_MODE_TYPE: case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: return type; default: var $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } case REACT_PORTAL_TYPE: return $$typeof; } } return undefined; } // AsyncMode is deprecated along with isAsyncMode var AsyncMode = REACT_ASYNC_MODE_TYPE; var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; var ContextConsumer = REACT_CONTEXT_TYPE; var ContextProvider = REACT_PROVIDER_TYPE; var Element = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal = REACT_PORTAL_TYPE; var Profiler = REACT_PROFILER_TYPE; var StrictMode = REACT_STRICT_MODE_TYPE; var Suspense = REACT_SUSPENSE_TYPE; var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; } function isConcurrentMode(object) { return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isContextProvider(object) { return typeOf(object) === REACT_PROVIDER_TYPE; } function isElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function isForwardRef(object) { return typeOf(object) === REACT_FORWARD_REF_TYPE; } function isFragment(object) { return typeOf(object) === REACT_FRAGMENT_TYPE; } function isLazy(object) { return typeOf(object) === REACT_LAZY_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } function isPortal(object) { return typeOf(object) === REACT_PORTAL_TYPE; } function isProfiler(object) { return typeOf(object) === REACT_PROFILER_TYPE; } function isStrictMode(object) { return typeOf(object) === REACT_STRICT_MODE_TYPE; } function isSuspense(object) { return typeOf(object) === REACT_SUSPENSE_TYPE; } exports.AsyncMode = AsyncMode; exports.ConcurrentMode = ConcurrentMode; exports.ContextConsumer = ContextConsumer; exports.ContextProvider = ContextProvider; exports.Element = Element; exports.ForwardRef = ForwardRef; exports.Fragment = Fragment; exports.Lazy = Lazy; exports.Memo = Memo; exports.Portal = Portal; exports.Profiler = Profiler; exports.StrictMode = StrictMode; exports.Suspense = Suspense; exports.isAsyncMode = isAsyncMode; exports.isConcurrentMode = isConcurrentMode; exports.isContextConsumer = isContextConsumer; exports.isContextProvider = isContextProvider; exports.isElement = isElement; exports.isForwardRef = isForwardRef; exports.isFragment = isFragment; exports.isLazy = isLazy; exports.isMemo = isMemo; exports.isPortal = isPortal; exports.isProfiler = isProfiler; exports.isStrictMode = isStrictMode; exports.isSuspense = isSuspense; exports.isValidElementType = isValidElementType; exports.typeOf = typeOf; })(); } /***/ }), /***/ "./node_modules/react-is/index.js": /*!****************************************!*\ !*** ./node_modules/react-is/index.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js"); } /***/ }), /***/ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js": /*!****************************************************************************!*\ !*** ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js ***! \****************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "polyfill": function() { return /* binding */ polyfill; } /* harmony export */ }); /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } /***/ }), /***/ "./node_modules/react-select/dist/react-select.esm.js": /*!************************************************************!*\ !*** ./node_modules/react-select/dist/react-select.esm.js ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Async": function() { return /* binding */ Async; }, /* harmony export */ "AsyncCreatable": function() { return /* binding */ AsyncCreatable; }, /* harmony export */ "Creatable": function() { return /* binding */ Creatable; }, /* harmony export */ "SelectBase": function() { return /* binding */ Select; }, /* harmony export */ "components": function() { return /* binding */ components; }, /* harmony export */ "createFilter": function() { return /* binding */ createFilter; }, /* harmony export */ "defaultTheme": function() { return /* binding */ defaultTheme; }, /* harmony export */ "makeAnimated": function() { return /* binding */ index; }, /* harmony export */ "makeAsyncSelect": function() { return /* binding */ makeAsyncSelect; }, /* harmony export */ "makeCreatableSelect": function() { return /* binding */ makeCreatableSelect; }, /* harmony export */ "mergeStyles": function() { return /* binding */ mergeStyles; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js"); /* harmony import */ var emotion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! emotion */ "./node_modules/emotion/dist/index.esm.js"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js"); /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var react_input_autosize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-input-autosize */ "./node_modules/react-input-autosize/lib/AutosizeInput.js"); /* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-transition-group */ "./node_modules/react-transition-group/index.js"); /* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_transition_group__WEBPACK_IMPORTED_MODULE_7__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } // ============================== // NO OP // ============================== var noop = function noop() {}; // Class Name Prefixer // ============================== /** String representation of component state for styling with class names. Expects an array of strings OR a string/object pair: - className(['comp', 'comp-arg', 'comp-arg-2']) @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2' - className('comp', { some: true, state: false }) @returns 'react-select__comp react-select__comp--some' */ function applyPrefixToName(prefix, name) { if (!name) { return prefix; } else if (name[0] === '-') { return prefix + name; } else { return prefix + '__' + name; } } function classNames(prefix, cssKey, state, className) { var arr = [cssKey, className]; if (state && prefix) { for (var key in state) { if (state.hasOwnProperty(key) && state[key]) { arr.push("".concat(applyPrefixToName(prefix, key))); } } } return arr.filter(function (i) { return i; }).map(function (i) { return String(i).trim(); }).join(' '); } // ============================== // Clean Value // ============================== var cleanValue = function cleanValue(value) { if (Array.isArray(value)) return value.filter(Boolean); if (_typeof(value) === 'object' && value !== null) return [value]; return []; }; // ============================== // Handle Input Change // ============================== function handleInputChange(inputValue, actionMeta, onInputChange) { if (onInputChange) { var newValue = onInputChange(inputValue, actionMeta); if (typeof newValue === 'string') return newValue; } return inputValue; } // ============================== // Scroll Helpers // ============================== function isDocumentElement(el) { return [document.documentElement, document.body, window].indexOf(el) > -1; } // Normalized Scroll Top // ------------------------------ function getScrollTop(el) { if (isDocumentElement(el)) { return window.pageYOffset; } return el.scrollTop; } function scrollTo(el, top) { // with a scroll distance, we perform scroll on the element if (isDocumentElement(el)) { window.scrollTo(0, top); return; } el.scrollTop = top; } // Get Scroll Parent // ------------------------------ function getScrollParent(element) { var style = getComputedStyle(element); var excludeStaticParent = style.position === 'absolute'; var overflowRx = /(auto|scroll)/; var docEl = document.documentElement; // suck it, flow... if (style.position === 'fixed') return docEl; for (var parent = element; parent = parent.parentElement;) { style = getComputedStyle(parent); if (excludeStaticParent && style.position === 'static') { continue; } if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) { return parent; } } return docEl; } // Animated Scroll To // ------------------------------ /** @param t: time (elapsed) @param b: initial value @param c: amount of change @param d: duration */ function easeOutCubic(t, b, c, d) { return c * ((t = t / d - 1) * t * t + 1) + b; } function animatedScrollTo(element, to) { var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop; var start = getScrollTop(element); var change = to - start; var increment = 10; var currentTime = 0; function animateScroll() { currentTime += increment; var val = easeOutCubic(currentTime, start, change, duration); scrollTo(element, val); if (currentTime < duration) { raf__WEBPACK_IMPORTED_MODULE_4___default()(animateScroll); } else { callback(element); } } animateScroll(); } // Scroll Into View // ------------------------------ function scrollIntoView(menuEl, focusedEl) { var menuRect = menuEl.getBoundingClientRect(); var focusedRect = focusedEl.getBoundingClientRect(); var overScroll = focusedEl.offsetHeight / 3; if (focusedRect.bottom + overScroll > menuRect.bottom) { scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight)); } else if (focusedRect.top - overScroll < menuRect.top) { scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0)); } } // ============================== // Get bounding client object // ============================== // cannot get keys using array notation with DOMRect function getBoundingClientObj(element) { var rect = element.getBoundingClientRect(); return { bottom: rect.bottom, height: rect.height, left: rect.left, right: rect.right, top: rect.top, width: rect.width }; } // Touch Capability Detector // ============================== function isTouchCapable() { try { document.createEvent('TouchEvent'); return true; } catch (e) { return false; } } // ============================== // Mobile Device Detector // ============================== function isMobileDevice() { try { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); } catch (e) { return false; } } function getMenuPlacement(_ref) { var maxHeight = _ref.maxHeight, menuEl = _ref.menuEl, minHeight = _ref.minHeight, placement = _ref.placement, shouldScroll = _ref.shouldScroll, isFixedPosition = _ref.isFixedPosition, theme = _ref.theme; var spacing = theme.spacing; var scrollParent = getScrollParent(menuEl); var defaultState = { placement: 'bottom', maxHeight: maxHeight }; // something went wrong, return default state if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when // the menu is rendered var _scrollParent$getBoun = scrollParent.getBoundingClientRect(), scrollHeight = _scrollParent$getBoun.height; var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(), menuBottom = _menuEl$getBoundingCl.bottom, menuHeight = _menuEl$getBoundingCl.height, menuTop = _menuEl$getBoundingCl.top; var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(), containerTop = _menuEl$offsetParent$.top; var viewHeight = window.innerHeight; var scrollTop = getScrollTop(scrollParent); var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10); var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10); var viewSpaceAbove = containerTop - marginTop; var viewSpaceBelow = viewHeight - menuTop; var scrollSpaceAbove = viewSpaceAbove + scrollTop; var scrollSpaceBelow = scrollHeight - scrollTop - menuTop; var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom; var scrollUp = scrollTop + menuTop - marginTop; var scrollDuration = 160; switch (placement) { case 'auto': case 'bottom': // 1: the menu will fit, do nothing if (viewSpaceBelow >= menuHeight) { return { placement: 'bottom', maxHeight: maxHeight }; } // 2: the menu will fit, if scrolled if (scrollSpaceBelow >= menuHeight && !isFixedPosition) { if (shouldScroll) { animatedScrollTo(scrollParent, scrollDown, scrollDuration); } return { placement: 'bottom', maxHeight: maxHeight }; } // 3: the menu will fit, if constrained if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) { if (shouldScroll) { animatedScrollTo(scrollParent, scrollDown, scrollDuration); } // we want to provide as much of the menu as possible to the user, // so give them whatever is available below rather than the minHeight. var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom; return { placement: 'bottom', maxHeight: constrainedHeight }; } // 4. Forked beviour when there isn't enough space below // AUTO: flip the menu, render above if (placement === 'auto' || isFixedPosition) { // may need to be constrained after flipping var _constrainedHeight = maxHeight; var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove; if (spaceAbove >= minHeight) { _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight); } return { placement: 'top', maxHeight: _constrainedHeight }; } // BOTTOM: allow browser to increase scrollable area and immediately set scroll if (placement === 'bottom') { scrollTo(scrollParent, scrollDown); return { placement: 'bottom', maxHeight: maxHeight }; } break; case 'top': // 1: the menu will fit, do nothing if (viewSpaceAbove >= menuHeight) { return { placement: 'top', maxHeight: maxHeight }; } // 2: the menu will fit, if scrolled if (scrollSpaceAbove >= menuHeight && !isFixedPosition) { if (shouldScroll) { animatedScrollTo(scrollParent, scrollUp, scrollDuration); } return { placement: 'top', maxHeight: maxHeight }; } // 3: the menu will fit, if constrained if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user, // so give them whatever is available below rather than the minHeight. if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop; } if (shouldScroll) { animatedScrollTo(scrollParent, scrollUp, scrollDuration); } return { placement: 'top', maxHeight: _constrainedHeight2 }; } // 4. not enough space, the browser WILL NOT increase scrollable area when // absolutely positioned element rendered above the viewport (only below). // Flip the menu, render below return { placement: 'bottom', maxHeight: maxHeight }; default: throw new Error("Invalid placement provided \"".concat(placement, "\".")); } // fulfil contract with flow: implicit return value of undefined return defaultState; } // Menu Component // ------------------------------ function alignToControl(placement) { var placementToCSSProp = { bottom: 'top', top: 'bottom' }; return placement ? placementToCSSProp[placement] : 'bottom'; } var coercePlacement = function coercePlacement(p) { return p === 'auto' ? 'bottom' : p; }; var menuCSS = function menuCSS(_ref2) { var _ref3; var placement = _ref2.placement, _ref2$theme = _ref2.theme, borderRadius = _ref2$theme.borderRadius, spacing = _ref2$theme.spacing, colors = _ref2$theme.colors; return _ref3 = { label: 'menu' }, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3; }; // NOTE: internal only var MenuPlacer = /*#__PURE__*/ function (_Component) { _inherits(MenuPlacer, _Component); function MenuPlacer() { var _getPrototypeOf2; var _this; _classCallCheck(this, MenuPlacer); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { maxHeight: _this.props.maxMenuHeight, placement: null }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getPlacement", function (ref) { var _this$props = _this.props, minMenuHeight = _this$props.minMenuHeight, maxMenuHeight = _this$props.maxMenuHeight, menuPlacement = _this$props.menuPlacement, menuPosition = _this$props.menuPosition, menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView, theme = _this$props.theme; var getPortalPlacement = _this.context.getPortalPlacement; if (!ref) return; // DO NOT scroll if position is fixed var isFixedPosition = menuPosition === 'fixed'; var shouldScroll = menuShouldScrollIntoView && !isFixedPosition; var state = getMenuPlacement({ maxHeight: maxMenuHeight, menuEl: ref, minHeight: minMenuHeight, placement: menuPlacement, shouldScroll: shouldScroll, isFixedPosition: isFixedPosition, theme: theme }); if (getPortalPlacement) getPortalPlacement(state); _this.setState(state); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getUpdatedProps", function () { var menuPlacement = _this.props.menuPlacement; var placement = _this.state.placement || coercePlacement(menuPlacement); return _objectSpread({}, _this.props, { placement: placement, maxHeight: _this.state.maxHeight }); }); return _this; } _createClass(MenuPlacer, [{ key: "render", value: function render() { var children = this.props.children; return children({ ref: this.getPlacement, placerProps: this.getUpdatedProps() }); } }]); return MenuPlacer; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); _defineProperty(MenuPlacer, "contextTypes", { getPortalPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func) }); var Menu = function Menu(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerRef = props.innerRef, innerProps = props.innerProps; var cn = cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('menu', props)), { menu: true }, className); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cn }, innerProps, { ref: innerRef }), children); }; // Menu List // ============================== var menuListCSS = function menuListCSS(_ref4) { var maxHeight = _ref4.maxHeight, baseUnit = _ref4.theme.spacing.baseUnit; return { maxHeight: maxHeight, overflowY: 'auto', paddingBottom: baseUnit, paddingTop: baseUnit, position: 'relative', // required for offset[Height, Top] > keyboard scroll WebkitOverflowScrolling: 'touch' }; }; var MenuList = function MenuList(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, isMulti = props.isMulti, innerRef = props.innerRef; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('menuList', props)), { 'menu-list': true, 'menu-list--is-multi': isMulti }, className), ref: innerRef }, children); }; // ============================== // Menu Notices // ============================== var noticeCSS = function noticeCSS(_ref5) { var _ref5$theme = _ref5.theme, baseUnit = _ref5$theme.spacing.baseUnit, colors = _ref5$theme.colors; return { color: colors.neutral40, padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px"), textAlign: 'center' }; }; var noOptionsMessageCSS = noticeCSS; var loadingMessageCSS = noticeCSS; var NoOptionsMessage = function NoOptionsMessage(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('noOptionsMessage', props)), { 'menu-notice': true, 'menu-notice--no-options': true }, className) }, innerProps), children); }; NoOptionsMessage.defaultProps = { children: 'No options' }; var LoadingMessage = function LoadingMessage(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('loadingMessage', props)), { 'menu-notice': true, 'menu-notice--loading': true }, className) }, innerProps), children); }; LoadingMessage.defaultProps = { children: 'Loading...' }; // ============================== // Menu Portal // ============================== var menuPortalCSS = function menuPortalCSS(_ref6) { var rect = _ref6.rect, offset = _ref6.offset, position = _ref6.position; return { left: rect.left, position: position, top: offset, width: rect.width, zIndex: 1 }; }; var MenuPortal = /*#__PURE__*/ function (_Component2) { _inherits(MenuPortal, _Component2); function MenuPortal() { var _getPrototypeOf3; var _this2; _classCallCheck(this, MenuPortal); for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } _this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "state", { placement: null }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "getPortalPlacement", function (_ref7) { var placement = _ref7.placement; var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed if (placement !== initialPlacement) { _this2.setState({ placement: placement }); } }); return _this2; } _createClass(MenuPortal, [{ key: "getChildContext", value: function getChildContext() { return { getPortalPlacement: this.getPortalPlacement }; } // callback for occassions where the menu must "flip" }, { key: "render", value: function render() { var _this$props2 = this.props, appendTo = _this$props2.appendTo, children = _this$props2.children, controlElement = _this$props2.controlElement, menuPlacement = _this$props2.menuPlacement, position = _this$props2.menuPosition, getStyles = _this$props2.getStyles; var isFixed = position === 'fixed'; // bail early if required elements aren't present if (!appendTo && !isFixed || !controlElement) { return null; } var placement = this.state.placement || coercePlacement(menuPlacement); var rect = getBoundingClientObj(controlElement); var scrollDistance = isFixed ? 0 : window.pageYOffset; var offset = rect[placement] + scrollDistance; var state = { offset: offset, position: position, rect: rect }; // same wrapper element whether fixed or portalled var menuWrapper = react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('menuPortal', state)) }, children); return appendTo ? (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)(menuWrapper, appendTo) : menuWrapper; } }]); return MenuPortal; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); _defineProperty(MenuPortal, "childContextTypes", { getPortalPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func) }); var isArray = Array.isArray; var keyList = Object.keys; var hasProp = Object.prototype.hasOwnProperty; function equal(a, b) { // fast-deep-equal index.js 2.0.1 if (a === b) return true; if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') { var arrA = isArray(a), arrB = isArray(b), i, length, key; if (arrA && arrB) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) { if (!equal(a[i], b[i])) return false; } return true; } if (arrA != arrB) return false; var dateA = a instanceof Date, dateB = b instanceof Date; if (dateA != dateB) return false; if (dateA && dateB) return a.getTime() == b.getTime(); var regexpA = a instanceof RegExp, regexpB = b instanceof RegExp; if (regexpA != regexpB) return false; if (regexpA && regexpB) return a.toString() == b.toString(); var keys = keyList(a); length = keys.length; if (length !== keyList(b).length) { return false; } for (i = length; i-- !== 0;) { if (!hasProp.call(b, keys[i])) return false; } // end fast-deep-equal // Custom handling for React for (i = length; i-- !== 0;) { key = keys[i]; if (key === '_owner' && a.$$typeof) { // React-specific: avoid traversing React elements' _owner. // _owner contains circular references // and is not needed when comparing the actual elements (and not their owners) // .$$typeof and ._store on just reasonable markers of a react element continue; } else { // all other properties should be traversed as usual if (!equal(a[key], b[key])) return false; } } // fast-deep-equal index.js 2.0.1 return true; } return a !== a && b !== b; } // end fast-deep-equal function exportedEqual(a, b) { try { return equal(a, b); } catch (error) { if (error.message && error.message.match(/stack|recursion/i)) { // warn on circular references, don't crash // browsers give this different errors name and messages: // chrome/safari: "RangeError", "Maximum call stack size exceeded" // firefox: "InternalError", too much recursion" // edge: "Error", "Out of stack space" console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message); return false; } // some other error. we should definitely know about these throw error; } } var diacritics = [{ base: 'A', letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g }, { base: 'AA', letters: /[\uA732]/g }, { base: 'AE', letters: /[\u00C6\u01FC\u01E2]/g }, { base: 'AO', letters: /[\uA734]/g }, { base: 'AU', letters: /[\uA736]/g }, { base: 'AV', letters: /[\uA738\uA73A]/g }, { base: 'AY', letters: /[\uA73C]/g }, { base: 'B', letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g }, { base: 'C', letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g }, { base: 'D', letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g }, { base: 'DZ', letters: /[\u01F1\u01C4]/g }, { base: 'Dz', letters: /[\u01F2\u01C5]/g }, { base: 'E', letters: /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g }, { base: 'F', letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g }, { base: 'G', letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g }, { base: 'H', letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g }, { base: 'I', letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g }, { base: 'J', letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g }, { base: 'K', letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g }, { base: 'L', letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g }, { base: 'LJ', letters: /[\u01C7]/g }, { base: 'Lj', letters: /[\u01C8]/g }, { base: 'M', letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g }, { base: 'N', letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g }, { base: 'NJ', letters: /[\u01CA]/g }, { base: 'Nj', letters: /[\u01CB]/g }, { base: 'O', letters: /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g }, { base: 'OI', letters: /[\u01A2]/g }, { base: 'OO', letters: /[\uA74E]/g }, { base: 'OU', letters: /[\u0222]/g }, { base: 'P', letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g }, { base: 'Q', letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g }, { base: 'R', letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g }, { base: 'S', letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g }, { base: 'T', letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g }, { base: 'TZ', letters: /[\uA728]/g }, { base: 'U', letters: /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g }, { base: 'V', letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g }, { base: 'VY', letters: /[\uA760]/g }, { base: 'W', letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g }, { base: 'X', letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g }, { base: 'Y', letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g }, { base: 'Z', letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g }, { base: 'a', letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g }, { base: 'aa', letters: /[\uA733]/g }, { base: 'ae', letters: /[\u00E6\u01FD\u01E3]/g }, { base: 'ao', letters: /[\uA735]/g }, { base: 'au', letters: /[\uA737]/g }, { base: 'av', letters: /[\uA739\uA73B]/g }, { base: 'ay', letters: /[\uA73D]/g }, { base: 'b', letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g }, { base: 'c', letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g }, { base: 'd', letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g }, { base: 'dz', letters: /[\u01F3\u01C6]/g }, { base: 'e', letters: /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g }, { base: 'f', letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g }, { base: 'g', letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g }, { base: 'h', letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g }, { base: 'hv', letters: /[\u0195]/g }, { base: 'i', letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g }, { base: 'j', letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g }, { base: 'k', letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g }, { base: 'l', letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g }, { base: 'lj', letters: /[\u01C9]/g }, { base: 'm', letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g }, { base: 'n', letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g }, { base: 'nj', letters: /[\u01CC]/g }, { base: 'o', letters: /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g }, { base: 'oi', letters: /[\u01A3]/g }, { base: 'ou', letters: /[\u0223]/g }, { base: 'oo', letters: /[\uA74F]/g }, { base: 'p', letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g }, { base: 'q', letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g }, { base: 'r', letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g }, { base: 's', letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g }, { base: 't', letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g }, { base: 'tz', letters: /[\uA729]/g }, { base: 'u', letters: /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g }, { base: 'v', letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g }, { base: 'vy', letters: /[\uA761]/g }, { base: 'w', letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g }, { base: 'x', letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g }, { base: 'y', letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g }, { base: 'z', letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g }]; var stripDiacritics = function stripDiacritics(str) { for (var i = 0; i < diacritics.length; i++) { str = str.replace(diacritics[i].letters, diacritics[i].base); } return str; }; var trimString = function trimString(str) { return str.replace(/^\s+|\s+$/g, ''); }; var defaultStringify = function defaultStringify(option) { return "".concat(option.label, " ").concat(option.value); }; var createFilter = function createFilter(config) { return function (option, rawInput) { var _ignoreCase$ignoreAcc = _objectSpread({ ignoreCase: true, ignoreAccents: true, stringify: defaultStringify, trim: true, matchFrom: 'any' }, config), ignoreCase = _ignoreCase$ignoreAcc.ignoreCase, ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents, stringify = _ignoreCase$ignoreAcc.stringify, trim = _ignoreCase$ignoreAcc.trim, matchFrom = _ignoreCase$ignoreAcc.matchFrom; var input = trim ? trimString(rawInput) : rawInput; var candidate = trim ? trimString(stringify(option)) : stringify(option); if (ignoreCase) { input = input.toLowerCase(); candidate = candidate.toLowerCase(); } if (ignoreAccents) { input = stripDiacritics(input); candidate = stripDiacritics(candidate); } return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1; }; }; var A11yText = function A11yText(props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", _extends({ className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)({ label: 'a11yText', zIndex: 9999, border: 0, clip: 'rect(1px, 1px, 1px, 1px)', height: 1, width: 1, position: 'absolute', overflow: 'hidden', padding: 0, whiteSpace: 'nowrap', backgroundColor: 'red', color: 'blue' }) }, props)); }; var DummyInput = /*#__PURE__*/ function (_Component) { _inherits(DummyInput, _Component); function DummyInput() { _classCallCheck(this, DummyInput); return _possibleConstructorReturn(this, _getPrototypeOf(DummyInput).apply(this, arguments)); } _createClass(DummyInput, [{ key: "render", value: function render() { var _this$props = this.props, inProp = _this$props.in, out = _this$props.out, onExited = _this$props.onExited, appear = _this$props.appear, enter = _this$props.enter, exit = _this$props.exit, innerRef = _this$props.innerRef, emotion = _this$props.emotion, props = _objectWithoutProperties(_this$props, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({ ref: innerRef }, props, { className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)({ label: 'dummyInput', // get rid of any default styles background: 0, border: 0, fontSize: 'inherit', outline: 0, padding: 0, // important! without `width` browsers won't allow focus width: 1, // remove cursor on desktop color: 'transparent', // remove cursor on mobile whilst maintaining "scroll into view" behaviour left: -100, opacity: 0, position: 'relative', transform: 'scale(0)' }) })); } }]); return DummyInput; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); var NodeResolver = /*#__PURE__*/ function (_Component) { _inherits(NodeResolver, _Component); function NodeResolver() { _classCallCheck(this, NodeResolver); return _possibleConstructorReturn(this, _getPrototypeOf(NodeResolver).apply(this, arguments)); } _createClass(NodeResolver, [{ key: "componentDidMount", value: function componentDidMount() { this.props.innerRef((0,react_dom__WEBPACK_IMPORTED_MODULE_2__.findDOMNode)(this)); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.props.innerRef(null); } }, { key: "render", value: function render() { return this.props.children; } }]); return NodeResolver; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position']; var LOCK_STYLES = { boxSizing: 'border-box', // account for possible declaration `width: 100%;` on body overflow: 'hidden', position: 'relative', height: '100%' }; function preventTouchMove(e) { e.preventDefault(); } function allowTouchMove(e) { e.stopPropagation(); } function preventInertiaScroll() { var top = this.scrollTop; var totalScroll = this.scrollHeight; var currentScroll = top + this.offsetHeight; if (top === 0) { this.scrollTop = 1; } else if (currentScroll === totalScroll) { this.scrollTop = top - 1; } } // `ontouchstart` check works on most browsers // `maxTouchPoints` works on IE10/11 and Surface function isTouchDevice() { return 'ontouchstart' in window || navigator.maxTouchPoints; } var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); var activeScrollLocks = 0; var ScrollLock = /*#__PURE__*/ function (_Component) { _inherits(ScrollLock, _Component); function ScrollLock() { var _getPrototypeOf2; var _this; _classCallCheck(this, ScrollLock); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollLock)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "originalStyles", {}); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "listenerOptions", { capture: false, passive: false }); return _this; } _createClass(ScrollLock, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; if (!canUseDOM) return; var _this$props = this.props, accountForScrollbars = _this$props.accountForScrollbars, touchScrollTarget = _this$props.touchScrollTarget; var target = document.body; var targetStyle = target && target.style; if (accountForScrollbars) { // store any styles already applied to the body STYLE_KEYS.forEach(function (key) { var val = targetStyle && targetStyle[key]; _this2.originalStyles[key] = val; }); } // apply the lock styles and padding if this is the first scroll lock if (accountForScrollbars && activeScrollLocks < 1) { var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0; var clientWidth = document.body ? document.body.clientWidth : 0; var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0; Object.keys(LOCK_STYLES).forEach(function (key) { var val = LOCK_STYLES[key]; if (targetStyle) { targetStyle[key] = val; } }); if (targetStyle) { targetStyle.paddingRight = "".concat(adjustedPadding, "px"); } } // account for touch devices if (target && isTouchDevice()) { // Mobile Safari ignores { overflow: hidden } declaration on the body. target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target if (touchScrollTarget) { touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions); touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions); } } // increment active scroll locks activeScrollLocks += 1; } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var _this3 = this; if (!canUseDOM) return; var _this$props2 = this.props, accountForScrollbars = _this$props2.accountForScrollbars, touchScrollTarget = _this$props2.touchScrollTarget; var target = document.body; var targetStyle = target && target.style; // safely decrement active scroll locks activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any if (accountForScrollbars && activeScrollLocks < 1) { STYLE_KEYS.forEach(function (key) { var val = _this3.originalStyles[key]; if (targetStyle) { targetStyle[key] = val; } }); } // remove touch listeners if (target && isTouchDevice()) { target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions); if (touchScrollTarget) { touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions); touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions); } } } }, { key: "render", value: function render() { return null; } }]); return ScrollLock; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); _defineProperty(ScrollLock, "defaultProps", { accountForScrollbars: true }); // NOTE: // We shouldn't need this after updating to React v16.3.0, which introduces: // - createRef() https://reactjs.org/docs/react-api.html#reactcreateref // - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref var ScrollBlock = /*#__PURE__*/ function (_PureComponent) { _inherits(ScrollBlock, _PureComponent); function ScrollBlock() { var _getPrototypeOf2; var _this; _classCallCheck(this, ScrollBlock); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollBlock)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { touchScrollTarget: null }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) { if (ref === _this.state.touchScrollTarget) return; _this.setState({ touchScrollTarget: ref }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blurSelectInput", function () { if (document.activeElement) { document.activeElement.blur(); } }); return _this; } _createClass(ScrollBlock, [{ key: "render", value: function render() { var _this$props = this.props, children = _this$props.children, isEnabled = _this$props.isEnabled; var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled if (!isEnabled) return children; /* * Div * ------------------------------ * blocks scrolling on non-body elements behind the menu * NodeResolver * ------------------------------ * we need a reference to the scrollable element to "unlock" scroll on * mobile devices * ScrollLock * ------------------------------ * actually does the scroll locking */ return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { onClick: this.blurSelectInput, className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)({ position: 'fixed', left: 0, bottom: 0, right: 0, top: 0 }) }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(NodeResolver, { innerRef: this.getScrollTarget }, children), touchScrollTarget ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ScrollLock, { touchScrollTarget: touchScrollTarget }) : null); } }]); return ScrollBlock; }(react__WEBPACK_IMPORTED_MODULE_0__.PureComponent); var ScrollCaptor = /*#__PURE__*/ function (_Component) { _inherits(ScrollCaptor, _Component); function ScrollCaptor() { var _getPrototypeOf2; var _this; _classCallCheck(this, ScrollCaptor); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollCaptor)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isBottom", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isTop", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollTarget", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "touchStart", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cancelScroll", function (event) { event.preventDefault(); event.stopPropagation(); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleEventDelta", function (event, delta) { var _this$props = _this.props, onBottomArrive = _this$props.onBottomArrive, onBottomLeave = _this$props.onBottomLeave, onTopArrive = _this$props.onTopArrive, onTopLeave = _this$props.onTopLeave; var _this$scrollTarget = _this.scrollTarget, scrollTop = _this$scrollTarget.scrollTop, scrollHeight = _this$scrollTarget.scrollHeight, clientHeight = _this$scrollTarget.clientHeight; var target = _this.scrollTarget; var isDeltaPositive = delta > 0; var availableScroll = scrollHeight - clientHeight - scrollTop; var shouldCancelScroll = false; // reset bottom/top flags if (availableScroll > delta && _this.isBottom) { if (onBottomLeave) onBottomLeave(event); _this.isBottom = false; } if (isDeltaPositive && _this.isTop) { if (onTopLeave) onTopLeave(event); _this.isTop = false; } // bottom limit if (isDeltaPositive && delta > availableScroll) { if (onBottomArrive && !_this.isBottom) { onBottomArrive(event); } target.scrollTop = scrollHeight; shouldCancelScroll = true; _this.isBottom = true; // top limit } else if (!isDeltaPositive && -delta > scrollTop) { if (onTopArrive && !_this.isTop) { onTopArrive(event); } target.scrollTop = 0; shouldCancelScroll = true; _this.isTop = true; } // cancel scroll if (shouldCancelScroll) { _this.cancelScroll(event); } }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onWheel", function (event) { _this.handleEventDelta(event, event.deltaY); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (event) { // set touch start so we can calculate touchmove delta _this.touchStart = event.changedTouches[0].clientY; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (event) { var deltaY = _this.touchStart - event.changedTouches[0].clientY; _this.handleEventDelta(event, deltaY); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) { _this.scrollTarget = ref; }); return _this; } _createClass(ScrollCaptor, [{ key: "componentDidMount", value: function componentDidMount() { this.startListening(this.scrollTarget); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.stopListening(this.scrollTarget); } }, { key: "startListening", value: function startListening(el) { // bail early if no scroll available if (!el) return; if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢 if (typeof el.addEventListener === 'function') { el.addEventListener('wheel', this.onWheel, false); } if (typeof el.addEventListener === 'function') { el.addEventListener('touchstart', this.onTouchStart, false); } if (typeof el.addEventListener === 'function') { el.addEventListener('touchmove', this.onTouchMove, false); } } }, { key: "stopListening", value: function stopListening(el) { // bail early if no scroll available if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢 if (typeof el.removeEventListener === 'function') { el.removeEventListener('wheel', this.onWheel, false); } if (typeof el.removeEventListener === 'function') { el.removeEventListener('touchstart', this.onTouchStart, false); } if (typeof el.removeEventListener === 'function') { el.removeEventListener('touchmove', this.onTouchMove, false); } } }, { key: "render", value: function render() { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(NodeResolver, { innerRef: this.getScrollTarget }, this.props.children); } }]); return ScrollCaptor; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); var ScrollCaptorSwitch = /*#__PURE__*/ function (_Component2) { _inherits(ScrollCaptorSwitch, _Component2); function ScrollCaptorSwitch() { _classCallCheck(this, ScrollCaptorSwitch); return _possibleConstructorReturn(this, _getPrototypeOf(ScrollCaptorSwitch).apply(this, arguments)); } _createClass(ScrollCaptorSwitch, [{ key: "render", value: function render() { var _this$props2 = this.props, isEnabled = _this$props2.isEnabled, props = _objectWithoutProperties(_this$props2, ["isEnabled"]); return isEnabled ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ScrollCaptor, props) : this.props.children; } }]); return ScrollCaptorSwitch; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); _defineProperty(ScrollCaptorSwitch, "defaultProps", { isEnabled: true }); var instructionsAriaMessage = function instructionsAriaMessage(event) { var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var isSearchable = context.isSearchable, isMulti = context.isMulti, label = context.label, isDisabled = context.isDisabled; switch (event) { case 'menu': return "Use Up and Down to choose options".concat(isDisabled ? '' : ', press Enter to select the currently focused option', ", press Escape to exit the menu, press Tab to select the option and exit the menu."); case 'input': return "".concat(label ? label : 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : ''); case 'value': return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value'; } }; var valueEventAriaMessage = function valueEventAriaMessage(event, context) { var value = context.value, isDisabled = context.isDisabled; if (!value) return; switch (event) { case 'deselect-option': case 'pop-value': case 'remove-value': return "option ".concat(value, ", deselected."); case 'select-option': return isDisabled ? "option ".concat(value, " is disabled. Select another option.") : "option ".concat(value, ", selected."); } }; var valueFocusAriaMessage = function valueFocusAriaMessage(_ref) { var focusedValue = _ref.focusedValue, getOptionLabel = _ref.getOptionLabel, selectValue = _ref.selectValue; return "value ".concat(getOptionLabel(focusedValue), " focused, ").concat(selectValue.indexOf(focusedValue) + 1, " of ").concat(selectValue.length, "."); }; var optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) { var focusedOption = _ref2.focusedOption, getOptionLabel = _ref2.getOptionLabel, options = _ref2.options; return "option ".concat(getOptionLabel(focusedOption), " focused").concat(focusedOption.isDisabled ? ' disabled' : '', ", ").concat(options.indexOf(focusedOption) + 1, " of ").concat(options.length, "."); }; var resultsAriaMessage = function resultsAriaMessage(_ref3) { var inputValue = _ref3.inputValue, screenReaderMessage = _ref3.screenReaderMessage; return "".concat(screenReaderMessage).concat(inputValue ? ' for search term ' + inputValue : '', "."); }; var formatGroupLabel = function formatGroupLabel(group) { return group.label; }; var getOptionLabel = function getOptionLabel(option) { return option.label; }; var getOptionValue = function getOptionValue(option) { return option.value; }; var isOptionDisabled = function isOptionDisabled(option) { return !!option.isDisabled; }; var containerCSS = function containerCSS(_ref) { var isDisabled = _ref.isDisabled, isRtl = _ref.isRtl; return { label: 'container', direction: isRtl ? 'rtl' : null, pointerEvents: isDisabled ? 'none' : null, // cancel mouse events when disabled position: 'relative' }; }; var SelectContainer = function SelectContainer(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('container', props)), { '--is-disabled': isDisabled, '--is-rtl': isRtl }, className) }, innerProps), children); }; // ============================== // Value Container // ============================== var valueContainerCSS = function valueContainerCSS(_ref2) { var spacing = _ref2.theme.spacing; return { alignItems: 'center', display: 'flex', flex: 1, flexWrap: 'wrap', padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px"), WebkitOverflowScrolling: 'touch', position: 'relative', overflow: 'hidden' }; }; var ValueContainer = /*#__PURE__*/ function (_Component) { _inherits(ValueContainer, _Component); function ValueContainer() { _classCallCheck(this, ValueContainer); return _possibleConstructorReturn(this, _getPrototypeOf(ValueContainer).apply(this, arguments)); } _createClass(ValueContainer, [{ key: "render", value: function render() { var _this$props = this.props, children = _this$props.children, className = _this$props.className, cx = _this$props.cx, isMulti = _this$props.isMulti, getStyles = _this$props.getStyles, hasValue = _this$props.hasValue; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('valueContainer', this.props)), { 'value-container': true, 'value-container--is-multi': isMulti, 'value-container--has-value': hasValue }, className) }, children); } }]); return ValueContainer; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); // ============================== // Indicator Container // ============================== var indicatorsContainerCSS = function indicatorsContainerCSS() { return { alignItems: 'center', alignSelf: 'stretch', display: 'flex', flexShrink: 0 }; }; var IndicatorsContainer = function IndicatorsContainer(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('indicatorsContainer', props)), { 'indicators': true }, className) }, children); }; // ============================== // Dropdown & Clear Icons // ============================== var Svg = function Svg(_ref) { var size = _ref.size, props = _objectWithoutProperties(_ref, ["size"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({ height: size, width: size, viewBox: "0 0 20 20", "aria-hidden": "true", focusable: "false", className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)({ display: 'inline-block', fill: 'currentColor', lineHeight: 1, stroke: 'currentColor', strokeWidth: 0 }) }, props)); }; var CrossIcon = function CrossIcon(props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Svg, _extends({ size: 20 }, props), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })); }; var DownChevron = function DownChevron(props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Svg, _extends({ size: 20 }, props), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })); }; // ============================== // Dropdown & Clear Buttons // ============================== var baseCSS = function baseCSS(_ref2) { var isFocused = _ref2.isFocused, _ref2$theme = _ref2.theme, baseUnit = _ref2$theme.spacing.baseUnit, colors = _ref2$theme.colors; return { label: 'indicatorContainer', color: isFocused ? colors.neutral60 : colors.neutral20, display: 'flex', padding: baseUnit * 2, transition: 'color 150ms', ':hover': { color: isFocused ? colors.neutral80 : colors.neutral40 } }; }; var dropdownIndicatorCSS = baseCSS; var DropdownIndicator = function DropdownIndicator(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({}, innerProps, { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('dropdownIndicator', props)), { 'indicator': true, 'dropdown-indicator': true }, className) }), children || react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DownChevron, null)); }; var clearIndicatorCSS = baseCSS; var ClearIndicator = function ClearIndicator(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({}, innerProps, { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('clearIndicator', props)), { 'indicator': true, 'clear-indicator': true }, className) }), children || react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CrossIcon, null)); }; // ============================== // Separator // ============================== var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) { var isDisabled = _ref3.isDisabled, _ref3$theme = _ref3.theme, baseUnit = _ref3$theme.spacing.baseUnit, colors = _ref3$theme.colors; return { label: 'indicatorSeparator', alignSelf: 'stretch', backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20, marginBottom: baseUnit * 2, marginTop: baseUnit * 2, width: 1 }; }; var IndicatorSeparator = function IndicatorSeparator(props) { var className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", _extends({}, innerProps, { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('indicatorSeparator', props)), { 'indicator-separator': true }, className) })); }; // ============================== // Loading // ============================== var keyframesName = 'react-select-loading-indicator'; var keyframesInjected = false; var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) { var isFocused = _ref4.isFocused, size = _ref4.size, _ref4$theme = _ref4.theme, colors = _ref4$theme.colors, baseUnit = _ref4$theme.spacing.baseUnit; return { label: 'loadingIndicator', color: isFocused ? colors.neutral60 : colors.neutral20, display: 'flex', padding: baseUnit * 2, transition: 'color 150ms', alignSelf: 'center', fontSize: size, lineHeight: 1, marginRight: size, textAlign: 'center', verticalAlign: 'middle' }; }; var LoadingDot = function LoadingDot(_ref5) { var color = _ref5.color, delay = _ref5.delay, offset = _ref5.offset; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)({ animationDuration: '1s', animationDelay: "".concat(delay, "ms"), animationIterationCount: 'infinite', animationName: keyframesName, animationTimingFunction: 'ease-in-out', backgroundColor: color, borderRadius: '1em', display: 'inline-block', marginLeft: offset ? '1em' : null, height: '1em', verticalAlign: 'top', width: '1em' }) }); }; var LoadingIndicator = function LoadingIndicator(props) { var className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps, isFocused = props.isFocused, isRtl = props.isRtl, colors = props.theme.colors; var color = isFocused ? colors.neutral80 : colors.neutral20; if (!keyframesInjected) { // eslint-disable-next-line no-unused-expressions (0,emotion__WEBPACK_IMPORTED_MODULE_1__.injectGlobal)("@keyframes ", keyframesName, "{0%,80%,100%{opacity:0;}40%{opacity:1;}};"); keyframesInjected = true; } return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({}, innerProps, { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('loadingIndicator', props)), { 'indicator': true, 'loading-indicator': true }, className) }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LoadingDot, { color: color, delay: 0, offset: isRtl }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LoadingDot, { color: color, delay: 160, offset: true }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LoadingDot, { color: color, delay: 320, offset: !isRtl })); }; LoadingIndicator.defaultProps = { size: 4 }; var css$1 = function css$$1(_ref) { var isDisabled = _ref.isDisabled, isFocused = _ref.isFocused, _ref$theme = _ref.theme, colors = _ref$theme.colors, borderRadius = _ref$theme.borderRadius, spacing = _ref$theme.spacing; return { label: 'control', alignItems: 'center', backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0, borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20, borderRadius: borderRadius, borderStyle: 'solid', borderWidth: 1, boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : null, cursor: 'default', display: 'flex', flexWrap: 'wrap', justifyContent: 'space-between', minHeight: spacing.controlHeight, outline: '0 !important', position: 'relative', transition: 'all 100ms', '&:hover': { borderColor: isFocused ? colors.primary : colors.neutral30 } }; }; var Control = function Control(props) { var children = props.children, cx = props.cx, getStyles = props.getStyles, className = props.className, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ ref: innerRef, className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('control', props)), { 'control': true, 'control--is-disabled': isDisabled, 'control--is-focused': isFocused, 'control--menu-is-open': menuIsOpen }, className) }, innerProps), children); }; var groupCSS = function groupCSS(_ref) { var spacing = _ref.theme.spacing; return { paddingBottom: spacing.baseUnit * 2, paddingTop: spacing.baseUnit * 2 }; }; var Group = function Group(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, Heading = props.Heading, headingProps = props.headingProps, label = props.label, theme = props.theme, selectProps = props.selectProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('group', props)), { 'group': true }, className) }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Heading, _extends({}, headingProps, { selectProps: selectProps, theme: theme, getStyles: getStyles, cx: cx }), label), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, children)); }; var groupHeadingCSS = function groupHeadingCSS(_ref2) { var spacing = _ref2.theme.spacing; return { label: 'group', color: '#999', cursor: 'default', display: 'block', fontSize: '75%', fontWeight: '500', marginBottom: '0.25em', paddingLeft: spacing.baseUnit * 3, paddingRight: spacing.baseUnit * 3, textTransform: 'uppercase' }; }; var GroupHeading = function GroupHeading(props) { var className = props.className, cx = props.cx, getStyles = props.getStyles, theme = props.theme, selectProps = props.selectProps, cleanProps = _objectWithoutProperties(props, ["className", "cx", "getStyles", "theme", "selectProps"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('groupHeading', _objectSpread({ theme: theme }, cleanProps))), { 'group-heading': true }, className) }, cleanProps)); }; var inputCSS = function inputCSS(_ref) { var isDisabled = _ref.isDisabled, _ref$theme = _ref.theme, spacing = _ref$theme.spacing, colors = _ref$theme.colors; return { margin: spacing.baseUnit / 2, paddingBottom: spacing.baseUnit / 2, paddingTop: spacing.baseUnit / 2, visibility: isDisabled ? 'hidden' : 'visible', color: colors.neutral80 }; }; var inputStyle = function inputStyle(isHidden) { return { label: 'input', background: 0, border: 0, fontSize: 'inherit', opacity: isHidden ? 0 : 1, outline: 0, padding: 0, color: 'inherit' }; }; var Input = function Input(_ref2) { var className = _ref2.className, cx = _ref2.cx, getStyles = _ref2.getStyles, innerRef = _ref2.innerRef, isHidden = _ref2.isHidden, isDisabled = _ref2.isDisabled, theme = _ref2.theme, selectProps = _ref2.selectProps, props = _objectWithoutProperties(_ref2, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: /*#__PURE__*/ /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('input', _objectSpread({ theme: theme }, props))) }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_input_autosize__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({ className: cx(null, { 'input': true }, className), inputRef: innerRef, inputStyle: inputStyle(isHidden), disabled: isDisabled }, props))); }; var multiValueCSS = function multiValueCSS(_ref) { var _ref$theme = _ref.theme, spacing = _ref$theme.spacing, borderRadius = _ref$theme.borderRadius, colors = _ref$theme.colors; return { label: 'multiValue', backgroundColor: colors.neutral10, borderRadius: borderRadius / 2, display: 'flex', margin: spacing.baseUnit / 2, minWidth: 0 // resolves flex/text-overflow bug }; }; var multiValueLabelCSS = function multiValueLabelCSS(_ref2) { var _ref2$theme = _ref2.theme, borderRadius = _ref2$theme.borderRadius, colors = _ref2$theme.colors, cropWithEllipsis = _ref2.cropWithEllipsis; return { borderRadius: borderRadius / 2, color: colors.neutral80, fontSize: '85%', overflow: 'hidden', padding: 3, paddingLeft: 6, textOverflow: cropWithEllipsis ? 'ellipsis' : null, whiteSpace: 'nowrap' }; }; var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) { var _ref3$theme = _ref3.theme, spacing = _ref3$theme.spacing, borderRadius = _ref3$theme.borderRadius, colors = _ref3$theme.colors, isFocused = _ref3.isFocused; return { alignItems: 'center', borderRadius: borderRadius / 2, backgroundColor: isFocused && colors.dangerLight, display: 'flex', paddingLeft: spacing.baseUnit, paddingRight: spacing.baseUnit, ':hover': { backgroundColor: colors.dangerLight, color: colors.danger } }; }; var MultiValueGeneric = function MultiValueGeneric(_ref4) { var children = _ref4.children, innerProps = _ref4.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", innerProps, children); }; var MultiValueContainer = MultiValueGeneric; var MultiValueLabel = MultiValueGeneric; var MultiValueRemove = /*#__PURE__*/ function (_Component) { _inherits(MultiValueRemove, _Component); function MultiValueRemove() { _classCallCheck(this, MultiValueRemove); return _possibleConstructorReturn(this, _getPrototypeOf(MultiValueRemove).apply(this, arguments)); } _createClass(MultiValueRemove, [{ key: "render", value: function render() { var _this$props = this.props, children = _this$props.children, innerProps = _this$props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", innerProps, children || react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CrossIcon, { size: 14 })); } }]); return MultiValueRemove; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); var MultiValue = /*#__PURE__*/ function (_Component2) { _inherits(MultiValue, _Component2); function MultiValue() { _classCallCheck(this, MultiValue); return _possibleConstructorReturn(this, _getPrototypeOf(MultiValue).apply(this, arguments)); } _createClass(MultiValue, [{ key: "render", value: function render() { var _this$props2 = this.props, children = _this$props2.children, className = _this$props2.className, components = _this$props2.components, cx = _this$props2.cx, data = _this$props2.data, getStyles = _this$props2.getStyles, innerProps = _this$props2.innerProps, isDisabled = _this$props2.isDisabled, removeProps = _this$props2.removeProps, selectProps = _this$props2.selectProps; var Container = components.Container, Label = components.Label, Remove = components.Remove; var containerInnerProps = _objectSpread({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('multiValue', this.props)), { 'multi-value': true, 'multi-value--is-disabled': isDisabled }, className) }, innerProps); var labelInnerProps = { className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('multiValueLabel', this.props)), { 'multi-value__label': true }, className) }; var removeInnerProps = _objectSpread({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('multiValueRemove', this.props)), { 'multi-value__remove': true }, className) }, removeProps); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Container, { data: data, innerProps: containerInnerProps, selectProps: selectProps }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Label, { data: data, innerProps: labelInnerProps, selectProps: selectProps }, children), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Remove, { data: data, innerProps: removeInnerProps, selectProps: selectProps })); } }]); return MultiValue; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); _defineProperty(MultiValue, "defaultProps", { cropWithEllipsis: true }); var optionCSS = function optionCSS(_ref) { var isDisabled = _ref.isDisabled, isFocused = _ref.isFocused, isSelected = _ref.isSelected, _ref$theme = _ref.theme, spacing = _ref$theme.spacing, colors = _ref$theme.colors; return { label: 'option', backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent', color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit', cursor: 'default', display: 'block', fontSize: 'inherit', padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"), width: '100%', userSelect: 'none', WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // provide some affordance on touch devices ':active': { backgroundColor: !isDisabled && (isSelected ? colors.primary : colors.primary50) } }; }; var Option = function Option(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ ref: innerRef, className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('option', props)), { 'option': true, 'option--is-disabled': isDisabled, 'option--is-focused': isFocused, 'option--is-selected': isSelected }, className) }, innerProps), children); }; var placeholderCSS = function placeholderCSS(_ref) { var _ref$theme = _ref.theme, spacing = _ref$theme.spacing, colors = _ref$theme.colors; return { label: 'placeholder', color: colors.neutral50, marginLeft: spacing.baseUnit / 2, marginRight: spacing.baseUnit / 2, position: 'absolute', top: '50%', transform: 'translateY(-50%)' }; }; var Placeholder = function Placeholder(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('placeholder', props)), { 'placeholder': true }, className) }, innerProps), children); }; var css$2 = function css$$1(_ref) { var isDisabled = _ref.isDisabled, _ref$theme = _ref.theme, spacing = _ref$theme.spacing, colors = _ref$theme.colors; return { label: 'singleValue', color: isDisabled ? colors.neutral40 : colors.neutral80, marginLeft: spacing.baseUnit / 2, marginRight: spacing.baseUnit / 2, maxWidth: "calc(100% - ".concat(spacing.baseUnit * 2, "px)"), overflow: 'hidden', position: 'absolute', textOverflow: 'ellipsis', whiteSpace: 'nowrap', top: '50%', transform: 'translateY(-50%)' }; }; var SingleValue = function SingleValue(props) { var children = props.children, className = props.className, cx = props.cx, getStyles = props.getStyles, isDisabled = props.isDisabled, innerProps = props.innerProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({ className: cx( /*#__PURE__*/ (0,emotion__WEBPACK_IMPORTED_MODULE_1__.css)(getStyles('singleValue', props)), { 'single-value': true, 'single-value--is-disabled': isDisabled }, className) }, innerProps), children); }; var components = { ClearIndicator: ClearIndicator, Control: Control, DropdownIndicator: DropdownIndicator, DownChevron: DownChevron, CrossIcon: CrossIcon, Group: Group, GroupHeading: GroupHeading, IndicatorsContainer: IndicatorsContainer, IndicatorSeparator: IndicatorSeparator, Input: Input, LoadingIndicator: LoadingIndicator, Menu: Menu, MenuList: MenuList, MenuPortal: MenuPortal, LoadingMessage: LoadingMessage, NoOptionsMessage: NoOptionsMessage, MultiValue: MultiValue, MultiValueContainer: MultiValueContainer, MultiValueLabel: MultiValueLabel, MultiValueRemove: MultiValueRemove, Option: Option, Placeholder: Placeholder, SelectContainer: SelectContainer, SingleValue: SingleValue, ValueContainer: ValueContainer }; var defaultComponents = function defaultComponents(props) { return _objectSpread({}, components, props.components); }; var defaultStyles = { clearIndicator: clearIndicatorCSS, container: containerCSS, control: css$1, dropdownIndicator: dropdownIndicatorCSS, group: groupCSS, groupHeading: groupHeadingCSS, indicatorsContainer: indicatorsContainerCSS, indicatorSeparator: indicatorSeparatorCSS, input: inputCSS, loadingIndicator: loadingIndicatorCSS, loadingMessage: loadingMessageCSS, menu: menuCSS, menuList: menuListCSS, menuPortal: menuPortalCSS, multiValue: multiValueCSS, multiValueLabel: multiValueLabelCSS, multiValueRemove: multiValueRemoveCSS, noOptionsMessage: noOptionsMessageCSS, option: optionCSS, placeholder: placeholderCSS, singleValue: css$2, valueContainer: valueContainerCSS }; // Merge Utility // Allows consumers to extend a base Select with additional styles function mergeStyles(source) { var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // initialize with source styles var styles = _objectSpread({}, source); // massage in target styles Object.keys(target).forEach(function (key) { if (source[key]) { styles[key] = function (rsCss, props) { return target[key](source[key](rsCss, props), props); }; } else { styles[key] = target[key]; } }); return styles; } var colors = { primary: '#2684FF', primary75: '#4C9AFF', primary50: '#B2D4FF', primary25: '#DEEBFF', danger: '#DE350B', dangerLight: '#FFBDAD', neutral0: 'hsl(0, 0%, 100%)', neutral5: 'hsl(0, 0%, 95%)', neutral10: 'hsl(0, 0%, 90%)', neutral20: 'hsl(0, 0%, 80%)', neutral30: 'hsl(0, 0%, 70%)', neutral40: 'hsl(0, 0%, 60%)', neutral50: 'hsl(0, 0%, 50%)', neutral60: 'hsl(0, 0%, 40%)', neutral70: 'hsl(0, 0%, 30%)', neutral80: 'hsl(0, 0%, 20%)', neutral90: 'hsl(0, 0%, 10%)' }; var borderRadius = 4; var baseUnit = 4; /* Used to calculate consistent margin/padding on elements */ var controlHeight = 38; /* The minimum height of the control */ var menuGutter = baseUnit * 2; /* The amount of space between the control and menu */ var spacing = { baseUnit: baseUnit, controlHeight: controlHeight, menuGutter: menuGutter }; var defaultTheme = { borderRadius: borderRadius, colors: colors, spacing: spacing }; var defaultProps = { backspaceRemovesValue: true, blurInputOnSelect: isTouchCapable(), captureMenuScroll: !isTouchCapable(), closeMenuOnSelect: true, closeMenuOnScroll: false, components: {}, controlShouldRenderValue: true, escapeClearsValue: false, filterOption: createFilter(), formatGroupLabel: formatGroupLabel, getOptionLabel: getOptionLabel, getOptionValue: getOptionValue, isDisabled: false, isLoading: false, isMulti: false, isRtl: false, isSearchable: true, isOptionDisabled: isOptionDisabled, loadingMessage: function loadingMessage() { return 'Loading...'; }, maxMenuHeight: 300, minMenuHeight: 140, menuIsOpen: false, menuPlacement: 'bottom', menuPosition: 'absolute', menuShouldBlockScroll: false, menuShouldScrollIntoView: !isMobileDevice(), noOptionsMessage: function noOptionsMessage() { return 'No options'; }, openMenuOnFocus: false, openMenuOnClick: true, options: [], pageSize: 5, placeholder: 'Select...', screenReaderStatus: function screenReaderStatus(_ref) { var count = _ref.count; return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available"); }, styles: {}, tabIndex: '0', tabSelectsValue: true }; var instanceId = 1; var Select = /*#__PURE__*/ function (_Component) { _inherits(Select, _Component); // Misc. Instance Properties // ------------------------------ // TODO // Refs // ------------------------------ // Lifecycle // ------------------------------ function Select(_props) { var _this; _classCallCheck(this, Select); _this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props)); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { ariaLiveSelection: '', ariaLiveContext: '', focusedOption: null, focusedValue: null, inputIsHidden: false, isFocused: false, menuOptions: { render: [], focusable: [] }, selectValue: [] }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blockOptionHover", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isComposing", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearFocusValueOnUpdate", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "commonProps", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "components", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "hasGroups", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchX", 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchY", 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputIsHiddenAfterUpdate", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "instancePrefix", ''); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "openAfterFocus", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollToFocusedOptionOnUpdate", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "userIsDragging", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "controlRef", null); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getControlRef", function (ref) { _this.controlRef = ref; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focusedOptionRef", null); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getFocusedOptionRef", function (ref) { _this.focusedOptionRef = ref; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "menuListRef", null); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getMenuListRef", function (ref) { _this.menuListRef = ref; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputRef", null); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getInputRef", function (ref) { _this.inputRef = ref; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cacheComponents", function (components$$1) { _this.components = defaultComponents({ components: components$$1 }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focus", _this.focusInput); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blur", _this.blurInput); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) { var _this$props = _this.props, onChange = _this$props.onChange, name = _this$props.name; onChange(newValue, _objectSpread({}, actionMeta, { name: name })); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setValue", function (newValue) { var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value'; var option = arguments.length > 2 ? arguments[2] : undefined; var _this$props2 = _this.props, closeMenuOnSelect = _this$props2.closeMenuOnSelect, isMulti = _this$props2.isMulti; _this.onInputChange('', { action: 'set-value' }); if (closeMenuOnSelect) { _this.inputIsHiddenAfterUpdate = !isMulti; _this.onMenuClose(); } // when the select value should change, we should reset focusedValue _this.clearFocusValueOnUpdate = true; _this.onChange(newValue, { action: action, option: option }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "selectOption", function (newValue) { var _this$props3 = _this.props, blurInputOnSelect = _this$props3.blurInputOnSelect, isMulti = _this$props3.isMulti; var selectValue = _this.state.selectValue; if (isMulti) { if (_this.isOptionSelected(newValue, selectValue)) { var candidate = _this.getOptionValue(newValue); _this.setValue(selectValue.filter(function (i) { return _this.getOptionValue(i) !== candidate; }), 'deselect-option', newValue); _this.announceAriaLiveSelection({ event: 'deselect-option', context: { value: _this.getOptionLabel(newValue) } }); } else { if (!_this.isOptionDisabled(newValue, selectValue)) { _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue); _this.announceAriaLiveSelection({ event: 'select-option', context: { value: _this.getOptionLabel(newValue) } }); } else { // announce that option is disabled _this.announceAriaLiveSelection({ event: 'select-option', context: { value: _this.getOptionLabel(newValue), isDisabled: true } }); } } } else { if (!_this.isOptionDisabled(newValue, selectValue)) { _this.setValue(newValue, 'select-option'); _this.announceAriaLiveSelection({ event: 'select-option', context: { value: _this.getOptionLabel(newValue) } }); } else { // announce that option is disabled _this.announceAriaLiveSelection({ event: 'select-option', context: { value: _this.getOptionLabel(newValue), isDisabled: true } }); } } if (blurInputOnSelect) { _this.blurInput(); } }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "removeValue", function (removedValue) { var selectValue = _this.state.selectValue; var candidate = _this.getOptionValue(removedValue); _this.onChange(selectValue.filter(function (i) { return _this.getOptionValue(i) !== candidate; }), { action: 'remove-value', removedValue: removedValue }); _this.announceAriaLiveSelection({ event: 'remove-value', context: { value: removedValue ? _this.getOptionLabel(removedValue) : '' } }); _this.focusInput(); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearValue", function () { var isMulti = _this.props.isMulti; _this.onChange(isMulti ? [] : null, { action: 'clear' }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "popValue", function () { var selectValue = _this.state.selectValue; var lastSelectedValue = selectValue[selectValue.length - 1]; _this.announceAriaLiveSelection({ event: 'pop-value', context: { value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : '' } }); _this.onChange(selectValue.slice(0, selectValue.length - 1), { action: 'pop-value', removedValue: lastSelectedValue }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionLabel", function (data) { return _this.props.getOptionLabel(data); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionValue", function (data) { return _this.props.getOptionValue(data); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyles", function (key, props) { var base = defaultStyles[key](props); base.boxSizing = 'border-box'; var custom = _this.props.styles[key]; return custom ? custom(base, props) : base; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getElementId", function (element) { return "".concat(_this.instancePrefix, "-").concat(element); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getActiveDescendentId", function () { var menuIsOpen = _this.props.menuIsOpen; var _this$state = _this.state, menuOptions = _this$state.menuOptions, focusedOption = _this$state.focusedOption; if (!focusedOption || !menuIsOpen) return undefined; var index = menuOptions.focusable.indexOf(focusedOption); var option = menuOptions.render[index]; return option && option.key; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveSelection", function (_ref2) { var event = _ref2.event, context = _ref2.context; _this.setState({ ariaLiveSelection: valueEventAriaMessage(event, context) }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveContext", function (_ref3) { var event = _ref3.event, context = _ref3.context; _this.setState({ ariaLiveContext: instructionsAriaMessage(event, _objectSpread({}, context, { label: _this.props['aria-label'] })) }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseDown", function (event) { if (event.button !== 0) { return; } event.stopPropagation(); event.preventDefault(); _this.focusInput(); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseMove", function (event) { _this.blockOptionHover = false; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlMouseDown", function (event) { var openMenuOnClick = _this.props.openMenuOnClick; if (!_this.state.isFocused) { if (openMenuOnClick) { _this.openAfterFocus = true; } _this.focusInput(); } else if (!_this.props.menuIsOpen) { if (openMenuOnClick) { _this.openMenu('first'); } } else { //$FlowFixMe if (event.target.tagName !== 'INPUT') { _this.onMenuClose(); } } //$FlowFixMe if (event.target.tagName !== 'INPUT') { event.preventDefault(); } }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorMouseDown", function (event) { // ignore mouse events that weren't triggered by the primary button if (event && event.type === 'mousedown' && event.button !== 0) { return; } if (_this.props.isDisabled) return; var _this$props4 = _this.props, isMulti = _this$props4.isMulti, menuIsOpen = _this$props4.menuIsOpen; _this.focusInput(); if (menuIsOpen) { _this.inputIsHiddenAfterUpdate = !isMulti; _this.onMenuClose(); } else { _this.openMenu('first'); } event.preventDefault(); event.stopPropagation(); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorMouseDown", function (event) { // ignore mouse events that weren't triggered by the primary button if (event && event.type === 'mousedown' && event.button !== 0) { return; } _this.clearValue(); event.stopPropagation(); _this.openAfterFocus = false; setTimeout(function () { return _this.focusInput(); }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onScroll", function (event) { if (typeof _this.props.closeMenuOnScroll === 'boolean') { if (event.target instanceof HTMLElement && isDocumentElement(event.target)) { _this.props.onMenuClose(); } } else if (typeof _this.props.closeMenuOnScroll === 'function') { if (_this.props.closeMenuOnScroll(event)) { _this.props.onMenuClose(); } } }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionStart", function () { _this.isComposing = true; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionEnd", function () { _this.isComposing = false; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (_ref4) { var touches = _ref4.touches; var touch = touches.item(0); if (!touch) { return; } _this.initialTouchX = touch.clientX; _this.initialTouchY = touch.clientY; _this.userIsDragging = false; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (_ref5) { var touches = _ref5.touches; var touch = touches.item(0); if (!touch) { return; } var deltaX = Math.abs(touch.clientX - _this.initialTouchX); var deltaY = Math.abs(touch.clientY - _this.initialTouchY); var moveThreshold = 5; _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchEnd", function (event) { if (_this.userIsDragging) return; // close the menu if the user taps outside // we're checking on event.target here instead of event.currentTarget, because we want to assert information // on events on child elements, not the document (which we've attached this handler to). if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) { _this.blurInput(); } // reset move vars _this.initialTouchX = 0; _this.initialTouchY = 0; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlTouchEnd", function (event) { if (_this.userIsDragging) return; _this.onControlMouseDown(event); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorTouchEnd", function (event) { if (_this.userIsDragging) return; _this.onClearIndicatorMouseDown(event); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorTouchEnd", function (event) { if (_this.userIsDragging) return; _this.onDropdownIndicatorMouseDown(event); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (event) { var inputValue = event.currentTarget.value; _this.inputIsHiddenAfterUpdate = false; _this.onInputChange(inputValue, { action: 'input-change' }); _this.onMenuOpen(); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputFocus", function (event) { var _this$props5 = _this.props, isSearchable = _this$props5.isSearchable, isMulti = _this$props5.isMulti; if (_this.props.onFocus) { _this.props.onFocus(event); } _this.inputIsHiddenAfterUpdate = false; _this.announceAriaLiveContext({ event: 'input', context: { isSearchable: isSearchable, isMulti: isMulti } }); _this.setState({ isFocused: true }); if (_this.openAfterFocus || _this.props.openMenuOnFocus) { _this.openMenu('first'); } _this.openAfterFocus = false; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputBlur", function (event) { if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) { _this.inputRef.focus(); return; } if (_this.props.onBlur) { _this.props.onBlur(event); } _this.onInputChange('', { action: 'input-blur' }); _this.onMenuClose(); _this.setState({ focusedValue: null, isFocused: false }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onOptionHover", function (focusedOption) { if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) { return; } _this.setState({ focusedOption: focusedOption }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "shouldHideSelectedOptions", function () { var _this$props6 = _this.props, hideSelectedOptions = _this$props6.hideSelectedOptions, isMulti = _this$props6.isMulti; if (hideSelectedOptions === undefined) return isMulti; return hideSelectedOptions; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onKeyDown", function (event) { var _this$props7 = _this.props, isMulti = _this$props7.isMulti, backspaceRemovesValue = _this$props7.backspaceRemovesValue, escapeClearsValue = _this$props7.escapeClearsValue, inputValue = _this$props7.inputValue, isClearable = _this$props7.isClearable, isDisabled = _this$props7.isDisabled, menuIsOpen = _this$props7.menuIsOpen, onKeyDown = _this$props7.onKeyDown, tabSelectsValue = _this$props7.tabSelectsValue, openMenuOnFocus = _this$props7.openMenuOnFocus; var _this$state2 = _this.state, focusedOption = _this$state2.focusedOption, focusedValue = _this$state2.focusedValue, selectValue = _this$state2.selectValue; if (isDisabled) return; if (typeof onKeyDown === 'function') { onKeyDown(event); if (event.defaultPrevented) { return; } } // Block option hover events when the user has just pressed a key _this.blockOptionHover = true; switch (event.key) { case 'ArrowLeft': if (!isMulti || inputValue) return; _this.focusValue('previous'); break; case 'ArrowRight': if (!isMulti || inputValue) return; _this.focusValue('next'); break; case 'Delete': case 'Backspace': if (inputValue) return; if (focusedValue) { _this.removeValue(focusedValue); } else { if (!backspaceRemovesValue) return; if (isMulti) { _this.popValue(); } else if (isClearable) { _this.clearValue(); } } break; case 'Tab': if (_this.isComposing) return; if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused // option is already selected; it breaks the flow of navigation openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) { return; } _this.selectOption(focusedOption); break; case 'Enter': if (event.keyCode === 229) { // ignore the keydown event from an Input Method Editor(IME) // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode break; } if (menuIsOpen) { if (!focusedOption) return; if (_this.isComposing) return; _this.selectOption(focusedOption); break; } return; case 'Escape': if (menuIsOpen) { _this.inputIsHiddenAfterUpdate = false; _this.onInputChange('', { action: 'menu-close' }); _this.onMenuClose(); } else if (isClearable && escapeClearsValue) { _this.clearValue(); } break; case ' ': // space if (inputValue) { return; } if (!menuIsOpen) { _this.openMenu('first'); break; } if (!focusedOption) return; _this.selectOption(focusedOption); break; case 'ArrowUp': if (menuIsOpen) { _this.focusOption('up'); } else { _this.openMenu('last'); } break; case 'ArrowDown': if (menuIsOpen) { _this.focusOption('down'); } else { _this.openMenu('first'); } break; case 'PageUp': if (!menuIsOpen) return; _this.focusOption('pageup'); break; case 'PageDown': if (!menuIsOpen) return; _this.focusOption('pagedown'); break; case 'Home': if (!menuIsOpen) return; _this.focusOption('first'); break; case 'End': if (!menuIsOpen) return; _this.focusOption('last'); break; default: return; } event.preventDefault(); }); var value = _props.value; _this.cacheComponents = (0,memoize_one__WEBPACK_IMPORTED_MODULE_6__["default"])(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized(_assertThisInitialized(_this))); _this.cacheComponents(_props.components); _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId); var _selectValue = cleanValue(value); var _menuOptions = _this.buildMenuOptions(_props, _selectValue); _this.state.menuOptions = _menuOptions; _this.state.selectValue = _selectValue; return _this; } _createClass(Select, [{ key: "componentDidMount", value: function componentDidMount() { this.startListeningComposition(); this.startListeningToTouch(); if (this.props.closeMenuOnScroll && document && document.addEventListener) { // Listen to all scroll events, and filter them out inside of 'onScroll' document.addEventListener('scroll', this.onScroll, true); } if (this.props.autoFocus) { this.focusInput(); } } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var _this$props8 = this.props, options = _this$props8.options, value = _this$props8.value, inputValue = _this$props8.inputValue; // re-cache custom components this.cacheComponents(nextProps.components); // rebuild the menu options if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) { var selectValue = cleanValue(nextProps.value); var menuOptions = this.buildMenuOptions(nextProps, selectValue); var focusedValue = this.getNextFocusedValue(selectValue); var focusedOption = this.getNextFocusedOption(menuOptions.focusable); this.setState({ menuOptions: menuOptions, selectValue: selectValue, focusedOption: focusedOption, focusedValue: focusedValue }); } // some updates should toggle the state of the input visibility if (this.inputIsHiddenAfterUpdate != null) { this.setState({ inputIsHidden: this.inputIsHiddenAfterUpdate }); delete this.inputIsHiddenAfterUpdate; } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props9 = this.props, isDisabled = _this$props9.isDisabled, menuIsOpen = _this$props9.menuIsOpen; var isFocused = this.state.isFocused; if ( // ensure focus is restored correctly when the control becomes enabled isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens isFocused && menuIsOpen && !prevProps.menuIsOpen) { this.focusInput(); } // scroll the focused option into view if necessary if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) { scrollIntoView(this.menuListRef, this.focusedOptionRef); } this.scrollToFocusedOptionOnUpdate = false; } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.stopListeningComposition(); this.stopListeningToTouch(); document.removeEventListener('scroll', this.onScroll, true); } }, { key: "onMenuOpen", // ============================== // Consumer Handlers // ============================== value: function onMenuOpen() { this.props.onMenuOpen(); } }, { key: "onMenuClose", value: function onMenuClose() { var _this$props10 = this.props, isSearchable = _this$props10.isSearchable, isMulti = _this$props10.isMulti; this.announceAriaLiveContext({ event: 'input', context: { isSearchable: isSearchable, isMulti: isMulti } }); this.onInputChange('', { action: 'menu-close' }); this.props.onMenuClose(); } }, { key: "onInputChange", value: function onInputChange(newValue, actionMeta) { this.props.onInputChange(newValue, actionMeta); } // ============================== // Methods // ============================== }, { key: "focusInput", value: function focusInput() { if (!this.inputRef) return; this.inputRef.focus(); } }, { key: "blurInput", value: function blurInput() { if (!this.inputRef) return; this.inputRef.blur(); } // aliased for consumers }, { key: "openMenu", value: function openMenu(focusOption) { var _this$state3 = this.state, menuOptions = _this$state3.menuOptions, selectValue = _this$state3.selectValue, isFocused = _this$state3.isFocused; var isMulti = this.props.isMulti; var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1; if (!isMulti) { var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]); if (selectedIndex > -1) { openAtIndex = selectedIndex; } } // only scroll if the menu isn't already open this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef); this.inputIsHiddenAfterUpdate = false; this.onMenuOpen(); this.setState({ focusedValue: null, focusedOption: menuOptions.focusable[openAtIndex] }); this.announceAriaLiveContext({ event: 'menu' }); } }, { key: "focusValue", value: function focusValue(direction) { var _this$props11 = this.props, isMulti = _this$props11.isMulti, isSearchable = _this$props11.isSearchable; var _this$state4 = this.state, selectValue = _this$state4.selectValue, focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing if (!isMulti) return; this.setState({ focusedOption: null }); var focusedIndex = selectValue.indexOf(focusedValue); if (!focusedValue) { focusedIndex = -1; this.announceAriaLiveContext({ event: 'value' }); } var lastIndex = selectValue.length - 1; var nextFocus = -1; if (!selectValue.length) return; switch (direction) { case 'previous': if (focusedIndex === 0) { // don't cycle from the start to the end nextFocus = 0; } else if (focusedIndex === -1) { // if nothing is focused, focus the last value first nextFocus = lastIndex; } else { nextFocus = focusedIndex - 1; } break; case 'next': if (focusedIndex > -1 && focusedIndex < lastIndex) { nextFocus = focusedIndex + 1; } break; } if (nextFocus === -1) { this.announceAriaLiveContext({ event: 'input', context: { isSearchable: isSearchable, isMulti: isMulti } }); } this.setState({ inputIsHidden: nextFocus === -1 ? false : true, focusedValue: selectValue[nextFocus] }); } }, { key: "focusOption", value: function focusOption() { var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first'; var pageSize = this.props.pageSize; var _this$state5 = this.state, focusedOption = _this$state5.focusedOption, menuOptions = _this$state5.menuOptions; var options = menuOptions.focusable; if (!options.length) return; var nextFocus = 0; // handles 'first' var focusedIndex = options.indexOf(focusedOption); if (!focusedOption) { focusedIndex = -1; this.announceAriaLiveContext({ event: 'menu' }); } if (direction === 'up') { nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1; } else if (direction === 'down') { nextFocus = (focusedIndex + 1) % options.length; } else if (direction === 'pageup') { nextFocus = focusedIndex - pageSize; if (nextFocus < 0) nextFocus = 0; } else if (direction === 'pagedown') { nextFocus = focusedIndex + pageSize; if (nextFocus > options.length - 1) nextFocus = options.length - 1; } else if (direction === 'last') { nextFocus = options.length - 1; } this.scrollToFocusedOptionOnUpdate = true; this.setState({ focusedOption: options[nextFocus], focusedValue: null }); this.announceAriaLiveContext({ event: 'menu', context: { isDisabled: isOptionDisabled(options[nextFocus]) } }); } }, { key: "getTheme", // ============================== // Getters // ============================== value: function getTheme() { // Use the default theme if there are no customizations. if (!this.props.theme) { return defaultTheme; } // If the theme prop is a function, assume the function // knows how to merge the passed-in default theme with // its own modifications. if (typeof this.props.theme === 'function') { return this.props.theme(defaultTheme); } // Otherwise, if a plain theme object was passed in, // overlay it with the default theme. return _objectSpread({}, defaultTheme, this.props.theme); } }, { key: "getCommonProps", value: function getCommonProps() { var clearValue = this.clearValue, getStyles = this.getStyles, setValue = this.setValue, selectOption = this.selectOption, props = this.props; var classNamePrefix = props.classNamePrefix, isMulti = props.isMulti, isRtl = props.isRtl, options = props.options; var selectValue = this.state.selectValue; var hasValue = this.hasValue(); var getValue = function getValue() { return selectValue; }; var cx = classNames.bind(null, classNamePrefix); return { cx: cx, clearValue: clearValue, getStyles: getStyles, getValue: getValue, hasValue: hasValue, isMulti: isMulti, isRtl: isRtl, options: options, selectOption: selectOption, setValue: setValue, selectProps: props, theme: this.getTheme() }; } }, { key: "getNextFocusedValue", value: function getNextFocusedValue(nextSelectValue) { if (this.clearFocusValueOnUpdate) { this.clearFocusValueOnUpdate = false; return null; } var _this$state6 = this.state, focusedValue = _this$state6.focusedValue, lastSelectValue = _this$state6.selectValue; var lastFocusedIndex = lastSelectValue.indexOf(focusedValue); if (lastFocusedIndex > -1) { var nextFocusedIndex = nextSelectValue.indexOf(focusedValue); if (nextFocusedIndex > -1) { // the focused value is still in the selectValue, return it return focusedValue; } else if (lastFocusedIndex < nextSelectValue.length) { // the focusedValue is not present in the next selectValue array by // reference, so return the new value at the same index return nextSelectValue[lastFocusedIndex]; } } return null; } }, { key: "getNextFocusedOption", value: function getNextFocusedOption(options) { var lastFocusedOption = this.state.focusedOption; return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0]; } }, { key: "hasValue", value: function hasValue() { var selectValue = this.state.selectValue; return selectValue.length > 0; } }, { key: "hasOptions", value: function hasOptions() { return !!this.state.menuOptions.render.length; } }, { key: "countOptions", value: function countOptions() { return this.state.menuOptions.focusable.length; } }, { key: "isClearable", value: function isClearable() { var _this$props12 = this.props, isClearable = _this$props12.isClearable, isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable // multi select, by default, IS clearable if (isClearable === undefined) return isMulti; return isClearable; } }, { key: "isOptionDisabled", value: function isOptionDisabled$$1(option, selectValue) { return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false; } }, { key: "isOptionSelected", value: function isOptionSelected(option, selectValue) { var _this2 = this; if (selectValue.indexOf(option) > -1) return true; if (typeof this.props.isOptionSelected === 'function') { return this.props.isOptionSelected(option, selectValue); } var candidate = this.getOptionValue(option); return selectValue.some(function (i) { return _this2.getOptionValue(i) === candidate; }); } }, { key: "filterOption", value: function filterOption(option, inputValue) { return this.props.filterOption ? this.props.filterOption(option, inputValue) : true; } }, { key: "formatOptionLabel", value: function formatOptionLabel(data, context) { if (typeof this.props.formatOptionLabel === 'function') { var inputValue = this.props.inputValue; var selectValue = this.state.selectValue; return this.props.formatOptionLabel(data, { context: context, inputValue: inputValue, selectValue: selectValue }); } else { return this.getOptionLabel(data); } } }, { key: "formatGroupLabel", value: function formatGroupLabel$$1(data) { return this.props.formatGroupLabel(data); } // ============================== // Mouse Handlers // ============================== }, { key: "startListeningComposition", // ============================== // Composition Handlers // ============================== value: function startListeningComposition() { if (document && document.addEventListener) { document.addEventListener('compositionstart', this.onCompositionStart, false); document.addEventListener('compositionend', this.onCompositionEnd, false); } } }, { key: "stopListeningComposition", value: function stopListeningComposition() { if (document && document.removeEventListener) { document.removeEventListener('compositionstart', this.onCompositionStart); document.removeEventListener('compositionend', this.onCompositionEnd); } } }, { key: "startListeningToTouch", // ============================== // Touch Handlers // ============================== value: function startListeningToTouch() { if (document && document.addEventListener) { document.addEventListener('touchstart', this.onTouchStart, false); document.addEventListener('touchmove', this.onTouchMove, false); document.addEventListener('touchend', this.onTouchEnd, false); } } }, { key: "stopListeningToTouch", value: function stopListeningToTouch() { if (document && document.removeEventListener) { document.removeEventListener('touchstart', this.onTouchStart); document.removeEventListener('touchmove', this.onTouchMove); document.removeEventListener('touchend', this.onTouchEnd); } } }, { key: "buildMenuOptions", // ============================== // Menu Options // ============================== value: function buildMenuOptions(props, selectValue) { var _this3 = this; var _props$inputValue = props.inputValue, inputValue = _props$inputValue === void 0 ? '' : _props$inputValue, options = props.options; var toOption = function toOption(option, id) { var isDisabled = _this3.isOptionDisabled(option, selectValue); var isSelected = _this3.isOptionSelected(option, selectValue); var label = _this3.getOptionLabel(option); var value = _this3.getOptionValue(option); if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({ label: label, value: value, data: option }, inputValue)) { return; } var onHover = isDisabled ? undefined : function () { return _this3.onOptionHover(option); }; var onSelect = isDisabled ? undefined : function () { return _this3.selectOption(option); }; var optionId = "".concat(_this3.getElementId('option'), "-").concat(id); return { innerProps: { id: optionId, onClick: onSelect, onMouseMove: onHover, onMouseOver: onHover, tabIndex: -1 }, data: option, isDisabled: isDisabled, isSelected: isSelected, key: optionId, label: label, type: 'option', value: value }; }; return options.reduce(function (acc, item, itemIndex) { if (item.options) { // TODO needs a tidier implementation if (!_this3.hasGroups) _this3.hasGroups = true; var items = item.options; var children = items.map(function (child, i) { var option = toOption(child, "".concat(itemIndex, "-").concat(i)); if (option) acc.focusable.push(child); return option; }).filter(Boolean); if (children.length) { var groupId = "".concat(_this3.getElementId('group'), "-").concat(itemIndex); acc.render.push({ type: 'group', key: groupId, data: item, options: children }); } } else { var option = toOption(item, "".concat(itemIndex)); if (option) { acc.render.push(option); acc.focusable.push(item); } } return acc; }, { render: [], focusable: [] }); } // ============================== // Renderers // ============================== }, { key: "constructAriaLiveMessage", value: function constructAriaLiveMessage() { var _this$state7 = this.state, ariaLiveContext = _this$state7.ariaLiveContext, selectValue = _this$state7.selectValue, focusedValue = _this$state7.focusedValue, focusedOption = _this$state7.focusedOption; var _this$props13 = this.props, options = _this$props13.options, menuIsOpen = _this$props13.menuIsOpen, inputValue = _this$props13.inputValue, screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select. var focusedValueMsg = focusedValue ? valueFocusAriaMessage({ focusedValue: focusedValue, getOptionLabel: this.getOptionLabel, selectValue: selectValue }) : ''; // An aria live message representing the currently focused option in the select. var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({ focusedOption: focusedOption, getOptionLabel: this.getOptionLabel, options: options }) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue. var resultsMsg = resultsAriaMessage({ inputValue: inputValue, screenReaderMessage: screenReaderStatus({ count: this.countOptions() }) }); return "".concat(focusedValueMsg, " ").concat(focusedOptionMsg, " ").concat(resultsMsg, " ").concat(ariaLiveContext); } }, { key: "renderInput", value: function renderInput() { var _this$props14 = this.props, isDisabled = _this$props14.isDisabled, isSearchable = _this$props14.isSearchable, inputId = _this$props14.inputId, inputValue = _this$props14.inputValue, tabIndex = _this$props14.tabIndex; var Input = this.components.Input; var inputIsHidden = this.state.inputIsHidden; var id = inputId || this.getElementId('input'); if (!isSearchable) { // use a dummy input to maintain focus/blur functionality return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DummyInput, { id: id, innerRef: this.getInputRef, onBlur: this.onInputBlur, onChange: noop, onFocus: this.onInputFocus, readOnly: true, disabled: isDisabled, tabIndex: tabIndex, value: "" }); } // aria attributes makes the JSX "noisy", separated for clarity var ariaAttributes = { 'aria-autocomplete': 'list', 'aria-label': this.props['aria-label'], 'aria-labelledby': this.props['aria-labelledby'] }; var _this$commonProps = this.commonProps, cx = _this$commonProps.cx, theme = _this$commonProps.theme, selectProps = _this$commonProps.selectProps; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Input, _extends({ autoCapitalize: "none", autoComplete: "off", autoCorrect: "off", cx: cx, getStyles: this.getStyles, id: id, innerRef: this.getInputRef, isDisabled: isDisabled, isHidden: inputIsHidden, onBlur: this.onInputBlur, onChange: this.handleInputChange, onFocus: this.onInputFocus, selectProps: selectProps, spellCheck: "false", tabIndex: tabIndex, theme: theme, type: "text", value: inputValue }, ariaAttributes)); } }, { key: "renderPlaceholderOrValue", value: function renderPlaceholderOrValue() { var _this4 = this; var _this$components = this.components, MultiValue = _this$components.MultiValue, MultiValueContainer = _this$components.MultiValueContainer, MultiValueLabel = _this$components.MultiValueLabel, MultiValueRemove = _this$components.MultiValueRemove, SingleValue = _this$components.SingleValue, Placeholder = _this$components.Placeholder; var commonProps = this.commonProps; var _this$props15 = this.props, controlShouldRenderValue = _this$props15.controlShouldRenderValue, isDisabled = _this$props15.isDisabled, isMulti = _this$props15.isMulti, inputValue = _this$props15.inputValue, placeholder = _this$props15.placeholder; var _this$state8 = this.state, selectValue = _this$state8.selectValue, focusedValue = _this$state8.focusedValue, isFocused = _this$state8.isFocused; if (!this.hasValue() || !controlShouldRenderValue) { return inputValue ? null : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Placeholder, _extends({}, commonProps, { key: "placeholder", isDisabled: isDisabled, isFocused: isFocused }), placeholder); } if (isMulti) { var selectValues = selectValue.map(function (opt) { var isOptionFocused = opt === focusedValue; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MultiValue, _extends({}, commonProps, { components: { Container: MultiValueContainer, Label: MultiValueLabel, Remove: MultiValueRemove }, isFocused: isOptionFocused, isDisabled: isDisabled, key: _this4.getOptionValue(opt), removeProps: { onClick: function onClick() { return _this4.removeValue(opt); }, onTouchEnd: function onTouchEnd() { return _this4.removeValue(opt); }, onMouseDown: function onMouseDown(e) { e.preventDefault(); e.stopPropagation(); } }, data: opt }), _this4.formatOptionLabel(opt, 'value')); }); return selectValues; } if (inputValue) { return null; } var singleValue = selectValue[0]; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SingleValue, _extends({}, commonProps, { data: singleValue, isDisabled: isDisabled }), this.formatOptionLabel(singleValue, 'value')); } }, { key: "renderClearIndicator", value: function renderClearIndicator() { var ClearIndicator = this.components.ClearIndicator; var commonProps = this.commonProps; var _this$props16 = this.props, isDisabled = _this$props16.isDisabled, isLoading = _this$props16.isLoading; var isFocused = this.state.isFocused; if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) { return null; } var innerProps = { onMouseDown: this.onClearIndicatorMouseDown, onTouchEnd: this.onClearIndicatorTouchEnd, 'aria-hidden': 'true' }; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ClearIndicator, _extends({}, commonProps, { innerProps: innerProps, isFocused: isFocused })); } }, { key: "renderLoadingIndicator", value: function renderLoadingIndicator() { var LoadingIndicator = this.components.LoadingIndicator; var commonProps = this.commonProps; var _this$props17 = this.props, isDisabled = _this$props17.isDisabled, isLoading = _this$props17.isLoading; var isFocused = this.state.isFocused; if (!LoadingIndicator || !isLoading) return null; var innerProps = { 'aria-hidden': 'true' }; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LoadingIndicator, _extends({}, commonProps, { innerProps: innerProps, isDisabled: isDisabled, isFocused: isFocused })); } }, { key: "renderIndicatorSeparator", value: function renderIndicatorSeparator() { var _this$components2 = this.components, DropdownIndicator = _this$components2.DropdownIndicator, IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator if (!DropdownIndicator || !IndicatorSeparator) return null; var commonProps = this.commonProps; var isDisabled = this.props.isDisabled; var isFocused = this.state.isFocused; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(IndicatorSeparator, _extends({}, commonProps, { isDisabled: isDisabled, isFocused: isFocused })); } }, { key: "renderDropdownIndicator", value: function renderDropdownIndicator() { var DropdownIndicator = this.components.DropdownIndicator; if (!DropdownIndicator) return null; var commonProps = this.commonProps; var isDisabled = this.props.isDisabled; var isFocused = this.state.isFocused; var innerProps = { onMouseDown: this.onDropdownIndicatorMouseDown, onTouchEnd: this.onDropdownIndicatorTouchEnd, 'aria-hidden': 'true' }; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DropdownIndicator, _extends({}, commonProps, { innerProps: innerProps, isDisabled: isDisabled, isFocused: isFocused })); } }, { key: "renderMenu", value: function renderMenu() { var _this5 = this; var _this$components3 = this.components, Group = _this$components3.Group, GroupHeading = _this$components3.GroupHeading, Menu$$1 = _this$components3.Menu, MenuList$$1 = _this$components3.MenuList, MenuPortal$$1 = _this$components3.MenuPortal, LoadingMessage$$1 = _this$components3.LoadingMessage, NoOptionsMessage$$1 = _this$components3.NoOptionsMessage, Option = _this$components3.Option; var commonProps = this.commonProps; var _this$state9 = this.state, focusedOption = _this$state9.focusedOption, menuOptions = _this$state9.menuOptions; var _this$props18 = this.props, captureMenuScroll = _this$props18.captureMenuScroll, inputValue = _this$props18.inputValue, isLoading = _this$props18.isLoading, loadingMessage = _this$props18.loadingMessage, minMenuHeight = _this$props18.minMenuHeight, maxMenuHeight = _this$props18.maxMenuHeight, menuIsOpen = _this$props18.menuIsOpen, menuPlacement = _this$props18.menuPlacement, menuPosition = _this$props18.menuPosition, menuPortalTarget = _this$props18.menuPortalTarget, menuShouldBlockScroll = _this$props18.menuShouldBlockScroll, menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView, noOptionsMessage = _this$props18.noOptionsMessage, onMenuScrollToTop = _this$props18.onMenuScrollToTop, onMenuScrollToBottom = _this$props18.onMenuScrollToBottom; if (!menuIsOpen) return null; // TODO: Internal Option Type here var render = function render(props) { // for performance, the menu options in state aren't changed when the // focused option changes so we calculate additional props based on that var isFocused = focusedOption === props.data; props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Option, _extends({}, commonProps, props, { isFocused: isFocused }), _this5.formatOptionLabel(props.data, 'menu')); }; var menuUI; if (this.hasOptions()) { menuUI = menuOptions.render.map(function (item) { if (item.type === 'group') { var type = item.type, group = _objectWithoutProperties(item, ["type"]); var headingId = "".concat(item.key, "-heading"); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Group, _extends({}, commonProps, group, { Heading: GroupHeading, headingProps: { id: headingId }, label: _this5.formatGroupLabel(item.data) }), item.options.map(function (option) { return render(option); })); } else if (item.type === 'option') { return render(item); } }); } else if (isLoading) { var message = loadingMessage({ inputValue: inputValue }); if (message === null) return null; menuUI = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LoadingMessage$$1, commonProps, message); } else { var _message = noOptionsMessage({ inputValue: inputValue }); if (_message === null) return null; menuUI = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(NoOptionsMessage$$1, commonProps, _message); } var menuPlacementProps = { minMenuHeight: minMenuHeight, maxMenuHeight: maxMenuHeight, menuPlacement: menuPlacement, menuPosition: menuPosition, menuShouldScrollIntoView: menuShouldScrollIntoView }; var menuElement = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref6) { var ref = _ref6.ref, _ref6$placerProps = _ref6.placerProps, placement = _ref6$placerProps.placement, maxHeight = _ref6$placerProps.maxHeight; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Menu$$1, _extends({}, commonProps, menuPlacementProps, { innerRef: ref, innerProps: { onMouseDown: _this5.onMenuMouseDown, onMouseMove: _this5.onMenuMouseMove }, isLoading: isLoading, placement: placement }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ScrollCaptorSwitch, { isEnabled: captureMenuScroll, onTopArrive: onMenuScrollToTop, onBottomArrive: onMenuScrollToBottom }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ScrollBlock, { isEnabled: menuShouldBlockScroll }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuList$$1, _extends({}, commonProps, { innerRef: _this5.getMenuListRef, isLoading: isLoading, maxHeight: maxHeight }), menuUI)))); }); // positioning behaviour is almost identical for portalled and fixed, // so we use the same component. the actual portalling logic is forked // within the component based on `menuPosition` return menuPortalTarget || menuPosition === 'fixed' ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuPortal$$1, _extends({}, commonProps, { appendTo: menuPortalTarget, controlElement: this.controlRef, menuPlacement: menuPlacement, menuPosition: menuPosition }), menuElement) : menuElement; } }, { key: "renderFormField", value: function renderFormField() { var _this6 = this; var _this$props19 = this.props, delimiter = _this$props19.delimiter, isDisabled = _this$props19.isDisabled, isMulti = _this$props19.isMulti, name = _this$props19.name; var selectValue = this.state.selectValue; if (!name || isDisabled) return; if (isMulti) { if (delimiter) { var value = selectValue.map(function (opt) { return _this6.getOptionValue(opt); }).join(delimiter); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { name: name, type: "hidden", value: value }); } else { var input = selectValue.length > 0 ? selectValue.map(function (opt, i) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { key: "i-".concat(i), name: name, type: "hidden", value: _this6.getOptionValue(opt) }); }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { name: name, type: "hidden" }); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, input); } } else { var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : ''; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { name: name, type: "hidden", value: _value }); } } }, { key: "renderLiveRegion", value: function renderLiveRegion() { if (!this.state.isFocused) return null; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(A11yText, { "aria-live": "assertive" }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { id: "aria-selection-event" }, "\xA0", this.state.ariaLiveSelection), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { id: "aria-context" }, "\xA0", this.constructAriaLiveMessage())); } }, { key: "render", value: function render() { var _this$components4 = this.components, Control = _this$components4.Control, IndicatorsContainer = _this$components4.IndicatorsContainer, SelectContainer = _this$components4.SelectContainer, ValueContainer = _this$components4.ValueContainer; var _this$props20 = this.props, className = _this$props20.className, id = _this$props20.id, isDisabled = _this$props20.isDisabled, menuIsOpen = _this$props20.menuIsOpen; var isFocused = this.state.isFocused; var commonProps = this.commonProps = this.getCommonProps(); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SelectContainer, _extends({}, commonProps, { className: className, innerProps: { id: id, onKeyDown: this.onKeyDown }, isDisabled: isDisabled, isFocused: isFocused }), this.renderLiveRegion(), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Control, _extends({}, commonProps, { innerRef: this.getControlRef, innerProps: { onMouseDown: this.onControlMouseDown, onTouchEnd: this.onControlTouchEnd }, isDisabled: isDisabled, isFocused: isFocused, menuIsOpen: menuIsOpen }), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ValueContainer, _extends({}, commonProps, { isDisabled: isDisabled }), this.renderPlaceholderOrValue(), this.renderInput()), react__WEBPACK_IMPORTED_MODULE_0___default().createElement(IndicatorsContainer, _extends({}, commonProps, { isDisabled: isDisabled }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField()); } }]); return Select; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); _defineProperty(Select, "defaultProps", defaultProps); var defaultProps$1 = { defaultInputValue: '', defaultMenuIsOpen: false, defaultValue: null }; var manageState = function manageState(SelectComponent) { var _class, _temp; return _temp = _class = /*#__PURE__*/ function (_Component) { _inherits(StateManager, _Component); function StateManager() { var _getPrototypeOf2; var _this; _classCallCheck(this, StateManager); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(StateManager)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue, menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen, value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (value, actionMeta) { _this.callProp('onChange', value, actionMeta); _this.setState({ value: value }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputChange", function (value, actionMeta) { // TODO: for backwards compatibility, we allow the prop to return a new // value, but now inputValue is a controllable prop we probably shouldn't var newValue = _this.callProp('onInputChange', value, actionMeta); _this.setState({ inputValue: newValue !== undefined ? newValue : value }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuOpen", function () { _this.callProp('onMenuOpen'); _this.setState({ menuIsOpen: true }); }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuClose", function () { _this.callProp('onMenuClose'); _this.setState({ menuIsOpen: false }); }); return _this; } _createClass(StateManager, [{ key: "focus", value: function focus() { this.select.focus(); } }, { key: "blur", value: function blur() { this.select.blur(); } // FIXME: untyped flow code, return any }, { key: "getProp", value: function getProp(key) { return this.props[key] !== undefined ? this.props[key] : this.state[key]; } // FIXME: untyped flow code, return any }, { key: "callProp", value: function callProp(name) { if (typeof this.props[name] === 'function') { var _this$props; for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return (_this$props = this.props)[name].apply(_this$props, args); } } }, { key: "render", value: function render() { var _this2 = this; var _this$props2 = this.props, defaultInputValue = _this$props2.defaultInputValue, defaultMenuIsOpen = _this$props2.defaultMenuIsOpen, defaultValue = _this$props2.defaultValue, props = _objectWithoutProperties(_this$props2, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SelectComponent, _extends({}, props, { ref: function ref(_ref) { _this2.select = _ref; }, inputValue: this.getProp('inputValue'), menuIsOpen: this.getProp('menuIsOpen'), onChange: this.onChange, onInputChange: this.onInputChange, onMenuClose: this.onMenuClose, onMenuOpen: this.onMenuOpen, value: this.getProp('value') })); } }]); return StateManager; }(react__WEBPACK_IMPORTED_MODULE_0__.Component), _defineProperty(_class, "defaultProps", defaultProps$1), _temp; }; var defaultProps$2 = { cacheOptions: false, defaultOptions: false, filterOption: null }; var makeAsyncSelect = function makeAsyncSelect(SelectComponent) { var _class, _temp; return _temp = _class = /*#__PURE__*/ function (_Component) { _inherits(Async, _Component); function Async(props) { var _this; _classCallCheck(this, Async); _this = _possibleConstructorReturn(this, _getPrototypeOf(Async).call(this)); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "lastRequest", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "mounted", false); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "optionsCache", {}); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (newValue, actionMeta) { var _this$props = _this.props, cacheOptions = _this$props.cacheOptions, onInputChange = _this$props.onInputChange; // TODO var inputValue = handleInputChange(newValue, actionMeta, onInputChange); if (!inputValue) { delete _this.lastRequest; _this.setState({ inputValue: '', loadedInputValue: '', loadedOptions: [], isLoading: false, passEmptyOptions: false }); return; } if (cacheOptions && _this.optionsCache[inputValue]) { _this.setState({ inputValue: inputValue, loadedInputValue: inputValue, loadedOptions: _this.optionsCache[inputValue], isLoading: false, passEmptyOptions: false }); } else { var request = _this.lastRequest = {}; _this.setState({ inputValue: inputValue, isLoading: true, passEmptyOptions: !_this.state.loadedInputValue }, function () { _this.loadOptions(inputValue, function (options) { if (!_this.mounted) return; if (options) { _this.optionsCache[inputValue] = options; } if (request !== _this.lastRequest) return; delete _this.lastRequest; _this.setState({ isLoading: false, loadedInputValue: inputValue, loadedOptions: options || [], passEmptyOptions: false }); }); }); } return inputValue; }); _this.state = { defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined, inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '', isLoading: props.defaultOptions === true ? true : false, loadedOptions: [], passEmptyOptions: false }; return _this; } _createClass(Async, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.mounted = true; var defaultOptions = this.props.defaultOptions; var inputValue = this.state.inputValue; if (defaultOptions === true) { this.loadOptions(inputValue, function (options) { if (!_this2.mounted) return; var isLoading = !!_this2.lastRequest; _this2.setState({ defaultOptions: options || [], isLoading: isLoading }); }); } } }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { // if the cacheOptions prop changes, clear the cache if (nextProps.cacheOptions !== this.props.cacheOptions) { this.optionsCache = {}; } if (nextProps.defaultOptions !== this.props.defaultOptions) { this.setState({ defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.mounted = false; } }, { key: "focus", value: function focus() { this.select.focus(); } }, { key: "blur", value: function blur() { this.select.blur(); } }, { key: "loadOptions", value: function loadOptions(inputValue, callback) { var loadOptions = this.props.loadOptions; if (!loadOptions) return callback(); var loader = loadOptions(inputValue, callback); if (loader && typeof loader.then === 'function') { loader.then(callback, function () { return callback(); }); } } }, { key: "render", value: function render() { var _this3 = this; var _this$props2 = this.props, loadOptions = _this$props2.loadOptions, props = _objectWithoutProperties(_this$props2, ["loadOptions"]); var _this$state = this.state, defaultOptions = _this$state.defaultOptions, inputValue = _this$state.inputValue, isLoading = _this$state.isLoading, loadedInputValue = _this$state.loadedInputValue, loadedOptions = _this$state.loadedOptions, passEmptyOptions = _this$state.passEmptyOptions; var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || []; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SelectComponent, _extends({}, props, { ref: function ref(_ref) { _this3.select = _ref; }, options: options, isLoading: isLoading, onInputChange: this.handleInputChange })); } }]); return Async; }(react__WEBPACK_IMPORTED_MODULE_0__.Component), _defineProperty(_class, "defaultProps", defaultProps$2), _temp; }; var SelectState = manageState(Select); var Async = makeAsyncSelect(SelectState); var compareOption = function compareOption() { var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var option = arguments.length > 1 ? arguments[1] : undefined; var candidate = String(inputValue).toLowerCase(); var optionValue = String(option.value).toLowerCase(); var optionLabel = String(option.label).toLowerCase(); return optionValue === candidate || optionLabel === candidate; }; var builtins = { formatCreateLabel: function formatCreateLabel(inputValue) { return "Create \"".concat(inputValue, "\""); }, isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) { return !(!inputValue || selectValue.some(function (option) { return compareOption(inputValue, option); }) || selectOptions.some(function (option) { return compareOption(inputValue, option); })); }, getNewOptionData: function getNewOptionData(inputValue, optionLabel) { return { label: optionLabel, value: inputValue, __isNew__: true }; } }; var defaultProps$3 = _objectSpread({ allowCreateWhileLoading: false, createOptionPosition: 'last' }, builtins); var makeCreatableSelect = function makeCreatableSelect(SelectComponent) { var _class, _temp; return _temp = _class = /*#__PURE__*/ function (_Component) { _inherits(Creatable, _Component); function Creatable(props) { var _this; _classCallCheck(this, Creatable); _this = _possibleConstructorReturn(this, _getPrototypeOf(Creatable).call(this, props)); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) { var _this$props = _this.props, getNewOptionData = _this$props.getNewOptionData, inputValue = _this$props.inputValue, isMulti = _this$props.isMulti, onChange = _this$props.onChange, onCreateOption = _this$props.onCreateOption, value = _this$props.value; if (actionMeta.action !== 'select-option') { return onChange(newValue, actionMeta); } var newOption = _this.state.newOption; var valueArray = Array.isArray(newValue) ? newValue : [newValue]; if (valueArray[valueArray.length - 1] === newOption) { if (onCreateOption) onCreateOption(inputValue);else { var newOptionData = getNewOptionData(inputValue, inputValue); var newActionMeta = { action: 'create-option' }; if (isMulti) { onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta); } else { onChange(newOptionData, newActionMeta); } } return; } onChange(newValue, actionMeta); }); var options = props.options || []; _this.state = { newOption: undefined, options: options }; return _this; } _createClass(Creatable, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var allowCreateWhileLoading = nextProps.allowCreateWhileLoading, createOptionPosition = nextProps.createOptionPosition, formatCreateLabel = nextProps.formatCreateLabel, getNewOptionData = nextProps.getNewOptionData, inputValue = nextProps.inputValue, isLoading = nextProps.isLoading, isValidNewOption = nextProps.isValidNewOption, value = nextProps.value; var options = nextProps.options || []; var newOption = this.state.newOption; if (isValidNewOption(inputValue, cleanValue(value), options)) { newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue)); } else { newOption = undefined; } this.setState({ newOption: newOption, options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options }); } }, { key: "focus", value: function focus() { this.select.focus(); } }, { key: "blur", value: function blur() { this.select.blur(); } }, { key: "render", value: function render() { var _this2 = this; var props = _extends({}, this.props); var options = this.state.options; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SelectComponent, _extends({}, props, { ref: function ref(_ref) { _this2.select = _ref; }, options: options, onChange: this.onChange })); } }]); return Creatable; }(react__WEBPACK_IMPORTED_MODULE_0__.Component), _defineProperty(_class, "defaultProps", defaultProps$3), _temp; }; // TODO: do this in package entrypoint var SelectCreatable = makeCreatableSelect(Select); var Creatable = manageState(SelectCreatable); var SelectCreatable$1 = makeCreatableSelect(Select); var SelectCreatableState = manageState(SelectCreatable$1); var AsyncCreatable = makeAsyncSelect(SelectCreatableState); // strip transition props off before spreading onto select component // note we need to be explicit about innerRef for flow var AnimatedInput = function AnimatedInput(WrappedComponent) { return function (_ref) { var inProp = _ref.in, onExited = _ref.onExited, appear = _ref.appear, enter = _ref.enter, exit = _ref.exit, props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(WrappedComponent, props); }; }; var Fade = function Fade(_ref) { var Tag = _ref.component, _ref$duration = _ref.duration, duration = _ref$duration === void 0 ? 1 : _ref$duration, inProp = _ref.in, onExited = _ref.onExited, props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]); var transition = { entering: { opacity: 0 }, entered: { opacity: 1, transition: "opacity ".concat(duration, "ms") }, exiting: { opacity: 0 }, exited: { opacity: 0 } }; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__.Transition, { mountOnEnter: true, unmountOnExit: true, in: inProp, timeout: duration }, function (state) { var innerProps = { style: _objectSpread({}, transition[state]) }; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Tag, _extends({ innerProps: innerProps }, props)); }); }; // ============================== // Collapse Transition // ============================== var collapseDuration = 260; // wrap each MultiValue with a collapse transition; decreases width until // finally removing from DOM var Collapse = /*#__PURE__*/ function (_Component) { _inherits(Collapse, _Component); function Collapse() { var _getPrototypeOf2; var _this; _classCallCheck(this, Collapse); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Collapse)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "duration", collapseDuration); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "rafID", void 0); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { width: 'auto' }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "transition", { exiting: { width: 0, transition: "width ".concat(_this.duration, "ms ease-out") }, exited: { width: 0 } }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getWidth", function (ref) { if (ref && isNaN(_this.state.width)) { /* Here we're invoking requestAnimationFrame with a callback invoking our call to getBoundingClientRect and setState in order to resolve an edge case around portalling. Certain portalling solutions briefly remove children from the DOM before appending them to the target node. This is to avoid us trying to call getBoundingClientrect while the Select component is in this state. */ // cannot use `offsetWidth` because it is rounded _this.rafID = window.requestAnimationFrame(function () { var _ref$getBoundingClien = ref.getBoundingClientRect(), width = _ref$getBoundingClien.width; _this.setState({ width: width }); }); } }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyle", function (width) { return { overflow: 'hidden', whiteSpace: 'nowrap', width: width }; }); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getTransition", function (state) { return _this.transition[state]; }); return _this; } _createClass(Collapse, [{ key: "componentWillUnmount", value: function componentWillUnmount() { if (this.rafID) { window.cancelAnimationFrame(this.rafID); } } // width must be calculated; cannot transition from `undefined` to `number` }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, children = _this$props.children, inProp = _this$props.in; var width = this.state.width; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__.Transition, { enter: false, mountOnEnter: true, unmountOnExit: true, in: inProp, timeout: this.duration }, function (state) { var style = _objectSpread({}, _this2.getStyle(width), _this2.getTransition(state)); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { ref: _this2.getWidth, style: style }, children); }); } }]); return Collapse; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) { return function (_ref) { var inProp = _ref.in, onExited = _ref.onExited, props = _objectWithoutProperties(_ref, ["in", "onExited"]); return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Collapse, { in: inProp, onExited: onExited }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(WrappedComponent, _extends({ cropWithEllipsis: inProp }, props))); }; }; var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) { return function (props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Fade, _extends({ component: WrappedComponent, duration: props.isMulti ? collapseDuration : 1 }, props)); }; }; var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) { return function (props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Fade, _extends({ component: WrappedComponent }, props)); }; }; // make ValueContainer a transition group var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) { return function (props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_7__.TransitionGroup, _extends({ component: WrappedComponent }, props)); }; }; var makeAnimated = function makeAnimated() { var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var components$$1 = defaultComponents({ components: externalComponents }); var Input = components$$1.Input, MultiValue = components$$1.MultiValue, Placeholder = components$$1.Placeholder, SingleValue = components$$1.SingleValue, ValueContainer = components$$1.ValueContainer, rest = _objectWithoutProperties(components$$1, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]); return _objectSpread({ Input: AnimatedInput(Input), MultiValue: AnimatedMultiValue(MultiValue), Placeholder: AnimatedPlaceholder(Placeholder), SingleValue: AnimatedSingleValue(SingleValue), ValueContainer: AnimatedValueContainer(ValueContainer) }, rest); }; var AnimatedComponents = makeAnimated(); var Input$1 = AnimatedComponents.Input; var MultiValue$1 = AnimatedComponents.MultiValue; var Placeholder$1 = AnimatedComponents.Placeholder; var SingleValue$1 = AnimatedComponents.SingleValue; var ValueContainer$1 = AnimatedComponents.ValueContainer; var index = (0,memoize_one__WEBPACK_IMPORTED_MODULE_6__["default"])(makeAnimated, exportedEqual); var index$1 = manageState(Select); /* harmony default export */ __webpack_exports__["default"] = (index$1); /***/ }), /***/ "./node_modules/react-transition-group/CSSTransition.js": /*!**************************************************************!*\ !*** ./node_modules/react-transition-group/CSSTransition.js ***! \**************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _addClass = _interopRequireDefault(__webpack_require__(/*! dom-helpers/class/addClass */ "./node_modules/dom-helpers/class/addClass.js")); var _removeClass = _interopRequireDefault(__webpack_require__(/*! dom-helpers/class/removeClass */ "./node_modules/dom-helpers/class/removeClass.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); var _Transition = _interopRequireDefault(__webpack_require__(/*! ./Transition */ "./node_modules/react-transition-group/Transition.js")); var _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ "./node_modules/react-transition-group/utils/PropTypes.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } var addClass = function addClass(node, classes) { return node && classes && classes.split(' ').forEach(function (c) { return (0, _addClass.default)(node, c); }); }; var removeClass = function removeClass(node, classes) { return node && classes && classes.split(' ').forEach(function (c) { return (0, _removeClass.default)(node, c); }); }; /** * A transition component inspired by the excellent * [ng-animate](http://www.nganimate.org/) library, you should use it if you're * using CSS transitions or animations. It's built upon the * [`Transition`](https://reactcommunity.org/react-transition-group/transition) * component, so it inherits all of its props. * * `CSSTransition` applies a pair of class names during the `appear`, `enter`, * and `exit` states of the transition. The first class is applied and then a * second `*-active` class in order to activate the CSSS transition. After the * transition, matching `*-done` class names are applied to persist the * transition state. * * ```jsx * function App() { * const [inProp, setInProp] = useState(false); * return ( *
    * *
    * {"I'll receive my-node-* classes"} *
    *
    * *
    * ); * } * ``` * * When the `in` prop is set to `true`, the child component will first receive * the class `example-enter`, then the `example-enter-active` will be added in * the next tick. `CSSTransition` [forces a * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215) * between before adding the `example-enter-active`. This is an important trick * because it allows us to transition between `example-enter` and * `example-enter-active` even though they were added immediately one after * another. Most notably, this is what makes it possible for us to animate * _appearance_. * * ```css * .my-node-enter { * opacity: 0; * } * .my-node-enter-active { * opacity: 1; * transition: opacity 200ms; * } * .my-node-exit { * opacity: 1; * } * .my-node-exit-active { * opacity: 0; * transition: opacity: 200ms; * } * ``` * * `*-active` classes represent which styles you want to animate **to**. */ var CSSTransition = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(CSSTransition, _React$Component); function CSSTransition() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.onEnter = function (node, appearing) { var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'), className = _this$getClassNames.className; _this.removeClasses(node, 'exit'); addClass(node, className); if (_this.props.onEnter) { _this.props.onEnter(node, appearing); } }; _this.onEntering = function (node, appearing) { var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'), activeClassName = _this$getClassNames2.activeClassName; _this.reflowAndAddClass(node, activeClassName); if (_this.props.onEntering) { _this.props.onEntering(node, appearing); } }; _this.onEntered = function (node, appearing) { var appearClassName = _this.getClassNames('appear').doneClassName; var enterClassName = _this.getClassNames('enter').doneClassName; var doneClassName = appearing ? appearClassName + " " + enterClassName : enterClassName; _this.removeClasses(node, appearing ? 'appear' : 'enter'); addClass(node, doneClassName); if (_this.props.onEntered) { _this.props.onEntered(node, appearing); } }; _this.onExit = function (node) { var _this$getClassNames3 = _this.getClassNames('exit'), className = _this$getClassNames3.className; _this.removeClasses(node, 'appear'); _this.removeClasses(node, 'enter'); addClass(node, className); if (_this.props.onExit) { _this.props.onExit(node); } }; _this.onExiting = function (node) { var _this$getClassNames4 = _this.getClassNames('exit'), activeClassName = _this$getClassNames4.activeClassName; _this.reflowAndAddClass(node, activeClassName); if (_this.props.onExiting) { _this.props.onExiting(node); } }; _this.onExited = function (node) { var _this$getClassNames5 = _this.getClassNames('exit'), doneClassName = _this$getClassNames5.doneClassName; _this.removeClasses(node, 'exit'); addClass(node, doneClassName); if (_this.props.onExited) { _this.props.onExited(node); } }; _this.getClassNames = function (type) { var classNames = _this.props.classNames; var isStringClassNames = typeof classNames === 'string'; var prefix = isStringClassNames && classNames ? classNames + '-' : ''; var className = isStringClassNames ? prefix + type : classNames[type]; var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active']; var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done']; return { className: className, activeClassName: activeClassName, doneClassName: doneClassName }; }; return _this; } var _proto = CSSTransition.prototype; _proto.removeClasses = function removeClasses(node, type) { var _this$getClassNames6 = this.getClassNames(type), className = _this$getClassNames6.className, activeClassName = _this$getClassNames6.activeClassName, doneClassName = _this$getClassNames6.doneClassName; className && removeClass(node, className); activeClassName && removeClass(node, activeClassName); doneClassName && removeClass(node, doneClassName); }; _proto.reflowAndAddClass = function reflowAndAddClass(node, className) { // This is for to force a repaint, // which is necessary in order to transition styles when adding a class name. if (className) { /* eslint-disable no-unused-expressions */ node && node.scrollTop; /* eslint-enable no-unused-expressions */ addClass(node, className); } }; _proto.render = function render() { var props = _extends({}, this.props); delete props.classNames; return _react.default.createElement(_Transition.default, _extends({}, props, { onEnter: this.onEnter, onEntered: this.onEntered, onEntering: this.onEntering, onExit: this.onExit, onExiting: this.onExiting, onExited: this.onExited })); }; return CSSTransition; }(_react.default.Component); CSSTransition.defaultProps = { classNames: '' }; CSSTransition.propTypes = true ? _extends({}, _Transition.default.propTypes, { /** * The animation classNames applied to the component as it enters, exits or * has finished the transition. A single name can be provided and it will be * suffixed for each stage: e.g. * * `classNames="fade"` applies `fade-enter`, `fade-enter-active`, * `fade-enter-done`, `fade-exit`, `fade-exit-active`, `fade-exit-done`, * `fade-appear`, `fade-appear-active`, and `fade-appear-done`. * * **Note**: `fade-appear-done` and `fade-enter-done` will _both_ be applied. * This allows you to define different behavior for when appearing is done and * when regular entering is done, using selectors like * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply an * epic entrance animation when element first appears in the DOM using * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can * simply use `fade-enter-done` for defining both cases. * * Each individual classNames can also be specified independently like: * * ```js * classNames={{ * appear: 'my-appear', * appearActive: 'my-active-appear', * appearDone: 'my-done-appear', * enter: 'my-enter', * enterActive: 'my-active-enter', * enterDone: 'my-done-enter', * exit: 'my-exit', * exitActive: 'my-active-exit', * exitDone: 'my-done-exit', * }} * ``` * * If you want to set these classes using CSS Modules: * * ```js * import styles from './styles.css'; * ``` * * you might want to use camelCase in your CSS file, that way could simply * spread them instead of listing them one by one: * * ```js * classNames={{ ...styles }} * ``` * * @type {string | { * appear?: string, * appearActive?: string, * appearDone?: string, * enter?: string, * enterActive?: string, * enterDone?: string, * exit?: string, * exitActive?: string, * exitDone?: string, * }} */ classNames: _PropTypes.classNamesShape, /** * A `` callback fired immediately after the 'enter' or 'appear' class is * applied. * * @type Function(node: HtmlElement, isAppearing: bool) */ onEnter: PropTypes.func, /** * A `` callback fired immediately after the 'enter-active' or * 'appear-active' class is applied. * * @type Function(node: HtmlElement, isAppearing: bool) */ onEntering: PropTypes.func, /** * A `` callback fired immediately after the 'enter' or * 'appear' classes are **removed** and the `done` class is added to the DOM node. * * @type Function(node: HtmlElement, isAppearing: bool) */ onEntered: PropTypes.func, /** * A `` callback fired immediately after the 'exit' class is * applied. * * @type Function(node: HtmlElement) */ onExit: PropTypes.func, /** * A `` callback fired immediately after the 'exit-active' is applied. * * @type Function(node: HtmlElement) */ onExiting: PropTypes.func, /** * A `` callback fired immediately after the 'exit' classes * are **removed** and the `exit-done` class is added to the DOM node. * * @type Function(node: HtmlElement) */ onExited: PropTypes.func }) : 0; var _default = CSSTransition; exports["default"] = _default; module.exports = exports["default"]; /***/ }), /***/ "./node_modules/react-transition-group/ReplaceTransition.js": /*!******************************************************************!*\ !*** ./node_modules/react-transition-group/ReplaceTransition.js ***! \******************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); var _reactDom = __webpack_require__(/*! react-dom */ "react-dom"); var _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! ./TransitionGroup */ "./node_modules/react-transition-group/TransitionGroup.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * The `` component is a specialized `Transition` component * that animates between two children. * * ```jsx * *
    I appear first
    *
    I replace the above
    *
    * ``` */ var ReplaceTransition = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(ReplaceTransition, _React$Component); function ReplaceTransition() { var _this; for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) { _args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this; _this.handleEnter = function () { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return _this.handleLifecycle('onEnter', 0, args); }; _this.handleEntering = function () { for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } return _this.handleLifecycle('onEntering', 0, args); }; _this.handleEntered = function () { for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return _this.handleLifecycle('onEntered', 0, args); }; _this.handleExit = function () { for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { args[_key5] = arguments[_key5]; } return _this.handleLifecycle('onExit', 1, args); }; _this.handleExiting = function () { for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } return _this.handleLifecycle('onExiting', 1, args); }; _this.handleExited = function () { for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { args[_key7] = arguments[_key7]; } return _this.handleLifecycle('onExited', 1, args); }; return _this; } var _proto = ReplaceTransition.prototype; _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) { var _child$props; var children = this.props.children; var child = _react.default.Children.toArray(children)[idx]; if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs); if (this.props[handler]) this.props[handler]((0, _reactDom.findDOMNode)(this)); }; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, inProp = _this$props.in, props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]); var _React$Children$toArr = _react.default.Children.toArray(children), first = _React$Children$toArr[0], second = _React$Children$toArr[1]; delete props.onEnter; delete props.onEntering; delete props.onEntered; delete props.onExit; delete props.onExiting; delete props.onExited; return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, { key: 'first', onEnter: this.handleEnter, onEntering: this.handleEntering, onEntered: this.handleEntered }) : _react.default.cloneElement(second, { key: 'second', onEnter: this.handleExit, onEntering: this.handleExiting, onEntered: this.handleExited })); }; return ReplaceTransition; }(_react.default.Component); ReplaceTransition.propTypes = true ? { in: _propTypes.default.bool.isRequired, children: function children(props, propName) { if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components."); return null; } } : 0; var _default = ReplaceTransition; exports["default"] = _default; module.exports = exports["default"]; /***/ }), /***/ "./node_modules/react-transition-group/Transition.js": /*!***********************************************************!*\ !*** ./node_modules/react-transition-group/Transition.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports["default"] = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0; var PropTypes = _interopRequireWildcard(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "react-dom")); var _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js"); var _PropTypes = __webpack_require__(/*! ./utils/PropTypes */ "./node_modules/react-transition-group/utils/PropTypes.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } var UNMOUNTED = 'unmounted'; exports.UNMOUNTED = UNMOUNTED; var EXITED = 'exited'; exports.EXITED = EXITED; var ENTERING = 'entering'; exports.ENTERING = ENTERING; var ENTERED = 'entered'; exports.ENTERED = ENTERED; var EXITING = 'exiting'; /** * The Transition component lets you describe a transition from one component * state to another _over time_ with a simple declarative API. Most commonly * it's used to animate the mounting and unmounting of a component, but can also * be used to describe in-place transition states as well. * * --- * * **Note**: `Transition` is a platform-agnostic base component. If you're using * transitions in CSS, you'll probably want to use * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition) * instead. It inherits all the features of `Transition`, but contains * additional features necessary to play nice with CSS transitions (hence the * name of the component). * * --- * * By default the `Transition` component does not alter the behavior of the * component it renders, it only tracks "enter" and "exit" states for the * components. It's up to you to give meaning and effect to those states. For * example we can add styles to a component when it enters or exits: * * ```jsx * import { Transition } from 'react-transition-group'; * * const duration = 300; * * const defaultStyle = { * transition: `opacity ${duration}ms ease-in-out`, * opacity: 0, * } * * const transitionStyles = { * entering: { opacity: 0 }, * entered: { opacity: 1 }, * }; * * const Fade = ({ in: inProp }) => ( * * {state => ( *
    * I'm a fade Transition! *
    * )} *
    * ); * ``` * * There are 4 main states a Transition can be in: * - `'entering'` * - `'entered'` * - `'exiting'` * - `'exited'` * * Transition state is toggled via the `in` prop. When `true` the component * begins the "Enter" stage. During this stage, the component will shift from * its current transition state, to `'entering'` for the duration of the * transition and then to the `'entered'` stage once it's complete. Let's take * the following example (we'll use the * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook): * * ```jsx * function App() { * const [inProp, setInProp] = useState(false); * return ( *
    * * {state => ( * // ... * )} * * *
    * ); * } * ``` * * When the button is clicked the component will shift to the `'entering'` state * and stay there for 500ms (the value of `timeout`) before it finally switches * to `'entered'`. * * When `in` is `false` the same thing happens except the state moves from * `'exiting'` to `'exited'`. */ exports.EXITING = EXITING; var Transition = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(Transition, _React$Component); function Transition(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; var initialStatus; _this.appearStatus = null; if (props.in) { if (appear) { initialStatus = EXITED; _this.appearStatus = ENTERING; } else { initialStatus = ENTERED; } } else { if (props.unmountOnExit || props.mountOnEnter) { initialStatus = UNMOUNTED; } else { initialStatus = EXITED; } } _this.state = { status: initialStatus }; _this.nextCallback = null; return _this; } var _proto = Transition.prototype; _proto.getChildContext = function getChildContext() { return { transitionGroup: null // allows for nested Transitions }; }; Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { var nextIn = _ref.in; if (nextIn && prevState.status === UNMOUNTED) { return { status: EXITED }; } return null; }; // getSnapshotBeforeUpdate(prevProps) { // let nextStatus = null // if (prevProps !== this.props) { // const { status } = this.state // if (this.props.in) { // if (status !== ENTERING && status !== ENTERED) { // nextStatus = ENTERING // } // } else { // if (status === ENTERING || status === ENTERED) { // nextStatus = EXITING // } // } // } // return { nextStatus } // } _proto.componentDidMount = function componentDidMount() { this.updateStatus(true, this.appearStatus); }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var nextStatus = null; if (prevProps !== this.props) { var status = this.state.status; if (this.props.in) { if (status !== ENTERING && status !== ENTERED) { nextStatus = ENTERING; } } else { if (status === ENTERING || status === ENTERED) { nextStatus = EXITING; } } } this.updateStatus(false, nextStatus); }; _proto.componentWillUnmount = function componentWillUnmount() { this.cancelNextCallback(); }; _proto.getTimeouts = function getTimeouts() { var timeout = this.props.timeout; var exit, enter, appear; exit = enter = appear = timeout; if (timeout != null && typeof timeout !== 'number') { exit = timeout.exit; enter = timeout.enter; // TODO: remove fallback for next major appear = timeout.appear !== undefined ? timeout.appear : enter; } return { exit: exit, enter: enter, appear: appear }; }; _proto.updateStatus = function updateStatus(mounting, nextStatus) { if (mounting === void 0) { mounting = false; } if (nextStatus !== null) { // nextStatus will always be ENTERING or EXITING. this.cancelNextCallback(); var node = _reactDom.default.findDOMNode(this); if (nextStatus === ENTERING) { this.performEnter(node, mounting); } else { this.performExit(node); } } else if (this.props.unmountOnExit && this.state.status === EXITED) { this.setState({ status: UNMOUNTED }); } }; _proto.performEnter = function performEnter(node, mounting) { var _this2 = this; var enter = this.props.enter; var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting; var timeouts = this.getTimeouts(); var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED // if we are mounting and running this it means appear _must_ be set if (!mounting && !enter) { this.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(node); }); return; } this.props.onEnter(node, appearing); this.safeSetState({ status: ENTERING }, function () { _this2.props.onEntering(node, appearing); _this2.onTransitionEnd(node, enterTimeout, function () { _this2.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(node, appearing); }); }); }); }; _proto.performExit = function performExit(node) { var _this3 = this; var exit = this.props.exit; var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED if (!exit) { this.safeSetState({ status: EXITED }, function () { _this3.props.onExited(node); }); return; } this.props.onExit(node); this.safeSetState({ status: EXITING }, function () { _this3.props.onExiting(node); _this3.onTransitionEnd(node, timeouts.exit, function () { _this3.safeSetState({ status: EXITED }, function () { _this3.props.onExited(node); }); }); }); }; _proto.cancelNextCallback = function cancelNextCallback() { if (this.nextCallback !== null) { this.nextCallback.cancel(); this.nextCallback = null; } }; _proto.safeSetState = function safeSetState(nextState, callback) { // This shouldn't be necessary, but there are weird race conditions with // setState callbacks and unmounting in testing, so always make sure that // we can cancel any pending setState callbacks after we unmount. callback = this.setNextCallback(callback); this.setState(nextState, callback); }; _proto.setNextCallback = function setNextCallback(callback) { var _this4 = this; var active = true; this.nextCallback = function (event) { if (active) { active = false; _this4.nextCallback = null; callback(event); } }; this.nextCallback.cancel = function () { active = false; }; return this.nextCallback; }; _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) { this.setNextCallback(handler); var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; if (!node || doesNotHaveTimeoutOrListener) { setTimeout(this.nextCallback, 0); return; } if (this.props.addEndListener) { this.props.addEndListener(node, this.nextCallback); } if (timeout != null) { setTimeout(this.nextCallback, timeout); } }; _proto.render = function render() { var status = this.state.status; if (status === UNMOUNTED) { return null; } var _this$props = this.props, children = _this$props.children, childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition delete childProps.in; delete childProps.mountOnEnter; delete childProps.unmountOnExit; delete childProps.appear; delete childProps.enter; delete childProps.exit; delete childProps.timeout; delete childProps.addEndListener; delete childProps.onEnter; delete childProps.onEntering; delete childProps.onEntered; delete childProps.onExit; delete childProps.onExiting; delete childProps.onExited; if (typeof children === 'function') { return children(status, childProps); } var child = _react.default.Children.only(children); return _react.default.cloneElement(child, childProps); }; return Transition; }(_react.default.Component); Transition.contextTypes = { transitionGroup: PropTypes.object }; Transition.childContextTypes = { transitionGroup: function transitionGroup() {} }; Transition.propTypes = true ? { /** * A `function` child can be used instead of a React element. This function is * called with the current transition status (`'entering'`, `'entered'`, * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context * specific props to a component. * * ```jsx * * {state => ( * * )} * * ``` */ children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired, /** * Show the component; triggers the enter or exit states */ in: PropTypes.bool, /** * By default the child component is mounted immediately along with * the parent `Transition` component. If you want to "lazy mount" the component on the * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay * mounted, even on "exited", unless you also specify `unmountOnExit`. */ mountOnEnter: PropTypes.bool, /** * By default the child component stays mounted after it reaches the `'exited'` state. * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting. */ unmountOnExit: PropTypes.bool, /** * Normally a component is not transitioned if it is shown when the `` component mounts. * If you want to transition on the first mount set `appear` to `true`, and the * component will transition in as soon as the `` mounts. * * > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition. */ appear: PropTypes.bool, /** * Enable or disable enter transitions. */ enter: PropTypes.bool, /** * Enable or disable exit transitions. */ exit: PropTypes.bool, /** * The duration of the transition, in milliseconds. * Required unless `addEndListener` is provided. * * You may specify a single timeout for all transitions: * * ```jsx * timeout={500} * ``` * * or individually: * * ```jsx * timeout={{ * appear: 500, * enter: 300, * exit: 500, * }} * ``` * * - `appear` defaults to the value of `enter` * - `enter` defaults to `0` * - `exit` defaults to `0` * * @type {number | { enter?: number, exit?: number, appear?: number }} */ timeout: function timeout(props) { var pt = _PropTypes.timeoutsShape; if (!props.addEndListener) pt = pt.isRequired; for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return pt.apply(void 0, [props].concat(args)); }, /** * Add a custom transition end trigger. Called with the transitioning * DOM node and a `done` callback. Allows for more fine grained transition end * logic. **Note:** Timeouts are still used as a fallback if provided. * * ```jsx * addEndListener={(node, done) => { * // use the css transitionend event to mark the finish of a transition * node.addEventListener('transitionend', done, false); * }} * ``` */ addEndListener: PropTypes.func, /** * Callback fired before the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ onEnter: PropTypes.func, /** * Callback fired after the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) */ onEntering: PropTypes.func, /** * Callback fired after the "entered" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ onEntered: PropTypes.func, /** * Callback fired before the "exiting" status is applied. * * @type Function(node: HtmlElement) -> void */ onExit: PropTypes.func, /** * Callback fired after the "exiting" status is applied. * * @type Function(node: HtmlElement) -> void */ onExiting: PropTypes.func, /** * Callback fired after the "exited" status is applied. * * @type Function(node: HtmlElement) -> void */ onExited: PropTypes.func // Name the function so it is clearer in the documentation } : 0; function noop() {} Transition.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter: noop, onEntering: noop, onEntered: noop, onExit: noop, onExiting: noop, onExited: noop }; Transition.UNMOUNTED = 0; Transition.EXITED = 1; Transition.ENTERING = 2; Transition.ENTERED = 3; Transition.EXITING = 4; var _default = (0, _reactLifecyclesCompat.polyfill)(Transition); exports["default"] = _default; /***/ }), /***/ "./node_modules/react-transition-group/TransitionGroup.js": /*!****************************************************************!*\ !*** ./node_modules/react-transition-group/TransitionGroup.js ***! \****************************************************************/ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); var _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ "./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js"); var _ChildMapping = __webpack_require__(/*! ./utils/ChildMapping */ "./node_modules/react-transition-group/utils/ChildMapping.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } var values = Object.values || function (obj) { return Object.keys(obj).map(function (k) { return obj[k]; }); }; var defaultProps = { component: 'div', childFactory: function childFactory(child) { return child; } /** * The `` component manages a set of transition components * (`` and ``) in a list. Like with the transition * components, `` is a state machine for managing the mounting * and unmounting of components over time. * * Consider the example below. As items are removed or added to the TodoList the * `in` prop is toggled automatically by the ``. * * Note that `` does not define any animation behavior! * Exactly _how_ a list item animates is up to the individual transition * component. This means you can mix and match animations across different list * items. */ }; var TransitionGroup = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(TransitionGroup, _React$Component); function TransitionGroup(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear _this.state = { handleExited: handleExited, firstRender: true }; return _this; } var _proto = TransitionGroup.prototype; _proto.getChildContext = function getChildContext() { return { transitionGroup: { isMounting: !this.appeared } }; }; _proto.componentDidMount = function componentDidMount() { this.appeared = true; this.mounted = true; }; _proto.componentWillUnmount = function componentWillUnmount() { this.mounted = false; }; TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender; return { children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited), firstRender: false }; }; _proto.handleExited = function handleExited(child, node) { var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children); if (child.key in currentChildMapping) return; if (child.props.onExited) { child.props.onExited(node); } if (this.mounted) { this.setState(function (state) { var children = _extends({}, state.children); delete children[child.key]; return { children: children }; }); } }; _proto.render = function render() { var _this$props = this.props, Component = _this$props.component, childFactory = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]); var children = values(this.state.children).map(childFactory); delete props.appear; delete props.enter; delete props.exit; if (Component === null) { return children; } return _react.default.createElement(Component, props, children); }; return TransitionGroup; }(_react.default.Component); TransitionGroup.childContextTypes = { transitionGroup: _propTypes.default.object.isRequired }; TransitionGroup.propTypes = true ? { /** * `` renders a `
    ` by default. You can change this * behavior by providing a `component` prop. * If you use React v16+ and would like to avoid a wrapping `
    ` element * you can pass in `component={null}`. This is useful if the wrapping div * borks your css styles. */ component: _propTypes.default.any, /** * A set of `` components, that are toggled `in` and out as they * leave. the `` will inject specific transition props, so * remember to spread them through if you are wrapping the `` as * with our `` example. * * While this component is meant for multiple `Transition` or `CSSTransition` * children, sometimes you may want to have a single transition child with * content that you want to be transitioned out and in when you change it * (e.g. routes, images etc.) In that case you can change the `key` prop of * the transition child as you change its content, this will cause * `TransitionGroup` to transition the child out and back in. */ children: _propTypes.default.node, /** * A convenience prop that enables or disables appear animations * for all children. Note that specifying this will override any defaults set * on individual children Transitions. */ appear: _propTypes.default.bool, /** * A convenience prop that enables or disables enter animations * for all children. Note that specifying this will override any defaults set * on individual children Transitions. */ enter: _propTypes.default.bool, /** * A convenience prop that enables or disables exit animations * for all children. Note that specifying this will override any defaults set * on individual children Transitions. */ exit: _propTypes.default.bool, /** * You may need to apply reactive updates to a child as it is exiting. * This is generally done by using `cloneElement` however in the case of an exiting * child the element has already been removed and not accessible to the consumer. * * If you do need to update a child as it leaves you can provide a `childFactory` * to wrap every child, even the ones that are leaving. * * @type Function(child: ReactElement) -> ReactElement */ childFactory: _propTypes.default.func } : 0; TransitionGroup.defaultProps = defaultProps; var _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup); exports["default"] = _default; module.exports = exports["default"]; /***/ }), /***/ "./node_modules/react-transition-group/index.js": /*!******************************************************!*\ !*** ./node_modules/react-transition-group/index.js ***! \******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _CSSTransition = _interopRequireDefault(__webpack_require__(/*! ./CSSTransition */ "./node_modules/react-transition-group/CSSTransition.js")); var _ReplaceTransition = _interopRequireDefault(__webpack_require__(/*! ./ReplaceTransition */ "./node_modules/react-transition-group/ReplaceTransition.js")); var _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! ./TransitionGroup */ "./node_modules/react-transition-group/TransitionGroup.js")); var _Transition = _interopRequireDefault(__webpack_require__(/*! ./Transition */ "./node_modules/react-transition-group/Transition.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = { Transition: _Transition.default, TransitionGroup: _TransitionGroup.default, ReplaceTransition: _ReplaceTransition.default, CSSTransition: _CSSTransition.default }; /***/ }), /***/ "./node_modules/react-transition-group/utils/ChildMapping.js": /*!*******************************************************************!*\ !*** ./node_modules/react-transition-group/utils/ChildMapping.js ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.getChildMapping = getChildMapping; exports.mergeChildMappings = mergeChildMappings; exports.getInitialChildMapping = getInitialChildMapping; exports.getNextChildMapping = getNextChildMapping; var _react = __webpack_require__(/*! react */ "react"); /** * Given `this.props.children`, return an object mapping key to child. * * @param {*} children `this.props.children` * @return {object} Mapping of key to child */ function getChildMapping(children, mapFn) { var mapper = function mapper(child) { return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child; }; var result = Object.create(null); if (children) _react.Children.map(children, function (c) { return c; }).forEach(function (child) { // run the map function here instead so that the key is the computed one result[child.key] = mapper(child); }); return result; } /** * When you're adding or removing children some may be added or removed in the * same render pass. We want to show *both* since we want to simultaneously * animate elements in and out. This function takes a previous set of keys * and a new set of keys and merges them with its best guess of the correct * ordering. In the future we may expose some of the utilities in * ReactMultiChild to make this easy, but for now React itself does not * directly have this concept of the union of prevChildren and nextChildren * so we implement it here. * * @param {object} prev prev children as returned from * `ReactTransitionChildMapping.getChildMapping()`. * @param {object} next next children as returned from * `ReactTransitionChildMapping.getChildMapping()`. * @return {object} a key set that contains all keys in `prev` and all keys * in `next` in a reasonable order. */ function mergeChildMappings(prev, next) { prev = prev || {}; next = next || {}; function getValueForKey(key) { return key in next ? next[key] : prev[key]; } // For each key of `next`, the list of keys to insert before that key in // the combined list var nextKeysPending = Object.create(null); var pendingKeys = []; for (var prevKey in prev) { if (prevKey in next) { if (pendingKeys.length) { nextKeysPending[prevKey] = pendingKeys; pendingKeys = []; } } else { pendingKeys.push(prevKey); } } var i; var childMapping = {}; for (var nextKey in next) { if (nextKeysPending[nextKey]) { for (i = 0; i < nextKeysPending[nextKey].length; i++) { var pendingNextKey = nextKeysPending[nextKey][i]; childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); } } childMapping[nextKey] = getValueForKey(nextKey); } // Finally, add the keys which didn't appear before any key in `next` for (i = 0; i < pendingKeys.length; i++) { childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); } return childMapping; } function getProp(child, prop, props) { return props[prop] != null ? props[prop] : child.props[prop]; } function getInitialChildMapping(props, onExited) { return getChildMapping(props.children, function (child) { return (0, _react.cloneElement)(child, { onExited: onExited.bind(null, child), in: true, appear: getProp(child, 'appear', props), enter: getProp(child, 'enter', props), exit: getProp(child, 'exit', props) }); }); } function getNextChildMapping(nextProps, prevChildMapping, onExited) { var nextChildMapping = getChildMapping(nextProps.children); var children = mergeChildMappings(prevChildMapping, nextChildMapping); Object.keys(children).forEach(function (key) { var child = children[key]; if (!(0, _react.isValidElement)(child)) return; var hasPrev = key in prevChildMapping; var hasNext = key in nextChildMapping; var prevChild = prevChildMapping[key]; var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering) if (hasNext && (!hasPrev || isLeaving)) { // console.log('entering', key) children[key] = (0, _react.cloneElement)(child, { onExited: onExited.bind(null, child), in: true, exit: getProp(child, 'exit', nextProps), enter: getProp(child, 'enter', nextProps) }); } else if (!hasNext && hasPrev && !isLeaving) { // item is old (exiting) // console.log('leaving', key) children[key] = (0, _react.cloneElement)(child, { in: false }); } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) { // item hasn't changed transition states // copy over the last transition props; // console.log('unchanged', key) children[key] = (0, _react.cloneElement)(child, { onExited: onExited.bind(null, child), in: prevChild.props.in, exit: getProp(child, 'exit', nextProps), enter: getProp(child, 'enter', nextProps) }); } }); return children; } /***/ }), /***/ "./node_modules/react-transition-group/utils/PropTypes.js": /*!****************************************************************!*\ !*** ./node_modules/react-transition-group/utils/PropTypes.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.classNamesShape = exports.timeoutsShape = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var timeoutsShape = true ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ enter: _propTypes.default.number, exit: _propTypes.default.number, appear: _propTypes.default.number }).isRequired]) : 0; exports.timeoutsShape = timeoutsShape; var classNamesShape = true ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({ enter: _propTypes.default.string, exit: _propTypes.default.string, active: _propTypes.default.string }), _propTypes.default.shape({ enter: _propTypes.default.string, enterDone: _propTypes.default.string, enterActive: _propTypes.default.string, exit: _propTypes.default.string, exitDone: _propTypes.default.string, exitActive: _propTypes.default.string })]) : 0; exports.classNamesShape = classNamesShape; /***/ }), /***/ "./src/blocks/offer-product-image/editor.lazy.scss": /*!*********************************************************!*\ !*** ./src/blocks/offer-product-image/editor.lazy.scss ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-image/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/blocks/offer-product-price/editor.lazy.scss": /*!*********************************************************!*\ !*** ./src/blocks/offer-product-price/editor.lazy.scss ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-price/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/blocks/offer-product-variation/editor.lazy.scss": /*!*************************************************************!*\ !*** ./src/blocks/offer-product-variation/editor.lazy.scss ***! \*************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-product-variation/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/blocks/offer-yes-no-button/editor.lazy.scss": /*!*********************************************************!*\ !*** ./src/blocks/offer-yes-no-button/editor.lazy.scss ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-yes-no-button/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/blocks/offer-yes-no-link/editor.lazy.scss": /*!*******************************************************!*\ !*** ./src/blocks/offer-yes-no-link/editor.lazy.scss ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/offer-yes-no-link/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/blocks/pro-checkout-form/editor.lazy.scss": /*!*******************************************************!*\ !*** ./src/blocks/pro-checkout-form/editor.lazy.scss ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/blocks/pro-checkout-form/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/background/editor.lazy.scss": /*!****************************************************!*\ !*** ./src/components/background/editor.lazy.scss ***! \****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/background/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/color-control/editor.lazy.scss": /*!*******************************************************!*\ !*** ./src/components/color-control/editor.lazy.scss ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/color-control/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/gradient-settings/editor.lazy.scss": /*!***********************************************************!*\ !*** ./src/components/gradient-settings/editor.lazy.scss ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/gradient-settings/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/icon-picker/editor.lazy.scss": /*!*****************************************************!*\ !*** ./src/components/icon-picker/editor.lazy.scss ***! \*****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/icon-picker/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/inspector-tabs/editor.lazy.scss": /*!********************************************************!*\ !*** ./src/components/inspector-tabs/editor.lazy.scss ***! \********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/inspector-tabs/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/multi-buttons-control/editor.lazy.scss": /*!***************************************************************!*\ !*** ./src/components/multi-buttons-control/editor.lazy.scss ***! \***************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/multi-buttons-control/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/range/editor.lazy.scss": /*!***********************************************!*\ !*** ./src/components/range/editor.lazy.scss ***! \***********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/range/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/responsive-select/editor.lazy.scss": /*!***********************************************************!*\ !*** ./src/components/responsive-select/editor.lazy.scss ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/responsive-select/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/select-control/editor.lazy.scss": /*!********************************************************!*\ !*** ./src/components/select-control/editor.lazy.scss ***! \********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/select-control/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/separator/editor.lazy.scss": /*!***************************************************!*\ !*** ./src/components/separator/editor.lazy.scss ***! \***************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/separator/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/spacing-control/editor.lazy.scss": /*!*********************************************************!*\ !*** ./src/components/spacing-control/editor.lazy.scss ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/spacing-control/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/tabs/editor.lazy.scss": /*!**********************************************!*\ !*** ./src/components/tabs/editor.lazy.scss ***! \**********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/tabs/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./src/components/typography/editor.lazy.scss": /*!****************************************************!*\ !*** ./src/components/typography/editor.lazy.scss ***! \****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./editor.lazy.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/components/typography/editor.lazy.scss"); var refs = 0; var update; var options = {"injectType":"lazySingletonStyleTag","attributes":{"id":"uagb-editor-styles"}}; options.insert = "head"; options.singleton = true; var exported = {}; exported.locals = _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}; exported.use = function() { if (!(refs++)) { update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_lib_loader_js_editor_lazy_scss__WEBPACK_IMPORTED_MODULE_1__["default"], options); } return exported; }; exported.unuse = function() { if (refs > 0 && !--refs) { update(); update = null; } }; ; /* harmony default export */ __webpack_exports__["default"] = (exported); /***/ }), /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": /*!****************************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! \****************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var isOldIE = function isOldIE() { var memo; return function memorize() { if (typeof memo === 'undefined') { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 memo = Boolean(window && document && document.all && !window.atob); } return memo; }; }(); var getTarget = function getTarget() { var memo = {}; return function memorize(target) { if (typeof memo[target] === 'undefined') { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; }; }(); var stylesInDom = []; function getIndexByIdentifier(identifier) { var result = -1; for (var i = 0; i < stylesInDom.length; i++) { if (stylesInDom[i].identifier === identifier) { result = i; break; } } return result; } function modulesToDom(list, options) { var idCountMap = {}; var identifiers = []; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; var index = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], sourceMap: item[3] }; if (index !== -1) { stylesInDom[index].references++; stylesInDom[index].updater(obj); } else { stylesInDom.push({ identifier: identifier, updater: addStyle(obj, options), references: 1 }); } identifiers.push(identifier); } return identifiers; } function insertStyleElement(options) { var style = document.createElement('style'); var attributes = options.attributes || {}; if (typeof attributes.nonce === 'undefined') { var nonce = true ? __webpack_require__.nc : 0; if (nonce) { attributes.nonce = nonce; } } Object.keys(attributes).forEach(function (key) { style.setAttribute(key, attributes[key]); }); if (typeof options.insert === 'function') { options.insert(style); } else { var target = getTarget(options.insert || 'head'); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } return style; } function removeStyleElement(style) { // istanbul ignore if if (style.parentNode === null) { return false; } style.parentNode.removeChild(style); } /* istanbul ignore next */ var replaceText = function replaceText() { var textStore = []; return function replace(index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; }(); function applyToSingletonTag(style, index, remove, obj) { var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = style.childNodes; if (childNodes[index]) { style.removeChild(childNodes[index]); } if (childNodes.length) { style.insertBefore(cssNode, childNodes[index]); } else { style.appendChild(cssNode); } } } function applyToTag(style, options, obj) { var css = obj.css; var media = obj.media; var sourceMap = obj.sourceMap; if (media) { style.setAttribute('media', media); } else { style.removeAttribute('media'); } if (sourceMap && typeof btoa !== 'undefined') { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = css; } else { while (style.firstChild) { style.removeChild(style.firstChild); } style.appendChild(document.createTextNode(css)); } } var singleton = null; var singletonCounter = 0; function addStyle(obj, options) { var style; var update; var remove; if (options.singleton) { var styleIndex = singletonCounter++; style = singleton || (singleton = insertStyleElement(options)); update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true); } else { style = insertStyleElement(options); update = applyToTag.bind(null, style, options); remove = function remove() { removeStyleElement(style); }; } update(obj); return function updateStyle(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return; } update(obj = newObj); } else { remove(); } }; } module.exports = function (list, options) { options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of get_generated_stylesheet( $this_post ); } /** * Generates stylesheet in loop. * * @param object $this_post Current Post Object. * @since 1.6.13 */ public function get_generated_stylesheet( $this_post ) { if ( is_object( $this_post ) && isset( $this_post->ID ) && has_blocks( $this_post->ID ) && isset( $this_post->post_content ) ) { $blocks = $this->parse( $this_post->post_content ); self::$page_blocks = $blocks; if ( ! is_array( $blocks ) || empty( $blocks ) ) { return; } $assets = $this->get_assets( $blocks ); self::$stylesheet .= $assets['css']; self::$script .= $assets['js']; } } /** * Enqueue Gutenberg block assets for both frontend + backend. * * @since 1.6.13 */ public function block_assets() { $block_list_for_assets = self::$current_block_list; $blocks = Cartflows_Pro_Block_Config::get_block_attributes(); foreach ( $block_list_for_assets as $key => $curr_block_name ) { $js_assets = ( isset( $blocks[ $curr_block_name ]['js_assets'] ) ) ? $blocks[ $curr_block_name ]['js_assets'] : array(); $css_assets = ( isset( $blocks[ $curr_block_name ]['css_assets'] ) ) ? $blocks[ $curr_block_name ]['css_assets'] : array(); foreach ( $js_assets as $asset_handle => $val ) { // Scripts. wp_enqueue_script( $val ); } foreach ( $css_assets as $asset_handle => $val ) { // Styles. wp_enqueue_style( $val ); } } } /** * Parse Guten Block. * * @param string $content the content string. * @since 1.6.13 */ public function parse( $content ) { global $wp_version; return ( version_compare( $wp_version, '5', '>=' ) ) ? parse_blocks( $content ) : gutenberg_parse_blocks( $content ); } /** * Generates stylesheet for reusable blocks. * * @param array $blocks Blocks array. * @since 1.6.13 */ public function get_assets( $blocks ) { $desktop = ''; $tablet = ''; $mobile = ''; $tab_styling_css = ''; $mob_styling_css = ''; $js = ''; foreach ( $blocks as $i => $block ) { if ( is_array( $block ) ) { if ( '' === $block['blockName'] ) { continue; } if ( 'core/block' === $block['blockName'] ) { $id = ( isset( $block['attrs']['ref'] ) ) ? $block['attrs']['ref'] : 0; if ( $id ) { $content = get_post_field( 'post_content', $id ); $reusable_blocks = $this->parse( $content ); $assets = $this->get_assets( $reusable_blocks ); self::$stylesheet .= $assets['css']; self::$script .= $assets['js']; } } else { $block_assets = $this->get_block_css_and_js( $block ); // Get CSS for the Block. $css = $block_assets['css']; if ( isset( $css['desktop'] ) ) { $desktop .= $css['desktop']; $tablet .= $css['tablet']; $mobile .= $css['mobile']; } $js .= $block_assets['js']; } } } if ( ! empty( $tablet ) ) { $tab_styling_css .= '@media only screen and (max-width: ' . CFP_TABLET_BREAKPOINT . 'px) {'; $tab_styling_css .= $tablet; $tab_styling_css .= '}'; } if ( ! empty( $mobile ) ) { $mob_styling_css .= '@media only screen and (max-width: ' . CFP_MOBILE_BREAKPOINT . 'px) {'; $mob_styling_css .= $mobile; $mob_styling_css .= '}'; } return array( 'css' => $desktop . $tab_styling_css . $mob_styling_css, 'js' => $js, ); } /** * Get Typography Dynamic CSS. * * @param array $attr The Attribute array. * @param string $slug The field slug. * @param string $selector The selector array. * @param array $combined_selectors The combined selector array. * @since 1.6.13 * @return bool|string */ public static function get_typography_css( $attr, $slug, $selector, $combined_selectors ) { $typo_css_desktop = array(); $typo_css_tablet = array(); $typo_css_mobile = array(); $already_selectors_desktop = ( isset( $combined_selectors['desktop'][ $selector ] ) ) ? $combined_selectors['desktop'][ $selector ] : array(); $already_selectors_tablet = ( isset( $combined_selectors['tablet'][ $selector ] ) ) ? $combined_selectors['tablet'][ $selector ] : array(); $already_selectors_mobile = ( isset( $combined_selectors['mobile'][ $selector ] ) ) ? $combined_selectors['mobile'][ $selector ] : array(); $family_slug = ( '' === $slug ) ? 'fontFamily' : $slug . 'FontFamily'; $weight_slug = ( '' === $slug ) ? 'fontWeight' : $slug . 'FontWeight'; $transform_slug = ( '' === $slug ) ? 'fontTransform' : $slug . 'Transform'; $decoration_slug = ( '' === $slug ) ? 'fontDecoration' : $slug . 'Decoration'; $style_slug = ( '' === $slug ) ? 'fontStyle' : $slug . 'FontStyle'; $l_ht_slug = ( '' === $slug ) ? 'lineHeight' : $slug . 'LineHeight'; $f_sz_slug = ( '' === $slug ) ? 'fontSize' : $slug . 'FontSize'; $l_ht_type_slug = ( '' === $slug ) ? 'lineHeightType' : $slug . 'LineHeightType'; $f_sz_type_slug = ( '' === $slug ) ? 'fontSizeType' : $slug . 'FontSizeType'; $l_sp_slug = ( '' === $slug ) ? 'letterSpacing' : $slug . 'LetterSpacing'; $l_sp_type_slug = ( '' === $slug ) ? 'letterSpacingType' : $slug . 'LetterSpacingType'; $text_transform = isset( $attr[ $transform_slug ] ) ? $attr[ $transform_slug ] : 'normal'; $text_decoration = isset( $attr[ $decoration_slug ] ) ? $attr[ $decoration_slug ] : 'none'; $font_style = isset( $attr[ $style_slug ] ) ? $attr[ $style_slug ] : 'normal'; $typo_css_desktop[ $selector ] = array( 'font-family' => $attr[ $family_slug ], 'text-transform' => $text_transform, 'text-decoration' => $text_decoration, 'font-style' => $font_style, 'font-weight' => $attr[ $weight_slug ], 'font-size' => ( isset( $attr[ $f_sz_slug ] ) ) ? self::get_css_value( $attr[ $f_sz_slug ], $attr[ $f_sz_type_slug ] ) : '', 'line-height' => ( isset( $attr[ $l_ht_slug ] ) ) ? self::get_css_value( $attr[ $l_ht_slug ], $attr[ $l_ht_type_slug ] ) : '', 'letter-spacing' => ( isset( $attr[ $l_sp_slug ] ) ) ? self::get_css_value( $attr[ $l_sp_slug ], $attr[ $l_sp_type_slug ] ) : '', ); $typo_css_desktop[ $selector ] = array_merge( $typo_css_desktop[ $selector ], $already_selectors_desktop ); $typo_css_tablet[ $selector ] = array( 'font-size' => ( isset( $attr[ $f_sz_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $f_sz_slug . 'Tablet' ], $attr[ $f_sz_type_slug ] ) : '', 'line-height' => ( isset( $attr[ $l_ht_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $l_ht_slug . 'Tablet' ], $attr[ $l_ht_type_slug ] ) : '', 'letter-spacing' => ( isset( $attr[ $l_sp_slug . 'Tablet' ] ) ) ? self::get_css_value( $attr[ $l_sp_slug . 'Tablet' ], $attr[ $l_sp_type_slug ] ) : '', ); $typo_css_tablet[ $selector ] = array_merge( $typo_css_tablet[ $selector ], $already_selectors_tablet ); $typo_css_mobile[ $selector ] = array( 'font-size' => ( isset( $attr[ $f_sz_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $f_sz_slug . 'Mobile' ], $attr[ $f_sz_type_slug ] ) : '', 'line-height' => ( isset( $attr[ $l_ht_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $l_ht_slug . 'Mobile' ], $attr[ $l_ht_type_slug ] ) : '', 'letter-spacing' => ( isset( $attr[ $l_sp_slug . 'Mobile' ] ) ) ? self::get_css_value( $attr[ $l_sp_slug . 'Mobile' ], $attr[ $l_sp_type_slug ] ) : '', ); $typo_css_mobile[ $selector ] = array_merge( $typo_css_mobile[ $selector ], $already_selectors_mobile ); return array( 'desktop' => array_merge( $combined_selectors['desktop'], $typo_css_desktop ), 'tablet' => array_merge( $combined_selectors['tablet'], $typo_css_tablet ), 'mobile' => array_merge( $combined_selectors['mobile'], $typo_css_mobile ), ); } /** * Get CSS value * * Syntax: * * get_css_value( VALUE, UNIT ); * * E.g. * * get_css_value( VALUE, 'em' ); * * @param string $value CSS value. * @param string $unit CSS unit. * @since 1.6.13 */ public static function get_css_value( $value = '', $unit = '' ) { $css_val = ''; if ( '' !== $value ) { $css_val = esc_attr( $value ) . $unit; } return $css_val; } /** * Parse CSS into correct CSS syntax. * * @param array $combined_selectors The combined selector array. * @param string $id The selector ID. * @since 1.6.13 */ public static function generate_all_css( $combined_selectors, $id ) { return array( 'desktop' => self::generate_css( $combined_selectors['desktop'], $id ), 'tablet' => self::generate_css( $combined_selectors['tablet'], $id ), 'mobile' => self::generate_css( $combined_selectors['mobile'], $id ), ); } /** * Parse CSS into correct CSS syntax. * * @param array $selectors The block selectors. * @param string $id The selector ID. * @since 1.6.13 */ public static function generate_css( $selectors, $id ) { $styling_css = ''; if ( ! empty( $selectors ) ) { foreach ( $selectors as $key => $value ) { $css = ''; foreach ( $value as $j => $val ) { if ( 'font-family' === $j && 'Default' === $val ) { continue; } if ( ! empty( $val ) || 0 === $val ) { if ( 'font-family' === $j ) { $css .= $j . ': "' . $val . '";'; } else { $css .= $j . ': ' . $val . ';'; } } } if ( ! empty( $css ) ) { $styling_css .= $id; $styling_css .= $key . '{'; $styling_css .= $css . '}'; } } } return $styling_css; } /** * Adds Google fonts all blocks. * * @param array $load_google_font the blocks attr. * @param array $font_family the blocks attr. * @param array $font_weight the blocks attr. * @param array $font_subset the blocks attr. */ public static function blocks_google_font( $load_google_font, $font_family, $font_weight, $font_subset ) { if ( true === $load_google_font ) { if ( ! array_key_exists( $font_family, self::$gfonts ) ) { $add_font = array( 'fontfamily' => $font_family, 'fontvariants' => ( isset( $font_weight ) && ! empty( $font_weight ) ? array( $font_weight ) : array() ), 'fontsubsets' => ( isset( $font_subset ) && ! empty( $font_subset ) ? array( $font_subset ) : array() ), ); self::$gfonts[ $font_family ] = $add_font; } else { if ( isset( $font_weight ) && ! empty( $font_weight ) && ! in_array( $font_weight, self::$gfonts[ $font_family ]['fontvariants'], true ) ) { array_push( self::$gfonts[ $font_family ]['fontvariants'], $font_weight ); } if ( isset( $font_subset ) && ! empty( $font_subset ) && ! in_array( $font_subset, self::$gfonts[ $font_family ]['fontsubsets'], true ) ) { array_push( self::$gfonts[ $font_family ]['fontsubsets'], $font_subset ); } } } } /** * Generates CSS recurrsively. * * @param object $block The block object. * @since 1.6.13 */ public function get_block_css_and_js( $block ) { $block = (array) $block; $name = $block['blockName']; $css = array(); $js = ''; $block_id = ''; if ( isset( $name ) ) { if ( isset( $block['attrs'] ) && is_array( $block['attrs'] ) ) { $blockattr = $block['attrs']; if ( isset( $blockattr['block_id'] ) ) { $block_id = $blockattr['block_id']; } } self::$current_block_list[] = $name; if ( strpos( $name, 'wcfpb/' ) !== false ) { self::$cfp_flag = true; } switch ( $name ) { case 'wcfb/checkout-form': $css = Cartflows_Pro_Block_Helper::get_checkout_form_pro_css( $blockattr, $block_id ); break; case 'wcfpb/offer-yes-no-link': $css = Cartflows_Pro_Block_Helper::get_offer_yes_no_link_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_yes_no_link_gfont( $blockattr ); break; case 'wcfpb/offer-yes-no-button': $css = Cartflows_Pro_Block_Helper::get_offer_yes_no_button_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_yes_no_button_gfont( $blockattr ); break; case 'wcfpb/offer-product-title': $css = Cartflows_Pro_Block_Helper::get_offer_product_title_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_product_title_gfont( $blockattr ); break; case 'wcfpb/offer-product-description': $css = Cartflows_Pro_Block_Helper::get_offer_product_description_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_product_description_gfont( $blockattr ); break; case 'wcfpb/offer-product-price': $css = Cartflows_Pro_Block_Helper::get_offer_product_price_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_product_price_gfont( $blockattr ); break; case 'wcfpb/offer-product-quantity': $css = Cartflows_Pro_Block_Helper::get_offer_product_quantity_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_product_quantity_gfont( $blockattr ); break; case 'wcfpb/offer-product-variation': $css = Cartflows_Pro_Block_Helper::get_offer_product_variation_css( $blockattr, $block_id ); Cartflows_Pro_Block_JS::blocks_offer_product_variation_gfont( $blockattr ); break; case 'wcfpb/offer-product-image': $css = Cartflows_Pro_Block_Helper::get_offer_product_image_css( $blockattr, $block_id ); break; default: // Nothing to do here. break; } if ( isset( $block['innerBlocks'] ) ) { foreach ( $block['innerBlocks'] as $j => $inner_block ) { if ( 'core/block' === $inner_block['blockName'] ) { $id = ( isset( $inner_block['attrs']['ref'] ) ) ? $inner_block['attrs']['ref'] : 0; if ( $id ) { $content = get_post_field( 'post_content', $id ); $reusable_blocks = $this->parse( $content ); $assets = $this->get_assets( $reusable_blocks ); self::$stylesheet .= $assets['css']; self::$script .= $assets['js']; } } else { // Get CSS for the Block. $inner_assets = $this->get_block_css_and_js( $inner_block ); $inner_block_css = $inner_assets['css']; $css_desktop = ( isset( $css['desktop'] ) ? $css['desktop'] : '' ); $css_tablet = ( isset( $css['tablet'] ) ? $css['tablet'] : '' ); $css_mobile = ( isset( $css['mobile'] ) ? $css['mobile'] : '' ); if ( isset( $inner_block_css['desktop'] ) ) { $css['desktop'] = $css_desktop . $inner_block_css['desktop']; $css['tablet'] = $css_tablet . $inner_block_css['tablet']; $css['mobile'] = $css_mobile . $inner_block_css['mobile']; } $js .= $inner_assets['js']; } } } self::$current_block_list = array_unique( self::$current_block_list ); } return array( 'css' => $css, 'js' => $js, ); } /** * Border attribute generation Function. * * @param array $prefix Attribute Prefix. * @param array $default_args default attributes args. * @return array */ public static function generate_php_border_attribute( $prefix, $default_args = array() ) { $border_attr = array(); $device = array( '', 'Tablet', 'Mobile' ); foreach ( $device as $slug => $data ) { $border_attr[ "{$prefix}BorderTopWidth{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderLeftWidth{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderRightWidth{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderBottomWidth{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderTopLeftRadius{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderTopRightRadius{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderBottomLeftRadius{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderBottomRightRadius{$data}" ] = array( 'type' => 'number', ); $border_attr[ "{$prefix}BorderRadiusUnit{$data}" ] = array( 'type' => 'number', ); } $border_attr[ "{$prefix}BorderStyle" ] = array( 'type' => 'string', ); $border_attr[ "{$prefix}BorderColor" ] = array( 'type' => 'string', ); $border_attr[ "{$prefix}BorderHColor" ] = array( 'type' => 'string', ); $border_attr[ "{$prefix}BorderLink" ] = array( 'type' => 'boolean', 'default' => true, ); $border_attr[ "{$prefix}BorderRadiusLink" ] = array( 'type' => 'boolean', 'default' => true, ); return $border_attr; } /** * Border attribute generation Function. * * @param array $prefix Attribute Prefix. * @param array $default_args default attributes args. * @return array */ public static function generate_border_attribute( $prefix, $default_args = array() ) { $defaults = wp_parse_args( $default_args, array( // Width. 'borderTopWidth' => '', 'borderRightWidth' => '', 'borderBottomWidth' => '', 'borderLeftWidth' => '', 'borderTopWidthTablet' => '', 'borderRightWidthTablet' => '', 'borderBottomWidthTablet' => '', 'borderLeftWidthTablet' => '', 'borderTopWidthMobile' => '', 'borderRightWidthMobile' => '', 'borderBottomWidthMobile' => '', 'borderLeftWidthMobile' => '', // Radius. 'borderTopLeftRadius' => '', 'borderTopRightRadius' => '', 'borderBottomRightRadius' => '', 'borderBottomLeftRadius' => '', 'borderTopLeftRadiusTablet' => '', 'borderTopRightRadiusTablet' => '', 'borderBottomRightRadiusTablet' => '', 'borderBottomLeftRadiusTablet' => '', 'borderTopLeftRadiusMobile' => '', 'borderTopRightRadiusMobile' => '', 'borderBottomRightRadiusMobile' => '', 'borderBottomLeftRadiusMobile' => '', // unit. 'borderRadiusUnit' => 'px', 'borderRadiusUnitTablet' => 'px', 'borderRadiusUnitMobile' => 'px', // common. 'borderStyle' => 'none', 'borderColor' => '', 'borderHColor' => '', ) ); $border_attr = array(); $device = array( '', 'Tablet', 'Mobile' ); foreach ( $device as $slug => $data ) { $border_attr[ "{$prefix}BorderTopWidth{$data}" ] = $defaults[ "borderTopWidth{$data}" ]; $border_attr[ "{$prefix}BorderLeftWidth{$data}" ] = $defaults[ "borderLeftWidth{$data}" ]; $border_attr[ "{$prefix}BorderRightWidth{$data}" ] = $defaults[ "borderRightWidth{$data}" ]; $border_attr[ "{$prefix}BorderBottomWidth{$data}" ] = $defaults[ "borderBottomWidth{$data}" ]; $border_attr[ "{$prefix}BorderTopLeftRadius{$data}" ] = $defaults[ "borderTopLeftRadius{$data}" ]; $border_attr[ "{$prefix}BorderTopRightRadius{$data}" ] = $defaults[ "borderTopRightRadius{$data}" ]; $border_attr[ "{$prefix}BorderBottomLeftRadius{$data}" ] = $defaults[ "borderBottomLeftRadius{$data}" ]; $border_attr[ "{$prefix}BorderBottomRightRadius{$data}" ] = $defaults[ "borderBottomLeftRadius{$data}" ]; $border_attr[ "{$prefix}BorderRadiusUnit{$data}" ] = $defaults[ "borderRadiusUnit{$data}" ]; } $border_attr[ "{$prefix}BorderStyle" ] = $defaults['borderStyle']; $border_attr[ "{$prefix}BorderColor" ] = $defaults['borderColor']; $border_attr[ "{$prefix}BorderHColor" ] = $defaults['borderHColor']; return $border_attr; } /** * Border CSS generation Function. * * @param array $attr Attribute List. * @param string $prefix Attribuate prefix . * @param string $device Responsive. * @return array border css array. */ public static function generate_border_css( $attr, $prefix, $device = 'desktop' ) { $gen_border_css = array(); if ( 'tablet' === $device ) { if ( 'none' !== $attr[ $prefix . 'BorderStyle' ] ) { $gen_border_css['border-top-width'] = self::get_css_value( $attr[ $prefix . 'BorderTopWidthTablet' ], 'px' ); $gen_border_css['border-left-width'] = self::get_css_value( $attr[ $prefix . 'BorderLeftWidthTablet' ], 'px' ); $gen_border_css['border-right-width'] = self::get_css_value( $attr[ $prefix . 'BorderRightWidthTablet' ], 'px' ); $gen_border_css['border-bottom-width'] = self::get_css_value( $attr[ $prefix . 'BorderBottomWidthTablet' ], 'px' ); } $gen_border_unit_tablet = isset( $attr[ $prefix . 'BorderRadiusUnitTablet' ] ) ? $attr[ $prefix . 'BorderRadiusUnitTablet' ] : 'px'; $gen_border_css['border-top-left-radius'] = self::get_css_value( $attr[ $prefix . 'BorderTopLeftRadiusTablet' ], $gen_border_unit_tablet ); $gen_border_css['border-top-right-radius'] = self::get_css_value( $attr[ $prefix . 'BorderTopRightRadiusTablet' ], $gen_border_unit_tablet ); $gen_border_css['border-bottom-left-radius'] = self::get_css_value( $attr[ $prefix . 'BorderBottomLeftRadiusTablet' ], $gen_border_unit_tablet ); $gen_border_css['border-bottom-right-radius'] = self::get_css_value( $attr[ $prefix . 'BorderBottomRightRadiusTablet' ], $gen_border_unit_tablet ); } elseif ( 'mobile' === $device ) { if ( 'none' !== $attr[ $prefix . 'BorderStyle' ] ) { $gen_border_css['border-top-width'] = self::get_css_value( $attr[ $prefix . 'BorderTopWidthMobile' ], 'px' ); $gen_border_css['border-left-width'] = self::get_css_value( $attr[ $prefix . 'BorderLeftWidthMobile' ], 'px' ); $gen_border_css['border-right-width'] = self::get_css_value( $attr[ $prefix . 'BorderRightWidthMobile' ], 'px' ); $gen_border_css['border-bottom-width'] = self::get_css_value( $attr[ $prefix . 'BorderBottomWidthMobile' ], 'px' ); } $gen_border_unit_mobile = isset( $attr[ $prefix . 'BorderTopLeftRadiusMobile' ] ) ? $attr[ $prefix . 'BorderTopLeftRadiusMobile' ] : 'px'; $gen_border_css['border-top-left-radius'] = self::get_css_value( $attr[ $prefix . 'BorderTopLeftRadiusMobile' ], $gen_border_unit_mobile ); $gen_border_css['border-top-right-radius'] = self::get_css_value( $attr[ $prefix . 'BorderTopRightRadiusMobile' ], $gen_border_unit_mobile ); $gen_border_css['border-bottom-left-radius'] = self::get_css_value( $attr[ $prefix . 'BorderBottomLeftRadiusMobile' ], $gen_border_unit_mobile ); $gen_border_css['border-bottom-right-radius'] = self::get_css_value( $attr[ $prefix . 'BorderBottomRightRadiusMobile' ], $gen_border_unit_mobile ); } else { if ( 'none' !== $attr[ $prefix . 'BorderStyle' ] ) { $gen_border_css['border-top-width'] = self::get_css_value( $attr[ $prefix . 'BorderTopWidth' ], 'px' ); $gen_border_css['border-left-width'] = self::get_css_value( $attr[ $prefix . 'BorderLeftWidth' ], 'px' ); $gen_border_css['border-right-width'] = self::get_css_value( $attr[ $prefix . 'BorderRightWidth' ], 'px' ); $gen_border_css['border-bottom-width'] = self::get_css_value( $attr[ $prefix . 'BorderBottomWidth' ], 'px' ); } $gen_border_unit = isset( $attr[ $prefix . 'BorderRadiusUnit' ] ) ? $attr[ $prefix . 'BorderRadiusUnit' ] : 'px'; $gen_border_css['border-top-left-radius'] = self::get_css_value( $attr[ $prefix . 'BorderTopLeftRadius' ], $gen_border_unit ); $gen_border_css['border-top-right-radius'] = self::get_css_value( $attr[ $prefix . 'BorderTopRightRadius' ], $gen_border_unit ); $gen_border_css['border-bottom-left-radius'] = self::get_css_value( $attr[ $prefix . 'BorderBottomLeftRadius' ], $gen_border_unit ); $gen_border_css['border-bottom-right-radius'] = self::get_css_value( $attr[ $prefix . 'BorderBottomRightRadius' ], $gen_border_unit ); } $border_style = $attr[ $prefix . 'BorderStyle' ]; $border_color = $attr[ $prefix . 'BorderColor' ]; $gen_border_css['border-style'] = $border_style; $gen_border_css['border-color'] = $border_color; return $gen_border_css; } /** * Generate advanced settings clsses. * * @param array $attributes Blocks Attribute. * @return array */ public function generate_advanced_setting_classes( $attributes ) { $is_visible = array_key_exists( 'UAGHideDesktop', $attributes ) || array_key_exists( 'UAGHideTab', $attributes ) || array_key_exists( 'UAGHideMob', $attributes ); $desktop_class = $is_visible && isset( $attributes['UAGHideDesktop'] ) ? 'uag-hide-desktop' : ''; $tab_class = $is_visible && isset( $attributes['UAGHideTab'] ) ? 'uag-hide-tab' : ''; $mob_class = $is_visible && isset( $attributes['UAGHideMob'] ) ? 'uag-hide-mob' : ''; $zindex_wrap = array(); $zindex_extention_enabled = ( isset( $attributes['zIndex'] ) || isset( $attributes['zIndexTablet'] ) || isset( $attributes['zIndexMobile'] ) ); $zindex_desktop = $zindex_extention_enabled && isset( $attributes['zIndex'] ) ? '--z-index-desktop:' . $attributes['zIndex'] . ';' : false; $zindex_tablet = $zindex_extention_enabled && isset( $attributes['zIndexTablet'] ) ? '--z-index-tablet:' . $attributes['zIndexTablet'] . ';' : false; $zindex_mobile = $zindex_extention_enabled && isset( $attributes['zIndexMobile'] ) ? '--z-index-mobile:' . $attributes['zIndexMobile'] . ';' : false; if ( $zindex_desktop ) { array_push( $zindex_wrap, $zindex_desktop ); } if ( $zindex_tablet ) { array_push( $zindex_wrap, $zindex_tablet ); } if ( $zindex_mobile ) { array_push( $zindex_wrap, $zindex_mobile ); } return array( 'desktop_class' => $desktop_class, 'tab_class' => $tab_class, 'mob_class' => $mob_class, 'zindex_wrap' => $zindex_wrap, 'zindex_extention_enabled' => $zindex_extention_enabled, ); } } /** * Prepare if class 'Cartflows_Pro_Gb_Helper' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Gb_Helper::get_instance(); } modules/gutenberg/classes/class-cartflows-pro-init-blocks.php000064400000032424147600244370020501 0ustar00=' ) ) { add_filter( 'block_categories_all', array( $this, 'register_block_category' ), 10, 2 ); } else { add_filter( 'block_categories', array( $this, 'register_block_category' ), 10, 2 ); } add_action( 'wp_ajax_wpcfp_offer_product_title_shortcode', array( $this, 'offer_product_title_shortcode' ) ); add_action( 'wp_ajax_wpcfp_offer_product_description_shortcode', array( $this, 'offer_product_description_shortcode' ) ); add_action( 'wp_ajax_wpcfp_offer_product_price_shortcode', array( $this, 'offer_product_price_shortcode' ) ); add_action( 'wp_ajax_wpcfp_offer_product_quantity_shortcode', array( $this, 'offer_product_quantity_shortcode' ) ); add_action( 'wp_ajax_wpcfp_offer_product_variation_shortcode', array( $this, 'offer_product_variation_shortcode' ) ); add_action( 'wp_ajax_wpcfp_offer_product_image_shortcode', array( $this, 'offer_product_image_shortcode' ) ); // Add GB editor compatibility. add_action( 'cartflows_gutenberg_editor_compatibility', array( $this, 'gutenberg_editor_compatibility' ) ); add_filter( 'cartflows_gutenberg_blocks_attributes', array( $this, 'add_pro_checkout_form_attributes' ), 10, 1 ); } /** * Update attrinutes. * * * * @param array $attr attr List. */ public function add_pro_checkout_form_attributes( $attr ) { $product_border_attribute = Cartflows_Pro_Gb_Helper::generate_border_attribute( 'product' ); $product_hl_border_attribute = Cartflows_Pro_Gb_Helper::generate_border_attribute( 'productHighlight' ); $attr['wcfb/checkout-form']['attributes'] = array_merge( $attr['wcfb/checkout-form']['attributes'], $product_border_attribute, $product_hl_border_attribute ); return $attr; } /** * Gutenberg editor compatibility. * * @param int $step_id Step id. * * @since 1.6.13 */ public function gutenberg_editor_compatibility( $step_id ) { if ( wcf()->utils->check_is_offer_page( $step_id ) ) { add_filter( 'cartflows_is_offer_type', '__return_true' ); } } /** * Renders the Offer Product Title shortcode. * * @since 1.6.13 */ public function offer_product_title_shortcode() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( array( 'message' => __( 'Permission denied.', 'cartflows-pro' ) ) ); } check_ajax_referer( 'wpcfp_ajax_nonce', 'nonce' ); $data['html'] = do_shortcode( '[cartflows_offer_product_title]' ); wp_send_json_success( $data ); } /** * Renders the Offer Product Description shortcode. * * @since 1.6.13 */ public function offer_product_description_shortcode() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( array( 'message' => __( 'Permission denied.', 'cartflows-pro' ) ) ); } check_ajax_referer( 'wpcfp_ajax_nonce', 'nonce' ); if ( isset( $_POST['shortDescription'] ) && 'true' === $_POST['shortDescription'] ) { $data['html'] = do_shortcode( '[cartflows_offer_product_short_desc]' ); } else { $data['html'] = do_shortcode( '[cartflows_offer_product_desc]' ); } wp_send_json_success( $data ); } /** * Renders the Offer Product Price shortcode. * * @since 1.6.13 */ public function offer_product_price_shortcode() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( array( 'message' => __( 'Permission denied.', 'cartflows-pro' ) ) ); } check_ajax_referer( 'wpcfp_ajax_nonce', 'nonce' ); $data['html'] = do_shortcode( '[cartflows_offer_product_price]' ); wp_send_json_success( $data ); } /** * Renders the Offer Product Quantity shortcode. * * @since 1.6.13 */ public function offer_product_quantity_shortcode() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( array( 'message' => __( 'Permission denied.', 'cartflows-pro' ) ) ); } check_ajax_referer( 'wpcfp_ajax_nonce', 'nonce' ); $data['html'] = do_shortcode( '[cartflows_offer_product_quantity]' ); wp_send_json_success( $data ); } /** * Renders the Offer Product Variation shortcode. * * @since 1.6.13 */ public function offer_product_variation_shortcode() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( array( 'message' => __( 'Permission denied.', 'cartflows-pro' ) ) ); } check_ajax_referer( 'wpcfp_ajax_nonce', 'nonce' ); $data['html'] = do_shortcode( '[cartflows_offer_product_variation]' ); wp_send_json_success( $data ); } /** * Renders the Offer Product Image shortcode. * * @since 1.6.13 */ public function offer_product_image_shortcode() { if ( ! current_user_can( 'cartflows_manage_flows_steps' ) ) { wp_send_json_error( array( 'message' => __( 'Permission denied.', 'cartflows-pro' ) ) ); } check_ajax_referer( 'wpcfp_ajax_nonce', 'nonce' ); $data['html'] = do_shortcode( '[cartflows_offer_product_image]' ); wp_send_json_success( $data ); } /** * Enqueue Gutenberg block assets for both frontend + backend. * * @since 1.6.13 */ public function block_assets() { $post = get_post(); if ( isset( $post ) && CARTFLOWS_STEP_POST_TYPE === $post->post_type ) { /** * Filters the post to build stylesheet for. * * @param \WP_Post $post The global post. */ $post = apply_filters( 'cfp_post_for_stylesheet', $post ); // Register block styles for both frontend + backend. wp_enqueue_style( 'CFP_block-cfp-style-css', // Handle. CARTFLOWS_PRO_URL . 'modules/gutenberg/build/style-blocks.css', is_admin() ? array( 'wp-editor' ) : null, // Dependency to include the CSS after it. CARTFLOWS_PRO_VER // filemtime( plugin_dir_path( __DIR__ ) . 'modules/gutenberg/dist/blocks.style.build.css' ) // Version: File modification time. ); $blocks = Cartflows_Pro_Block_Config::get_block_attributes(); $block_assets = Cartflows_Pro_Block_Config::get_block_assets(); foreach ( $blocks as $slug => $value ) { $_slug = str_replace( 'wcfpb/', '', $slug ); $js_assets = ( isset( $blocks[ $slug ]['js_assets'] ) ) ? $blocks[ $slug ]['js_assets'] : array(); $css_assets = ( isset( $blocks[ $slug ]['css_assets'] ) ) ? $blocks[ $slug ]['css_assets'] : array(); foreach ( $js_assets as $asset_handle => $val ) { // Scripts. wp_register_script( $val, // Handle. $block_assets[ $val ]['src'], $block_assets[ $val ]['dep'], CARTFLOWS_PRO_VER, true ); $skip_editor = isset( $block_assets[ $val ]['skipEditor'] ) ? $block_assets[ $val ]['skipEditor'] : false; if ( is_admin() && false === $skip_editor ) { wp_enqueue_script( $val ); } } } } } /** * Enqueue Gutenberg block assets for backend. * * @since 1.6.13 */ public function editor_assets() { $post_id = isset( $_GET['post'] ) ? intval( $_GET['post'] ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $post_type = get_post_type( $post_id ); if ( CARTFLOWS_STEP_POST_TYPE === $post_type ) { $wpcfp_ajax_nonce = wp_create_nonce( 'wpcfp_ajax_nonce' ); $step_type = wcf()->utils->get_step_type( $post_id ); $enable_product_options = wcf()->options->get_checkout_meta_value( $post_id, 'wcf-enable-product-options' ); $enable_order_bump = wcf()->options->get_checkout_meta_value( $post_id, 'wcf-order-bump' ); wp_enqueue_style( 'wcf-pro-flexslider', wcf_pro()->utils->get_css_url( 'flexslider' ), array(), CARTFLOWS_PRO_VER, false ); wp_enqueue_script( 'flexslider', plugins_url() . '/woocommerce/assets/js/flexslider/jquery.flexslider.js', array( 'jquery' ), CARTFLOWS_PRO_VER, false ); $script_dep_path = CARTFLOWS_PRO_DIR . 'modules/gutenberg/build/blocks.asset.php'; $script_info = file_exists( $script_dep_path ) ? include $script_dep_path : array( 'dependencies' => array(), 'version' => CARTFLOWS_VER, ); $script_dep = array_merge( $script_info['dependencies'], array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ) ); $script_ver = $script_info['version']; // Register block editor script for backend. wp_register_script( 'CFP_block-cfp-block-js', // Handle. CARTFLOWS_PRO_URL . 'modules/gutenberg/build/blocks.js', $script_dep, // Dependencies, defined above. $script_ver, // Version: filemtime — Gets file modification. true // Enqueue the script in the footer. ); wp_set_script_translations( 'CFP_block-cfp-block-js', 'cartflows-pro' ); // Register block editor styles for backend. wp_register_style( 'CFP_block-cfp-block-editor-css', // Handle. CARTFLOWS_PRO_URL . 'modules/gutenberg/build/blocks.style.css', array( 'wp-edit-blocks' ), // Dependency to include the CSS after it. CARTFLOWS_PRO_VER // filemtime( plugin_dir_path( __DIR__ ) . 'modules/gutenberg/dist/blocks.editor.build.css' ) // Version: File modification time. ); // Enqueue frontend CSS in editor. wp_enqueue_style( 'CFP_block-cartflows-frotend-style', CARTFLOWS_PRO_URL . 'assets/css/frontend.css', array( 'wp-edit-blocks', 'wp-editor' ), CARTFLOWS_PRO_VER ); wp_enqueue_style( 'cartflows-pro-optin-style', wcf_pro()->utils->get_css_url( 'optin-styles' ), array( 'wp-edit-blocks', 'wp-editor' ), CARTFLOWS_PRO_VER ); wp_enqueue_style( 'cartflows-pro-checkout-style', wcf_pro()->utils->get_css_url( 'checkout-styles' ), array( 'wp-edit-blocks', 'wp-editor' ), CARTFLOWS_PRO_VER ); wp_enqueue_style( 'cartflows-pro-multistep-checkout-style', wcf_pro()->utils->get_css_url( 'multistep-checkout' ), array( 'wp-edit-blocks', 'wp-editor' ), CARTFLOWS_PRO_VER ); wp_enqueue_script( 'wcf-editor-helper', CARTFLOWS_PRO_URL . 'modules/gutenberg/assets/js/editor-helper.js', array( 'wp-editor', 'jquery' ), CARTFLOWS_PRO_VER, true ); // WP Localized globals. Use dynamic PHP stuff in JavaScript via `cfpGlobal` object. wp_localize_script( 'CFP_block-cfp-block-js', 'cfp_blocks_info', // Array containing dynamic data for a JS Global. array( 'pluginDirPath' => plugin_dir_path( __DIR__ ), 'pluginDirUrl' => plugin_dir_url( __DIR__ ), 'category' => 'cartflows-pro', 'ajax_url' => admin_url( 'admin-ajax.php' ), 'wpcfp_ajax_nonce' => $wpcfp_ajax_nonce, 'blocks' => Cartflows_Pro_Block_Config::get_block_attributes(), 'block_assets' => Cartflows_Pro_Block_Config::get_block_assets(), 'tablet_breakpoint' => CFP_TABLET_BREAKPOINT, 'mobile_breakpoint' => CFP_MOBILE_BREAKPOINT, 'step_type' => $step_type, 'ID' => $post_id, 'enable_product_options' => $enable_product_options, 'enable_order_bump' => $enable_order_bump, 'is_woo_active' => wcf()->is_woo_active, 'multistep_buttons_strings' => array( 'billing' => __( 'Continue to shipping', 'cartflows-pro' ), 'shipping' => __( 'Continue to payment', 'cartflows-pro' ), ), 'admin_base_url' => admin_url(), 'license_status' => cartflows_pro_is_active_license(), // Add more data here that you want to access from `cfpGlobal` object. ) ); /** * Register Gutenberg block on server-side. * * Register the block on server-side to ensure that the block * scripts and styles for both frontend and backend are * enqueued when the editor loads. * * @link https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type#enqueuing-block-scripts * @since 1.6.13 */ register_block_type( 'wcfpb/offer-yes-no-button', array( // Enqueue blocks.build.js in the editor only. 'editor_script' => 'CFP_block-cfp-block-js', // Enqueue blocks.editor.build.css in the editor only. 'style' => 'CFP_block-cfp-block-editor-css', // Enqueue blocks.commoneditorstyle.build.css in the editor only. 'editor_style' => 'CFP_block-common-editor-css', ) ); } } /** * Gutenberg block category for Cartflows Pro. * * @param array $categories Block categories. * @param object $post Post object. * @since 1.6.13 */ public function register_block_category( $categories, $post ) { return array_merge( $categories, array( array( 'slug' => 'cartflows-pro', 'title' => __( 'Cartflows Pro', 'cartflows-pro' ), ), ) ); } } /** * Prepare if class 'Cartflows_Pro_Init_Blocks' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Init_Blocks::get_instance(); gutenberg/dist/blocks/cartflows-pro-gb-checkout-form-extend/class-cartflows-pro-checkout-form.php000064400000024645147600244370030764 0ustar00modules 'wcf-checkout-step-one-title', 'setting_name' => 'stepOneTitleText', ), array( 'filter_slug' => 'wcf-checkout-step-one-sub-title', 'setting_name' => 'stepOneSubTitleText', ), array( 'filter_slug' => 'wcf-checkout-step-two-title', 'setting_name' => 'stepTwoTitleText', ), array( 'filter_slug' => 'wcf-checkout-step-two-sub-title', 'setting_name' => 'stepTwoSubTitleText', ), array( 'filter_slug' => 'wcf-checkout-step-two-next-button-title-text', 'setting_name' => 'offerButtonTitleText', ), array( 'filter_slug' => 'wcf-checkout-step-two-next-button-subtitle-text', 'setting_name' => 'offerButtonSubTitleText', ), ); if ( isset( $checkout_fields ) && is_array( $checkout_fields ) ) { foreach ( $checkout_fields as $key => $field ) { $setting_name = $field['setting_name']; if ( '' !== self::$settings[ $setting_name ] ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_name ) { $value = self::$settings[ $setting_name ]; return $value; }, 10, 1 ); } } } add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note', function ( $is_note_enabled ) { $is_note_enabled = ( 'yes' === self::$settings['enableNote'] ) ? 'yes' : 'no'; return $is_note_enabled; }, 10, 1 ); if ( 'yes' === self::$settings['enableNote'] && '' !== self::$settings['noteText'] ) { add_filter( 'cartflows_checkout_meta_wcf-checkout-box-note-text', function ( $checkout_note_text ) { $checkout_note_text = self::$settings['noteText']; return $checkout_note_text; }, 10, 1 ); } // Checkout offer. $checkout_offer_fields = array( array( 'filter_slug' => 'wcf-checkout-offer-button-title', 'setting_name' => 'offerButtonTitleText', ), array( 'filter_slug' => 'wcf-checkout-offer-button-sub-title', 'setting_name' => 'offerButtonSubTitleText', ), ); if ( isset( $checkout_offer_fields ) && is_array( $checkout_offer_fields ) ) { foreach ( $checkout_offer_fields as $key => $field ) { $setting_name = $field['setting_name']; if ( '' !== self::$settings[ $setting_name ] ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_name ) { $value = self::$settings[ $setting_name ]; return $value; }, 10, 1 ); } } } // Product options. $product_options_fields = array( array( 'filter_slug' => 'wcf-product-options-skin', 'setting_name' => 'productOptionsSkin', ), array( 'filter_slug' => 'wcf-show-product-images', 'setting_name' => 'productOptionsImages', ), array( 'filter_slug' => 'wcf-product-opt-title', 'setting_name' => 'productOptionsSectionTitleText', ), array( 'filter_slug' => 'wcf-your-products-position', 'setting_name' => 'sectionposition', ), ); if ( isset( $product_options_fields ) && is_array( $product_options_fields ) ) { foreach ( $product_options_fields as $key => $field ) { $setting_name = $field['setting_name']; if ( '' !== self::$settings[ $setting_name ] ) { add_filter( 'cartflows_checkout_meta_' . $field['filter_slug'], function ( $value ) use ( $setting_name ) { $value = self::$settings[ $setting_name ]; return $value; }, 10, 1 ); } } } } /** * Registers the `core/latest-posts` block on server. * * @param array $attr Array of block attributes. * * @since 1.6.13 */ public function checkout_form_pro_attributes( $attr ) { $product_section_border_attr = Cartflows_Pro_Gb_Helper::generate_php_border_attribute( 'product' ); $highlight_product_border_attr = Cartflows_Pro_Gb_Helper::generate_php_border_attribute( 'productHighlight' ); $attributes = array( 'productBorderColor' => array( 'type' => 'string', 'default' => '', ), 'productBorderRadius' => array( 'type' => 'string', 'default' => '', ), 'productBorderWidth' => array( 'type' => 'string', 'default' => '', ), 'productBorderStyle' => array( 'type' => 'string', 'default' => 'none', ), 'productTextBgColor' => array( 'type' => 'string', 'default' => '', ), 'productTextColor' => array( 'type' => 'string', 'default' => '', ), 'productTitleTextColor' => array( 'type' => 'string', 'default' => '', ), 'productHighlightBgColor' => array( 'type' => 'string', 'default' => '', ), 'productHighlightTextColor' => array( 'type' => 'string', 'default' => '', ), 'productHighlightBorderstyle' => array( 'type' => 'string', 'default' => '', ), 'productHighlightBorderWidth' => array( 'type' => 'string', 'default' => '', ), 'productHighlightBorderRadius' => array( 'type' => 'string', 'default' => '', ), 'productHighlightBorderColor' => array( 'type' => 'string', 'default' => '', ), 'productHighlightFlagTextColor' => array( 'type' => 'string', 'default' => '', ), 'productHighlightFlagBgColor' => array( 'type' => 'string', 'default' => '', ), 'sectionposition' => array( 'type' => 'string', 'default' => '', ), 'twoStepBgColor' => array( 'type' => 'string', 'default' => '', ), 'twoStepTextColor' => array( 'type' => 'string', 'default' => '', ), 'productOptionsSkin' => array( 'type' => 'string', 'default' => '', ), 'productOptionsImages' => array( 'type' => 'string', 'default' => '', ), 'productOptionsSectionTitleText' => array( 'type' => 'string', 'default' => '', ), 'enableNote' => array( 'type' => 'string', 'default' => 'yes', ), 'noteText' => array( 'type' => 'string', 'default' => __( 'Get Your FREE copy of CartFlows in just few steps.', 'cartflows-pro' ), ), 'stepOneTitleText' => array( 'type' => 'string', 'default' => __( 'Shipping', 'cartflows-pro' ), ), 'stepOneSubTitleText' => array( 'type' => 'string', 'default' => __( 'Where to ship it?', 'cartflows-pro' ), ), 'stepTwoTitleText' => array( 'type' => 'string', 'default' => __( 'Payment', 'cartflows-pro' ), ), 'stepTwoSubTitleText' => array( 'type' => 'string', 'default' => __( 'Of your order', 'cartflows-pro' ), ), 'offerButtonTitleText' => array( 'type' => 'string', 'default' => __( 'For Special Offer Click Here', 'cartflows-pro' ), ), 'offerButtonSubTitleText' => array( 'type' => 'string', 'default' => __( 'Yes! I want this offer!', 'cartflows-pro' ), ), 'tstextFontSize' => array( 'type' => 'number', 'default' => '', ), 'tstextFontSizeType' => array( 'type' => 'string', 'default' => 'px', ), 'tstextFontSizeTablet' => array( 'type' => 'number', ), 'tstextFontSizeMobile' => array( 'type' => 'number', ), 'tstextFontFamily' => array( 'type' => 'string', 'default' => 'Default', ), 'tstextFontWeight' => array( 'type' => 'string', ), 'tstextFontSubset' => array( 'type' => 'string', ), 'tstextLineHeightType' => array( 'type' => 'string', 'default' => 'em', ), 'tstextLineHeight' => array( 'type' => 'number', ), 'tstextLineHeightTablet' => array( 'type' => 'number', ), 'tstextLineHeightMobile' => array( 'type' => 'number', ), 'tstextLoadGoogleFonts' => array( 'type' => 'boolean', 'default' => false, ), 'productHighlightBorderHoverColor' => array( 'type' => 'string', 'default' => '', ), 'productBorderHoverColor' => array( 'type' => 'string', 'default' => '', ), 'tstextFontStyle' => array( 'type' => 'string', 'default' => '', ), ); $attributes = array_merge( $product_section_border_attr, $highlight_product_border_attr, $attributes ); return array_merge( $attr, $attributes ); } } /** * Prepare if class 'Cartflows_Pro_Checkout_Form' exist. * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Checkout_Form::get_instance(); } gutenberg/dist/blocks/offer-product-description/class-cartflows-pro-gb-block-product-description.php000064400000020167147600244370031547 0ustar00modules array( 'block_id' => array( 'type' => 'string', ), 'classMigrate' => array( 'type' => 'boolean', 'default' => false, ), 'className' => array( 'type' => 'string', ), // General. 'shortDescription' => array( 'type' => 'boolean', 'default' => false, ), // text alignment. 'textAlignment' => array( 'type' => 'string', 'default' => 'center', ), 'ttextAlignment' => array( 'type' => 'string', 'default' => 'center', ), 'mtextAlignment' => array( 'type' => 'string', 'default' => 'center', ), // padding. 'paddingTypeDesktop' => array( 'type' => 'string', 'default' => 'px', ), 'paddingTypeTablet' => array( 'type' => 'string', 'default' => 'px', ), 'paddingTypeMobile' => array( 'type' => 'string', 'default' => 'px', ), 'vPaddingDesktop' => array( 'type' => 'number', 'default' => 0, ), 'hPaddingDesktop' => array( 'type' => 'number', 'default' => 0, ), 'vPaddingTablet' => array( 'type' => 'number', 'default' => 0, ), 'hPaddingTablet' => array( 'type' => 'number', 'default' => 0, ), 'vPaddingMobile' => array( 'type' => 'number', 'default' => 0, ), 'hPaddingMobile' => array( 'type' => 'number', 'default' => 0, ), // text color. 'textColor' => array( 'type' => 'string', 'default' => '', ), // text font family. 'textLoadGoogleFonts' => array( 'type' => 'boolean', 'default' => false, ), 'textFontFamily' => array( 'type' => 'string', ), 'textFontWeight' => array( 'type' => 'string', ), 'textFontSubset' => array( 'type' => 'string', ), // text font size. 'textFontSize' => array( 'type' => 'number', ), 'textFontSizeType' => array( 'type' => 'string', 'default' => 'px', ), 'textFontSizeTablet' => array( 'type' => 'number', ), 'textFontSizeMobile' => array( 'type' => 'number', ), // text line height. 'textLineHeightType' => array( 'type' => 'string', 'default' => 'em', ), 'textLineHeight' => array( 'type' => 'number', ), 'textLineHeightTablet' => array( 'type' => 'number', ), 'textLineHeightMobile' => array( 'type' => 'number', ), // Text Shadow. 'textShadowColor' => array( 'type' => 'string', ), 'textShadowHOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowVOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowBlur' => array( 'type' => 'number', ), 'deviceType' => array( 'type' => 'string', 'default' => 'Desktop', ), // new attr. 'textHoverColor' => array( 'type' => 'string', 'default' => '', ), 'paddingTop' => array( 'type' => 'number', 'default' => 0, ), 'paddingBottom' => array( 'type' => 'number', 'default' => 0, ), 'paddingLeft' => array( 'type' => 'number', 'default' => 0, ), 'paddingRight' => array( 'type' => 'number', 'default' => 0, ), 'paddingTopTablet' => array( 'type' => 'number', 'default' => 0, ), 'paddingBottomTablet' => array( 'type' => 'number', 'default' => 0, ), 'paddingLeftTablet' => array( 'type' => 'number', 'default' => 0, ), 'paddingRightTablet' => array( 'type' => 'number', 'default' => 0, ), 'paddingTopMobile' => array( 'type' => 'number', 'default' => 0, ), 'paddingBottomMobile' => array( 'type' => 'number', 'default' => 0, ), 'paddingLeftMobile' => array( 'type' => 'number', 'default' => 0, ), 'paddingRightMobile' => array( 'type' => 'number', 'default' => 0, ), 'textFontStyle' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textTransform' => array( 'type' => 'string', 'default' => 'none', ), 'textLetterSpacing' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingTablet' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingMobile' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingType' => array( 'type' => 'string', 'default' => 'px', ), ), 'render_callback' => array( $this, 'render_html' ), 'editor_style' => 'CFP_block-cartflows-frotend-style', ) ); } /** * Render Offer Product Description HTML. * * @param array $attributes Array of block attributes. * * @since 1.6.13 */ public function render_html( $attributes ) { $advanced_classes = Cartflows_Pro_Gb_Helper::get_instance()->generate_advanced_setting_classes( $attributes ); $zindex_wrap = $advanced_classes['zindex_wrap']; $main_classes = array( 'wp-block-wcfpb-offer-product-description', 'cfp-block-' . $attributes['block_id'], $advanced_classes['desktop_class'], $advanced_classes['tab_class'], $advanced_classes['mob_class'], $advanced_classes['zindex_extention_enabled'] ? 'uag-blocks-common-selector' : '', ); if ( isset( $attributes['className'] ) ) { $main_classes[] = $attributes['className']; } $classes = array( 'wpcfp__offer-product-description', ); ob_start(); ?>
    array( 'type' => 'string', ), 'classMigrate' => array( 'type' => 'boolean', 'default' => false, ), 'className' => array( 'type' => 'string', ), // text alignment. 'alignment' => array( 'type' => 'string', 'default' => 'center', ), // image bottom spacing. 'image_bottom_spacing' => array( 'type' => 'number', ), // margin. 'topMargin' => array( 'type' => 'number', 'default' => 0, ), 'bottomMargin' => array( 'type' => 'number', 'default' => 0, ), // Image Border. 'imageBorderStyle' => array( 'type' => 'string', 'default' => 'none', ), 'imageBorderWidth' => array( 'type' => 'number', ), 'imageBorderColor' => array( 'type' => 'string', ), 'imageBorderRadius' => array( 'type' => 'number', ), // spacing between thumbnails. 'spacing_between_thumbnails' => array( 'type' => 'number', ), // Thumbnail Border. 'thumbnailBorderStyle' => array( 'type' => 'string', 'default' => 'none', ), 'thumbnailBorderWidth' => array( 'type' => 'number', ), 'thumbnailBorderColor' => array( 'type' => 'string', ), 'thumbnailBorderRadius' => array( 'type' => 'number', ), 'deviceType' => array( 'type' => 'string', 'default' => 'Desktop', ), 'linkTextFontStyle' => array( 'type' => 'string', 'default' => '', ), 'imageMarginTop' => array( 'type' => 'number', 'default' => '', ), 'imageMarginBottom' => array( 'type' => 'number', 'default' => 25, ), 'imageMarginLeft' => array( 'type' => 'number', 'default' => '', ), 'imageMarginRight' => array( 'type' => 'number', 'default' => '', ), 'imageMarginTopTablet' => array( 'type' => 'number', 'default' => '', ), 'imageMarginRightTablet' => array( 'type' => 'number', 'default' => '', ), 'imageMarginBottomTablet' => array( 'type' => 'number', 'default' => 25, ), 'imageMarginLeftTablet' => array( 'type' => 'number', 'default' => '', ), 'imageMarginTopMobile' => array( 'type' => 'number', 'default' => '', ), 'imageMarginRightMobile' => array( 'type' => 'number', 'default' => '', ), 'imageMarginBottomMobile' => array( 'type' => 'number', 'default' => 25, ), 'imageMarginLeftMobile' => array( 'type' => 'number', 'default' => '', ), 'imageMarginTypeDesktop' => array( 'type' => 'string', 'default' => 'px', ), 'imageMarginTypeTablet' => array( 'type' => 'string', 'default' => 'px', ), 'imageMarginTypeMobile' => array( 'type' => 'string', 'default' => 'px', ), ); $image_border_attr = Cartflows_Pro_Gb_Helper::generate_php_border_attribute( 'image' ); $thumbnail_border_attr = Cartflows_Pro_Gb_Helper::generate_php_border_attribute( 'thumbnail' ); $attr = array_merge( $image_border_attr, $thumbnail_border_attr, $attr ); register_block_type( 'wcfpb/offer-product-image', array( 'attributes' => $attr, 'render_callback' => array( $this, 'render_html' ), 'editor_style' => 'CFP_block-cartflows-frotend-style', ) ); } /** * Render Offer Product Image HTML. * * @param array $attributes Array of block attributes. * * @since 1.6.13 */ public function render_html( $attributes ) { $advanced_classes = Cartflows_Pro_Gb_Helper::get_instance()->generate_advanced_setting_classes( $attributes ); $zindex_wrap = $advanced_classes['zindex_wrap']; $main_classes = array( 'wp-block-wcfpb-offer-product-image', 'cfp-block-' . $attributes['block_id'], $advanced_classes['desktop_class'], $advanced_classes['tab_class'], $advanced_classes['mob_class'], $advanced_classes['zindex_extention_enabled'] ? 'uag-blocks-common-selector' : '', ); if ( isset( $attributes['className'] ) ) { $main_classes[] = $attributes['className']; } $classes = array( 'wpcfp__offer-product-image', ); ob_start(); ?>
    array( 'block_id' => array( 'type' => 'string', ), 'classMigrate' => array( 'type' => 'boolean', 'default' => false, ), 'className' => array( 'type' => 'string', ), // text alignment. 'textAlignment' => array( 'type' => 'string', 'default' => 'center', ), 'ttextAlignment' => array( 'type' => 'string', 'default' => 'center', ), 'mtextAlignment' => array( 'type' => 'string', 'default' => 'center', ), // margin. 'topMargin' => array( 'type' => 'number', 'default' => 0, ), 'bottomMargin' => array( 'type' => 'number', 'default' => 0, ), // text color. 'textColor' => array( 'type' => 'string', 'default' => '', ), 'textHoverColor' => array( 'type' => 'string', 'default' => '', ), // text font family. 'textLoadGoogleFonts' => array( 'type' => 'boolean', 'default' => false, ), 'textFontFamily' => array( 'type' => 'string', ), 'textFontWeight' => array( 'type' => 'string', ), 'textFontSubset' => array( 'type' => 'string', ), // text font size. 'textFontSize' => array( 'type' => 'number', ), 'textFontSizeType' => array( 'type' => 'string', 'default' => 'px', ), 'textFontSizeTablet' => array( 'type' => 'number', ), 'textFontSizeMobile' => array( 'type' => 'number', ), // text line height. 'textLineHeightType' => array( 'type' => 'string', 'default' => 'em', ), 'textLineHeight' => array( 'type' => 'number', ), 'textLineHeightTablet' => array( 'type' => 'number', ), 'textLineHeightMobile' => array( 'type' => 'number', ), // Text Shadow. 'textShadowColor' => array( 'type' => 'string', ), 'textShadowHOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowVOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowBlur' => array( 'type' => 'number', ), 'deviceType' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textFontStyle' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textMarginTop' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottom' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeft' => array( 'type' => 'number', 'default' => '', ), 'textMarginRight' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomTablet' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomMobile' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginTypeDesktop' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeTablet' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeMobile' => array( 'type' => 'string', 'default' => 'px', ), 'textLetterSpacing' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingTablet' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingMobile' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingType' => array( 'type' => 'string', 'default' => 'px', ), ), 'render_callback' => array( $this, 'render_html' ), 'editor_style' => 'CFP_block-cartflows-frotend-style', ) ); } /** * Render Offer Product Price HTML. * * @param array $attributes Array of block attributes. * * @since 1.6.13 */ public function render_html( $attributes ) { $advanced_classes = Cartflows_Pro_Gb_Helper::get_instance()->generate_advanced_setting_classes( $attributes ); $zindex_wrap = $advanced_classes['zindex_wrap']; $main_classes = array( 'wp-block-wcfpb-offer-product-price', 'cfp-block-' . $attributes['block_id'], $advanced_classes['desktop_class'], $advanced_classes['tab_class'], $advanced_classes['mob_class'], $advanced_classes['zindex_extention_enabled'] ? 'uag-blocks-common-selector' : '', ); if ( isset( $attributes['className'] ) ) { $main_classes[] = $attributes['className']; } $classes = array( 'wpcfp__offer-product-price', ); ob_start(); ?>
    array( 'type' => 'string', ), 'classMigrate' => array( 'type' => 'boolean', 'default' => false, ), 'className' => array( 'type' => 'string', ), // text alignment. 'alignment' => array( 'type' => 'string', 'default' => 'center', ), // width. 'width' => array( 'type' => 'number', ), // Label bottom spacing. 'label_bottom_spacing' => array( 'type' => 'number', ), // margin. 'topMargin' => array( 'type' => 'number', 'default' => 0, ), 'bottomMargin' => array( 'type' => 'number', 'default' => 0, ), // label color. 'labelColor' => array( 'type' => 'string', 'default' => '', ), // input color. 'inputTextColor' => array( 'type' => 'string', 'default' => '', ), // background color. 'backgroundColor' => array( 'type' => 'string', 'default' => '', ), // text font family. 'textLoadGoogleFonts' => array( 'type' => 'boolean', 'default' => false, ), 'textFontFamily' => array( 'type' => 'string', ), 'textFontWeight' => array( 'type' => 'string', ), 'textFontSubset' => array( 'type' => 'string', ), // text font size. 'textFontSize' => array( 'type' => 'number', ), 'textFontSizeType' => array( 'type' => 'string', 'default' => 'px', ), 'textFontSizeTablet' => array( 'type' => 'number', ), 'textFontSizeMobile' => array( 'type' => 'number', ), // text line height. 'textLineHeightType' => array( 'type' => 'string', 'default' => 'em', ), 'textLineHeight' => array( 'type' => 'number', ), 'textLineHeightTablet' => array( 'type' => 'number', ), 'textLineHeightMobile' => array( 'type' => 'number', ), // Text Shadow. 'textShadowColor' => array( 'type' => 'string', ), 'textShadowHOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowVOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowBlur' => array( 'type' => 'number', ), // Border. 'borderStyle' => array( 'type' => 'string', 'default' => 'solid', ), 'borderWidth' => array( 'type' => 'number', 'default' => '', ), 'borderRadius' => array( 'type' => 'number', 'default' => '', ), 'borderColor' => array( 'type' => 'string', 'default' => '', ), 'deviceType' => array( 'type' => 'string', 'default' => 'Desktop', ), 'borderHoverColor' => array( 'type' => 'string', 'default' => '', ), 'textFontStyle' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textMarginTop' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottom' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeft' => array( 'type' => 'number', 'default' => '', ), 'textMarginRight' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomTablet' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomMobile' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginTypeDesktop' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeTablet' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeMobile' => array( 'type' => 'string', 'default' => 'px', ), 'textTransform' => array( 'type' => 'string', 'default' => 'none', ), 'textLetterSpacing' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingTablet' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingMobile' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingType' => array( 'type' => 'string', 'default' => 'px', ), ); $attr = array_merge( $content_border_attr, $attr ); register_block_type( 'wcfpb/offer-product-quantity', array( 'attributes' => $attr, 'render_callback' => array( $this, 'render_html' ), 'editor_style' => 'CFP_block-cartflows-frotend-style', ) ); } /** * Render Offer Product Quantity HTML. * * @param array $attributes Array of block attributes. * * @since 1.6.13 */ public function render_html( $attributes ) { $advanced_classes = Cartflows_Pro_Gb_Helper::get_instance()->generate_advanced_setting_classes( $attributes ); $zindex_wrap = $advanced_classes['zindex_wrap']; $main_classes = array( 'wp-block-wcfpb-offer-product-quantity', 'cfp-block-' . $attributes['block_id'], $advanced_classes['desktop_class'], $advanced_classes['tab_class'], $advanced_classes['mob_class'], $advanced_classes['zindex_extention_enabled'] ? 'uag-blocks-common-selector' : '', ); if ( isset( $attributes['className'] ) ) { $main_classes[] = $attributes['className']; } $classes = array( 'wpcfp__offer-product-quantity', ); ob_start(); ?>
    array( 'block_id' => array( 'type' => 'string', ), 'classMigrate' => array( 'type' => 'boolean', 'default' => false, ), 'className' => array( 'type' => 'string', ), // text alignment. 'textAlignment' => array( 'type' => 'string', 'default' => 'center', ), 'ttextAlignment' => array( 'type' => 'string', 'default' => 'center', ), 'mtextAlignment' => array( 'type' => 'string', 'default' => 'center', ), // margin. 'topMargin' => array( 'type' => 'number', 'default' => 0, ), 'bottomMargin' => array( 'type' => 'number', 'default' => 0, ), // text color. 'textColor' => array( 'type' => 'string', 'default' => '', ), 'textHoverColor' => array( 'type' => 'string', 'default' => '', ), // text font family. 'textLoadGoogleFonts' => array( 'type' => 'boolean', 'default' => false, ), 'textFontFamily' => array( 'type' => 'string', ), 'textFontWeight' => array( 'type' => 'string', ), 'textFontSubset' => array( 'type' => 'string', ), // text font size. 'textFontSize' => array( 'type' => 'number', ), 'textFontSizeType' => array( 'type' => 'string', 'default' => 'px', ), 'textFontSizeTablet' => array( 'type' => 'number', ), 'textFontSizeMobile' => array( 'type' => 'number', ), // text line height. 'textLineHeightType' => array( 'type' => 'string', 'default' => 'em', ), 'textLineHeight' => array( 'type' => 'number', ), 'textLineHeightTablet' => array( 'type' => 'number', ), 'textLineHeightMobile' => array( 'type' => 'number', ), // Text Shadow. 'textShadowColor' => array( 'type' => 'string', ), 'textShadowHOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowVOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowBlur' => array( 'type' => 'number', ), 'deviceType' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textFontStyle' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textMarginTop' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottom' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeft' => array( 'type' => 'number', 'default' => '', ), 'textMarginRight' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomTablet' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomMobile' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginTypeDesktop' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeTablet' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeMobile' => array( 'type' => 'string', 'default' => 'px', ), 'textTransform' => array( 'type' => 'string', 'default' => 'none', ), 'textLetterSpacing' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingTablet' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingMobile' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingType' => array( 'type' => 'string', 'default' => 'px', ), ), 'render_callback' => array( $this, 'render_html' ), 'editor_style' => 'CFP_block-cartflows-frotend-style', ) ); } /** * Render Offer Product Title HTML. * * @param array $attributes Array of block attributes. * * @since 1.6.13 */ public function render_html( $attributes ) { $advanced_classes = Cartflows_Pro_Gb_Helper::get_instance()->generate_advanced_setting_classes( $attributes ); $zindex_wrap = $advanced_classes['zindex_wrap']; $main_classes = array( 'wp-block-wcfpb-offer-product-title', 'cfp-block-' . $attributes['block_id'], $advanced_classes['desktop_class'], $advanced_classes['tab_class'], $advanced_classes['mob_class'], $advanced_classes['zindex_extention_enabled'] ? 'uag-blocks-common-selector' : '', ); if ( isset( $attributes['className'] ) ) { $main_classes[] = $attributes['className']; } $classes = array( 'wpcfp__offer-product-title', ); ob_start(); ?>
    array( 'block_id' => array( 'type' => 'string', ), 'classMigrate' => array( 'type' => 'boolean', 'default' => false, ), 'className' => array( 'type' => 'string', ), // text alignment. 'alignment' => array( 'type' => 'string', 'default' => 'center', ), // width. 'width' => array( 'type' => 'number', ), // Label bottom spacing. 'label_bottom_spacing' => array( 'type' => 'number', ), // margin. 'topMargin' => array( 'type' => 'number', 'default' => 0, ), 'bottomMargin' => array( 'type' => 'number', 'default' => 0, ), // label color. 'labelColor' => array( 'type' => 'string', 'default' => '', ), // input color. 'inputTextColor' => array( 'type' => 'string', 'default' => '', ), // text font family. 'textLoadGoogleFonts' => array( 'type' => 'boolean', 'default' => false, ), 'textFontFamily' => array( 'type' => 'string', ), 'textFontWeight' => array( 'type' => 'string', ), 'textFontSubset' => array( 'type' => 'string', ), // text font size. 'textFontSize' => array( 'type' => 'number', ), 'textFontSizeType' => array( 'type' => 'string', 'default' => 'px', ), 'textFontSizeTablet' => array( 'type' => 'number', ), 'textFontSizeMobile' => array( 'type' => 'number', ), // text line height. 'textLineHeightType' => array( 'type' => 'string', 'default' => 'em', ), 'textLineHeight' => array( 'type' => 'number', ), 'textLineHeightTablet' => array( 'type' => 'number', ), 'textLineHeightMobile' => array( 'type' => 'number', ), // Text Shadow. 'textShadowColor' => array( 'type' => 'string', ), 'textShadowHOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowVOffset' => array( 'type' => 'number', 'default' => 0, ), 'textShadowBlur' => array( 'type' => 'number', ), 'deviceType' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textFontStyle' => array( 'type' => 'string', 'default' => 'Desktop', ), 'textMarginTop' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottom' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeft' => array( 'type' => 'number', 'default' => '', ), 'textMarginRight' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomTablet' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftTablet' => array( 'type' => 'number', 'default' => '', ), 'textMarginTopMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginRightMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginBottomMobile' => array( 'type' => 'number', 'default' => 25, ), 'textMarginLeftMobile' => array( 'type' => 'number', 'default' => '', ), 'textMarginTypeDesktop' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeTablet' => array( 'type' => 'string', 'default' => 'px', ), 'textMarginTypeMobile' => array( 'type' => 'string', 'default' => 'px', ), 'textTransform' => array( 'type' => 'string', 'default' => 'none', ), 'textLetterSpacing' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingTablet' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingMobile' => array( 'type' => 'number', 'default' => '', ), 'textLetterSpacingType' => array( 'type' => 'string', 'default' => 'px', ), ), 'render_callback' => array( $this, 'render_html' ), 'editor_style' => 'CFP_block-cartflows-frotend-style', ) ); } /** * Render Offer Product Variation HTML. * * @param array $attributes Array of block attributes. * * @since 1.6.13 */ public function render_html( $attributes ) { $advanced_classes = Cartflows_Pro_Gb_Helper::get_instance()->generate_advanced_setting_classes( $attributes ); $zindex_wrap = $advanced_classes['zindex_wrap']; $main_classes = array( 'wp-block-wcfpb-offer-product-variation', 'cfp-block-' . $attributes['block_id'], $advanced_classes['desktop_class'], $advanced_classes['tab_class'], $advanced_classes['mob_class'], $advanced_classes['zindex_extention_enabled'] ? 'uag-blocks-common-selector' : '', ); if ( isset( $attributes['className'] ) ) { $main_classes[] = $attributes['className']; } $classes = array( 'wpcfp__offer-product-variation', ); ob_start(); ?>
    modules > gutenebrg > src > components See the CartFlows-Pro > modules > gutenebrg > src > control These are are the folders need to be update in the CartFlows-Pro. Below are the steps to update the spectra/ultimate-addon-for-gutenebrg components and controls in CartFlows. 1. Get the latest version of the components and controls from https://github.com/brainstormforce/ultimate-addons-for-gutenberg Components => ultimate-addons-for-gutenberg/src/components Controls => ultimate-addons-for-gutenberg/blocks-config/uagb-controls 2. Copy the components folder from the Spectra to the CartFlows-Pro > modules > gutenebrg > src > components 3. Copy the uagb-controls folder from the Spectra to the CartFlows-Pro > modules > gutenebrg > src > control 4. Comment out the lazy loading CSS code in the each components and import respective CSS file directly. 5. In controls folder, go to renderIcons.js and on line no. 13 update the variable from const fontAwesome = uagb_blocks_info.uagb_svg_icons[ svg ]; to const fontAwesome = cf_blocks_info.wcf_svg_icons[ svg ]; 6. Done modules/offer/classes/class-cartflows-pro-base-offer-markup.php000064400000041547147600244370020716 0ustar00ID; $flow_id = wcf()->utils->get_flow_id_from_step_id( $step_id ); if ( wcf()->flow->is_flow_testmode( $flow_id ) ) { $offer_product = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-product', 'dummy' ); if ( 'dummy' === $offer_product ) { $args = array( 'posts_per_page' => 1, 'orderby' => 'rand', 'post_type' => 'product', ); $random_product = get_posts( $args ); if ( isset( $random_product[0]->ID ) ) { $offer_product = array( $random_product[0]->ID, ); } } } else { $offer_product = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-product' ); } if ( isset( $offer_product[0] ) ) { $product_id = $offer_product[0]; } $order_id = ( isset( $_GET['wcf-order'] ) ) ? intval( $_GET['wcf-order'] ) : 0; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_key = ( isset( $_GET['wcf-key'] ) ) ? sanitize_text_field( wp_unslash( $_GET['wcf-key'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $order = wc_get_order( $order_id ); $skip_offer = 'no'; $offer_type = get_post_meta( $step_id, 'wcf-step-type', true ); $payment_method = ''; if ( $order ) { $payment_method = $order->get_payment_method(); $gateways = array( 'paypal', 'ppec_paypal' ); $gateways = apply_filters( 'cartflows_offer_supported_payment_gateway_slugs', $gateways ); if ( ( in_array( $payment_method, $gateways, true ) ) && ! wcf_pro()->utils->is_reference_transaction() && ! wcf_pro()->utils->is_zero_value_offered_product() ) { $skip_offer = 'yes'; } } $currency_symbol = get_woocommerce_currency_symbol(); $discount_type = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-discount' ); $discount_value = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-discount-value' ); $flat_shipping_rate = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-flat-shipping-value' ); $localize = array( 'step_id' => $step_id, 'product_id' => $product_id, 'order_id' => $order_id, 'order_key' => $order_key, 'skip_offer' => $skip_offer, 'offer_type' => $offer_type, 'discount_type' => $discount_type, 'discount_value' => $discount_value, 'flat_shipping_rate' => $flat_shipping_rate, 'currency_symbol' => $currency_symbol, 'wcf_downsell_accepted_nonce' => wp_create_nonce( 'wcf_downsell_accepted' ), 'wcf_downsell_rejected_nonce' => wp_create_nonce( 'wcf_downsell_rejected' ), 'wcf_upsell_accepted_nonce' => wp_create_nonce( 'wcf_upsell_accepted' ), 'wcf_upsell_rejected_nonce' => wp_create_nonce( 'wcf_upsell_rejected' ), 'payment_method' => $payment_method, ); if ( 'stripe' === $payment_method ) { $localize['wcf_stripe_sca_check_nonce'] = wp_create_nonce( 'wcf_stripe_sca_check' ); wp_register_script( 'stripe', 'https://js.stripe.com/v3/', '', '3.0', true ); wp_enqueue_script( 'stripe' ); } if ( 'cpsw_stripe' === $payment_method ) { $localize['wcf_cpsw_create_payment_intent_nonce'] = wp_create_nonce( 'wcf_cpsw_create_payment_intent' ); } if ( 'cpsw_stripe_element' === $payment_method ) { $localize['wcf_cpsw_create_payment_element_intent_nonce'] = wp_create_nonce( 'wcf_cpsw_create_element_payment_intent' ); } if ( 'mollie_wc_gateway_creditcard' === $payment_method ) { $localize['wcf_mollie_creditcard_process_nonce'] = wp_create_nonce( 'wcf_mollie_creditcard_process' ); } if ( 'mollie_wc_gateway_ideal' === $payment_method ) { $localize['wcf_mollie_ideal_process_nonce'] = wp_create_nonce( 'wcf_mollie_ideal_process' ); } if ( 'ppcp-gateway' === $payment_method ) { $localize['wcf_create_paypal_order_nonce'] = wp_create_nonce( 'wcf_create_paypal_order' ); $localize['wcf_capture_paypal_order_nonce'] = wp_create_nonce( 'wcf_capture_paypal_order' ); } if ( 'woocommerce_payments' === $payment_method ) { $localize['wcf_woop_create_payment_intent_nonce'] = wp_create_nonce( 'wcf_woop_create_payment_intent' ); wp_register_script( 'stripe', 'https://js.stripe.com/v3/', '', '3.0', true ); wp_enqueue_script( 'stripe' ); } if ( 'cppw_paypal' === $payment_method ) { $localize['wcf_cppw_create_paypal_order_nonce'] = wp_create_nonce( 'wcf_cppw_create_paypal_order' ); } $localize = apply_filters( 'cartflows_offer_js_localize', $localize ); $localize_script = ''; $localize_script .= ''; // Reason for PHPCS ignore: Used to localize the strings which will be displayed on the browser's tab. echo $localize_script; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Offer accepeted * * @param int $step_id Flow step id. * @param array $extra_data extra data. * @param array $result process result. * @since 1.0.0 */ public function offer_accepted( $step_id, $extra_data, $result ) { wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); // Update the offer data changes made on offer page, like quantity and variation. $order = wc_get_order( $extra_data['order_id'] ); if ( is_object( $order ) ) { $updated_offer_data = $order->get_meta( 'wcf_offer_product_data_' . $step_id, true ); if ( is_array( $updated_offer_data ) && ! empty( $updated_offer_data ) ) { $extra_data = array_merge( $extra_data, $updated_offer_data ); } } $order_id = $extra_data['order_id']; $order_key = $extra_data['order_key']; $product_id = $extra_data['product_id']; $variation_id = $extra_data['variation_id']; $input_qty = $extra_data['input_qty']; $step_type = $extra_data['template_type']; $is_charge_success = false; $order = wc_get_order( $order_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id, $variation_id, $input_qty, $order_id ); $is_offer_accepted = $order->get_meta( 'wcf_is_offer_purchased', true ); if ( empty( $order_key ) ) { $data = array( 'order_id' => $order_id, 'order_key' => $order_key, ); $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, $data ); $result = array( 'status' => 'failed', 'redirect' => $next_step_url, 'message' => __( 'Order does not exist', 'cartflows-pro' ), ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer Payment Failed. Order key does not exist. Redirected to next step.' ); return $result; } if ( ! empty( $is_offer_accepted ) ) { $is_offer_accepted = json_decode( $is_offer_accepted, true ); if ( $order_id === $is_offer_accepted['offer_order_id'] && ( $step_id === $is_offer_accepted['offer_step_id'] && $order_key === $is_offer_accepted['offer_order_key'] ) && 'offer_accepted' === $is_offer_accepted['offer_status'] ) { /* Get Redirect URL */ $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, array( 'action' => 'offer_accepted', 'order_id' => $order_id, 'order_key' => $order_key, 'template_type' => $step_type, ) ); $result = array( 'status' => 'failed', 'redirect' => $next_step_url, 'message' => __( 'Seems like this order is been already purchased.', 'cartflows-pro' ), ); wcf()->logger->log( 'Offer is already purchased. Redirecting to URL : ' . $next_step_url ); wcf()->logger->log( 'Use-case: The user might have clicked the back button on browser and trying to re-purchase the offer.', 'cartflows-pro' ); return $result; } } // check if product is in stock if stock management is enabled. $product = wc_get_product( $product_id ); $stock_quantity = $product ? $product->get_stock_quantity() : 0; if ( $product && $product->managing_stock() && $stock_quantity < intval( $offer_product['qty'] ) ) { $data = array( 'order_id' => $order_id, 'order_key' => $order_key, ); // @todo Need some conditional redirection if there is downsell. $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, $data ); $result = array( 'status' => 'failed', 'redirect' => $next_step_url, 'message' => __( 'Oooops! Product is out of stock.', 'cartflows-pro' ), ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer Payment Failed. Product is out of stock. Redirected to next step.' ); return $result; } // Restrict the purchase of product if the product price is in negative. if ( isset( $offer_product['price'] ) && ( floatval( $offer_product['price'] ) < floatval( 0 ) ) ) { $data = array( 'order_id' => $order_id, 'order_key' => $order_key, ); // @todo Need some conditional redirection if there is downsell. $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, $data ); $result = array( 'status' => 'failed', 'redirect' => $next_step_url, 'message' => __( 'Oooops! Product\'s price is not correct.', 'cartflows-pro' ), ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer Payment Failed. Product price is in negative format. Redirected to next step.' ); return $result; } if ( isset( $offer_product['price'] ) && ( floatval( 0 ) === floatval( $offer_product['price'] ) || '' === trim( $offer_product['price'] ) ) ) { $is_charge_success = true; } else { $order_gateway = $order->get_payment_method(); wcf()->logger->log( 'Order-' . $order->get_id() . ' ' . $order_gateway . ' - Payment gateway' ); $gateway_obj = wcf_pro()->gateways->load_gateway( $order_gateway ); if ( $gateway_obj ) { wcf()->logger->log( 'Order-' . $order->get_id() . ' Payment gateway charge' ); $offer_product['action'] = $extra_data['action']; $is_charge_success = $gateway_obj->process_offer_payment( $order, $offer_product ); } } wcf()->logger->log( 'Is Charge Success - ' . $is_charge_success ); if ( $is_charge_success ) { if ( 'upsell' === $step_type ) { /* Add Product To Main Order */ wcf_pro()->order->add_upsell_product( $order, $offer_product ); } else { wcf_pro()->order->add_downsell_product( $order, $offer_product ); } do_action( 'cartflows_offer_accepted', $order, $offer_product ); do_action( 'cartflows_' . $step_type . '_offer_accepted', $order, $offer_product ); /** * We need to reduce stock here. * * @todo * reduce_stock(); */ $data = array( 'action' => 'offer_accepted', 'order_id' => $order_id, 'order_key' => $order_key, 'template_type' => $step_type, ); /* Get Redirect URL */ $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, $data ); $result = array( 'status' => 'success', 'redirect' => $next_step_url, 'message' => wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-order-success-text' ), ); // Set meta-option to verify that this offer is accepted or rejected. $this->update_order_and_step_status( $order, array( 'offer_status' => $data['action'], 'offer_step_id' => $step_id, 'offer_order_id' => $order_id, 'offer_order_key' => $order_key, ) ); wcf()->logger->log( 'Redirect URL : ' . $next_step_url ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer accepted for step ID : ' . $step_id ); } else { /* @todo if payment failed redirect to last page or not */ $data = array( 'order_id' => $order_id, 'order_key' => $order_key, ); $thank_you_page_url = wcf_pro()->flow->get_thankyou_page_url( $step_id, $data ); $result = array( 'status' => 'failed', 'redirect' => $thank_you_page_url, 'message' => wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-order-failure-text' ), ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer Payment Failed. Redirected to thankyou step.' ); } wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); return $result; } /** * Offer rejected * * @param int $step_id Flow step id. * @param array $extra_data extra data. * @param array $result process result. * @since 1.0.0 */ public function offer_rejected( $step_id, $extra_data, $result ) { /* Get Redirect URL */ $next_step_url = wcf_pro()->flow->get_next_step_url( $step_id, $extra_data ); $order_id = $extra_data['order_id']; $step_type = $extra_data['template_type']; $order = wc_get_order( $order_id ); $offer_product = wcf_pro()->utils->get_offer_data( $step_id ); $result = array( 'status' => 'success', 'redirect' => $next_step_url, 'message' => __( 'Redirecting...', 'cartflows-pro' ), ); wcf()->logger->log( 'Order-' . $order_id . ' ' . $step_type . ' Offer rejected' ); do_action( 'cartflows_offer_rejected', $order, $offer_product ); do_action( 'cartflows_' . $step_type . '_offer_rejected', $order, $offer_product ); return $result; } /** * Offer rejected * * @param int $step_id Flow step id. * @param object $order order data. */ public function maybe_skip_offer( $step_id, $order ) { $is_skip_offer = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-skip-offer', false ); $billing_email = $order->get_billing_email(); if ( 'yes' === $is_skip_offer && $billing_email ) { $offer_product = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-product', false ); $offer_product_id = $offer_product[0]; $is_purchased = wc_customer_bought_product( $billing_email, get_current_user_id(), $offer_product_id ); if ( $is_purchased ) { $wcf_step_obj = wcf_pro_get_step( $step_id ); $step_to_redirect = $wcf_step_obj->get_next_step_id(); $step_type = wcf_get_step_type( $step_id ); do_action( 'cartflows_' . $step_type . '_offer_skipped', $step_id, $order, $offer_product ); /* Get Redirect URL */ $step_id = $this->get_next_step_id_for_skip_offer( $step_id, $step_to_redirect ); /** * Check recursively to find if the next step is also upsell/downsell and has the skip offer is enabled. * * Use-case: If there are multiple offer steps and has the same product selected & and Skip offer is enabled. * Output : The control should return the next step after the offer steps. * Example : Checkout, Upsell-1, Upsell-2, Thank you. */ if ( wcf()->utils->check_is_offer_page( $step_id ) ) { $step_id = $this->maybe_skip_offer( $step_id, $order ); } } } return $step_id; } /** * Get next step id for skipped offers. * * @param int $current_step_id step id. * @param int $step_to_redirect default step id. */ public function get_next_step_id_for_skip_offer( $current_step_id, $step_to_redirect ) { $flow_id = wcf()->utils->get_flow_id_from_step_id( $current_step_id ); $steps = get_post_meta( $flow_id, 'wcf-steps', true ); if ( $steps ) { $current_step_found = false; foreach ( $steps as $index => $step ) { if ( $current_step_found ) { if ( in_array( $step['type'], array( 'upsell', 'thankyou' ), true ) ) { $step_to_redirect = $step['id']; break; } } else { if ( intval( $step['id'] ) === $current_step_id ) { $current_step_found = true; } } } } return $step_to_redirect; } /** * Update the order and step status in the step's post-meta. * * @param wc_order $order The current step ID. * @param array $offer_purchased_data The current offer data. * * @return void */ public function update_order_and_step_status( $order = '', $offer_purchased_data = '' ) { if ( ! empty( $order ) && ! empty( $offer_purchased_data ) ) { $order->update_meta_data( 'wcf_is_offer_purchased', wp_json_encode( $offer_purchased_data ) ); } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Base_Offer_Markup::get_instance(); modules/offer/classes/class-cartflows-pro-base-offer-meta-data.php000064400000041121147600244370021240 0ustar00 wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-discount' ), 'value' => $product_id, 'label' => $product_obj->get_name(), 'img_url' => get_the_post_thumbnail_url( $product_id ), 'original_price' => Cartflows_Pro_Admin_Helper::get_product_original_price( $product_obj ), ); } } // If 'wcf-offer-product' is present but empty, reset to an empty string to prevent undefined output. if ( array_key_exists( 'wcf-offer-product', $options ) && isset( $options['wcf-offer-product'][0] ) && empty( $options['wcf-offer-product'][0] ) ) { $options['wcf-offer-product'] = ''; } return $options; } /** * Gget_offer_step_default_fields * * @param array $step_default_fields step default fields. * @param int $step_id Post meta. */ public function get_offer_step_default_fields( $step_default_fields, $step_id ) { $step_default_fields = Cartflows_Pro_Default_Meta::get_instance()->get_offer_fields( $step_id ); return $step_default_fields; } /** * Page Header Tabs * * @param array $settings settings. * @param int $step_id Post meta. */ public function get_settings( $settings, $step_id ) { $add_tabs = array( 'products' => array( 'title' => __( 'Products', 'cartflows-pro' ), 'id' => 'products', 'class' => '', 'icon' => 'dashicons-format-aside', 'priority' => 20, ), 'settings' => array( 'title' => __( 'Settings', 'cartflows-pro' ), 'id' => 'settings', 'class' => '', 'icon' => 'dashicons-format-aside', 'priority' => 20, ), ); $settings_data = $this->get_settings_fields( $step_id ); $settings = array( 'tabs' => $add_tabs, 'page_settings' => $this->get_page_settings( $step_id ), 'settings' => $settings_data, ); return $settings; } /** * Get_page_settings * * @param string $step_id step id. */ public function get_page_settings( $step_id ) { $options = $this->get_data( $step_id ); $settings = array( 'settings' => array( 'product' => array( 'title' => __( 'Product', 'cartflows-pro' ), 'priority' => 20, 'fields' => array( 'product-settings-separator' => array( 'type' => 'separator', ), 'offer-replace-settings' => ! wcf_pro()->utils->is_separate_offer_order() ? array( 'type' => 'doc', 'content' => sprintf( /* translators: %1$1s, %2$2s Link to meta */ __( 'Do you want to cancel the main order on the purchase of upsell/downsell offer?
    Please set the "Create a new child order" option in the %1$1sOffer Global Settings%2$2s to use the cancel primary order option.', 'cartflows-pro' ), '', '' ), ) : array( 'type' => 'toggle', 'label' => __( 'Replace Main Order', 'cartflows-pro' ), 'name' => 'wcf-replace-main-order', 'desc' => sprintf( /* translators: %1$1s, %2$2s Link to meta */ __( 'Note: If "Replace Main Order" option is enabled then on the purchase of upsell/downsell offer it will charge the difference of main order total and this product. %1$1sLearn More >>%2$2s', 'cartflows-pro' ), '', '' ), 'tooltip' => __( 'If this option is enabled, it will cancel the main order on the purchase of upsell/downsell offer.', 'cartflows-pro' ), ), 'replace-order-settings-separator' => array( 'type' => 'separator', ), 'skip-offer-settings' => array( 'type' => 'toggle', 'name' => 'wcf-skip-offer', 'label' => __( 'Skip Offer', 'cartflows-pro' ), 'desc' => __( 'Exclude the offer if the buyer has previously purchased the selected product.', 'cartflows-pro' ), ), ), ), ), ); return $settings; } /** * Get settings data. * * @param int $step_id Post ID. */ public function get_settings_fields( $step_id ) { $step_type = get_post_meta( $step_id, 'wcf-step-type', true ); $flow_id = get_post_meta( $step_id, 'wcf-flow-id', true ); if ( 'upsell' === $step_type ) { $offer_yes_link = wcf()->utils->get_linking_url( array( 'class' => 'wcf-up-offer-yes' ) ); $offer_no_link = wcf()->utils->get_linking_url( array( 'class' => 'wcf-up-offer-no' ) ); } if ( 'downsell' === $step_type ) { $offer_yes_link = wcf()->utils->get_linking_url( array( 'class' => 'wcf-down-offer-yes' ) ); $offer_no_link = wcf()->utils->get_linking_url( array( 'class' => 'wcf-down-offer-no' ) ); } $options = $this->get_data( $step_id ); $opt_steps = Cartflows_Pro_Admin_Helper::get_opt_steps( $step_id ); $settings = array( 'settings' => array( 'offer_processing_strings' => array( 'title' => __( 'Offer Popup Strings', 'cartflows-pro' ), 'slug' => 'offer_processing_strings', 'priority' => 20, 'fields' => array( 'offer-process-text' => array( 'type' => 'text', 'label' => __( 'Offer Processing', 'cartflows-pro' ), 'name' => 'wcf-offer-order-process-text', 'placeholder' => __( 'Processing Order...', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'offer-success-text' => array( 'type' => 'text', 'label' => __( 'Offer Success', 'cartflows-pro' ), 'name' => 'wcf-offer-order-success-text', 'placeholder' => __( 'Product Added Successfully.', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'offer-failure-text' => array( 'type' => 'text', 'label' => __( 'Offer Failure', 'cartflows-pro' ), 'name' => 'wcf-offer-order-failure-text', 'placeholder' => __( 'Oooops! Your Payment Failed.', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'offer-success-note' => array( 'type' => 'text', 'label' => __( 'Offer Success Note', 'cartflows-pro' ), 'name' => 'wcf-offer-order-success-note', 'placeholder' => __( 'Please wait while we process your payment...', 'cartflows-pro' ), 'display_align' => 'vertical', ), ), ), 'shortcode' => array( 'title' => __( 'Shortcodes', 'cartflows-pro' ), 'slug' => 'shortcodes', 'priority' => 40, 'fields' => array( 'offer-accept-link' => array( 'type' => 'text', 'label' => __( 'Accept Offer Link', 'cartflows-pro' ), 'value' => $offer_yes_link, 'readonly' => true, 'display_align' => 'vertical', ), 'offer-reject-link' => array( 'type' => 'text', 'label' => __( 'Decline Offer Link', 'cartflows-pro' ), 'value' => $offer_no_link, 'readonly' => true, 'display_align' => 'vertical', ), 'product-variation' => array( 'type' => 'text', 'label' => __( 'Product Variation ', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_variation]', 'help' => esc_html__( 'Add this shortcode to your offer page for variation selection. If product is variable, it will show variations.', 'cartflows-pro' ), 'readonly' => true, 'display_align' => 'vertical', ), 'product-quantity' => array( 'type' => 'text', 'label' => __( 'Product Quantity', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_quantity]', 'help' => esc_html__( 'Add this shortcode to your offer page for quantity selection.', 'cartflows-pro' ), 'readonly' => true, 'display_align' => 'vertical', ), 'product-title' => array( 'type' => 'text', 'label' => __( 'Product Title', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_title]', 'readonly' => true, 'display_align' => 'vertical', ), 'product-description' => array( 'type' => 'text', 'label' => __( 'Product Description', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_desc]', 'readonly' => true, 'display_align' => 'vertical', ), 'product-short-description' => array( 'type' => 'text', 'label' => __( 'Product Short Description', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_short_desc]', 'readonly' => true, 'display_align' => 'vertical', ), 'product-price' => array( 'type' => 'text', 'label' => __( 'Product Price', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_price]', 'help' => __( 'This shortcode will show the products single quantity price.', 'cartflows-pro' ), 'readonly' => true, 'display_align' => 'vertical', ), 'product-image' => array( 'type' => 'text', 'label' => __( 'Product Image', 'cartflows-pro' ), 'value' => '[cartflows_offer_product_image]', 'readonly' => true, 'display_align' => 'vertical', ), ), ), 'general' => array( 'title' => __( 'General', 'cartflows-pro' ), 'slug' => 'general', 'priority' => 50, 'fields' => array( 'slug' => array( 'type' => 'text', 'name' => 'step_post_name', 'label' => __( 'Step Slug', 'cartflows-pro' ), 'value' => get_post_field( 'post_name' ), 'display_align' => 'vertical', ), ), ), 'conditional-redirection' => array( 'title' => __( 'Conditional Redirection', 'cartflows-pro' ), 'slug' => 'conditional_redirection', 'priority' => 10, 'fields' => array( 'offer-yes-next-step' => array( 'type' => 'select', 'label' => __( 'Offer - Yes Next Step', 'cartflows-pro' ), 'optgroup' => array( 'upsell' => esc_html__( 'Upsell (Woo)', 'cartflows-pro' ), 'downsell' => esc_html__( 'Downsell (Woo)', 'cartflows-pro' ), 'thankyou' => esc_html__( 'Thankyou (Woo)', 'cartflows-pro' ), ), 'name' => 'wcf-yes-next-step', 'value' => $options['wcf-yes-next-step'], 'data-flow-id' => $flow_id, 'data-exclude-id' => $step_id, 'options' => $opt_steps, 'display_align' => 'vertical', ), 'offer-next-step-doc' => array( 'type' => 'select', 'label' => __( 'Offer - No Next Step', 'cartflows-pro' ), 'optgroup' => array( 'upsell' => esc_html__( 'Upsell (Woo)', 'cartflows-pro' ), 'downsell' => esc_html__( 'Downsell (Woo)', 'cartflows-pro' ), 'thankyou' => esc_html__( 'Thankyou (Woo)', 'cartflows-pro' ), ), 'name' => 'wcf-no-next-step', 'value' => $options['wcf-no-next-step'], 'data-flow-id' => $flow_id, 'data-exclude-id' => $step_id, 'options' => $opt_steps, 'display_align' => 'vertical', ), 'offer-no-next-step' => array( 'type' => 'doc', /* translators: %1$1s: link html start, %2$12: link html end*/ 'content' => sprintf( __( 'For more information about the conditional redirection please %1$1sClick here.%2$2s', 'cartflows-pro' ), '', '' ), ), ), ), 'custom-scripts' => array( 'title' => __( 'Custom Script', 'cartflows-pro' ), 'slug' => 'custom_scripts', 'priority' => 30, 'fields' => array( 'wcf-checkout-custom-script' => array( 'type' => 'textarea', 'label' => __( 'Custom Script', 'cartflows-pro' ), 'name' => 'wcf-custom-script', 'value' => $options['wcf-custom-script'], 'display_align' => 'vertical', ), 'offer-success-script' => array( 'type' => 'textarea', 'label' => __( 'Offer Success Script', 'cartflows-pro' ), 'name' => 'wcf-offer-accept-script', 'value' => $options['wcf-offer-accept-script'], 'tooltip' => __( 'Add your custom script which you need to run when the offer is accepted.', 'cartflows-pro' ), 'display_align' => 'vertical', ), 'offer-rejected-script' => array( 'type' => 'textarea', 'label' => __( 'Offer Rejected Script', 'cartflows-pro' ), 'name' => 'wcf-offer-reject-script', 'value' => $options['wcf-offer-reject-script'], 'tooltip' => __( 'Add your custom script which you need to run when the offer is rejected.', 'cartflows-pro' ), /* translators: %1$1s: link html start, %2$12: link html end*/ 'desc' => sprintf( __( 'Use {{order_id}}, {{product_id}} & {{quantity}} and more shortcodes to fetch offer details. %1$1sClick here.%2$2s to know more.', 'cartflows-pro' ), '', '' ), 'display_align' => 'vertical', ), ), ), ), ); if ( wcf_pro_show_deprecated_step_notes() ) { $settings['settings']['general']['fields']['step-note'] = array( 'type' => 'textarea', 'name' => 'wcf-step-note', 'label' => __( 'Step Note', 'cartflows-pro' ), 'value' => get_post_meta( $step_id, 'wcf-step-note', true ), 'rows' => 2, 'cols' => 38, 'display_align' => 'vertical', ); } return $settings; } /** * Get data. * * @param int $step_id Post ID. */ public function get_data( $step_id ) { $optin_data = array(); // Stored data. $stored_meta = get_post_meta( $step_id ); // Default. $default_data = self::get_meta_option( $step_id ); // Set stored and override defaults. foreach ( $default_data as $key => $value ) { if ( array_key_exists( $key, $stored_meta ) ) { $optin_data[ $key ] = ( isset( $stored_meta[ $key ][0] ) ) ? maybe_unserialize( $stored_meta[ $key ][0] ) : ''; } else { $optin_data[ $key ] = ( isset( $default_data[ $key ]['default'] ) ) ? $default_data[ $key ]['default'] : ''; } } return $optin_data; } /** * Get meta. * * @param int $post_id Post ID. */ public static function get_meta_option( $post_id ) { $meta_option = wcf_pro()->options->get_offer_fields( $post_id ); return $meta_option; } } Cartflows_Pro_Base_Offer_Meta_Data::get_instance(); modules/offer/classes/class-cartflows-pro-base-offer-shortcodes.php000064400000036615147600244370021574 0ustar00get_offer_product( 'object' ); if ( ! is_object( $product ) || null === $product ) { return; } return $product->get_title(); } } /** * Product selection options */ public function product_desc() { if ( _is_wcf_base_offer_type() ) { $product = $this->get_offer_product( 'object' ); if ( ! is_object( $product ) || null === $product ) { return; } return $product->get_description(); } } /** * Product selection options */ public function product_short_desc() { if ( _is_wcf_base_offer_type() ) { $product = $this->get_offer_product( 'object' ); if ( ! is_object( $product ) || null === $product ) { return; } if ( ! $product->get_short_description() ) { if ( $product->get_description() ) { return substr( $product->get_description(), 0, 200 ); } else { return ''; } } else { return $product->get_short_description(); } } } /** * Product selection options */ public function product_price() { if ( _is_wcf_base_offer_type() ) { global $post; $output = ''; $context = 'raw'; $product = $this->get_offer_product( 'object' ); add_filter( 'woocommerce_price_trim_zeros', '__return_true' ); if ( ! is_object( $product ) || null === $product ) { return; } $post_id = false; if ( $post ) { $post_id = $post->ID; } elseif ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $post_id = intval( $_POST['id'] ); //phpcs:ignore WordPress.Security.NonceVerification.Missing } if ( ! $post_id ) { return; } $offer_product = wcf_pro()->utils->get_offer_data( $post_id ); if ( empty( $offer_product ) ) { return; } $price_args = array( 'decimals' => wc_get_price_decimals(), ); $output .= ''; $output .= ''; if ( $product->is_type( 'variable' ) ) { $output .= ''; } $output .= ''; remove_filter( 'woocommerce_price_trim_zeros', '__return_true' ); return $output; } } /** * Product selection options */ public function product_diff_price() { if ( _is_wcf_base_offer_type() ) { global $post; $output = ''; $product = $this->get_offer_product( 'object' ); if ( ! is_object( $product ) || null === $product ) { return; } // We are executing the shortcode here.So need for nonce verification. $order_id = isset( $_GET['wcf-order'] ) ? intval( $_GET['wcf-order'] ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_key = isset( $_GET['wcf-key'] ) ? sanitize_text_field( wp_unslash( $_GET['wcf-key'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( empty( $order_key ) || empty( $order_id ) ) { return; } $order = wc_get_order( $order_id ); $order_total = $order->get_total(); $offer_product = wcf_pro()->utils->get_offer_data( $post->ID ); $product_price = $offer_product['unit_price']; $diff_amt = floatval( $product_price ) - floatval( $order_total ); $price_args = array( 'decimals' => 0 ); if ( $diff_amt > 0 ) { $output = wc_price( $diff_amt, $price_args ); } return $output; } } /** * Product selection options */ public function product_image() { if ( _is_wcf_base_offer_type() ) { $product = $this->get_offer_product( 'object' ); if ( ! is_object( $product ) || null === $product ) { return; } wp_enqueue_script( 'wc-add-to-cart-variation' ); if ( ! function_exists( 'wc_get_gallery_image_html' ) ) { return; } $columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 ); $post_thumbnail_id = $product->get_image_id(); $attachment_ids = $product->get_gallery_image_ids(); if ( ! empty( $attachment_ids ) ) { /* Enqueue slider script */ wp_enqueue_style( 'wcf-pro-flexslider', wcf_pro()->utils->get_css_url( 'flexslider' ), array(), CARTFLOWS_PRO_VER ); wp_enqueue_script( 'flexslider' ); } $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array( 'woocommerce-product-gallery', 'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ), 'woocommerce-product-gallery--columns-' . absint( $columns ), 'images', ) ); ob_start(); ?>
    get_offer_product( 'object' ); if ( ! is_object( $product_obj ) || empty( $product_obj ) ) { return; } if ( ! $product_obj->is_type( 'variable' ) ) { return; } $product = $product_obj; ob_start(); ?>
    get_offer_product( 'data' ); if ( ! is_array( $products ) || empty( $products ) ) { return; } $step_id = 0; if ( $post ) { $step_id = $post->ID; } elseif ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $step_id = intval( $_POST['id'] ); //phpcs:ignore WordPress.Security.NonceVerification.Missing } $prdouct_id = $products['id']; ob_start(); ?>
    options->get_offers_meta_value( $step_id, 'wcf-offer-quantity' ); if ( ! empty( $get_product_quantity ) ) { $product_quantity = $get_product_quantity; } else { $product_quantity = apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ); } woocommerce_quantity_input( array( 'product_name' => '', 'min_value' => $product_quantity, 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ), 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( intval( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), //phpcs:ignore WordPress.Security.NonceVerification.Missing ) ); ?>
    ID; } elseif ( is_admin() && isset( $_POST['id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing $step_id = intval( $_POST['id'] ); //phpcs:ignore WordPress.Security.NonceVerification.Missing } $product_data = wcf_pro()->options->get_offers_meta_value( $step_id, 'wcf-offer-product' ); $products = array(); if ( is_array( $product_data ) ) { foreach ( $product_data as $p_index => $p_data ) { if ( ! isset( $product_data[ $p_index ] ) ) { continue; } $products = array( 'id' => $product_data[ $p_index ], 'variable' => false, 'variation' => false, 'variation_id' => $product_data[ $p_index ], ); $_product = wc_get_product( $product_data[ $p_index ] ); if ( ! empty( $_product ) ) { if ( $_product->is_type( 'variable' ) ) { $products['variable'] = true; $products['variation_id'] = wcf_pro()->utils->get_variable_variation_product_id( $product_data[ $p_index ] ); } if ( $_product->is_type( 'variation' ) ) { $products['id'] = $_product->get_parent_id(); $products['variation'] = true; } self::$main_product = $_product; self::$main_product_data = $products; } } } } if ( 'object' === $context ) { return self::$main_product; } else { return self::$main_product_data; } } /** * Offer shortcode markup * * @param array $atts attributes. * @return string */ public function offer_link_yes_markup( $atts ) { $order_id = ( isset( $_GET['wcf-order'] ) ) ? intval( $_GET['wcf-order'] ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $output = '#'; if ( _is_wcf_base_offer_type() ) { $step_id = _get_wcf_base_offer_id(); if ( $step_id ) { $action = 'yes'; $template_type = get_post_meta( $step_id, 'wcf-step-type', true ); $attr = array( 'class' => 'wcf-' . $template_type . '-offer-' . $action, ); $order = wc_get_order( $order_id ); if ( $order ) { $payment_method = $order->get_payment_method(); $gateways = array( 'paypal', 'ppec_paypal' ); $gateways = apply_filters( 'cartflows_offer_supported_payment_gateway_slugs', $gateways ); if ( ( in_array( $payment_method, $gateways, true ) ) && ! wcf_pro()->utils->is_reference_transaction() ) { $attr['skip'] = 'cartflows-skip'; } } $attr_string = '?'; foreach ( $attr as $key => $value ) { $attr_string .= $key . '=' . $value . '&'; } $output = rtrim( $attr_string, '&' ); } } return $output; } /** * Offer shortcode markup * * @param array $atts attributes. * @return string */ public function offer_link_no_markup( $atts ) { $output = '#'; if ( _is_wcf_base_offer_type() ) { $step_id = _get_wcf_base_offer_id(); if ( $step_id ) { $action = 'no'; $template_type = get_post_meta( $step_id, 'wcf-step-type', true ); $attr = array( 'class' => 'wcf-' . $template_type . '-offer-' . $action, ); $attr_string = '?'; foreach ( $attr as $key => $value ) { $attr_string .= $key . '=' . $value . '&'; } $output = rtrim( $attr_string, '&' ); } } return $output; } /** * Override woo templates. * * @param string $template new Template full path. * @param string $template_name Template name. * @param string $template_path Template Path. * @since 1.1.5 * @return string. */ public function override_woo_variable_template( $template, $template_name, $template_path ) { if ( _is_wcf_base_offer_type() ) { global $woocommerce; $_template = $template; $plugin_path = CARTFLOWS_PRO_DIR . 'woocommerce/templates/'; if ( file_exists( $plugin_path . $template_name ) ) { $template = $plugin_path . $template_name; } if ( ! $template ) { $template = $_template; } } return $template; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Base_Offer_Shortcodes::get_instance(); modules/offer/classes/class-cartflows-pro-offer-order-meta.php000064400000011616147600244370020540 0ustar00base && 'shop_order' == $screen->post_type ) { $order_id = $order->get_id(); $is_offer = $order->get_meta( '_cartflows_offer' ); $is_main_order_cancelled = $order->get_meta( '_cartflows_main_order_status' ); if ( 'cancelled' === $is_main_order_cancelled ) { $formatted_total .= '
    ' . __( 'CartFlows Order Auto Cancelled', 'cartflows-pro' ) . '
    '; } if ( 'yes' === $is_offer ) { $offer_type = $order->get_meta( '_cartflows_offer_type' ); if ( 'upsell' === $offer_type ) { $formatted_total .= '
    ' . __( 'CartFlows Upsell', 'cartflows-pro' ) . '
    '; } elseif ( 'downsell' === $offer_type ) { $formatted_total .= '
    ' . __( 'CartFlows Downsell', 'cartflows-pro' ) . '
    '; } } } return $formatted_total; } /** * Display child orders in order detail page. * * @param object $order order object. * @return void */ public function offer_linked_orders( $order ) { $order_id = $order->get_id(); $is_cartflows_offer = $order->get_meta( '_cartflows_offer' ); if ( 'yes' === $is_cartflows_offer ) { $amount_diff_data = ''; $amount_diff = $order->get_meta( '_cartflows_offer_amount_diff', true ); if ( false !== $amount_diff && floatval( 0 ) < floatval( $amount_diff ) ) { $amount_diff_data = '' . __( 'Amount Charged: ', 'cartflows-pro' ) . wc_price( $amount_diff ) . ''; $amount_diff_data .= '' . __( 'This order has charged the difference, and the same amount will be considered while refunding this order. You need to refund the rest of the amount from the parent order.', 'cartflows-pro' ) . ''; } $parent_order_id = $order->get_meta( '_cartflows_offer_parent_id' ); if ( ! empty( $parent_order_id ) ) { $parent_order = wc_get_order( $parent_order_id ); $order_number = $parent_order->get_order_number(); $parent_order_html = '

    ' . __( 'CartFlows Parent Order', 'cartflows-pro' ) . ' : '; $parent_order_html .= '#' . esc_attr( $order_number ) . ''; $parent_order_html .= $amount_diff_data; $parent_order_html .= '

    '; echo wp_kses_post( $parent_order_html ); } } else { $child_orders = $order->get_meta( '_cartflows_offer_child_orders' ); if ( ! empty( $child_orders ) ) { $child_order_html = '

    ' . __( 'CartFlows Upsell/Downsell Orders', 'cartflows-pro' ) . ' : '; foreach ( $child_orders as $child_id => $data ) { $child_order = wc_get_order( $child_id ); $order_number = $child_order->get_order_number(); $offer_type = $child_order->get_meta( '_cartflows_offer_type' ); if ( 'upsell' === $offer_type ) { $tag = __( 'Upsell', 'cartflows-pro' ); } elseif ( 'downsell' === $offer_type ) { $tag = __( 'Downsell', 'cartflows-pro' ); } $child_order_html .= '
    #' . esc_attr( $order_number ) . '
    - ' . $tag . '
    '; } $child_order_html .= '

    '; echo wp_kses_post( $child_order_html ); } } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Offer_Order_Meta::get_instance(); modules/offer/classes/class-cartflows-pro-offer-subscriptions.php000064400000015176147600244370021415 0ustar00utils->is_separate_offer_order() ) { add_action( 'cartflows_child_offer_before_payment_complete', array( $this, 'separate_order_subcription' ), 10, 3 ); } else { add_action( 'cartflows_offer_accepted', array( $this, 'add_to_main_order_subcription' ), 10, 2 ); } add_action( 'cartflows_offer_before_main_order_cancel', array( $this, 'full_subscription_cancellation' ), 10, 1 ); } /** * Create Add to main order subscription * * @since 1.0.0 * @param object $order order data. * @param array $offer_product offer product data. * @return void */ public function add_to_main_order_subcription( $order, $offer_product ) { $transaction_id = $order->get_meta( 'cartflows_offer_txn_resp_' . $offer_product['step_id'] ); $offer_product['transaction_id'] = $transaction_id; $subscription = $this->maybe_create_subscription( $order, $offer_product ); if ( ! empty( $subscription ) ) { do_action( 'cartflows_offer_subscription_created', $subscription, $order, $offer_product ); } } /** * Create separate order order subscription * * @since 1.0.0 * @param object $order child order data. Product to be subscribed. * @param array $offer_product offer product data. * @param object $parent_order Parent order data. * @return void */ public function separate_order_subcription( $order, $offer_product, $parent_order ) { $subscription = $this->maybe_create_subscription( $order, $offer_product ); if ( ! empty( $subscription ) ) { do_action( 'cartflows_offer_subscription_created', $subscription, $parent_order, $offer_product ); } } /** * Create WooCommerce subscription * * @since 1.0.0 * @param object $order order data. * @param array $offer_product offer product data. * @return bool|object */ public function maybe_create_subscription( $order, $offer_product ) { $product_id = $offer_product['id']; $product = wc_get_product( $product_id ); $subscription = false; wcf()->logger->log( 'Subscription Product-' . $product_id ); // If product is of subscription type. Execute the code only if the WooCommerce Subscription plugin is active. if ( wcf_pro()->is_wcs_active && $product instanceof WC_Product && ( $product->get_type() === 'subscription' || $product->get_type() === 'subscription_variation' ) ) { if ( is_user_logged_in() ) { $user_id = $order->get_user_id(); } else { // Create new customer. $user_created = null; $user_id = ( null === $user_created ) ? $this->create_new_customer( $order->get_billing_email() ) : $user_created; $order->set_customer_id( $user_id ); $order->save(); } $transaction_id = $offer_product['transaction_id']; $start_date = wcs_get_datetime_utc_string( wcs_get_objects_property( $order, 'date_created' ) ); $period = WC_Subscriptions_Product::get_period( $product ); $interval = WC_Subscriptions_Product::get_interval( $product ); $trial_period = WC_Subscriptions_Product::get_trial_period( $product ); $order_id = $order->get_id(); // Create Woo subscription. $subscription = wcs_create_subscription( array( 'start_date' => $start_date, 'order_id' => $order_id, 'billing_period' => $period, 'billing_interval' => $interval, 'customer_note' => $order->get_customer_note(), 'customer_id' => $user_id, ) ); if ( ! empty( $subscription ) ) { // Add product to subscription. $subscription_item_id = $subscription->add_product( $product, 1 ); $subscription->set_total( $product->get_price(), 'total' ); $subscription = wcs_copy_order_address( $order, $subscription ); // set subscription dates. $trial_end_date = WC_Subscriptions_Product::get_trial_expiration_date( $product->get_id(), $start_date ); $next_payment_date = WC_Subscriptions_Product::get_first_renewal_payment_date( $product->get_id(), $start_date ); $end_date = WC_Subscriptions_Product::get_expiration_date( $product->get_id(), $start_date ); $subscription->update_dates( array( 'trial_end' => $trial_end_date, 'next_payment' => $next_payment_date, 'end' => $end_date, ) ); // Set meta for order if product has trial period. if ( WC_Subscriptions_Product::get_trial_length( $product->get_id() ) > 0 ) { wc_add_order_item_meta( $subscription_item_id, '_has_trial', 'true' ); } // Set payment method data. $subscription->set_payment_method( $order->get_payment_method() ); $subscription->set_payment_method_title( $order->get_payment_method_title() ); if ( ! empty( $user_id ) ) { $subscription->update_meta_data( '_customer_user', $user_id ); $subscription->save(); } // Save the subscription. $subscription->save(); } } return $subscription; } /** * Create new customer. * * @since 1.0.0 * @param string $email user email. * @return int */ public function create_new_customer( $email ) { if ( empty( $email ) ) { return false; } /** * Try to get the user by the email provided, if present then process as user ID exists. */ $maybe_user = get_user_by( 'email', $email ); if ( $maybe_user instanceof WP_User ) { return $maybe_user->ID; } $username = sanitize_user( current( explode( '@', $email ) ), true ); // username has to be unique. $append = 1; $o_username = $username; while ( username_exists( $username ) ) { $username = $o_username . $append; ++ $append; } $password = wp_generate_password(); $customer_id = wc_create_new_customer( $email, $username, $password ); if ( ! empty( $customer_id ) ) { wp_set_current_user( $customer_id, $username ); wc_set_customer_auth_cookie( $customer_id ); } return $customer_id; } /** * Cancel full subscription while cancelling. * * @since 1.6.13 * @param object $parent_order Order object. * @return void */ public function full_subscription_cancellation( $parent_order ) { add_filter( 'woocommerce_subscription_use_pending_cancel', '__return_false' ); } } Cartflows_Pro_Offer_Subscriptions::get_instance(); modules/offer/class-cartflows-pro-base-offer.php000064400000002516147600244370015755 0ustar00is_wcs_active ) { require_once CARTFLOWS_PRO_BASE_OFFER_DIR . 'classes/class-cartflows-pro-offer-subscriptions.php'; } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Base_Offer::get_instance(); modules/optin/classes/class-cartflows-pro-optin-default-meta.php000064400000001237147600244370021127 0ustar00get_meta( '_wcf_optin_id' ); if ( ! $optin_id ) { return $fields; } // Get custom fields. $custom_fields = get_post_meta( $optin_id, 'wcf-optin-enable-custom-fields', true ); if ( 'yes' === $custom_fields ) { // Billing Fields & Values. $billing_fields = get_post_meta( $optin_id, 'wcf_fields_billing', true ); $saved_billing_fields = get_post_meta( $optin_id, 'wcf-optin-fields-billing', true ); if ( is_array( $billing_fields ) ) { foreach ( $billing_fields as $field => $data ) { if ( isset( $saved_billing_fields[ $field ] ) && isset( $data['custom'] ) && $data['custom'] && ( isset( $saved_billing_fields[ $field ]['show_in_email'] ) && $saved_billing_fields[ $field ]['show_in_email'] ) ) { $fields[ $field ] = array( 'label' => $data['label'], 'value' => $order->get_meta( '_' . $field ), ); } } } } return $fields; } /** * Display billing custom field data on order page * * @param obj $order Order object. * @return void */ public function display_billing_custom_fields_in_order_meta( $order ) { if ( ! $order ) { return; } $optin_id = $order->get_meta( '_wcf_optin_id' ); if ( ! $optin_id ) { return; } /* Custom Field To Do */ $custom_fields = get_post_meta( $optin_id, 'wcf-optin-enable-custom-fields', true ); if ( 'yes' === $custom_fields ) { $output = ''; $saved_billing_fields = get_post_meta( $optin_id, 'wcf-optin-fields-billing', true ); $billing_fields = get_post_meta( $optin_id, 'wcf_fields_billing', true ); if ( is_array( $billing_fields ) ) { foreach ( $billing_fields as $field => $data ) { if ( isset( $saved_billing_fields[ $field ] ) && isset( $data['custom'] ) && $data['custom'] ) { $output .= '

    ' . esc_html( $data['label'] ) . ': ' . esc_html( $order->get_meta( '_' . $field ) ) . '

    '; } } } if ( '' !== $output ) { $output = '

    ' . __( 'Billing Custom Fields', 'cartflows-pro' ) . '

    ' . $output; } echo wp_kses_post( $output ); } } /** * Load shortcode scripts. * * @return void */ public function optin_style_scripts() { global $post; if ( Cartflows_Compatibility::get_instance()->is_divi_enabled() || Cartflows_Compatibility::get_instance()->is_divi_builder_enabled( $post->ID ) ) { $this->divi_status = true; } wp_enqueue_style( 'wcf-pro-optin', wcf_pro()->utils->get_css_url( 'optin-styles' ), '', CARTFLOWS_PRO_VER ); wp_enqueue_script( 'wcf-pro-optin', wcf_pro()->utils->get_js_url( 'optin' ), array( 'jquery' ), CARTFLOWS_PRO_VER, true ); // Add DIVI Compatibility css if DIVI theme is enabled. if ( $this->divi_status ) { wp_enqueue_style( 'wcf-optin-styles-divi', wcf_pro()->utils->get_css_url( 'optin-styles-divi' ), '', CARTFLOWS_PRO_VER ); } } /** * Prepare default country locale. * * @param array $fields country locale fields. * @param int $optin_id checkout id. * @return array */ public function optin_default_fields( $fields, $optin_id ) { if ( ! _is_wcf_optin_custom_fields( $optin_id ) ) { return $fields; } $optin_fields = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-fields-billing' ); if ( ! is_array( $optin_fields ) ) { return $fields; } if ( ! empty( $optin_fields ) && ! empty( $fields ) ) { foreach ( $fields as $name => $field ) { $fname = 'billing_' . $name; $custom_field = isset( $optin_fields[ $fname ] ) ? $optin_fields[ $fname ] : false; if ( $custom_field && ! ( isset( $custom_field['enabled'] ) && false == $custom_field['enabled'] ) ) { $fields[ $name ]['required'] = isset( $custom_field['required'] ) && $custom_field['required'] ? true : false; } } } return $fields; } /** * Prepare default country locale. * * @param array $fields country locale fields. * @param int $optin_id checkout id. * @return array */ public function optin_fields( $fields, $optin_id ) { if ( ! _is_wcf_optin_custom_fields( $optin_id ) ) { return $fields; } $optin_fields = wcf()->options->get_optin_meta_value( $optin_id, 'wcf-optin-fields-billing' ); if ( ! is_array( $optin_fields ) ) { return $fields; } if ( ! empty( $optin_fields ) && ! empty( $fields ) ) { $override_required = apply_filters( 'wcf_address_field_override_required', true ); foreach ( $fields as $name => $field ) { $fname = $sname . '_' . $name; if ( $this->_is_locale_field( $fname ) && $override_required ) { $custom_field = isset( $address_fields[ $fname ] ) ? $address_fields[ $fname ] : false; if ( $custom_field && ! ( isset( $custom_field['enabled'] ) && false == $custom_field['enabled'] ) ) { $fields[ $name ]['required'] = isset( $custom_field['required'] ) && $custom_field['required'] ? true : false; } } } } return $fields; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Optin_Markup::get_instance(); modules/optin/classes/class-cartflows-pro-optin-meta-data.php000064400000001416147600244370020413 0ustar00utils->is_separate_offer_order() ) { /* Only for merged order Order Status to main order */ add_action( 'cartflows_order_started', array( $this, 'register_order_status_to_main_order' ), 10 ); } } /** * Get order status slug. * * @since 1.0.0 * * @return string */ public function get_order_status_slug() { return 'wc-wcf-main-order'; } /** * Get order status title. * * @since 1.0.0 * * @return string */ public function get_order_status_title() { return _x( 'Main Order Accepted (CF)', 'Order status', 'cartflows-pro' ); } /** * Register new order status. * * @since 1.0.0 * @param string $order_status order status. * * @return array */ public function register_new_order_status( $order_status ) { $order_status_title = $this->get_order_status_title(); $order_status[ $this->get_order_status_slug() ] = array( 'label' => $order_status_title, 'public' => false, 'exclude_from_search' => true, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, /* translators: %s: Single count value */ 'label_count' => _n_noop( 'Main Order Accepted (%s)', 'Main Order Accepted (%s)', 'cartflows-pro' ), ); return $order_status; } /** * Update native statuses. * * @since 1.0.0 * @param string $order_status Order status. * * @return array */ public function update_to_native_stauses( $order_status ) { $order_status[ $this->get_order_status_slug() ] = $this->get_order_status_title(); return $order_status; } /** * Add upsell product and order meta. * * @since 1.0.0 * @param array $order order. * @param array $upsell_product upsell product. * @return void */ public function add_upsell_product( $order, $upsell_product ) { wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); $this->add_offer_product( $order, $upsell_product, 'upsell' ); wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Add downsell product. * * @since 1.0.0 * @param array $order order. * @param array $downsell_product downsell product. * @return void */ public function add_downsell_product( $order, $downsell_product ) { $this->add_offer_product( $order, $downsell_product, 'downsell' ); } /** * Add shipping to order. * * @param array $product_data offer product. * @param array $order parent order. * @return void */ public function add_shipping_charges_to_order( $product_data, $order ) { // Add the shipping charges. $item = new WC_Order_Item_Shipping(); $item->set_props( array( 'method_title' => 'Flat rate', 'method_id' => '', 'total' => $product_data['shipping_fee'], ) ); $item->save(); $order->add_item( $item ); // Show product details in shipping rates section of order data. $product_name = $product_data['name'] . ' × ' . $product_data['qty']; $offer_shipping_items = array( $product_name ); $item_id = $item->get_id(); $offer_itmes = implode( ',', $offer_shipping_items ); wc_add_order_item_meta( $item_id, 'Items', $offer_itmes ); $order->calculate_totals(); $order->save(); } /** * Add offer product. * * @since 1.0.0 * @param array $order order. * @param array $product_data offer product. * @param string $type offer product type. * @return void */ public function add_offer_product( $order, $product_data, $type = 'upsell' ) { wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'Offer type - ' . $type ); $transaction_id = $order->get_meta( 'cartflows_offer_txn_resp_' . $product_data['step_id'] ); $child_order = null; if ( ! wcf_pro()->utils->is_separate_offer_order() ) { $item_id = $order->add_product( wc_get_product( $product_data['id'] ), $product_data['qty'], $product_data['args'] ); /** * This filter 'cartflows_display_offer_shipping_fee' will be true always. * Can be used to hide/show the shipping fee on thank you page depending on the product selected. */ if ( 0 < $product_data['shipping_fee'] || apply_filters( 'cartflows_display_offer_shipping_fee', false, $product_data ) ) { $this->add_shipping_charges_to_order( $product_data, $order ); wc_add_order_item_meta( $item_id, '_cartflows_offer_shipping_fee', $product_data['shipping_fee_tax'] ); } wc_add_order_item_meta( $item_id, '_cartflows_' . $type, 'yes' ); wc_add_order_item_meta( $item_id, '_cartflows_step_id', $product_data['step_id'] ); wc_add_order_item_meta( $item_id, '_cartflows_offer_txn_id', $transaction_id ); $order->calculate_totals(); } else { // Set transaction_id in product data. $product_data['transaction_id'] = $transaction_id; $child_order = $this->create_child_order( $order, $product_data, $type ); } do_action( 'cartflows_offer_product_processed', $order, $product_data, $child_order ); wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); } /** * Normalize order status. * * @since 1.0.0 * @param WC_Order $order order. * @return void */ public function may_be_normalize_status( $order ) { wcf()->logger->log( 'Entering: ' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'Order status: ' . $order->get_status() ); /* @todo : Check if it is our status */ $flow_id = wcf()->utils->get_flow_id_from_order( $order ); $before_normal = 'pending'; $normal_status = 'processing'; /* Get status change data from order */ $order_status_change_data = $order->get_meta( '_cartflows_order_status_change' ); if ( is_array( $order_status_change_data ) && isset( $order_status_change_data['before_normal'] ) && isset( $order_status_change_data['normal_status'] ) ) { $before_normal = $order_status_change_data['before_normal']; $normal_status = $order_status_change_data['normal_status']; } else { $session_data = wcf_pro()->session->get_data( $flow_id ); if ( $session_data ) { $before_normal = isset( $session_data['before_normal'] ) ? $session_data['before_normal'] : $before_normal; $normal_status = isset( $session_data['normal_status'] ) ? $session_data['normal_status'] : $normal_status; } } $this->do_normalize_status( $order, $before_normal, $normal_status ); } /** * Normalize order status. * * @since 1.0.0 * @param WC_Order $order order. * @param string $before_normal before status. * @param string $normal_status normal status. * @return void */ public function do_normalize_status( $order, $before_normal = 'pending', $normal_status = 'processing' ) { wcf()->logger->log( 'Entering: ' . __CLASS__ . '::' . __FUNCTION__ ); wcf()->logger->log( 'Before Normal: ' . $before_normal ); wcf()->logger->log( 'Normal: ' . $normal_status ); wcf()->logger->log( 'order data: ' . $order ); if ( false === is_a( $order, 'WC_Order' ) ) { return; } $current_status = $order->get_status(); if ( 'wcf-main-order' !== $current_status ) { return; } /* Setup Beofore Normal Status */ $order->update_status( $before_normal ); $normal_status = apply_filters( 'wcf_order_status_after_order_complete', $normal_status, $order ); /* Setup Normal Staus */ $order->update_status( $normal_status ); } /** * Schedule normalize order status. * * @since 1.0.0 * @param int $order_id order id. * @param string $before_normal before status. * @param string $normal_status normal status. * @return void */ public function schedule_normalize_order_status( $order_id, $before_normal, $normal_status ) { $order = wc_get_order( $order_id ); $this->do_normalize_status( $order, $before_normal, $normal_status ); } /** * Register order status to main order. * * @since 1.0.0 * @param array $order order data. * @return void */ public function register_order_status_to_main_order( $order ) { if ( ! is_a( $order, 'WC_Order' ) ) { return; } $payment_method = $order->get_payment_method(); if ( 'cod' === $payment_method || 'bacs' === $payment_method ) { return; } add_filter( 'woocommerce_payment_complete_order_status', array( $this, 'maybe_set_completed_order_status' ), 999, 3 ); } /** * Set order status to complete. * * @since 1.0.0 * @param string $order_status order status. * @param int $id order id. * @param array $order order data. * @return string */ public function maybe_set_completed_order_status( $order_status, $id, $order ) { wcf()->logger->log( __CLASS__ . '::maybe_set_completed_order_status' ); if ( ! is_a( $order, 'WC_Order' ) ) { return $order_status; } remove_filter( 'woocommerce_payment_complete_order_status', array( $this, 'maybe_set_completed_order_status' ), 999 ); $new_status = $this->get_order_status_slug(); /** * $new_status = our new status * $order_status = default status change */ do_action( 'cartflows_order_status_change_to_main_order', $new_status, $order_status, $order ); return $this->get_order_status_slug(); } /** * Create child offer order. * * @since 1.0.0 * @param object $parent_order order. * @param array $product_data offer product. * @param string $type offer product type. */ public function create_child_order( $parent_order, $product_data, $type = 'upsell' ) { wcf()->logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); $order = false; if ( ! empty( $parent_order ) ) { $parent_order_id = $parent_order->get_id(); $parent_order_currency = $parent_order->get_currency(); $parent_order_billing = $parent_order->get_address( 'billing' ); $flow_id = $parent_order->get_meta( '_wcf_flow_id' ); if ( apply_filters( 'cartflows_force_create_child_order', ! empty( $parent_order_billing['email'] ), $parent_order ) ) { $customer_id = $parent_order->get_customer_id(); $order = wc_create_order( array( 'customer_id' => $customer_id, 'status' => 'wc-pending', ) ); /* Set Order type */ $order->update_meta_data( '_cartflows_offer', 'yes' ); $order->update_meta_data( '_cartflows_offer_type', $type ); $order->update_meta_data( '_cartflows_parent_flow_id', $flow_id ); $order->update_meta_data( '_cartflows_offer_step_id', $product_data['step_id'] ); $order->update_meta_data( '_cartflows_offer_parent_id', $parent_order_id ); $order->update_meta_data( '_wc_order_attribution_utm_source', '(direct)' ); $order->update_meta_data( '_wc_order_attribution_source_type', 'typein' ); $order->set_currency( $parent_order_currency ); $item_id = $order->add_product( wc_get_product( $product_data['id'] ), $product_data['qty'], $product_data['args'] ); if ( 0 < $product_data['shipping_fee'] || apply_filters( 'cartflows_display_offer_shipping_fee', false, $product_data ) ) { $this->add_shipping_charges_to_order( $product_data, $order ); } wc_add_order_item_meta( $item_id, '_cartflows_' . $type, 'yes' ); wc_add_order_item_meta( $item_id, '_cartflows_step_id', $product_data['step_id'] ); $order->set_address( $parent_order->get_address( 'billing' ), 'billing' ); $order->set_address( $parent_order->get_address( 'shipping' ), 'shipping' ); // Set shipping data. $order->set_payment_method( $parent_order->get_payment_method() ); $order->set_payment_method_title( $parent_order->get_payment_method_title() ); if ( ! wc_tax_enabled() ) { // Reports won't track orders fix. $order->set_shipping_tax( 0 ); $order->set_cart_tax( 0 ); } $order->calculate_totals(); $offer_orders_meta = $parent_order->get_meta( '_cartflows_offer_child_orders' ); if ( ! is_array( $offer_orders_meta ) ) { $offer_orders_meta = array(); } $offer_orders_meta[ $order->get_id() ] = array( 'type' => $type ); $parent_order->update_meta_data( '_cartflows_offer_child_orders', $offer_orders_meta ); // Cancel the main order if replace order is enabled. $this->cancel_parent_order( $parent_order, $product_data, $type, $order ); // Save the order. $parent_order->save(); // Save the child order. $order->save(); wcf()->logger->log( 'Child Order created - ' . $order->get_id() ); } } if ( $order ) { $transaction_id = $product_data['transaction_id']; remove_action( 'woocommerce_pre_payment_complete', array( Cartflows_Pro_Frontend::get_instance(), 'maybe_setup_upsell' ), 99, 1 ); do_action( 'cartflows_child_offer_before_payment_complete', $order, $product_data, $parent_order ); $this->payment_complete( $order, $transaction_id ); $order->set_transaction_id( $transaction_id ); $order->save(); $transaction_id_note = ''; if ( ! empty( $transaction_id ) ) { $transaction_id_note = sprintf( ' | (Transaction ID: %s)', $transaction_id ); } $order->add_order_note( 'Offer Accepted | ' . $type . ' | Step ID - ' . $product_data['step_id'] . $transaction_id_note ); do_action( 'cartflows_offer_child_order_created', $parent_order, $order, $transaction_id ); do_action( 'cartflows_offer_child_order_created_' . $parent_order->get_payment_method(), $parent_order, $order, $transaction_id ); } wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); return $order; } /** * Cancel the parent order. * * @param object $parent_order order. * @param array $product_data offer data. * @param string $type offer type. * @param object $order child order. */ public function cancel_parent_order( $parent_order, $product_data, $type, $order ) { $is_cancal_main_order = get_post_meta( $product_data['step_id'], 'wcf-replace-main-order', true ); if ( 'yes' === $is_cancal_main_order && $product_data['cancal_main_order'] && ! $parent_order->has_status( 'cancelled' ) ) { do_action( 'cartflows_offer_before_main_order_cancel', $parent_order ); $parent_order->update_status( 'cancelled' ); /* translators: %s step type */ $parent_order->add_order_note( sprintf( __( 'Order has been cancelled as the user has upgraded to the CartFlows %s order.', 'cartflows-pro' ), $type ) ); $parent_order->update_meta_data( '_cartflows_main_order_status', 'cancelled' ); $order->update_meta_data( '_cartflows_offer_amount_diff', $product_data['amount_diff'] ); do_action( 'cartflows_offer_after_main_order_cancel', $parent_order ); } } /** * Complete payment of child order offer. * * @since 1.0.0 * @param object $order order. * @param string $transaction_id Transaction id. */ public function payment_complete( $order, $transaction_id = '' ) { $payment_method = $order->get_payment_method(); if ( 'cod' === $payment_method ) { $order->set_status( 'processing' ); wc_reduce_stock_levels( $order ); } elseif ( 'bacs' === $payment_method ) { $order->set_status( 'on-hold' ); wc_reduce_stock_levels( $order ); } else { $order->payment_complete( $transaction_id ); } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Orders::get_instance(); modules/shortcodes/class-cartflows-pro-order-fields-shortcode.php000064400000006503147600244370021367 0ustar00utils->is_step_post_type() ) { return $output; } $def_val = isset( $atts['default'] ) ? sanitize_text_field( $atts['default'] ) : ''; /* Set default value */ $output = $def_val; $order_id = isset( $_GET['wcf-order'] ) ? intval( $_GET['wcf-order'] ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $order_key = isset( $_GET['wcf-key'] ) ? sanitize_text_field( wp_unslash( $_GET['wcf-key'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! empty( $order_key ) && ! empty( $order_id ) ) { $order = wc_get_order( $order_id ); $field = isset( $atts['field'] ) ? sanitize_text_field( $atts['field'] ) : ''; // Validate order key. if ( ! $order || $order->get_order_key() !== $order_key ) { return $output; } $order_data = $order->get_data(); $type = isset( $atts['type'] ) ? sanitize_text_field( $atts['type'] ) : 'billing'; if ( 'billing' === $type || 'shipping' === $type ) { $details = isset( $order_data[ $type ] ) ? $order_data[ $type ] : array(); if ( '' !== $field ) { if ( ! empty( $details ) && isset( $details[ $field ] ) && '' !== $details[ $field ] ) { $output = $details[ $field ]; } } } elseif ( 'total' === $type ) { $field_val = isset( $order_data[ $type ] ) ? $order_data[ $type ] : ''; if ( '' !== $field_val ) { $output = wc_price( $field_val, array( 'decimals' => 0 ) ); } } } return $output; } /** * Optin details shortcode markup. * * @param array $atts attributes ( $atts['key'] can be first_name, last_name, email ). * @return string */ public function url_fields_markup( $atts ) { $output = ''; $def_val = isset( $atts['default'] ) ? sanitize_text_field( $atts['default'] ) : ''; $output = $def_val; $field = isset( $atts['field'] ) ? sanitize_text_field( $atts['field'] ) : ''; if ( ! empty( $field ) && isset( $_GET[ $field ] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $url_param = isset( $_GET[ $field ] ) ? sanitize_text_field( wp_unslash( $_GET[ $field ] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! empty( $url_param ) ) { $output = $url_param; } } return $output; } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Order_Fields_Shortcode::get_instance(); modules/shortcodes/class-cartflows-pro-shortcodes.php000064400000001670147600244370017175 0ustar00get_meta( '_cartflows_offer_child_orders' ); if ( ! empty( $child_orders ) ) { foreach ( $child_orders as $child_id => $child_data ) { $order_id = $child_id; include CARTFLOWS_PRO_THANKYOU_DIR . 'template/child-order-details.php'; } } } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Thankyou_Markup::get_instance(); modules/thankyou/template/child-order-details.php000064400000007247147600244370016242 0ustar00get_items( apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' ) ); $show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) ); $offer_type = $order->get_meta( '_cartflows_offer_type' ); $downloads = $order->get_downloadable_items(); $show_downloads = $order->has_downloadable_item() && $order->is_download_permitted(); if ( $show_downloads ) { wc_get_template( 'order/order-downloads.php', array( 'downloads' => $downloads, 'show_title' => true, ) ); } ?>
    has_status( 'cancelled' ) ) : ?>
    • get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    • get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    has_status( 'cancelled' ) ) : ?>

    (#get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>)

    $item ) { $product = $item->get_product(); wc_get_template( 'order/order-details-item.php', array( 'order' => $order, 'item_id' => $item_id, 'item' => $item, 'show_purchase_note' => $show_purchase_note, 'purchase_note' => $product ? $product->get_purchase_note() : '', 'product' => $product, ) ); } do_action( 'woocommerce_order_details_after_order_table_items', $order ); ?> get_order_item_totals() as $key => $total ) { ?> get_customer_note() ) : ?>
    get_customer_note() ) ) ); ?>
    create_db_tables(); } /** * Create tables for analytics. */ public function create_db_tables() { global $wpdb; if ( get_option( 'cartflows_database_tables_created' ) === 'yes' ) { return; } $visits_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_TABLE; $visits_meta_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_META_TABLE; $charset_collate = $wpdb->get_charset_collate(); // visits db sql command. $sql = "CREATE TABLE $visits_db ( id bigint(20) NOT NULL AUTO_INCREMENT, step_id bigint(20) NOT NULL, date_visited datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, visit_type enum('new','return'), PRIMARY KEY (id) ) $charset_collate;\n"; // visits meta db sql command. $sql .= "CREATE TABLE $visits_meta_db ( id bigint(20) NOT NULL AUTO_INCREMENT, visit_id bigint(20) NOT NULL, meta_key varchar(255) NULL, meta_value longtext NULL, PRIMARY KEY (id) ) $charset_collate;"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $sql ); update_option( 'cartflows_database_tables_created', 'yes' ); } } Cartflows_Pro_Analytics_Db::get_instance(); modules/tracking/class-cartflows-pro-analytics-reports.php000064400000076062147600244370020137 0ustar00get_orders_by_all_flows( $start_date, $end_date ); $gross_sale = 0; $order_count = 0; $total_bump_offer = 0; $cartflows_offer = 0; if ( is_array( $orders ) && ! empty( $orders ) ) { foreach ( $orders as $order ) { $order_id = $order->ID; $order = wc_get_order( $order_id ); $order_total = $order->get_total(); $order_count++; if ( ! $order->has_status( 'cancelled' ) ) { $gross_sale += (float) $order_total; } $bump_product_id = $order->get_meta( '_wcf_bump_product' ); $multiple_obs = $order->get_meta( '_wcf_bump_products' ); $separate_offer_order = $order->get_meta( '_cartflows_parent_flow_id' ); // If Separate order for upsell/downsell is disabled i:e merge in parent order. if ( empty( $separate_offer_order ) ) { foreach ( $order->get_items() as $item_id => $item_data ) { $item_product_id = $item_data->get_product_id(); $item_total = $item_data->get_total(); $is_upsell = wc_get_order_item_meta( $item_id, '_cartflows_upsell', true ); $is_downsell = wc_get_order_item_meta( $item_id, '_cartflows_downsell', true ); // Old order bump. if ( $item_product_id == $bump_product_id ) { $total_bump_offer += $item_total; } // Upsell or Downsell. if ( 'yes' === $is_upsell || 'yes' === $is_downsell ) { $cartflows_offer += number_format( (float) $item_total, 2, '.', '' ); } } // Multiple order bump. if ( is_array( $multiple_obs ) && ! empty( $multiple_obs ) ) { foreach ( $multiple_obs as $key => $data ) { $total_bump_offer += number_format( $data['price'], wc_get_price_decimals(), '.', '' ); } } } else { // If separate order for upsell/downsell is enabled. $is_offer = $order->get_meta( '_cartflows_offer' ); if ( 'yes' === $is_offer ) { $cartflows_offer += number_format( (float) $order_total, 2, '.', '' ); } } } /* Get the Flow IDs. */ $flow_ids = array_column( $orders, 'meta_value' ); /* Calculate the Visits of those flows. */ $visits = $this->fetch_visits_of_all_flows( $flow_ids, $start_date, $end_date ); $analytics_data['total_revenue_raw'] = $gross_sale; $analytics_data['total_revenue'] = str_replace( ' ', '', wc_price( (float) $gross_sale ) ); $analytics_data['total_offers_revenue'] = str_replace( ' ', '', wc_price( (float) $cartflows_offer ) ); $analytics_data['total_bump_revenue'] = str_replace( ' ', '', wc_price( (float) $total_bump_offer ) ); $analytics_data['total_visits'] = $visits; $analytics_data['total_orders'] = $order_count; } global $wpdb; $visit_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_TABLE; $visit_meta_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_META_TABLE; //phpcs:disable WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared $analytics_data['visits_by_date'] = $wpdb->get_results( $wpdb->prepare( "SELECT DATE_FORMAT( date_visited, '%%Y-%%m-%%d') AS OrderDate, COUNT( DISTINCT( $visit_db.id ) ) AS total_visits FROM $visit_db INNER JOIN $visit_meta_db ON $visit_db.id = $visit_meta_db.visit_id WHERE 1 = 1 AND date_visited >= %s AND date_visited <= %s GROUP BY OrderDate ORDER BY OrderDate ASC", $start_date, $end_date ) ); if ( class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) && OrderUtil::custom_orders_table_usage_is_enabled() ) { // HPOS usage is enabled. $order_date_key = 'date_created_gmt'; $order_status_key = 'status'; $order_id_key = 'order_id'; $order_table = $wpdb->prefix . 'wc_orders'; $order_meta_table = $wpdb->prefix . 'wc_orders_meta'; $order_type_key = 'type'; $order_table_id = 'id'; $customer_id_key = 'customer_id'; } else { // Traditional CPT-based orders are in use. $order_date_key = 'post_date'; $order_status_key = 'post_status'; $order_id_key = 'post_id'; $order_table = $wpdb->prefix . 'posts'; $order_meta_table = $wpdb->prefix . 'postmeta'; $order_type_key = 'post_type'; $order_table_id = 'ID'; $customer_id_key = 'post_author'; } $user_table = $wpdb->prefix . 'users'; $merged_offer_revenue = $wpdb->get_results( $wpdb->prepare( "SELECT DATE_FORMAT(orders.$order_date_key, '%%Y-%%m-%%d') AS OrderDate, SUM(meta_price.meta_value) AS Revenue FROM {$wpdb->prefix}woocommerce_order_items AS items JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS meta ON items.order_item_id = meta.order_item_id JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS meta_price ON items.order_item_id = meta_price.order_item_id JOIN $order_table AS orders ON items.order_id = orders.$order_table_id JOIN $order_table AS p ON orders.$order_table_id = p.$order_table_id JOIN $user_table AS u ON p.$customer_id_key = u.ID WHERE (meta.meta_key LIKE %s OR meta.meta_key LIKE %s) AND meta_price.meta_key = '_line_subtotal' AND orders.$order_type_key = 'shop_order' AND orders.$order_status_key IN ('wc-completed', 'wc-processing') AND orders.$order_date_key >= %s AND orders.$order_date_key < %s GROUP BY OrderDate", '%\_cartflows\_upsell', '%\_cartflows\_downsell', $start_date, $end_date ) ); $analytics_data['offer_revenue_by_date'] = $merged_offer_revenue; return $analytics_data; } /** * Get orders data for flow. * * @since 1.6.15 * @param string $start_date start date. * @param string $end_date end date. * * @return int */ public function get_orders_by_all_flows( $start_date, $end_date ) { global $wpdb; if ( $this->is_custom_order_table_enabled() ) { // HPOS usage is enabled. $conditions = array( 'tb1.type' => 'shop_order', ); $order_date_key = 'date_created_gmt'; $order_status_key = 'status'; $order_id_key = 'order_id'; $order_table = $wpdb->prefix . 'wc_orders'; $order_meta_table = $wpdb->prefix . 'wc_orders_meta'; } else { // TraditionalCPT-based orders are in use. $conditions = array( 'tb1.post_type' => 'shop_order', ); $order_date_key = 'post_date'; $order_status_key = 'post_status'; $order_id_key = 'post_id'; $order_table = $wpdb->prefix . 'posts'; $order_meta_table = $wpdb->prefix . 'postmeta'; } $where = $this->get_items_query_where( $conditions ); $where .= ' AND ( tb1.' . $order_date_key . " BETWEEN IF (tb2.meta_key='wcf-analytics-reset-date'>'" . $start_date . "', tb2.meta_key, '" . $start_date . "') AND '" . $end_date . "' )"; $where .= " AND ( ( tb2.meta_key = '_wcf_flow_id' ) OR ( tb2.meta_key = '_cartflows_parent_flow_id' ) )"; $where .= ' AND tb1.' . $order_status_key . " IN ( 'wc-completed', 'wc-processing', 'wc-cancelled' )"; $query = 'SELECT tb1.ID, DATE( tb1.' . $order_status_key . ' ) date, tb2.meta_value FROM ' . $order_table . ' tb1 INNER JOIN ' . $order_meta_table . ' tb2 ON tb1.ID = tb2.' . $order_id_key . ' ' . $where; // @codingStandardsIgnoreStart. return $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared // @codingStandardsIgnoreEnd. } /** * Fetch total visits. * * @param integer $flow_ids flows id. * @param string $start_date start date. * @param string $end_date end date. * * @return array|object|null */ public function fetch_visits_of_all_flows( $flow_ids, $start_date, $end_date ) { global $wpdb; $visit_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_TABLE; $visit_meta_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_META_TABLE; //phpcs:disable WordPress.DB.PreparedSQL $query = $wpdb->prepare( "SELECT COUNT( DISTINCT( $visit_db.id ) ) AS total_visits FROM $visit_db INNER JOIN $visit_meta_db ON $visit_db.id = $visit_meta_db.visit_id WHERE ( date_visited BETWEEN %s AND %s ) GROUP BY step_id ORDER BY NULL", $start_date, $end_date ); // Query is prepared above. $visits = $wpdb->get_results( $query );//phpcs:ignore WordPress.DB.DirectDatabaseQuery //phpcs:enable WordPress.DB.PreparedSQL $total_visits = 0; foreach ( $visits as $visit ) { $total_visits += $visit->total_visits; } return $total_visits; } /** * Visits map. * * @param int $flow_id flow id. * @param array $visits visits data. * @param array $earning earning data. * @return array */ public function visits_map( $flow_id, $visits, $earning ) { $visits_map = array(); foreach ( $visits as $v_in => $v_data ) { $step_id = $v_data->step_id; $v_data_array = (array) $v_data; $visits_map[ $step_id ] = $v_data_array; $step_type = wcf()->utils->get_step_type( $step_id ); $visits_map[ $step_id ]['revenue'] = 0; $visits_map[ $step_id ]['title'] = get_the_title( $step_id ); $visits_map[ $step_id ]['note'] = get_post_meta( $step_id, 'wcf-step-note', true ); $visits_map[ $step_id ]['conversion_rate'] = 0; // Set conversion rate. $conversions = intval( $v_data_array['conversions'] ); $total_visits = intval( $v_data_array['total_visits'] ); if ( $total_visits > 0 ) { $conversion_rate = $conversions / intval( $v_data_array['total_visits'] ) * 100; $visits_map[ $step_id ]['conversion_rate'] = number_format( (float) $conversion_rate, 2, '.', '' ); } switch ( $step_type ) { case 'checkout': $visits_map[ $step_id ]['revenue'] = 0; if ( isset( $earning['checkout'][ $step_id ] ) ) { $visits_map[ $step_id ]['revenue'] = $earning['checkout'][ $step_id ]; } break; case 'upsell': case 'downsell': $visits_map[ $step_id ]['revenue'] = 0; if ( isset( $earning['offer'][ $step_id ] ) ) { $visits_map[ $step_id ]['revenue'] = $earning['offer'][ $step_id ]; } break; } $visits_map[ $step_id ]['revenue'] = number_format( (float) $visits_map[ $step_id ]['revenue'], 2, '.', '' ); } $all_steps = wcf()->flow->get_steps( $flow_id ); foreach ( $all_steps as $in => $step_data ) { $step_id = $step_data['id']; if ( isset( $visits_map[ $step_id ] ) ) { $all_steps[ $in ]['visits'] = $visits_map[ $step_id ]; if ( isset( $step_data['ab-test'] ) ) { $ab_total_visits = 0; $ab_unique_visits = 0; $ab_conversions = 0; $ab_revenue = 0; // If ab test true but ab test ui is off and variations are empty. if ( isset( $step_data['ab-test-variations'] ) && ! empty( $step_data['ab-test-variations'] ) ) { $variations = $step_data['ab-test-variations']; foreach ( $variations as $v_in => $v_data ) { $v_id = $v_data['id']; if ( isset( $visits_map[ $v_id ] ) ) { $all_steps[ $in ]['visits-ab'][ $v_id ] = $visits_map[ $v_id ]; $ab_total_visits = $ab_total_visits + intval( $visits_map[ $v_id ]['total_visits'] ); $ab_unique_visits = $ab_unique_visits + intval( $visits_map[ $v_id ]['unique_visits'] ); $ab_conversions = $ab_conversions + intval( $visits_map[ $v_id ]['conversions'] ); $ab_revenue = $ab_revenue + $visits_map[ $v_id ]['revenue']; } } } else { $ab_total_visits = $all_steps[ $in ]['visits']['total_visits']; $ab_unique_visits = $all_steps[ $in ]['visits']['unique_visits']; $ab_conversions = $all_steps[ $in ]['visits']['conversions']; $ab_revenue = $all_steps[ $in ]['visits']['revenue']; $all_steps[ $in ]['visits-ab'][ $step_id ] = $visits_map[ $step_id ]; } if ( isset( $step_data['ab-test-archived-variations'] ) && ! empty( $step_data['ab-test-archived-variations'] ) ) { /* Add archived variations */ $archived_variations = $step_data['ab-test-archived-variations']; foreach ( $archived_variations as $v_in => $v_data ) { $v_id = $v_data['id']; if ( isset( $visits_map[ $v_id ] ) ) { $all_steps[ $in ]['visits-ab-archived'][ $v_id ] = $visits_map[ $v_id ]; $all_steps[ $in ]['visits-ab-archived'][ $v_id ]['title'] = $v_data['title']; if ( $v_data['deleted'] ) { $all_steps[ $in ]['visits-ab-archived'][ $v_id ]['archived_date'] = '(Deleted on ' . $v_data['date'] . ')'; } else { $all_steps[ $in ]['visits-ab-archived'][ $v_id ]['archived_date'] = '(Archived on ' . $v_data['date'] . ')'; } $all_steps[ $in ]['visits-ab-archived'][ $v_id ]['note'] = isset( $v_data['note'] ) ? $v_data['note'] : ''; $ab_total_visits = $ab_total_visits + intval( $visits_map[ $v_id ]['total_visits'] ); $ab_unique_visits = $ab_unique_visits + intval( $visits_map[ $v_id ]['unique_visits'] ); $ab_conversions = $ab_conversions + intval( $visits_map[ $v_id ]['conversions'] ); $ab_revenue = $ab_revenue + $visits_map[ $v_id ]['revenue']; } } } // Add total count to main step. $all_steps[ $in ]['visits']['total_visits'] = $ab_total_visits; $all_steps[ $in ]['visits']['unique_visits'] = $ab_unique_visits; $all_steps[ $in ]['visits']['conversions'] = $ab_conversions; $all_steps[ $in ]['visits']['revenue'] = str_replace( ' ', '', wc_price( (float) $ab_revenue ) ); // Calculate total conversion count and set to main step. $total_conversion_rate = 0; if ( $ab_total_visits > 0 ) { $total_conversion_rate = $ab_conversions / $ab_total_visits * 100; $total_conversion_rate = number_format( (float) $total_conversion_rate, 2, '.', '' ); } $all_steps[ $in ]['visits']['conversion_rate'] = $total_conversion_rate; } } } return $all_steps; } /** * Fetch total visits. * * @param integer $flow_id flow_id. * @param string $start_date start date. * @param string $end_date end date. * @return array|object|null */ public function fetch_visits( $flow_id, $start_date, $end_date ) { global $wpdb; $visit_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_TABLE; $visit_meta_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_META_TABLE; $start_date = $start_date ? $start_date : gmdate( 'Y-m-d' ); $end_date = $end_date ? $end_date : gmdate( 'Y-m-d' ); $start_date = gmdate( 'Y-m-d H:i:s', strtotime( $start_date . '00:00:00' ) ); $end_date = gmdate( 'Y-m-d H:i:s', strtotime( $end_date . '23:59:59' ) ); // Need to look into date format later. $analytics_reset_date = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-analytics-reset-date' ); if ( $analytics_reset_date > $start_date ) { $start_date = $analytics_reset_date; } $steps = wcf()->flow->get_steps( $flow_id ); $all_steps = array(); foreach ( $steps as $s_key => $s_data ) { if ( isset( $s_data['ab-test'] ) ) { if ( isset( $s_data['ab-test-variations'] ) && ! empty( $s_data['ab-test-variations'] ) ) { foreach ( $s_data['ab-test-variations'] as $v_key => $v_data ) { $all_steps[] = $v_data['id']; } } else { $all_steps[] = $s_data['id']; } if ( isset( $s_data['ab-test-archived-variations'] ) && ! empty( $s_data['ab-test-archived-variations'] ) ) { foreach ( $s_data['ab-test-archived-variations'] as $av_key => $av_data ) { $all_steps[] = $av_data['id']; } } } else { $all_steps[] = $s_data['id']; } } $step_ids = implode( ', ', $all_steps ); if ( empty( $step_ids ) ) { return array( 'step_id' => 0, 'total_visits' => 0, 'unique_visits' => 0, 'conversions' => 0, 'revenue' => 0, ); } // phpcs:disable WordPress.DB.PreparedSQL $query = $wpdb->prepare( "SELECT step_id, COUNT( DISTINCT( $visit_db.id ) ) AS total_visits, COUNT( DISTINCT( CASE WHEN visit_type = 'new' THEN $visit_db.id ELSE NULL END ) ) AS unique_visits, COUNT( CASE WHEN $visit_meta_db.meta_key = 'conversion' AND $visit_meta_db.meta_value = 'yes' THEN step_id ELSE NULL END ) AS conversions FROM $visit_db INNER JOIN $visit_meta_db ON $visit_db.id = $visit_meta_db.visit_id WHERE step_id IN ( $step_ids ) AND ( date_visited BETWEEN %s AND %s ) GROUP BY step_id ORDER BY NULL", $start_date, $end_date ); $visits = $wpdb->get_results( $query ); //phpcs:ignore WordPress.DB.DirectDatabaseQuery // phpcs:enable WordPress.DB.PreparedSQL $visited_steps = wp_list_pluck( (array) $visits, 'step_id' ); $non_visited_steps = array_diff( $all_steps, $visited_steps ); // Non visited steps. if ( $non_visited_steps ) { $non_visit = array( 'step_id' => 0, 'total_visits' => 0, 'unique_visits' => 0, 'conversions' => 0, 'revenue' => 0, ); foreach ( $non_visited_steps as $non_visited_step ) { $non_visit['step_id'] = $non_visited_step; array_push( $visits, (object) $non_visit ); } } $step_ids_array = wp_list_pluck( (array) $steps, 'id' ); usort( $visits, function ( $a, $b ) use ( $all_steps ) { return array_search( intval( $a->step_id ), $all_steps, true ) - array_search( intval( $b->step_id ), $all_steps, true ); } ); // phpcs:enable return $visits; } /** * Calculate earning. * * @param integer $flow_id flow_id. * @param string $start_date start date. * @param string $end_date end date. * @return array */ public function get_earnings( $flow_id, $start_date, $end_date ) { $orders = $this->get_orders_by_flow( $flow_id, $start_date, $end_date ); $gross_sale = 0; $checkout_total = 0; $avg_order_value = 0; $total_bump_offer_earning = 0; $checkout_earnings = array(); $offer_earnings = array(); $order_count = 0; if ( ! empty( $orders ) ) { foreach ( $orders as $order ) { $order_id = $order->ID; $order = wc_get_order( $order_id ); $user_id = $order->get_user_id(); $order_total = $order->get_total(); if ( ! $order->has_status( 'cancelled' ) ) { $gross_sale += (float) $order_total; $checkout_total = (float) $order_total; } $bump_product_id = $order->get_meta( '_wcf_bump_product' ); $multiple_obs = $order->get_meta( '_wcf_bump_products' ); $separate_offer_order = $order->get_meta( '_cartflows_parent_flow_id' ); $checkout_id = $order->get_meta( '_wcf_checkout_id' ); if ( empty( $separate_offer_order ) ) { // We are doing this for main order and not for the other order such as Upsell/Downsells. $order_count++; foreach ( $order->get_items() as $item_id => $item_data ) { $item_product_id = $item_data->get_product_id(); $item_total = $item_data->get_total(); $is_upsell = wc_get_order_item_meta( $item_id, '_cartflows_upsell', true ); $is_downsell = wc_get_order_item_meta( $item_id, '_cartflows_downsell', true ); $offer_step_id = wc_get_order_item_meta( $item_id, '_cartflows_step_id', true ); if ( 'yes' === $is_upsell ) { $checkout_total -= $item_total; if ( ! isset( $offer_earnings[ $offer_step_id ] ) ) { $offer_earnings[ $offer_step_id ] = 0; } $offer_earnings[ $offer_step_id ] += number_format( (float) $item_total, 2, '.', '' ); } if ( 'yes' === $is_downsell ) { $checkout_total -= $item_total; if ( ! isset( $offer_earnings[ $offer_step_id ] ) ) { $offer_earnings[ $offer_step_id ] = 0; } $offer_earnings[ $offer_step_id ] += number_format( (float) $item_total, 2, '.', '' ); } if ( $item_product_id == $bump_product_id ) { $total_bump_offer_earning += $item_total; $checkout_total -= $item_total; } } // Multiple order bump. if ( is_array( $multiple_obs ) && ! empty( $multiple_obs ) ) { foreach ( $multiple_obs as $key => $data ) { $total_bump_offer_earning += number_format( $data['price'], wc_get_price_decimals(), '.', '' ); } } } else { // Calculate the current upsell/downsell's earnings for the same order. $is_offer = $order->get_meta( '_cartflows_offer' ); $offer_step_id = $order->get_meta( '_cartflows_offer_step_id', true ); if ( 'yes' === $is_offer ) { $checkout_total -= $order_total; if ( ! isset( $offer_earnings[ $offer_step_id ] ) ) { $offer_earnings[ $offer_step_id ] = 0; } $offer_earnings[ $offer_step_id ] += number_format( (float) $order_total, 2, '.', '' ); } } if ( ! empty( $checkout_id ) ) { if ( ! isset( $checkout_earnings[ $checkout_id ] ) ) { $checkout_earnings[ $checkout_id ] = 0; } $checkout_earnings[ $checkout_id ] = $checkout_earnings[ $checkout_id ] + $checkout_total; } } if ( 0 !== $order_count ) { $avg_order_value = $gross_sale / $order_count; } } $all_earning_data = array( 'order_count' => $order_count, 'avg_order_value' => str_replace( ' ', '', wc_price( (float) $avg_order_value ) ), 'gross_sale' => str_replace( ' ', '', wc_price( (float) $gross_sale ) ), 'checkout_sale' => str_replace( ' ', '', wc_price( (float) $checkout_total ) ), 'offer' => $offer_earnings, 'checkout' => $checkout_earnings, 'bump_offer' => str_replace( ' ', '', wc_price( (float) $total_bump_offer_earning ) ), ); return $all_earning_data; } /** * Prepare where items for query. * * @param array $conditions conditions to prepare WHERE query. * @return string */ protected function get_items_query_where( $conditions ) { global $wpdb; $where_conditions = array(); $where_values = array(); foreach ( $conditions as $key => $condition ) { if ( false !== stripos( $key, 'IN' ) ) { $where_conditions[] = $key . '( %s )'; } else { $where_conditions[] = $key . '= %s'; } $where_values[] = $condition; } if ( ! empty( $where_conditions ) ) { // @codingStandardsIgnoreStart return $wpdb->prepare( 'WHERE 1 = 1 AND ' . implode( ' AND ', $where_conditions ), $where_values ); // @codingStandardsIgnoreEnd } else { return ''; } } /** * Get orders data for flow. * * @param int $flow_id flow id. * @param string $start_date start date. * @param string $end_date end date. * @return array */ public function get_orders_by_flow( $flow_id, $start_date, $end_date ) { global $wpdb; $start_date = $start_date ? $start_date : gmdate( 'Y-m-d' ); $end_date = $end_date ? $end_date : gmdate( 'Y-m-d' ); $start_date = gmdate( 'Y-m-d H:i:s', strtotime( $start_date . '00:00:00' ) ); $end_date = gmdate( 'Y-m-d H:i:s', strtotime( $end_date . '23:59:59' ) ); $analytics_reset_date = wcf()->options->get_flow_meta_value( $flow_id, 'wcf-analytics-reset-date' ); if ( $analytics_reset_date > $start_date ) { $start_date = $analytics_reset_date; } if ( $this->is_custom_order_table_enabled() ) { // HPOS usage is enabled. $conditions = array( 'tb1.type' => 'shop_order', ); $order_date_key = 'date_created_gmt'; $order_status_key = 'status'; $order_id_key = 'order_id'; $order_table = $wpdb->prefix . 'wc_orders'; $order_meta_table = $wpdb->prefix . 'wc_orders_meta'; } else { // Traditional CPT-based orders are in use. $conditions = array( 'tb1.post_type' => 'shop_order', ); $order_date_key = 'post_date'; $order_status_key = 'post_status'; $order_id_key = 'post_id'; $order_table = $wpdb->prefix . 'posts'; $order_meta_table = $wpdb->prefix . 'postmeta'; } $where = $this->get_items_query_where( $conditions ); $where .= ' AND ( tb1.' . $order_date_key . " BETWEEN '" . $start_date . "' AND '" . $end_date . "' )"; $where .= " AND ( ( tb2.meta_key = '_wcf_flow_id' AND tb2.meta_value = $flow_id ) OR ( tb2.meta_key = '_cartflows_parent_flow_id' AND tb2.meta_value = $flow_id ) )"; $where .= ' AND tb1.' . $order_status_key . " IN ( 'wc-completed', 'wc-processing', 'wc-cancelled' )"; $query = 'SELECT tb1.ID, DATE( tb1.' . $order_date_key . ' ) date FROM ' . $order_table . ' tb1 INNER JOIN ' . $order_meta_table . ' tb2 ON tb1.ID = tb2.' . $order_id_key . ' ' . $where; // @codingStandardsIgnoreStart $orders = $wpdb->get_results( $query ); // @codingStandardsIgnoreEnd self::$flow_orders = $orders; return $orders; } /** * Check if custom order table enabled. * * @return bool */ public function is_custom_order_table_enabled() { return class_exists( 'Automattic\WooCommerce\Utilities\OrderUtil' ) && OrderUtil::custom_orders_table_usage_is_enabled() ? true : false; } /** * Get revenue of flow. * * @param int $flow_id flow id. * @return int */ public function get_gross_sale_by_flow( $flow_id ) { //phpcs:disable WordPress.DB.SlowDBQuery // Fetch primary orders: Checkout, Order Bumps. $args = array( 'status' => array( 'completed', 'processing', 'cancelled' ), // Accepts a string: one of 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled', or a custom order status. 'meta_key' => '_wcf_flow_id', // Postmeta key field. 'meta_value' => $flow_id, // Postmeta value field. 'meta_compare' => '=', // Possible values are ‘=’, ‘!=’, ‘>’, ‘>=’, ‘<‘, ‘<=’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘EXISTS’ (only in WP >= 3.5), and ‘NOT EXISTS’ (also only in WP >= 3.5). Values ‘REGEXP’, ‘NOT REGEXP’ and ‘RLIKE’ were added in WordPress 3.7. Default value is ‘=’. 'return' => 'ids', // Accepts a string: 'ids' or 'objects'. Default: 'objects'. ); $parent_orders = wc_get_orders( $args ); // Fetch separate/child orders. $args = array( 'status' => array( 'completed', 'processing', 'cancelled' ), // Accepts a string: one of 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled', or a custom order status. 'meta_key' => '_cartflows_parent_flow_id', // Postmeta key field. 'meta_value' => $flow_id, // Postmeta value field. 'meta_compare' => '=', // Possible values are ‘=’, ‘!=’, ‘>’, ‘>=’, ‘<‘, ‘<=’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘EXISTS’ (only in WP >= 3.5), and ‘NOT EXISTS’ (also only in WP >= 3.5). Values ‘REGEXP’, ‘NOT REGEXP’ and ‘RLIKE’ were added in WordPress 3.7. Default value is ‘=’. 'return' => 'ids', // Accepts a string: 'ids' or 'objects'. Default: 'objects'. ); //phpcs:enable WordPress.DB.SlowDBQuery $child_orders = wc_get_orders( $args ); $orders = array_merge( $parent_orders, $child_orders ); $gross_sale = 0; if ( ! empty( $orders ) && is_array( $orders ) ) { foreach ( $orders as $order_id ) { $order = wc_get_order( $order_id ); $user_id = $order->get_user_id(); // skip the orders which are placed by the user whose user role is Administrator. if ( $user_id && user_can( $user_id, 'cartflows_manage_flows_steps' ) ) { continue; } $order_total = $order->get_total(); if ( ! $order->has_status( 'cancelled' ) ) { $gross_sale += (float) $order_total; } } } return $gross_sale; } /** * Get revenue of flow. * * @param int $flow_id flow id. * @return int */ public function get_conversion_by_flow( $flow_id ) { //phpcs:disable WordPress.DB.SlowDBQuery $args = array( 'status' => array( 'completed', 'processing', 'cancelled' ), // Accepts a string: one of 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled', or a custom order status. 'meta_key' => '_wcf_flow_id', // Postmeta key field. 'meta_value' => $flow_id, // Postmeta value field. 'meta_compare' => '=', // Possible values are ‘=’, ‘!=’, ‘>’, ‘>=’, ‘<‘, ‘<=’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘EXISTS’ (only in WP >= 3.5), and ‘NOT EXISTS’ (also only in WP >= 3.5). Values ‘REGEXP’, ‘NOT REGEXP’ and ‘RLIKE’ were added in WordPress 3.7. Default value is ‘=’. 'return' => 'ids', // Accepts a string: 'ids' or 'objects'. Default: 'objects'. ); $parent_orders = wc_get_orders( $args ); $args = array( 'status' => array( 'completed', 'processing', 'cancelled' ), // Accepts a string: one of 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled', or a custom order status. 'meta_key' => '_cartflows_parent_flow_id', // Postmeta key field. 'meta_value' => $flow_id, // Postmeta value field. 'meta_compare' => '=', // Possible values are ‘=’, ‘!=’, ‘>’, ‘>=’, ‘<‘, ‘<=’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘EXISTS’ (only in WP >= 3.5), and ‘NOT EXISTS’ (also only in WP >= 3.5). Values ‘REGEXP’, ‘NOT REGEXP’ and ‘RLIKE’ were added in WordPress 3.7. Default value is ‘=’. 'return' => 'ids', // Accepts a string: 'ids' or 'objects'. Default: 'objects'. ); //phpcs:enable WordPress.DB.SlowDBQuery $child_orders = wc_get_orders( $args ); $orders = array_merge( $parent_orders, $child_orders ); $gross_sale = 0; if ( ! empty( $orders ) && is_array( $orders ) ) { foreach ( $orders as $order_id ) { $order = wc_get_order( $order_id ); $user_id = $order->get_user_id(); // skip the orders which are placed by the user whose user role is Administrator. if ( $user_id && user_can( $user_id, 'cartflows_manage_flows_steps' ) ) { continue; } $order_total = $order->get_total(); if ( ! $order->has_status( 'cancelled' ) ) { $gross_sale += (float) $order_total; } } } return $gross_sale; } } Cartflows_Pro_Analytics_Reports::get_instance(); modules/tracking/class-cartflows-pro-analytics-tracking.php000064400000030342147600244370020232 0ustar00namespace, $this->rest_base, array( array( 'methods' => 'POST', 'callback' => array( $this, 'save_analytics_data' ), 'permission_callback' => '__return_true', ), ) ); } /** * Save analytics data. * * @param WP_REST_Request $request Full details about the request. */ public function save_analytics_data( $request ) { wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Entering' ); $data = $request->get_body(); if ( ! empty( $data ) ) { $data = json_decode( $data, true ); } $current_flow = isset( $data['flow_id'] ) ? intval( $data['flow_id'] ) : false; $current_step = isset( $data['step_id'] ) ? intval( $data['step_id'] ) : false; $is_returning = isset( $data['is_returning'] ) ? intval( $data['is_returning'] ) : ''; $flow_cookie_data = isset( $data['flow_cookie_data'] ) ? json_decode( $data['flow_cookie_data'], true ) : array(); $step_cookie_data = isset( $data['step_cookie_data'] ) && ! empty( $data['step_cookie_data'] ) ? json_decode( wp_unslash( $data['step_cookie_data'] ), true ) : array(); $url_params = isset( $data['url_params'] ) ? $this->sanitize_url_params( json_decode( wp_unslash( $data['url_params'] ), true ) ) : ''; if ( ! $current_flow || ! $current_step ) { return; } // Skip the tracking if the page is opened in the editor view. if ( Cartflows_Compatibility::get_instance()->is_page_builder_preview() ) { $response = array( 'message' => __( 'Page is opened in a preview mode.', 'cartflows-pro' ), ); $response = new \WP_REST_Response( $response ); $response->set_status( 200 ); return $response; } // Return if the thank you page is opened directly without placing an order. Don't track the visit or a conversion if no proper order is placed. if ( ! $this->is_valid_thank_you_page( $current_step, $url_params ) ) { $response = array( 'message' => __( 'Page is opened directly without placing an order.', 'cartflows-pro' ), ); $response = new \WP_REST_Response( $response ); $response->set_status( 200 ); return $response; } $analytics = wcf()->options->get_flow_meta_value( $current_flow, 'wcf-enable-analytics' ); wcf()->logger->log( 'Is analytics enabled : ' . $analytics ); if ( 'no' === $analytics ) { return; } $wcf_step_obj = wcf_pro_get_step( $current_step ); $flow_id = $wcf_step_obj->get_flow_id(); $prev_control_id = $wcf_step_obj->get_prev_control_id(); $this->save_conversion_data( $flow_id, $prev_control_id, $step_cookie_data ); $current_step_visit_data = $this->save_visit( $current_step, $is_returning ); $response = array( 'success' => true, 'prev_control_id' => $prev_control_id, 'current_step_visit' => wp_json_encode( $current_step_visit_data ), ); $response = rest_ensure_response( $response ); wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Exited' ); return $response; } /** * Save conversion data except upsell/downsell. * * @param int $flow_id flow ID. * @param int $prev_control_id step ID. * @param array $step_cookie_data step cookie data. * * @since 1.6.13 */ public function save_conversion_data( $flow_id, $prev_control_id, $step_cookie_data ) { $this->save_conversion( $flow_id, $prev_control_id, $step_cookie_data, true ); } /** * Save upsell/downsell conversion. * * @param object $order Parent order object data. * @param array $offer_product offer product data. * * @since 1.6.13 */ public function save_offer_conversion( $order, $offer_product ) { // Skip the tracking if the page is opened in the editor view. if ( Cartflows_Compatibility::get_instance()->is_page_builder_preview() ) { return; } $step_id = intval( $offer_product['step_id'] ); // Case: In test mode step id is not available. So getting it from $_POST for correct analytics. if ( empty( $step_id ) ) { $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : false; //phpcs:ignore WordPress.Security.NonceVerification.Missing } $wcf_step_obj = wcf_pro_get_step( $step_id ); $flow_id = $wcf_step_obj->get_flow_id(); $control_id = $wcf_step_obj->get_control_step(); $step_cookie_name = CARTFLOWS_VISITED_STEP_COOKIE . $flow_id; $step_cookie_data = isset( $_COOKIE[ $step_cookie_name ] ) ? json_decode( sanitize_text_field( wp_unslash( $_COOKIE[ $step_cookie_name ] ) ), true ) : array(); //phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE $this->save_conversion( $flow_id, $control_id, $step_cookie_data, false ); } /** * Save single conversion by step id. * * @param int $flow_id flow ID. * @param int $control_id To find and create conversion. * @param array $step_cookie_data step cookie data. * @param bool $exclude_offer exclude offer conversion. * * @since 1.6.13 */ public function save_conversion( $flow_id, $control_id, $step_cookie_data, $exclude_offer = true ) { wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Entering ' ); wcf()->logger->log( PHP_EOL . '==== Log Start ====' . PHP_EOL ); wcf()->logger->log( 'Step cookie data : ' . PHP_EOL . wp_json_encode( $step_cookie_data ) ); if ( $control_id && isset( $step_cookie_data[ $control_id ] ) ) { $prev_step_data = $step_cookie_data[ $control_id ]; $prev_step_type = $prev_step_data['step_type']; $skip_type = array( 'upsell', 'downsell' ); $save_conversion = true; if ( $exclude_offer && in_array( $prev_step_type, $skip_type, true ) ) { $save_conversion = false; } wcf()->logger->log( 'Previous step cookie data : ' . PHP_EOL . wp_json_encode( $prev_step_data ) . PHP_EOL . 'Conversion Saved: ' . $save_conversion . PHP_EOL ); if ( $save_conversion && 'no' === $prev_step_data['conversion'] ) { /* Update entry in db */ global $wpdb; $visit_meta_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_META_TABLE; //phpcs:disable WordPress.DB.SlowDBQuery $wpdb->update( //phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching $visit_meta_db, array( 'visit_id' => $prev_step_data['visit_id'], 'meta_key' => 'conversion', 'meta_value' => 'yes', ), array( 'visit_id' => $prev_step_data['visit_id'], 'meta_key' => 'conversion', ) );// db call ok;. //phpcs:enable WordPress.DB.SlowDBQuery } } wcf()->logger->log( '==== Log End ====' . PHP_EOL ); wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Exit ' ); } /** * Save visits and visit meta in database. * * @param int $step_id step ID. * @param bool $is_returning is returning visitor. * * @since 1.0.0 */ public function save_visit( $step_id, $is_returning ) { wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Entering ' ); global $wpdb; $visit_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_TABLE; $visit_meta_db = $wpdb->prefix . CARTFLOWS_PRO_VISITS_META_TABLE; $visit_type = 'new'; $http_referer = isset( $_SERVER['HTTP_REFERER'] ) ? esc_url_raw( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : ''; if ( $is_returning ) { $visit_type = 'return'; } // insert visit entry. $wpdb->insert( $visit_db, array( 'step_id' => $step_id, 'date_visited' => current_time( 'Y-m-d H:i:s' ), 'visit_type' => $visit_type, ) );// db call ok;. $visit_id = $wpdb->insert_id; wcf()->logger->log( 'Visit recorded : ' . $visit_id ); $meta_data = array( 'http_referer' => $http_referer, 'conversion' => 'no', ); foreach ( $meta_data as $key => $value ) { // make sure there is a key and a value before saving. if ( ! $key || ! $value ) { continue; } $wpdb->insert( $visit_meta_db, array( 'visit_id' => $visit_id, 'meta_key' => $key, 'meta_value' => $value, //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value ) );// db call ok;. } /* Set current visit id */ $wcf_step_obj = wcf_pro_get_step( $step_id ); $step_control_id = $wcf_step_obj->get_control_step(); $step_type = $wcf_step_obj->get_step_type(); wcf()->logger->log( __CLASS__ . '::' . __FUNCTION__ . ' : Exited' ); return array( 'control_step_id' => $step_control_id, 'current_step_id' => $step_id, 'step_type' => $step_type, 'visit_id' => $visit_id, 'conversion' => 'no', ); } /** * Add localize variables. * * @param array $localize localize array. * * @since 1.0.0 */ public function add_localize_vars( $localize ) { global $post; $step_id = $post->ID; $analytics_track_nonce = wp_create_nonce( 'wcf-analytics-nonce-' . $step_id ); $localize['analytics_base_url'] = esc_url( get_home_url() ) . '/wp-json/' . $this->namespace . $this->rest_base; // The URL will be: '/cartflows-pro/v1/flow-analytics/'. $localize['analytics_nonce'] = $analytics_track_nonce; $localize['flow_cookie'] = CARTFLOWS_VISITED_FLOW_COOKIE; $localize['step_cookie'] = CARTFLOWS_VISITED_STEP_COOKIE; /** * Use this filter to modify the cookie expire time. * Reason: Sometimes, few servers does not expires the cookie automatically but have to specify the specific time. * * @since x.x.x */ $localize['analytics_cookie_expire_time'] = intval( apply_filters( 'cartflows_pro_analytics_cookie_expire_time', CARTFLOWS_ANALYTICS_COOKIE_EXPIRE_TIME ) ); return $localize; } /** * Validate the thank you page and restrict the access to track the analytics. * * @param int $step_id Current Step ID. * @param array $url_params Current Step's URL params if available. * @return boolean */ public function is_valid_thank_you_page( $step_id, $url_params ) { if ( 'thankyou' === wcf_get_step_type( $step_id ) ) { //phpcs:disable WordPress.Security.NonceVerification.Recommended if ( isset( $url_params['wcf-key'] ) && isset( $url_params['wcf-order'] ) ) { $order_id = intval( $url_params['wcf-order'] ); $order_key = wc_clean( wp_unslash( $url_params['wcf-key'] ) ); //phpcs:enable WordPress.Security.NonceVerification.Recommended $order = wc_get_order( $order_id ); if ( ! $order || $order->get_order_key() !== $order_key ) { return false; } } else { return false; } } return true; } /** * Sanitize the URL parameters. * * @param array|mixed $params Current URL parameters. * @return array $params sanitized URL parameters. * @since 2.0.2 */ public function sanitize_url_params( $params ) { if ( empty( $params ) ) { return $params; } // Convert the array in the key-value format. $params = array_combine( array_column( $params, 'name' ), array_column( $params, 'value' ) ); $sanitized_params = array(); if ( is_array( $params ) ) { foreach ( $params as $param_key => $param_value ) { $sanitized_params[ sanitize_text_field( $param_key ) ] = sanitize_text_field( $param_value ); } } return $sanitized_params; } } Cartflows_Pro_Analytics_Tracking::get_instance(); modules/upsell/classes/class-cartflows-pro-upsell-markup.php000064400000010261147600244370020401 0ustar00logger->log( 'Start-' . __CLASS__ . '::' . __FUNCTION__ ); $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( $verify_nonce && ! wp_verify_nonce( $nonce, 'wcf_upsell_accepted' ) ) { return; } $offer_action = isset( $_POST['offer_action'] ) ? sanitize_text_field( wp_unslash( $_POST['offer_action'] ) ) : ''; $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $product_id = isset( $_POST['product_id'] ) ? intval( $_POST['product_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $variation_id = ''; $input_qty = ''; if ( isset( $_POST['variation_id'] ) ) { $variation_id = intval( $_POST['variation_id'] ); } if ( isset( $_POST['input_qty'] ) && ! empty( $_POST['input_qty'] ) ) { $input_qty = intval( $_POST['input_qty'] ); } $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Order does not exist', 'cartflows-pro' ), ); if ( $order_id && $product_id ) { $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Upsell Payment Failed', 'cartflows-pro' ), ); $extra_data = array( 'order_id' => $order_id, 'product_id' => $product_id, 'variation_id' => $variation_id, 'input_qty' => $input_qty, 'order_key' => $order_key, 'template_type' => 'upsell', 'action' => 'wcf_upsell_accepted', ); $result = $this->offer_accepted( $step_id, $extra_data, $result ); } wcf()->logger->log( 'End-' . __CLASS__ . '::' . __FUNCTION__ ); // send json. wp_send_json( $result ); } /** * Process upsell rejection * * @return void */ public function process_upsell_rejected() { $nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'wcf_upsell_rejected' ) ) { return; } $step_id = isset( $_POST['step_id'] ) ? intval( $_POST['step_id'] ) : 0; $order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0; $order_key = isset( $_POST['order_key'] ) ? sanitize_text_field( wp_unslash( $_POST['order_key'] ) ) : ''; $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Current Step Not Found', 'cartflows-pro' ), ); if ( $step_id ) { $result = array( 'status' => 'failed', 'redirect' => '#', 'message' => __( 'Order does not exist', 'cartflows-pro' ), ); if ( $order_id ) { $extra_data = array( 'action' => 'offer_rejected', 'order_id' => $order_id, 'order_key' => $order_key, 'template_type' => 'upsell', ); $result = $this->offer_rejected( $step_id, $extra_data, $result ); } } // send json. wp_send_json( $result ); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Pro_Upsell_Markup::get_instance(); modules/upsell/class-cartflows-pro-upsell.php000064400000001625147600244370015453 0ustar00
    cartflows-pro.php000064400000000700147600244370010063 0ustar00setup_classes(); } /** * Include required classes. */ public function setup_classes() { /* Init API */ ApiInit::get_instance(); GlobalSettingsPro::get_instance(); AdminHooks::get_instance(); StoreCheckout::get_instance(); if ( is_admin() ) { /* Ajax init */ AjaxInit::get_instance(); } } } Pro_Admin_Loader::get_instance(); readme.txt000064400000050041147600244370006551 0ustar00=== WooCommerce Checkout & Funnel Builder by CartFlows – Create High Converting Stores For WooCommerce === Contributors: sujaypawar, wpcrafter Tags: woocommerce, funnel builder, sales funnels, elementor, beaver builder Requires at least: 5.8 Tested up to: 6.7 Stable tag: 2.1.4 Requires PHP: 7.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html WooCommerce checkout & funnel builder to boost conversion and revenue with beautiful and optimized checkout pages & funnels. == Description == **#1 WooCommerce Checkout & Funnel Builder For WooCommerce** ★★★★★
    More WooCommerce store owners choose CartFlows than all other checkout options combined. Why? Because CartFlows helps WooCommerce stores sell more! Being free probably helps too! We created CartFlows to make it simple for busy store owners to increase WooCommerce checkout conversions with just a few minutes of effort. You also can create unlimited sales funnels to increase your stores AOV (Average Order Value). [youtube https://www.youtube.com/watch?v=5iFv9Pxwgx0] ## Why Upgrade Your WooCommerce Checkout? ## The easier it is to do something, the more likely people are to do it. That’s the philosophy behind CartFlows. To make it easy for you to streamline store checkout which, in turn, makes it easy for customers to make a purchase. Lets face it, the default WooCommerce checkout doesn’t cut it anymore (if it ever did). You can end up losing sales because there are too many distractions, too much manual effort for the buyer and it just doesn’t flow well. Over the years, we’ve noted repeating trends of what works and what doesn’t for WooCommerce checkouts and the broader eCommerce industry. Everything we learned has been combined into a single, easy-to-use WooCommerce checkout replacement that can improve store conversions with just a few minutes of effort. We call it Modern Checkout. ## Modern Checkout For Conversions ## Introducing a new checkout experience that outperforms the default WooCommerce checkout in every way. * Fresh new modern look and feel * Fast, frictionless checkout for your customers * Optimized to get you more conversions Lets go over each of these WooCommerce checkout improvements one by one: * **Express checkout** – Skip the forms. Let users pay using their preferred payment gateways that directly integrate with CartFlows. * **Single or two column layouts** – Gain greater control with our layout options. Have two columns like most stores or a single column if you want to add more content such as testimonials, guarantees and FAQs. * **Real-time email validation** – Check if the account exists as your customer begins typing their email address. If it does, the password field is automatically displayed. If not, customers can check a box and their checkout details can be used to create their user account! * **Google address autocomplete** – The address field displays address suggestions as your customers begin typing. Once they select an address, the rest of the fields are auto-filled. * **New field interactions** – Have a more compact field layout by placing the labels in the field with an elegant animation as the buyer starts inputting their data. * **Field manager** – Add, remove, and reorder fields on your checkout page easily with the Modern Checkout layout. * **Coupon box control** – We have moved the coupon box to a better location and provided the option to display it collapsed or hide it altogether. * **Order button control** – You can customize the text of the order button and optionally show a padlock and the order total inside the button. * **Order summary box** – As a customer fills out the order, the order summary will follow them. And even better, on mobile it will display collapsed. * **Modern skeleton loader** – With WooCommerce customers see a spinning wheel when they change anything related to the order. It has a really dated look. We fixed it with a modern skeleton loader that is absolutely gorgeous. We want your WooCommerce store to be more profitable than ever, so we are giving you all the above for free. But that’s not all, you can also create high converting sales funnels with our WooCommerce sales funnel builder. ## Why Are Sales Funnels Important? ## You might not realize it, but if you have purchased anything online, you have gone through a sales funnel. They are used in almost every online store you have likely ever visited. Visit Apple’s website. Did you see a shop page and product pages that all look the same, then a checkout? No you didn’t because Apple uses dedicated sales funnels for each of their products. Funnels guide customers step-by-step through the buying or lead generation process. What you want the customer to do at the end may be different, but how you get them there is exactly the same. You may want them to download an eBook, purchase a product, schedule a call, or buy a service, whatever is most relevant to your business. A properly optimized funnel helps users make the journey from being a prospect to a lead or customer, without any distractions. All so you can generate higher ROI and increased profits. Major reasons to have an optimized funnel on your website or online store include: * **Increased average order value:** Increase the average order value (AOV) in your online store with upsells or order bumps. * **Optimized for conversions:** Get more conversions with CartFlows’ optimized checkout pages designed for a better user experience and higher conversions. * **Better return on investment:** Gain higher returns from your marketing or advertising spend with higher AOVs and conversions. ## Why Use CartFlows? ## CartFlows is an all-in-one funnel builder and WooCommerce checkout replacement that is trusted and used by 250,000+ websites. It offers a library of readymade, one-click templates that sell your products and services for you! With a huge list of features and free addons, it is a complete package that enables your website to start making money on autopilot. ## CartFlows Features ## These are just some of the features that make CartFlows the best funnel builder for WooCommerce. * **Ready to import checkout templates:** Choose from a wide variety of high conversion templates for every use case. You can add a professionally crafted, multi-step funnel with one click, or you can build your own funnel and choose individual elements. * **Use Your Page Builder:** CartFlows will work with all popular page builders. We offer templates for Beaver Builder, Elementor, Divi, Gutenberg & Thrive Architect. However, you can use CartFlows with your own templates and your own builder. * **Use your page builder:** CartFlows works with popular page builders. We provide templates for Elementor, Beaver Builder, Divi, Gutenberg and Thrive Architect. You can also use CartFlows with your own templates and your own builder too. * **Conversion tested WooCommerce checkout:** CartFlows replaces the complicated default checkout with an optimized version that can instantly increase conversions, helping you make more money. * **Custom WooCommerce thank you pages:** The customer journey doesn't end after checkout. Create a custom thank you page that guides the customer with the next steps in engagement after the sale. * **WooCommerce checkout page replacement:** Say goodbye to using the same checkout page that everyone else is using. Create the perfect WooCommerce checkout page and replace the default page with ease. * **Conversion insights:** Make informed decisions based on real-time data to prevent issues and optimize funnels. Insights will help you grow your revenue and ensure that your funnels continue to make money on autopilot. * **WooCommerce Facebook Pixel integration:** Add Facebook Pixel to your sales funnels to track ROI from your Facebook ads. Get insights into how you can further optimize your funnels and ads to get maximum results. * **Modern Checkout:** Replace the default WooCommerce checkout with Modern Checkout by CartFlows. Deliver a better user experience and a faster and optimized checkout to help boost conversions and reduce cart abandonment * **Cart abandonment recovery (Free addon):** A free plugin that helps you track cart abandonment and recover lost revenue on autopilot. The plugin works perfectly with CartFlows so you can easily recover abandoned carts and any revenue that would otherwise have been lost. * **Checkout plugins (Free addon):** A free checkout plugin for WooCommerce by CartFlows so you have a better payment gateway on your eCommerce website. With this plugin, you can deliver a faster and frictionless payment process experience with features like express checkout. ## Why Is Cartflows Such a Game-Changer? ## * **Sales Funnel Tools Are Expensive** — Most sales funnel tools carry a hefty fee, from $97 – $297 per month. They are worth every penny because funnels work, but that’s a lot of money. With CartFlows you can unleash the power of funnels for free. * **Sales funnel tools are complicated** — Feel right at home with CartFlows. It integrates with the major page builders so there’s no learning curve. You can get started immediately using the CartFlows with your favorite page builder and design perfect landing pages with ease! * **Sales funnel tools are closed** — Perhaps the worst part of using other funnel builder tools is they are based on a closed platform that limits you in every way. CartFlows is open and sits on top of WordPress and WooCommerce. * **Sales funnel tools lock you in** — We believe in using a platform where everything is on your domain and you control all your data. With CartFlows, you own your data as it’s stored on your web host. ## When To Use Cartflows ## * **Selling physical products** * **Selling online courses** * **Selling event tickets** * **Selling services** * **Selling digital products** * **Selling via dropshipping** * **Selling anything really** * **Lead generation** CartFlows is the perfect ClickFunnels Alternative because it’s built on the world’s most open platform, WordPress. ## Who Should Use CartFlows? ## Anyone who has a WooCommerce website or wants to generate leads should use CartFlows. The CartFlows funnel builder plugin is a *must-have for any WooCommerce store.* It is perfect for: ✔ eCommerce store owners ✔ Course creators ✔ Event organizers ✔ Coaches / Trainers ✔ Dropshippers ✔ Bloggers ✔ Niche sites ✔ Businesses ✔ Local businesses ✔ Startups ✔ Personal brands ✔ Real estate agents ✔ Artists and photographers ## CartFlows Pro Features: Take Your Business to New Heights ## **WooCommerce one-click upsell** Easily add one-click upsell offers to your online store and encourage customers to buy more and increase average order value. **WooCommerce one-click order bumps** Show single or multiple one-click order bump offers on the checkout page to boost sales while customers are in the right frame of mind. **Dynamic "smart" offers** Show customers upsell and order bump offers based on what you know about them. Set conditions to show the right offer at the right time and increase conversion rates. **Canvas Mode** See your entire funnel in a visualized view to better understand the entire customer journey through the funnel. **A/B split testing** Create funnel variations to test and improve their performance. Use data to drive steady improvement for higher conversion rates. ## CartFlows Integrations ## ### Page Builders ### CartFlows works with all WordPress page builders, including: * Elementor * Beaver Builder * Brizy Builder * Divi Builder * Thrive Architect * Gutenberg * Spectra Website Builder * Oxygen Builder * Bricks Builder * And others ### WooCommerce Themes ### CartFlows works with any theme that is compatible with WooCommerce, including: * Astra * Avada * Blocksy * Divi * Flatsome * GeneratePress * Hello Elementor * Hestia * Kadence * Neve * OceanWP * Phlox – by Averta * PopularFX – by Pagelayer * Storefront * Woostify * Zakra ### WordPress Plugins ### CartFlows works with any plugin that is compatible with WooCommerce, including: * Ultimate Addons for Elementor * LearnDash * AliDropship * AffiliateWP * TutorLMS * LifterLMS * WooFunnels * LearnPress * WooCommerce Stripe Payment Gateway * WooCommerce PayPal Payments * WooCommerce Shipping & Tax * WooCommerce Payments * And others ## JOIN THE CARTFLOWS INNER CIRCLE ## **JOIN OUR FACEBOOK GROUP COMMUNITY**: Learn the tricks and techniques that other CartFlows users are using to grow their business. Also, get exciting insider information on upcoming feature releases. == Installation == 1. Upload `cartflows.zip` to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Make sure to disable caching on your checkout and thank you steps == Frequently Asked Questions == = What is a sales funnel? = A sales funnel is a series of steps a buyer takes to purchase a product or service or provide a lead. = Why do I need a sales funnel builder? = It’s a fact that sales funnels have helped businesses to increase conversions and make more sales. But planning and implementing a funnel that works can be difficult and complicated. The CartFlows funnel builder plugin for WooCommerce takes the complexity and difficulty out of funnel building. It provides a set of easy-to-use and effective tools to create funnels that work. = How do I use CartFlows in WordPress/WooCommerce? = CartFlows can be used just like any other plugin. Just download and install it on your WordPress website. = Can I use CartFlows without WooCommerce? = To use CartFlows on your website, you must have WooCommerce installed. Otherwise, you can also install WooCommerce while installing CartFlows. = Do I need any coding and designing skills to create funnels with CartFlows? = No, you don’t need coding or design skills to use CartFlows. It comes with a library of professionally designed and optimized funnel templates for every use case. Just import the template with a single click and start customizing it with your page builder’s drag and drop feature. = Does CartFlows work with my theme? = Great question. While we haven't tested every WordPress theme out there, we designed CartFlows to work with as many themes as possible. If you do run into any issues with your particular theme, our support team will be happy to help resolve it for you. = Does CartFlows work with my page builder? = CartFlows should work with all page builders. We do provide templates for the most popular page builders, but you can just as easily use your own designs. = Does CartFlows work with the Facebook pixel? = Each step has an area to add any custom script. CartFlows also integrates with the free Pixel Caffeine and PixelYourSitePro. = Does CartFlows work with my payment gateway? = A good rule of thumb is, if it works with WooCommerce, it will work with CartFlows. = Can I use shortcodes in CartFlows? = Yes, CartFlows gives you the option to add shortcodes in any funnel step. = Is there a Pro version of CartFlows? = Glad you asked! CartFlows Pro is a powerful addon that adds lots of additional options for your funnels. They include, checkout styles, checkout field control, order bumps, one-click upsells / downsells, quantity changer, variable product selector, Pro templates, training, and more. = How Many Sales Funnels Can I Make With CartFlows? = Most users have fewer than 3 funnels on a single website, so we felt that it is the perfect number for CartFlows. Power users may need more than 3, so in CartFlows Pro, you can have unlimited funnels. As well as additional checkout styles, checkout field control, order bumps, one-click upsells / downsells, quantity changer, variable product selector, pro templates, training, and more. = What makes CartFlows unique from other funnel builders? = CartFlows is different from other SaaS funnel builders or plugins in a number of ways: * It is built for WordPress and WooCommerce * It is much easier to install and get started with * It is full of features aimed to help you boost revenue * It has a library of templates for various use cases * It comes with Canvas Mode, a visual representation of your funnel * The Pro version is much more affordable than other funnel builders = What type of funnels can I create with CartFlows? = With CartFlows, the possibilities are endless. You can create a funnel for just about any use where the selling of a product or service or lead generation is involved. This includes, but is not limited to: * Funnels to sell products * Funnels to sell tickets online * Funnels to sell online courses * Funnels to sell consultancy services * Funnels to generate leads for Webinar * Funnels to generate leads for any other purpose * Funnels for any WooCommerce use case == Screenshots == 1. Add "done for you" funnels to your website with 1 click. 2. Drag and drop interface to reorder your funnel steps. 3. Add products to the checkout form and choose your color and fonts. 4. Beautiful, on brand, checkout pages that eliminate distractions and increase conversions. 5. Easily edit anything with your page builder. == Changelog == = Version 2.1.4 - Thursday, 23rd January 2025 = * Improvement: Enhanced block previews in Gutenberg for Upsell and Downsell steps. * Fix: Resolved an issue where the license activation link redirected users to the General settings page instead of the License settings page. * Fix: Fixed an issue with CartFlows analytics not working when a custom URL was used for the WordPress admin panel. = Version 2.1.3 - Tuesday, 31st December 2024 = * Improvement: Enhanced compatibility with the latest version of Elementor. * Improvement: Updated license restriction messages across all page builders for better clarity when the license is inactive. * Fix: Resolved an error on the CartFlows checkout page when placing an order using the Mollie iDEAL payment method. * Fix: Addressed an issue where the pre-checked order bump did not replace the first product in the cart. = Version 2.1.2 - Tuesday, 10th December 2024 = * Improvement: Added a dedicated "Offer Popup Strings" tab to streamline Offer Step settings. * Fix: Upsell product quantity now automatically sets to 1 if left blank in the backend settings. * Fix: Fixed the next step button visibility issue on the first step of the Two-Step Checkout Layout when using Thrive Architect. * Fix: Resolved an incorrect usage error for the _load_textdomain_just_in_time function. * Fix: Addressed a critical error with the "CartFlows_Pro_Gateway" class on funnel pages in some cases. * Fix: Corrected upsell failures when using the Payment Element and Express Checkout with the Official Stripe plugin. * Fix: Fixed Unicode characters incorrectly appearing in the order details section in the admin panel. * Fix: Resolved an issue where an empty offer product displayed as "undefined" in some cases. * Deprecated: The Step Note field is now marked as soft-deprecated across all steps. = Version 2.1.1 - Tuesday, 19th November 2024 = * Fix: Resolved an issue where Upsell transactions failed when using the WooCommerce Square plugin. * Fix: Fixed a problem where deselecting an Order Bump reduced its quantity to 1 instead of fully removing the item. * Fix: Addressed a bug with the "Order Bump" layout position in the 'After Payment' section, ensuring proper functionality during checkout. * Fix: Fixed incorrect Order Bump placement across layout positions in Instant Checkout. = Version 2.1.0 - Thursday, 7th November 2024 = * New: Bricks Builder Integration for Upsell and Downsell steps with ready-made layouts. * New: SureTriggers Integration for adding workflows for Upsell and Downsell steps if required. * New: Introduced native support for Pinterest Pixel to track activities on CartFlows Upsell and Downsell pages. * New: Introduced native support for Snapchat Pixel to track activities on CartFlows Upsell and Downsell pages. * Improvement: Enhanced analytics API calls with proper response messages. * Fix: Resolved the problem with updating quantities for variable products added in Order Bumps. The full changelog is available [here](https://cartflows.com/product/cartflows-pro/). uninstall.php000064400000002146147600244370007300 0ustar00 $key ) { delete_option( $key ); } wp_clear_scheduled_hook( 'carflows_schedule_normalize_order_status' ); // phpcs:disable $wpdb->get_results( "DROP TABLE IF EXISTS {$wpdb->prefix}cartflows_visits_meta" ); // db call ok; no-cache ok. $wpdb->get_results( "DROP TABLE IF EXISTS {$wpdb->prefix}cartflows_visits" ); // db call ok; no-cache ok. }