| 1 |
<?php |
| 2 |
/** |
| 3 |
* Checkout widgets |
| 4 |
* |
| 5 |
* @package |
| 6 |
*/ |
| 7 |
namespace WPFunnels\Widgets\Elementor; |
| 8 |
|
| 9 |
use Elementor\Controls_Manager; |
| 10 |
use Elementor\Group_Control_Background; |
| 11 |
use Elementor\Group_Control_Border; |
| 12 |
use Elementor\Group_Control_Box_Shadow; |
| 13 |
use Elementor\Group_Control_Typography; |
| 14 |
use Elementor\Widget_Base; |
| 15 |
use WPFunnels\Wpfnl_functions; |
| 16 |
use Elementor\Controls_Stack; |
| 17 |
use WPFunnels\Modules\Frontend\Checkout\Wpfnl_Order_Bump_Rules; |
| 18 |
|
| 19 |
|
| 20 |
if (!defined('ABSPATH')) { |
| 21 |
exit; |
| 22 |
} // Exit if accessed directly |
| 23 |
|
| 24 |
|
| 25 |
/** |
| 26 |
* Funnel sell accept button |
| 27 |
* |
| 28 |
* @since 1.0.0 |
| 29 |
*/ |
| 30 |
class Checkout_Form extends Widget_Base |
| 31 |
{ |
| 32 |
|
| 33 |
/** |
| 34 |
* Register the widget controls. |
| 35 |
* |
| 36 |
* Adds different input fields to allow the user to change and Wpvrize the widget settings. |
| 37 |
* |
| 38 |
* @since 1.0.0 |
| 39 |
* |
| 40 |
* @access protected |
| 41 |
*/ |
| 42 |
// public $hide_section_settings; |
| 43 |
// $hide_section_settings = \WPFunnels\Wpfnl_functions::get_checkout_section_heading_settings( 'order' , get_the_ID() ); |
| 44 |
|
| 45 |
public function __construct( $data = [], $args = null ) { |
| 46 |
parent::__construct( $data, $args ); |
| 47 |
add_action( 'woocommerce_checkout_update_order_review', array( $this, 'apply_place_order_filter_on_ajax_update' ) ); |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* Fired during WooCommerce AJAX checkout update (update_order_review). |
| 52 |
* Reads Place Order settings from post_meta and applies the button filter |
| 53 |
* so the button is customized even during payment section re-renders. |
| 54 |
* |
| 55 |
* @param string $post_data URL-encoded post data string from the AJAX request. |
| 56 |
*/ |
| 57 |
public function apply_place_order_filter_on_ajax_update( $post_data ) { |
| 58 |
$parsed = array(); |
| 59 |
wp_parse_str( $post_data, $parsed ); |
| 60 |
$checkout_id = isset( $parsed['_wpfunnels_checkout_id'] ) ? intval( $parsed['_wpfunnels_checkout_id'] ) : 0; |
| 61 |
if ( ! $checkout_id ) { |
| 62 |
$checkout_id = intval( \WPFunnels\Wpfnl_functions::get_checkout_id_from_post_data() ); |
| 63 |
} |
| 64 |
if ( ! $checkout_id ) { |
| 65 |
$checkout_id = intval( \WPFunnels\Wpfnl_functions::get_checkout_id_from_post( $_POST ) ); |
| 66 |
} |
| 67 |
if ( ! $checkout_id ) { |
| 68 |
return; |
| 69 |
} |
| 70 |
$settings = get_post_meta( $checkout_id, '_wpfnl_place_order_settings', true ); |
| 71 |
if ( empty( $settings ) || ! is_array( $settings ) ) { |
| 72 |
return; |
| 73 |
} |
| 74 |
$place_order_filter = $this->get_place_order_button_filter( $settings ); |
| 75 |
add_filter( 'woocommerce_order_button_html', $place_order_filter ); |
| 76 |
|
| 77 |
$below_text = isset( $settings['placeOrderBelowText'] ) ? $settings['placeOrderBelowText'] : ''; |
| 78 |
if ( ! empty( $below_text ) ) { |
| 79 |
add_action( 'woocommerce_review_order_after_submit', function() use ( $below_text ) { |
| 80 |
echo '<div class="wpfnl-below-place-order-btn">' . wp_kses_post( $below_text ) . '</div>'; |
| 81 |
} ); |
| 82 |
} |
| 83 |
} |
| 84 |
|
| 85 |
/** |
| 86 |
* Build and return the woocommerce_order_button_html filter closure. |
| 87 |
* |
| 88 |
* @param array $settings Widget settings / post meta array. |
| 89 |
* @return \Closure |
| 90 |
*/ |
| 91 |
protected function get_place_order_button_filter( $settings ) { |
| 92 |
$btn_text = isset( $settings['place_order_btn_text'] ) && '' !== $settings['place_order_btn_text'] ? $settings['place_order_btn_text'] : ( isset( $settings['placeOrderBtnText'] ) && '' !== $settings['placeOrderBtnText'] ? $settings['placeOrderBtnText'] : 'Place Order' ); |
| 93 |
$sub_text = isset( $settings['place_order_sub_text'] ) ? $settings['place_order_sub_text'] : ( isset( $settings['placeOrderSubText'] ) ? $settings['placeOrderSubText'] : '' ); |
| 94 |
$enable_icon = isset( $settings['place_order_enable_icon'] ) ? ( 'yes' === $settings['place_order_enable_icon'] ) : ( isset( $settings['placeOrderEnableIcon'] ) ? (bool) $settings['placeOrderEnableIcon'] : false ); |
| 95 |
$icon_style = isset( $settings['place_order_icon_style'] ) ? $settings['place_order_icon_style'] : ( isset( $settings['placeOrderIconStyle'] ) ? $settings['placeOrderIconStyle'] : 'lock1' ); |
| 96 |
$enable_price = isset( $settings['place_order_enable_price'] ) ? ( 'yes' === $settings['place_order_enable_price'] ) : ( isset( $settings['placeOrderEnablePrice'] ) ? (bool) $settings['placeOrderEnablePrice'] : false ); |
| 97 |
|
| 98 |
$icon_svgs = array( |
| 99 |
'lock1' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" data-name="Layer 1" id="Layer_1" viewBox="0 0 128 128"><defs><style>.cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:8px;}</style></defs><title/><path class="cls-1" d="M40,53V35A24,24,0,0,1,64,11h0A24,24,0,0,1,88,35V45a8,8,0,0,1-8,8H36a8,8,0,0,0-8,8v46a8,8,0,0,0,8,8H92a8,8,0,0,0,8-8"/><path class="cls-1" d="M80,53H92a8,8,0,0,1,8,8v46"/><circle cx="64" cy="82" r="8"/></svg>', |
| 100 |
'lock2' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 32 32"><g id="Layer_11" fill="currentColor" data-name="Layer 11"><path d="m24 11.57h-.53v-3.1a7.47 7.47 0 1 0 -14.94 0v3.1h-.53a4 4 0 0 0 -4 4v11.43a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4v-11.43a4 4 0 0 0 -4-4zm-13.47-3.1a5.47 5.47 0 1 1 10.94 0v3.1h-10.94zm15.47 18.53a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2-2v-11.43a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"/><path d="m16 17.926a1.948 1.948 0 0 0 -1.354 3.348v2.371a1 1 0 0 0 1 1h.708a1 1 0 0 0 1-1v-2.371a1.948 1.948 0 0 0 -1.354-3.348z"/></g></svg>', |
| 101 |
'cart1' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" id="Layer_1" enable-background="new 0 0 64 64" height="512" viewBox="0 0 64 64" width="512"><g><g><path d="m25.308 61.679c-3.514 0-6.373-2.859-6.373-6.373s2.859-6.372 6.373-6.372 6.373 2.858 6.373 6.372-2.859 6.373-6.373 6.373zm0-8.745c-1.308 0-2.373 1.064-2.373 2.372 0 1.309 1.064 2.373 2.373 2.373s2.373-1.064 2.373-2.373c0-1.308-1.064-2.372-2.373-2.372z"/><path d="m47.462 61.679c-3.514 0-6.372-2.859-6.372-6.373s2.858-6.372 6.372-6.372 6.373 2.858 6.373 6.372-2.86 6.373-6.373 6.373zm0-8.745c-1.308 0-2.372 1.064-2.372 2.372 0 1.309 1.064 2.373 2.372 2.373 1.309 0 2.373-1.064 2.373-2.373 0-1.308-1.065-2.372-2.373-2.372z"/></g><path d="m52.128 43.994h-31.419c-3.057 0-5.668-2.081-6.35-5.061l-6.521-28.477c-.086-.376-.346-.698-.696-.86l-5.409-2.507c-1.252-.58-1.797-2.066-1.217-3.319.58-1.252 2.067-1.797 3.319-1.217l5.409 2.507c1.743.807 3.04 2.407 3.468 4.28l6.521 28.479c.158.692.765 1.176 1.476 1.176h31.419c.708 0 1.314-.481 1.476-1.171l5.07-21.813c.145-.62-.119-1.071-.288-1.284-.17-.214-.55-.572-1.186-.572h-37c-1.381 0-2.5-1.119-2.5-2.5s1.119-2.5 2.5-2.5h37c1.999 0 3.857.897 5.101 2.462s1.696 3.579 1.244 5.526l-5.071 21.814c-.691 2.965-3.3 5.037-6.346 5.037z"/></g></svg>', |
| 102 |
'checkout' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" xmlns:svg="http://www.w3.org/2000/svg" version="1.1" id="svg2001" xml:space="preserve" width="682.66669" height="682.66669" viewBox="0 0 682.66669 682.66669"><defs id="defs2005"><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2015"><path d="M 0,512 H 512 V 0 H 0 Z" id="path2013"/></clipPath></defs><g id="g2007" transform="matrix(1.3333333,0,0,-1.3333333,0,682.66667)"><g id="g2009"><g id="g2011" clip-path="url(#clipPath2015)"><g id="g2017" transform="translate(106,406)"><path d="M 0,0 H 391 L 331,-210 H 60" style="fill:none;stroke:currentColor;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path2019"/></g><g id="g2021" transform="translate(256,76)"><path d="m 0,0 c 0,-16.568 -13.432,-30 -30,-30 -16.568,0 -30,13.432 -30,30 0,16.568 13.432,30 30,30 C -13.432,30 0,16.568 0,0 Z" style="fill:none;stroke:currentColor;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path2023"/></g><g id="g2025" transform="translate(407,76)"><path d="m 0,0 c 0,-16.568 -13.432,-30 -30,-30 -16.568,0 -30,13.432 -30,30 0,16.568 13.432,30 30,30 C -13.432,30 0,16.568 0,0 Z" style="fill:none;stroke:currentColor;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path2027"/></g><g id="g2029" transform="translate(437,136)"><path d="m 0,0 h -252.459 c -22.301,0 -36.806,23.469 -26.833,43.417 L -271,60" style="fill:none;stroke:currentColor;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path2031"/></g><g id="g2033" transform="translate(15,466)"><path d="M 0,0 H 73.861 C 99.402,-89.409 151,-270 151,-270" style="fill:none;stroke:currentColor;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path2035"/></g></g></g></g></svg>', |
| 103 |
'arrow1' => '<svg width="24" height="24 xmlns="http://www.w3.org/2000/svg" fill="none" height="100" viewBox="0 0 100 100" width="100"><path clip-rule="evenodd" d="m51.2204 22.0537c1.6271-1.6272 4.2653-1.6272 5.8925 0l25 25c1.6272 1.6272 1.6272 4.2654 0 5.8926l-25 25c-1.6272 1.6271-4.2654 1.6271-5.8925 0-1.6272-1.6272-1.6272-4.2654 0-5.8926l17.887-17.8871h-48.2741c-2.3012 0-4.1667-1.8654-4.1667-4.1666s1.8655-4.1667 4.1667-4.1667h48.2741l-17.887-17.887c-1.6272-1.6272-1.6272-4.2654 0-5.8926z" fill="currentColor" fill-rule="evenodd"/></svg>', |
| 104 |
'arrow2' => '<svg fill="currentColor" width="24" height="24" xmlns="http://www.w3.org/2000/svg" height="512" viewBox="0 0 24 24" width="512"><g id="_19" data-name="19"><path d="m12 19a1 1 0 0 1 -.71-1.71l5.3-5.29-5.3-5.29a1 1 0 0 1 1.41-1.41l6 6a1 1 0 0 1 0 1.41l-6 6a1 1 0 0 1 -.7.29z"/><path d="m6 19a1 1 0 0 1 -.71-1.71l5.3-5.29-5.3-5.29a1 1 0 0 1 1.42-1.42l6 6a1 1 0 0 1 0 1.41l-6 6a1 1 0 0 1 -.71.3z"/></g></svg>', |
| 105 |
'arrow3' => '<svg fill="currentColor" width="24" height="24" xmlns="http://www.w3.org/2000/svg" height="512" viewBox="0 0 24 24" width="512"><g id="_15" data-name="15"><path d="m9 19a1 1 0 0 1 -.71-1.71l5.3-5.29-5.3-5.29a1 1 0 0 1 1.42-1.42l6 6a1 1 0 0 1 0 1.41l-6 6a1 1 0 0 1 -.71.3z"/></g></svg>', |
| 106 |
); |
| 107 |
|
| 108 |
return function( $button_html ) use ( $btn_text, $sub_text, $enable_icon, $icon_style, $enable_price, $icon_svgs ) { |
| 109 |
$icon_html = ''; |
| 110 |
if ( $enable_icon ) { |
| 111 |
$icon_svg = isset( $icon_svgs[ $icon_style ] ) ? $icon_svgs[ $icon_style ] : $icon_svgs['lock1']; |
| 112 |
$icon_html = '<span class="wpfnl-place-order-icon">' . $icon_svg . '</span>'; |
| 113 |
} |
| 114 |
|
| 115 |
$price_html = ''; |
| 116 |
if ( $enable_price && function_exists( 'WC' ) && is_object( WC()->cart ) ) { |
| 117 |
$price_html = ' <span class="wpfnl-place-order-price">' . WC()->cart->get_total() . '</span>'; |
| 118 |
} |
| 119 |
|
| 120 |
$sub_text_html = ''; |
| 121 |
if ( ! empty( $sub_text ) ) { |
| 122 |
$sub_text_html = '<span class="wpfnl-place-order-sub-text">' . esc_html( $sub_text ) . '</span>'; |
| 123 |
} |
| 124 |
|
| 125 |
$label = esc_html( $btn_text ); |
| 126 |
return '<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . $label . '" data-value="' . $label . '">' |
| 127 |
. $icon_html |
| 128 |
. '<span class="wpfnl-place-order-text">' . $label . '</span>' |
| 129 |
. $price_html |
| 130 |
. $sub_text_html |
| 131 |
. '</button>'; |
| 132 |
}; |
| 133 |
} |
| 134 |
|
| 135 |
protected function init_controls() { |
| 136 |
if ( version_compare(ELEMENTOR_VERSION, '3.1.0', '>=') ) { |
| 137 |
$this->register_controls(); |
| 138 |
} else { |
| 139 |
$this->_register_controls(); |
| 140 |
} |
| 141 |
} |
| 142 |
|
| 143 |
/** |
| 144 |
* Retrieve the widget name. |
| 145 |
* |
| 146 |
* @return string Widget name. |
| 147 |
* @since 1.0.0 |
| 148 |
* |
| 149 |
* @access public |
| 150 |
*/ |
| 151 |
public function get_name() |
| 152 |
{ |
| 153 |
return 'wpfnl-checkout'; |
| 154 |
} |
| 155 |
|
| 156 |
/** |
| 157 |
* Retrieve the widget title. |
| 158 |
* |
| 159 |
* @return string Widget title. |
| 160 |
* @since 1.0.0 |
| 161 |
* |
| 162 |
* @access public |
| 163 |
*/ |
| 164 |
public function get_title() |
| 165 |
{ |
| 166 |
return __('Checkout', 'wpfnl'); |
| 167 |
} |
| 168 |
|
| 169 |
/** |
| 170 |
* Retrieve the widget icon. |
| 171 |
* |
| 172 |
* @return string Widget icon. |
| 173 |
* @since 1.0.0 |
| 174 |
* |
| 175 |
* @access public |
| 176 |
*order-bump-settings |
| 177 |
*/ |
| 178 |
public function get_icon() |
| 179 |
{ |
| 180 |
return 'icon-wpfnl checkout-icon'; |
| 181 |
} |
| 182 |
|
| 183 |
/** |
| 184 |
* Retrieve the list of categories the widget belongs to. |
| 185 |
* |
| 186 |
* Used to determine where to display the widget in the editor. |
| 187 |
* |
| 188 |
* Note that currently Elementor supports only one category. |
| 189 |
* When multiple categories passed, Elementor uses the first one. |
| 190 |
* |
| 191 |
* @return array Widget categories. |
| 192 |
* @since 1.0.0 |
| 193 |
* |
| 194 |
* @access public |
| 195 |
*/ |
| 196 |
public function get_categories() |
| 197 |
{ |
| 198 |
return ['wp-funnel']; |
| 199 |
} |
| 200 |
|
| 201 |
/** |
| 202 |
* Retrieve the list of scripts the widget depended on. |
| 203 |
* |
| 204 |
* Used to set scripts dependencies required to run the widget. |
| 205 |
* |
| 206 |
* @return array Widget scripts dependencies. |
| 207 |
* @since 1.0.0 |
| 208 |
* |
| 209 |
* @access public |
| 210 |
*/ |
| 211 |
public function get_script_depends() |
| 212 |
{ |
| 213 |
return ['wpfnl-checkout-widget']; |
| 214 |
} |
| 215 |
|
| 216 |
/** |
| 217 |
* Get all funnel steps |
| 218 |
* |
| 219 |
* @since 1.0.0 |
| 220 |
* |
| 221 |
* @access protected |
| 222 |
*/ |
| 223 |
protected function get_steps_array($type = 'upsell') |
| 224 |
{ |
| 225 |
$options = $this->get_prev_next_link_options(); |
| 226 |
$response = []; |
| 227 |
|
| 228 |
if (isset($options[$type])) { |
| 229 |
$prime_data = $options[$type]; |
| 230 |
foreach ($prime_data as $data) { |
| 231 |
$response[$data['id']] = $data['title']; |
| 232 |
} |
| 233 |
} |
| 234 |
return $response; |
| 235 |
} |
| 236 |
|
| 237 |
public function get_prev_next_link_options() |
| 238 |
{ |
| 239 |
$associate_funnel_id = get_post_meta(get_the_ID(), '_funnel_id', true); |
| 240 |
$steps_array = [ |
| 241 |
'upsell' => 'Upsell', |
| 242 |
'downsell' => 'Downsell', |
| 243 |
'thankyou' => 'Thankyou' |
| 244 |
]; |
| 245 |
$option_group = []; |
| 246 |
foreach ($steps_array as $key => $value) { |
| 247 |
$args = [ |
| 248 |
'posts_per_page' => -1, |
| 249 |
'orderby' => 'date', |
| 250 |
'order' => 'DESC', |
| 251 |
'post_type' => WPFNL_STEPS_POST_TYPE, |
| 252 |
'post_status' => 'publish', |
| 253 |
'post__not_in' => [$this->get_id()], |
| 254 |
'meta_query' => [ |
| 255 |
'relation' => 'AND', |
| 256 |
[ |
| 257 |
'key' => '_step_type', |
| 258 |
'value' => $key, |
| 259 |
'compare' => '=', |
| 260 |
], |
| 261 |
[ |
| 262 |
'key' => '_funnel_id', |
| 263 |
'value' => $associate_funnel_id, |
| 264 |
'compare' => '=', |
| 265 |
], |
| 266 |
], |
| 267 |
]; |
| 268 |
$query = new \WP_Query($args); |
| 269 |
$steps = $query->posts; |
| 270 |
if ($steps) { |
| 271 |
foreach ($steps as $s) { |
| 272 |
$option_group[$key][] = [ |
| 273 |
'id' => $s->ID, |
| 274 |
'title' => $s->post_title, |
| 275 |
]; |
| 276 |
} |
| 277 |
} |
| 278 |
} |
| 279 |
return $option_group; |
| 280 |
} |
| 281 |
|
| 282 |
/** |
| 283 |
* Get all WC products |
| 284 |
* |
| 285 |
* @since 1.0.0 |
| 286 |
* |
| 287 |
* @access protected |
| 288 |
*/ |
| 289 |
protected function get_products_array() |
| 290 |
{ |
| 291 |
$products = []; |
| 292 |
$ids = wc_get_products(['return' => 'ids', 'limit' => -1]); |
| 293 |
if( !empty($ids) ){ |
| 294 |
foreach ($ids as $id) { |
| 295 |
$title = get_the_title($id); |
| 296 |
$products[$id] = $title ? $title : ''; |
| 297 |
} |
| 298 |
} |
| 299 |
|
| 300 |
return $products; |
| 301 |
} |
| 302 |
|
| 303 |
/** |
| 304 |
* Order Bump Settings |
| 305 |
* |
| 306 |
* @since 1.0.0 |
| 307 |
* |
| 308 |
* @access protected |
| 309 |
*/ |
| 310 |
protected function order_bump_primary_settings() |
| 311 |
{ |
| 312 |
$default = [ |
| 313 |
]; |
| 314 |
|
| 315 |
$settings = get_post_meta(get_the_ID(), 'order-bump-settings', true); |
| 316 |
|
| 317 |
if ($settings) { |
| 318 |
return $settings; |
| 319 |
} |
| 320 |
|
| 321 |
return $default; |
| 322 |
} |
| 323 |
|
| 324 |
|
| 325 |
/** |
| 326 |
* Get layout types |
| 327 |
* |
| 328 |
* @return array |
| 329 |
*/ |
| 330 |
private function get_layout_types() { |
| 331 |
$layouts = array( |
| 332 |
'wpfnl-col-1' => __('1 Column Checkout', 'wpfnl'), |
| 333 |
'wpfnl-col-2' => __('2 Column Checkout', 'wpfnl'), |
| 334 |
'wpfnl-2-step' => __('2 Step Checkout', 'wpfnl'), |
| 335 |
// 'wpfnl-multistep' => __('Multistep Checkout', 'wpfnl'), |
| 336 |
'wpfnl-modern-multistep' => __('Modern Multistep Checkout', 'wpfnl'), |
| 337 |
'wpfnl-express-checkout' => __('Express Checkout', 'wpfnl'), |
| 338 |
'wpfnl-modern-checkout' => __('Modern Checkout', 'wpfnl'), |
| 339 |
'wpfnl-modern-one-column' => __('Modern One Column Checkout', 'wpfnl'), |
| 340 |
); |
| 341 |
return $layouts; |
| 342 |
} |
| 343 |
|
| 344 |
|
| 345 |
/** |
| 346 |
* Register cart controls controls. |
| 347 |
* |
| 348 |
* @since 1.0.0 |
| 349 |
* @access protected |
| 350 |
*/ |
| 351 |
protected function _register_controls() |
| 352 |
{ |
| 353 |
$this->start_controls_section( |
| 354 |
'section_content', |
| 355 |
[ |
| 356 |
'label' => __('Layout Selection', 'wpfnl'), |
| 357 |
] |
| 358 |
); |
| 359 |
|
| 360 |
$this->add_control( |
| 361 |
'checkout_layout', |
| 362 |
[ |
| 363 |
'label' => __('Select Layout', 'wpfnl'), |
| 364 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 365 |
'default' => 'wpfnl-col-2', |
| 366 |
'label_block' => true, |
| 367 |
'options' => $this->get_layout_types(), |
| 368 |
] |
| 369 |
); |
| 370 |
|
| 371 |
$this->add_control( |
| 372 |
'checkout_floating_label', |
| 373 |
[ |
| 374 |
'label' => __('Floating Label', 'wpfnl'), |
| 375 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 376 |
'default' => '', |
| 377 |
'label_block' => true, |
| 378 |
'options' => array( |
| 379 |
'' => __('Select option', 'wpfnl'), |
| 380 |
'floating-label' => __('Floating Label', 'wpfnl'), |
| 381 |
), |
| 382 |
'separator' => 'after' |
| 383 |
] |
| 384 |
); |
| 385 |
|
| 386 |
if ( ! Wpfnl_functions::is_wpfnl_pro_activated() ) { |
| 387 |
|
| 388 |
$this->add_control( |
| 389 |
'layout_upgrade_pro', |
| 390 |
array( |
| 391 |
'type' => Controls_Manager::RAW_HTML, |
| 392 |
'raw' => sprintf( __( 'This is a pro feature. <a href="https://getwpfunnels.com/pricing/" target="_blank" rel="noopener">Upgrade Now!</a>.', 'wpfnl' )), |
| 393 |
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', |
| 394 |
'condition' => array( |
| 395 |
'checkout_layout' => ['wpfnl-multistep', 'wpfnl-express-checkout', 'wpfnl-2-step'], |
| 396 |
), |
| 397 |
) |
| 398 |
); |
| 399 |
} |
| 400 |
|
| 401 |
$this->end_controls_section(); |
| 402 |
|
| 403 |
$this->register_display_conditions_controls(); |
| 404 |
$this->register_order_bump_controls(); |
| 405 |
$this->register_place_order_controls(); |
| 406 |
|
| 407 |
$this->register_billing_style_controls(); |
| 408 |
$this->register_shipping_style_controls(); |
| 409 |
$this->register_your_order_style_controls(); |
| 410 |
$this->register_payment_section_style_controls(); |
| 411 |
$this->register_coupon_style_controls(); |
| 412 |
$this->register_error_style_controls(); |
| 413 |
$this->register_multistep_style_controls(); |
| 414 |
} |
| 415 |
|
| 416 |
|
| 417 |
/** |
| 418 |
* Register cart controls controls. |
| 419 |
* |
| 420 |
* @since x.x.x |
| 421 |
* @access protected |
| 422 |
*/ |
| 423 |
protected function register_controls() |
| 424 |
{ |
| 425 |
$this->start_controls_section( |
| 426 |
'section_content', |
| 427 |
[ |
| 428 |
'label' => __('Layout Selection', 'wpfnl'), |
| 429 |
] |
| 430 |
); |
| 431 |
|
| 432 |
$this->add_control( |
| 433 |
'checkout_layout', |
| 434 |
[ |
| 435 |
'label' => __('Select Layout', 'wpfnl'), |
| 436 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 437 |
'default' => 'wpfnl-col-2', |
| 438 |
'label_block' => true, |
| 439 |
'options' => $this->get_layout_types(), |
| 440 |
] |
| 441 |
); |
| 442 |
|
| 443 |
$this->add_control( |
| 444 |
'checkout_floating_label', |
| 445 |
[ |
| 446 |
'label' => __('Floating Label', 'wpfnl'), |
| 447 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 448 |
'default' => '', |
| 449 |
'label_block' => true, |
| 450 |
'options' => array( |
| 451 |
'' => __('Select option', 'wpfnl'), |
| 452 |
'floating-label' => __('Floating Label', 'wpfnl'), |
| 453 |
), |
| 454 |
'separator' => 'after' |
| 455 |
] |
| 456 |
); |
| 457 |
|
| 458 |
if ( ! Wpfnl_functions::is_wpfnl_pro_activated() ) { |
| 459 |
|
| 460 |
$this->add_control( |
| 461 |
'layout_upgrade_pro', |
| 462 |
array( |
| 463 |
'type' => Controls_Manager::RAW_HTML, |
| 464 |
'raw' => sprintf( __( 'This is a pro feature. <a href="https://getwpfunnels.com/pricing/" target="_blank" rel="noopener">Upgrade Now!</a>.', 'wpfnl' ) ), |
| 465 |
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', |
| 466 |
'condition' => array( |
| 467 |
'checkout_layout' => ['wpfnl-multistep', 'wpfnl-express-checkout', 'wpfnl-2-step'], |
| 468 |
), |
| 469 |
) |
| 470 |
); |
| 471 |
} |
| 472 |
|
| 473 |
$this->end_controls_section(); |
| 474 |
|
| 475 |
$this->register_display_conditions_controls(); |
| 476 |
$this->register_order_bump_controls(); |
| 477 |
$this->register_place_order_controls(); |
| 478 |
|
| 479 |
$this->register_billing_style_controls(); |
| 480 |
$this->register_shipping_style_controls(); |
| 481 |
$this->register_your_order_style_controls(); |
| 482 |
$this->register_payment_section_style_controls(); |
| 483 |
$this->register_coupon_style_controls(); |
| 484 |
$this->register_error_style_controls(); |
| 485 |
$this->register_multistep_style_controls(); |
| 486 |
} |
| 487 |
|
| 488 |
|
| 489 |
/** |
| 490 |
* Get user roles. |
| 491 |
* |
| 492 |
* Retrieve an array of WordPress user roles. |
| 493 |
* |
| 494 |
* @return array An array containing user roles. |
| 495 |
* @since x.x.x |
| 496 |
* @access protected |
| 497 |
*/ |
| 498 |
protected function get_user_roles() |
| 499 |
{ |
| 500 |
$roles = array( |
| 501 |
'none' => __('None', 'wpfnl'), |
| 502 |
); |
| 503 |
|
| 504 |
if (!function_exists('get_editable_roles')) { |
| 505 |
require_once ABSPATH . 'wp-admin/includes/user.php'; |
| 506 |
} |
| 507 |
|
| 508 |
$wp_roles = get_editable_roles(); |
| 509 |
|
| 510 |
foreach ($wp_roles as $role_key => $role_info) { |
| 511 |
$roles[$role_key] = $role_info['name']; |
| 512 |
} |
| 513 |
|
| 514 |
return $roles; |
| 515 |
} |
| 516 |
|
| 517 |
/** |
| 518 |
* Register Display Conditions Controls. |
| 519 |
* |
| 520 |
* @since x.x.x |
| 521 |
* @access protected |
| 522 |
*/ |
| 523 |
protected function register_display_conditions_controls() |
| 524 |
{ |
| 525 |
$this->start_controls_section( |
| 526 |
'section_display_conditions', |
| 527 |
[ |
| 528 |
'label' => __('Display Conditions', 'wpfnl'), |
| 529 |
] |
| 530 |
); |
| 531 |
|
| 532 |
$this->add_control( |
| 533 |
'display_condition_type', |
| 534 |
[ |
| 535 |
'label' => __('Display Condition', 'wpfnl'), |
| 536 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 537 |
'default' => 'none', |
| 538 |
'options' => [ |
| 539 |
'none' => __('None', 'wpfnl'), |
| 540 |
'user_state' => __('User State', 'wpfnl'), |
| 541 |
'user_role' => __('User Role', 'wpfnl'), |
| 542 |
'browser' => __('Browser', 'wpfnl'), |
| 543 |
'operating_system' => __('Operating System', 'wpfnl'), |
| 544 |
'day' => __('Day', 'wpfnl'), |
| 545 |
], |
| 546 |
] |
| 547 |
); |
| 548 |
|
| 549 |
// User State Conditions |
| 550 |
$this->add_control( |
| 551 |
'hide_from_logged_in', |
| 552 |
[ |
| 553 |
'label' => __('Hide From Logged In User', 'wpfnl'), |
| 554 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 555 |
'label_on' => __('Yes', 'wpfnl'), |
| 556 |
'label_off' => __('No', 'wpfnl'), |
| 557 |
'return_value' => 'yes', |
| 558 |
'default' => 'no', |
| 559 |
'condition' => [ |
| 560 |
'display_condition_type' => 'user_state', |
| 561 |
], |
| 562 |
] |
| 563 |
); |
| 564 |
|
| 565 |
$this->add_control( |
| 566 |
'hide_from_logged_out', |
| 567 |
[ |
| 568 |
'label' => __('Hide From Logged Out User', 'wpfnl'), |
| 569 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 570 |
'label_on' => __('Yes', 'wpfnl'), |
| 571 |
'label_off' => __('No', 'wpfnl'), |
| 572 |
'return_value' => 'yes', |
| 573 |
'default' => 'no', |
| 574 |
'condition' => [ |
| 575 |
'display_condition_type' => 'user_state', |
| 576 |
], |
| 577 |
] |
| 578 |
); |
| 579 |
|
| 580 |
// User Role Condition |
| 581 |
$this->add_control( |
| 582 |
'hide_for_user_role', |
| 583 |
[ |
| 584 |
'label' => __('Hide For User Role', 'wpfnl'), |
| 585 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 586 |
'default' => 'none', |
| 587 |
'options' => $this->get_user_roles(), |
| 588 |
'condition' => [ |
| 589 |
'display_condition_type' => 'user_role', |
| 590 |
], |
| 591 |
] |
| 592 |
); |
| 593 |
|
| 594 |
// Browser Condition |
| 595 |
$this->add_control( |
| 596 |
'hide_on_browser', |
| 597 |
[ |
| 598 |
'label' => __('Hide On Browser', 'wpfnl'), |
| 599 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 600 |
'default' => 'none', |
| 601 |
'options' => [ |
| 602 |
'none' => __('None', 'wpfnl'), |
| 603 |
'mozilla' => __('Mozilla Firefox', 'wpfnl'), |
| 604 |
'chrome' => __('Google Chrome', 'wpfnl'), |
| 605 |
'opera_mini' => __('Opera Mini', 'wpfnl'), |
| 606 |
'safari' => __('Safari', 'wpfnl'), |
| 607 |
'edge' => __('Microsoft Edge', 'wpfnl'), |
| 608 |
], |
| 609 |
'condition' => [ |
| 610 |
'display_condition_type' => 'browser', |
| 611 |
], |
| 612 |
] |
| 613 |
); |
| 614 |
|
| 615 |
// Operating System Condition |
| 616 |
$this->add_control( |
| 617 |
'hide_on_os', |
| 618 |
[ |
| 619 |
'label' => __('Hide On Operating System', 'wpfnl'), |
| 620 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 621 |
'default' => 'none', |
| 622 |
'options' => [ |
| 623 |
'none' => __('None', 'wpfnl'), |
| 624 |
'ios' => __('iOS', 'wpfnl'), |
| 625 |
'android' => __('Android', 'wpfnl'), |
| 626 |
'windows' => __('Windows', 'wpfnl'), |
| 627 |
'macos' => __('MacOS', 'wpfnl'), |
| 628 |
'linux' => __('Linux', 'wpfnl'), |
| 629 |
'sunos' => __('SunOS', 'wpfnl'), |
| 630 |
'openbsd' => __('OpenBSD', 'wpfnl'), |
| 631 |
], |
| 632 |
'condition' => [ |
| 633 |
'display_condition_type' => 'operating_system', |
| 634 |
], |
| 635 |
] |
| 636 |
); |
| 637 |
|
| 638 |
// Day Condition |
| 639 |
$this->add_control( |
| 640 |
'disable_on_days', |
| 641 |
[ |
| 642 |
'label' => __('Select Days You Want To Disable', 'wpfnl'), |
| 643 |
'type' => \Elementor\Controls_Manager::SELECT2, |
| 644 |
'multiple' => true, |
| 645 |
'options' => [ |
| 646 |
'monday' => __('Monday', 'wpfnl'), |
| 647 |
'tuesday' => __('Tuesday', 'wpfnl'), |
| 648 |
'wednesday' => __('Wednesday', 'wpfnl'), |
| 649 |
'thursday' => __('Thursday', 'wpfnl'), |
| 650 |
'friday' => __('Friday', 'wpfnl'), |
| 651 |
'saturday' => __('Saturday', 'wpfnl'), |
| 652 |
'sunday' => __('Sunday', 'wpfnl'), |
| 653 |
], |
| 654 |
'condition' => [ |
| 655 |
'display_condition_type' => 'day', |
| 656 |
], |
| 657 |
] |
| 658 |
); |
| 659 |
|
| 660 |
$this->end_controls_section(); |
| 661 |
} |
| 662 |
|
| 663 |
/** |
| 664 |
* Register Place Order Button Controls. |
| 665 |
* |
| 666 |
* @since x.x.x |
| 667 |
* @access protected |
| 668 |
*/ |
| 669 |
protected function register_place_order_controls() |
| 670 |
{ |
| 671 |
$this->start_controls_section( |
| 672 |
'section_place_order', |
| 673 |
[ |
| 674 |
'label' => __( 'Checkout Button', 'wpfnl' ), |
| 675 |
] |
| 676 |
); |
| 677 |
|
| 678 |
$this->add_control( |
| 679 |
'place_order_btn_text', |
| 680 |
[ |
| 681 |
'label' => __( 'Button Text', 'wpfnl' ), |
| 682 |
'type' => Controls_Manager::TEXT, |
| 683 |
'default' => __( 'Place Order', 'wpfnl' ), |
| 684 |
'label_block' => true, |
| 685 |
] |
| 686 |
); |
| 687 |
|
| 688 |
$this->add_control( |
| 689 |
'place_order_sub_text', |
| 690 |
[ |
| 691 |
'label' => __( 'Button Sub Text', 'wpfnl' ), |
| 692 |
'type' => Controls_Manager::TEXT, |
| 693 |
'default' => '', |
| 694 |
'label_block' => true, |
| 695 |
] |
| 696 |
); |
| 697 |
|
| 698 |
$this->add_control( |
| 699 |
'place_order_enable_icon', |
| 700 |
[ |
| 701 |
'label' => __( 'Enable Icon', 'wpfnl' ), |
| 702 |
'type' => Controls_Manager::SWITCHER, |
| 703 |
'default' => '', |
| 704 |
] |
| 705 |
); |
| 706 |
|
| 707 |
$this->add_control( |
| 708 |
'place_order_icon_style', |
| 709 |
[ |
| 710 |
'label' => __( 'Icon Style', 'wpfnl' ), |
| 711 |
'type' => Controls_Manager::SELECT, |
| 712 |
'default' => 'lock1', |
| 713 |
'label_block' => true, |
| 714 |
'options' => [ |
| 715 |
'lock1' => __( 'Lock (Filled)', 'wpfnl' ), |
| 716 |
'lock2' => __( 'Lock (Outlined)', 'wpfnl' ), |
| 717 |
'cart1' => __( 'Shopping Cart', 'wpfnl' ), |
| 718 |
'checkout' => __( 'Checkmark', 'wpfnl' ), |
| 719 |
'arrow1' => __( 'Arrow Right', 'wpfnl' ), |
| 720 |
'arrow2' => __( 'Arrow Chevron', 'wpfnl' ), |
| 721 |
'arrow3' => __( 'Arrow Down', 'wpfnl' ), |
| 722 |
], |
| 723 |
'condition' => [ |
| 724 |
'place_order_enable_icon' => 'yes', |
| 725 |
], |
| 726 |
] |
| 727 |
); |
| 728 |
|
| 729 |
$this->add_control( |
| 730 |
'place_order_enable_price', |
| 731 |
[ |
| 732 |
'label' => __( 'Show Cart Total on Button', 'wpfnl' ), |
| 733 |
'type' => Controls_Manager::SWITCHER, |
| 734 |
'default' => '', |
| 735 |
] |
| 736 |
); |
| 737 |
|
| 738 |
$this->add_control( |
| 739 |
'place_order_below_text', |
| 740 |
[ |
| 741 |
'label' => __( 'Text Below Button', 'wpfnl' ), |
| 742 |
'type' => Controls_Manager::WYSIWYG, |
| 743 |
'default' => '', |
| 744 |
'label_block' => true, |
| 745 |
] |
| 746 |
); |
| 747 |
|
| 748 |
$this->end_controls_section(); |
| 749 |
} |
| 750 |
|
| 751 |
/** |
| 752 |
* Register Order Bump Controls as a dedicated section. |
| 753 |
* |
| 754 |
* @since x.x.x |
| 755 |
* @access protected |
| 756 |
*/ |
| 757 |
protected function register_order_bump_controls() |
| 758 |
{ |
| 759 |
$ob_settings = $this->order_bump_primary_settings(); |
| 760 |
if ( empty( $ob_settings ) ) { |
| 761 |
return; |
| 762 |
} |
| 763 |
|
| 764 |
$this->start_controls_section( |
| 765 |
'section_order_bump', |
| 766 |
[ |
| 767 |
'label' => __( 'Order Bump', 'wpfnl' ), |
| 768 |
] |
| 769 |
); |
| 770 |
|
| 771 |
$this->ob_register_control(); |
| 772 |
|
| 773 |
$this->end_controls_section(); |
| 774 |
} |
| 775 |
|
| 776 |
private function ob_register_control(){ |
| 777 |
$ob_settings = $this->order_bump_primary_settings(); |
| 778 |
if( count($ob_settings) > 0 ){ |
| 779 |
foreach( $ob_settings as $key=>$settings ){ |
| 780 |
$key = (int) $key; |
| 781 |
$index = ((int)($key) + 1); |
| 782 |
|
| 783 |
$this->add_control( |
| 784 |
'order_bump_'.$key, |
| 785 |
[ |
| 786 |
'label' => sprintf( __("Enable Order bump %s", "wpfnl"),$index ), // phpcs:ignore |
| 787 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 788 |
'default' => $settings['isEnabled'] ? 'yes' : 'no', |
| 789 |
'options' => [ |
| 790 |
'yes' => __('Yes', 'wpfnl'), |
| 791 |
'no' => __('No', 'wpfnl'), |
| 792 |
], |
| 793 |
] |
| 794 |
); |
| 795 |
|
| 796 |
$this->add_control( |
| 797 |
'order_bump_position_'.$key, |
| 798 |
[ |
| 799 |
'label' => sprintf( __( "Order bump %s Position", "wpfnl"), $index ), // phpcs:ignore |
| 800 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 801 |
'default' => $ob_settings[$key]['position'], |
| 802 |
'options' => [ |
| 803 |
'before-order' => __('Before Order Details', 'wpfnl'), |
| 804 |
'after-order' => __('After Order Details', 'wpfnl'), |
| 805 |
'before-checkout' => __('Before Checkout Details', 'wpfnl'), |
| 806 |
'after-customer-details' => __('After Customer Details', 'wpfnl'), |
| 807 |
'after-payment' => __('After Payment Options', 'wpfnl'), |
| 808 |
'before-payment' => __('Before Payment Options', 'wpfnl'), |
| 809 |
'popup' => __('Pop-up offer', 'wpfnl'), |
| 810 |
], |
| 811 |
'label_block' => true, |
| 812 |
'condition' => [ |
| 813 |
'order_bump_'.$key => 'yes', |
| 814 |
] |
| 815 |
] |
| 816 |
); |
| 817 |
|
| 818 |
} |
| 819 |
} |
| 820 |
} |
| 821 |
|
| 822 |
/** |
| 823 |
* Register Multistep style Controls. |
| 824 |
* |
| 825 |
* @since x.x.x |
| 826 |
* @access protected |
| 827 |
*/ |
| 828 |
protected function register_multistep_style_controls() |
| 829 |
{ |
| 830 |
$this->start_controls_section( |
| 831 |
'section_multistep_style_fields', |
| 832 |
[ |
| 833 |
'label' => __('Multistep Section', 'wpfnl'), |
| 834 |
'tab' => Controls_Manager::TAB_STYLE, |
| 835 |
'condition' => [ |
| 836 |
'checkout_layout' => ['wpfnl-multistep', 'wpfnl-express-checkout', 'wpfnl-2-step'], |
| 837 |
], |
| 838 |
] |
| 839 |
); |
| 840 |
|
| 841 |
|
| 842 |
// ----start step title style----- |
| 843 |
$this->add_control( |
| 844 |
'step_title_heading', |
| 845 |
[ |
| 846 |
'label' => __('Step Title', 'wpfnl'), |
| 847 |
'type' => Controls_Manager::HEADING, |
| 848 |
'label_block' => true, |
| 849 |
] |
| 850 |
); |
| 851 |
|
| 852 |
$this->add_control( |
| 853 |
'step_title_color', |
| 854 |
[ |
| 855 |
'label' => __('Color', 'wpfnl'), |
| 856 |
'type' => Controls_Manager::COLOR, |
| 857 |
'default' => '#363B4E', |
| 858 |
'selectors' => [ |
| 859 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-title' => 'color: {{VALUE}};' |
| 860 |
], |
| 861 |
|
| 862 |
|
| 863 |
] |
| 864 |
); |
| 865 |
|
| 866 |
$this->add_group_control( |
| 867 |
Group_Control_Typography::get_type(), |
| 868 |
[ |
| 869 |
'name' => 'step_title_typography', |
| 870 |
'label' => 'Typography', |
| 871 |
'selector' => '{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-title', |
| 872 |
] |
| 873 |
); |
| 874 |
|
| 875 |
// ----start active step style----- |
| 876 |
$this->add_control( |
| 877 |
'hr2', |
| 878 |
[ |
| 879 |
'type' => \Elementor\Controls_Manager::DIVIDER, |
| 880 |
] |
| 881 |
); |
| 882 |
|
| 883 |
$this->add_control( |
| 884 |
'multistep_checkout_state', |
| 885 |
[ |
| 886 |
'label' => __('Step State', 'wpfnl'), |
| 887 |
'type' => Controls_Manager::HEADING, |
| 888 |
'label_block' => true, |
| 889 |
] |
| 890 |
); |
| 891 |
|
| 892 |
$this->add_group_control( |
| 893 |
\Elementor\Group_Control_Box_Shadow::get_type(), |
| 894 |
[ |
| 895 |
'name' => 'step_box_shadow', |
| 896 |
'label' => __( 'Box Shadow', 'wpfnl' ), |
| 897 |
'selector' => '{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon', |
| 898 |
] |
| 899 |
); |
| 900 |
|
| 901 |
//----start normal tab style--- |
| 902 |
$this->start_controls_tabs('multistep_checkout_tab'); |
| 903 |
$this->start_controls_tab( |
| 904 |
'multistep_checkout_normal', |
| 905 |
[ |
| 906 |
'label' => __('Normal', 'wpfnl'), |
| 907 |
] |
| 908 |
); |
| 909 |
|
| 910 |
$this->add_control( |
| 911 |
'step_normal_line_color', |
| 912 |
[ |
| 913 |
'label' => __('Line Color', 'wpfnl'), |
| 914 |
'type' => Controls_Manager::COLOR, |
| 915 |
'default' => '#eee', |
| 916 |
'selectors' => [ |
| 917 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard:before' => 'background-color: {{VALUE}};', |
| 918 |
], |
| 919 |
] |
| 920 |
); |
| 921 |
|
| 922 |
$this->add_control( |
| 923 |
'step_normal_box_bgcolor', |
| 924 |
[ |
| 925 |
'label' => __('Box Background Color', 'wpfnl'), |
| 926 |
'type' => Controls_Manager::COLOR, |
| 927 |
'default' => '#e8e8ed', |
| 928 |
'selectors' => [ |
| 929 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'background-color: {{VALUE}};', |
| 930 |
], |
| 931 |
] |
| 932 |
); |
| 933 |
|
| 934 |
$this->add_control( |
| 935 |
'step_normal_icon_color', |
| 936 |
[ |
| 937 |
'label' => __('Icon Color', 'wpfnl'), |
| 938 |
'type' => Controls_Manager::COLOR, |
| 939 |
'default' => '#6E42D3', |
| 940 |
'selectors' => [ |
| 941 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon svg path' => 'fill: {{VALUE}};', |
| 942 |
], |
| 943 |
] |
| 944 |
); |
| 945 |
|
| 946 |
$this->add_control( |
| 947 |
'step_normal_box_border_style', |
| 948 |
[ |
| 949 |
'label' => __('Border Style', 'wpfnl'), |
| 950 |
'type' => Controls_Manager::SELECT, |
| 951 |
'label_block' => false, |
| 952 |
'default' => 'solid', |
| 953 |
'options' => [ |
| 954 |
'inherit' => __('None', 'wpfnl'), |
| 955 |
'solid' => __('Solid', 'wpfnl'), |
| 956 |
'double' => __('Double', 'wpfnl'), |
| 957 |
'dotted' => __('Dotted', 'wpfnl'), |
| 958 |
'dashed' => __('Dashed', 'wpfnl'), |
| 959 |
], |
| 960 |
'selectors' => [ |
| 961 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'border-style: {{VALUE}};', |
| 962 |
], |
| 963 |
] |
| 964 |
); |
| 965 |
|
| 966 |
$this->add_control( |
| 967 |
'step_normal_box_border_size', |
| 968 |
[ |
| 969 |
'label' => __('Border Width', 'wpfnl'), |
| 970 |
'type' => Controls_Manager::DIMENSIONS, |
| 971 |
'size_units' => ['px'], |
| 972 |
'selectors' => [ |
| 973 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 974 |
], |
| 975 |
'condition' => [ |
| 976 |
'step_normal_box_border_style!' => 'inherit', |
| 977 |
] |
| 978 |
] |
| 979 |
); |
| 980 |
|
| 981 |
$this->add_control( |
| 982 |
'step_normal_box_border_color', |
| 983 |
[ |
| 984 |
'label' => __('Border Color', 'wpfnl'), |
| 985 |
'type' => Controls_Manager::COLOR, |
| 986 |
'default' => '#ffffff', |
| 987 |
'selectors' => [ |
| 988 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'border-color: {{VALUE}};', |
| 989 |
], |
| 990 |
'condition' => [ |
| 991 |
'step_normal_box_border_style!' => 'inherit', |
| 992 |
] |
| 993 |
|
| 994 |
] |
| 995 |
); |
| 996 |
|
| 997 |
$this->end_controls_tab(); |
| 998 |
//----end normal tab style--- |
| 999 |
|
| 1000 |
//----active/completed tab style--- |
| 1001 |
$this->start_controls_tab( |
| 1002 |
'multistep_checkout_active', |
| 1003 |
[ |
| 1004 |
'label' => __('Active / Completed', 'wpfnl'), |
| 1005 |
] |
| 1006 |
); |
| 1007 |
|
| 1008 |
$this->add_control( |
| 1009 |
'step_active_line_color', |
| 1010 |
[ |
| 1011 |
'label' => __('Line Color', 'wpfnl'), |
| 1012 |
'type' => Controls_Manager::COLOR, |
| 1013 |
'default' => '#6E42D3', |
| 1014 |
'selectors' => [ |
| 1015 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard > li.completed:before, |
| 1016 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard > li.current:before' => 'background-color: {{VALUE}};', |
| 1017 |
], |
| 1018 |
] |
| 1019 |
); |
| 1020 |
|
| 1021 |
$this->add_control( |
| 1022 |
'step_active_box_bgcolor', |
| 1023 |
[ |
| 1024 |
'label' => __('Box Background Color', 'wpfnl'), |
| 1025 |
'type' => Controls_Manager::COLOR, |
| 1026 |
'default' => '#6E42D3', |
| 1027 |
'selectors' => [ |
| 1028 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 1029 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'background-color: {{VALUE}};', |
| 1030 |
], |
| 1031 |
] |
| 1032 |
); |
| 1033 |
|
| 1034 |
$this->add_control( |
| 1035 |
'step_active_icon_color', |
| 1036 |
[ |
| 1037 |
'label' => __('Icon Color', 'wpfnl'), |
| 1038 |
'type' => Controls_Manager::COLOR, |
| 1039 |
'default' => '#ffffff', |
| 1040 |
'selectors' => [ |
| 1041 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon svg path, |
| 1042 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon svg path' => 'fill: {{VALUE}};', |
| 1043 |
], |
| 1044 |
] |
| 1045 |
); |
| 1046 |
|
| 1047 |
$this->add_control( |
| 1048 |
'step_active_box_border_style', |
| 1049 |
[ |
| 1050 |
'label' => __('Border Style', 'wpfnl'), |
| 1051 |
'type' => Controls_Manager::SELECT, |
| 1052 |
'label_block' => false, |
| 1053 |
'default' => 'solid', |
| 1054 |
'options' => [ |
| 1055 |
'inherit' => __('None', 'wpfnl'), |
| 1056 |
'solid' => __('Solid', 'wpfnl'), |
| 1057 |
'double' => __('Double', 'wpfnl'), |
| 1058 |
'dotted' => __('Dotted', 'wpfnl'), |
| 1059 |
'dashed' => __('Dashed', 'wpfnl'), |
| 1060 |
], |
| 1061 |
'selectors' => [ |
| 1062 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 1063 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'border-style: {{VALUE}};', |
| 1064 |
], |
| 1065 |
] |
| 1066 |
); |
| 1067 |
|
| 1068 |
$this->add_control( |
| 1069 |
'step_active_box_border_size', |
| 1070 |
[ |
| 1071 |
'label' => __('Border Width', 'wpfnl'), |
| 1072 |
'type' => Controls_Manager::DIMENSIONS, |
| 1073 |
'size_units' => ['px'], |
| 1074 |
'selectors' => [ |
| 1075 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 1076 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1077 |
], |
| 1078 |
'condition' => [ |
| 1079 |
'step_active_box_border_style!' => 'inherit', |
| 1080 |
] |
| 1081 |
] |
| 1082 |
); |
| 1083 |
|
| 1084 |
$this->add_control( |
| 1085 |
'step_active_box_border_color', |
| 1086 |
[ |
| 1087 |
'label' => __('Border Color', 'wpfnl'), |
| 1088 |
'type' => Controls_Manager::COLOR, |
| 1089 |
'default' => '#6E42D3', |
| 1090 |
'selectors' => [ |
| 1091 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 1092 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'border-color: {{VALUE}};', |
| 1093 |
], |
| 1094 |
'condition' => [ |
| 1095 |
'step_active_box_border_style!' => 'inherit', |
| 1096 |
] |
| 1097 |
|
| 1098 |
] |
| 1099 |
); |
| 1100 |
|
| 1101 |
$this->end_controls_tab(); |
| 1102 |
$this->end_controls_tabs(); |
| 1103 |
// ----end active step style----- |
| 1104 |
|
| 1105 |
|
| 1106 |
// ----start navigation button style----- |
| 1107 |
$this->add_control( |
| 1108 |
'hr3', |
| 1109 |
[ |
| 1110 |
'type' => \Elementor\Controls_Manager::DIVIDER, |
| 1111 |
] |
| 1112 |
); |
| 1113 |
|
| 1114 |
$this->add_control( |
| 1115 |
'step_navigation_btn', |
| 1116 |
[ |
| 1117 |
'label' => __('Navigation Button', 'wpfnl'), |
| 1118 |
'type' => Controls_Manager::HEADING, |
| 1119 |
'label_block' => true, |
| 1120 |
] |
| 1121 |
); |
| 1122 |
|
| 1123 |
//----start normal tab style--- |
| 1124 |
$this->start_controls_tabs('step_navigation_btn_tab'); |
| 1125 |
$this->start_controls_tab( |
| 1126 |
'step_navigation_btn_normal', |
| 1127 |
[ |
| 1128 |
'label' => __('Normal', 'wpfnl'), |
| 1129 |
] |
| 1130 |
); |
| 1131 |
|
| 1132 |
$this->add_control( |
| 1133 |
'step_navigation_btn_color', |
| 1134 |
[ |
| 1135 |
'label' => __('Color', 'wpfnl'), |
| 1136 |
'type' => Controls_Manager::COLOR, |
| 1137 |
'default' => '', |
| 1138 |
'selectors' => [ |
| 1139 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'color: {{VALUE}}!important;', |
| 1140 |
], |
| 1141 |
] |
| 1142 |
); |
| 1143 |
|
| 1144 |
$this->add_control( |
| 1145 |
'step_navigation_btn_bgcolor', |
| 1146 |
[ |
| 1147 |
'label' => __('Background Color', 'wpfnl'), |
| 1148 |
'type' => Controls_Manager::COLOR, |
| 1149 |
'default' => '', |
| 1150 |
'selectors' => [ |
| 1151 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'background-color: {{VALUE}}!important;', |
| 1152 |
], |
| 1153 |
] |
| 1154 |
); |
| 1155 |
|
| 1156 |
$this->end_controls_tab(); |
| 1157 |
//----end normal tab style--- |
| 1158 |
|
| 1159 |
//----hover tab style--- |
| 1160 |
$this->start_controls_tab( |
| 1161 |
'step_navigation_btn_hover', |
| 1162 |
[ |
| 1163 |
'label' => __('Hover', 'wpfnl'), |
| 1164 |
] |
| 1165 |
); |
| 1166 |
|
| 1167 |
$this->add_control( |
| 1168 |
'step_navigation_btn_hover_color', |
| 1169 |
[ |
| 1170 |
'label' => __('Color', 'wpfnl'), |
| 1171 |
'type' => Controls_Manager::COLOR, |
| 1172 |
'default' => '', |
| 1173 |
'selectors' => [ |
| 1174 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]:not(:disabled):hover' => 'color: {{VALUE}}!important;', |
| 1175 |
], |
| 1176 |
] |
| 1177 |
); |
| 1178 |
|
| 1179 |
$this->add_control( |
| 1180 |
'step_navigation_btn_hover_bgcolor', |
| 1181 |
[ |
| 1182 |
'label' => __('Background Color', 'wpfnl'), |
| 1183 |
'type' => Controls_Manager::COLOR, |
| 1184 |
'default' => '', |
| 1185 |
'selectors' => [ |
| 1186 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]:not(:disabled):hover' => 'background-color: {{VALUE}}!important;', |
| 1187 |
], |
| 1188 |
] |
| 1189 |
); |
| 1190 |
|
| 1191 |
$this->end_controls_tab(); |
| 1192 |
$this->end_controls_tabs(); |
| 1193 |
// ----end hover step style----- |
| 1194 |
|
| 1195 |
$this->add_group_control( |
| 1196 |
Group_Control_Typography::get_type(), |
| 1197 |
[ |
| 1198 |
'name' => 'step_navigation_btn_typography', |
| 1199 |
'label' => 'Typography', |
| 1200 |
'selector' => '{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]', |
| 1201 |
] |
| 1202 |
); |
| 1203 |
|
| 1204 |
$this->add_responsive_control( |
| 1205 |
'step_navigation_btn_padding', |
| 1206 |
[ |
| 1207 |
'label' => __('Padding', 'wpfnl'), |
| 1208 |
'type' => Controls_Manager::DIMENSIONS, |
| 1209 |
'size_units' => ['px', 'em', '%'], |
| 1210 |
'selectors' => [ |
| 1211 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1212 |
], |
| 1213 |
] |
| 1214 |
); |
| 1215 |
|
| 1216 |
$this->add_responsive_control( |
| 1217 |
'step_navigation_btn_radius', |
| 1218 |
[ |
| 1219 |
'label' => __('Radius', 'wpfnl'), |
| 1220 |
'type' => Controls_Manager::DIMENSIONS, |
| 1221 |
'size_units' => ['px', 'em', '%'], |
| 1222 |
'selectors' => [ |
| 1223 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1224 |
], |
| 1225 |
] |
| 1226 |
); |
| 1227 |
|
| 1228 |
$this->end_controls_section(); |
| 1229 |
} |
| 1230 |
|
| 1231 |
/** |
| 1232 |
* Register Sections error Controls. |
| 1233 |
* |
| 1234 |
* @since x.x.x |
| 1235 |
* @access protected |
| 1236 |
*/ |
| 1237 |
protected function register_error_style_controls() |
| 1238 |
{ |
| 1239 |
$this->start_controls_section( |
| 1240 |
'section_error_style_fields', |
| 1241 |
[ |
| 1242 |
'label' => __('Field Validation & Error Messages', 'wpfnl'), |
| 1243 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1244 |
] |
| 1245 |
); |
| 1246 |
|
| 1247 |
$this->add_control( |
| 1248 |
'error_fields_text', |
| 1249 |
[ |
| 1250 |
'label' => __('Field Validation', 'wpfnl'), |
| 1251 |
'type' => Controls_Manager::HEADING, |
| 1252 |
'label_block' => true, |
| 1253 |
] |
| 1254 |
); |
| 1255 |
|
| 1256 |
$this->add_control( |
| 1257 |
'error_label_color', |
| 1258 |
[ |
| 1259 |
'label' => __('Label Color', 'wpfnl'), |
| 1260 |
'type' => Controls_Manager::COLOR, |
| 1261 |
'default' => '', |
| 1262 |
'selectors' => [ |
| 1263 |
'{{WRAPPER}} .woocommerce form .form-row.woocommerce-invalid label' => 'color: {{VALUE}};', |
| 1264 |
], |
| 1265 |
] |
| 1266 |
); |
| 1267 |
|
| 1268 |
$this->add_control( |
| 1269 |
'error_field_border_color', |
| 1270 |
[ |
| 1271 |
'label' => __('Field Border Color', 'wpfnl'), |
| 1272 |
'type' => Controls_Manager::COLOR, |
| 1273 |
'selectors' => [ |
| 1274 |
'{{WRAPPER}} .wpfunnels-checkout-form .select2-container--default.field-required .select2-selection--single, |
| 1275 |
{{WRAPPER}} form .form-row input.input-text.field-required, |
| 1276 |
{{WRAPPER}} form .form-row textarea.input-text.field-required, |
| 1277 |
{{WRAPPER}} #order_review .input-text.field-required |
| 1278 |
{{WRAPPER}} form .form-row.woocommerce-invalid .select2-container, |
| 1279 |
{{WRAPPER}} form .form-row.woocommerce-invalid input.input-text, |
| 1280 |
{{WRAPPER}} form .form-row.woocommerce-invalid select' => 'border-color: {{VALUE}};', |
| 1281 |
|
| 1282 |
], |
| 1283 |
'separator' => 'after', |
| 1284 |
] |
| 1285 |
); |
| 1286 |
|
| 1287 |
$this->add_control( |
| 1288 |
'error_fields_section', |
| 1289 |
[ |
| 1290 |
'label' => __('Error Messages', 'wpfnl'), |
| 1291 |
'type' => Controls_Manager::HEADING, |
| 1292 |
'label_block' => true, |
| 1293 |
] |
| 1294 |
); |
| 1295 |
|
| 1296 |
$this->add_control( |
| 1297 |
'error_text_color', |
| 1298 |
[ |
| 1299 |
'label' => __('Error Message Color', 'wpfnl'), |
| 1300 |
'type' => Controls_Manager::COLOR, |
| 1301 |
'default' => '', |
| 1302 |
'selectors' => [ |
| 1303 |
'{{WRAPPER}} .woocommerce-error, |
| 1304 |
{{WRAPPER}} .woocommerce-NoticeGroup .woocommerce-error, |
| 1305 |
{{WRAPPER}} .woocommerce-notices-wrapper .woocommerce-error' => 'color: {{VALUE}};', |
| 1306 |
], |
| 1307 |
] |
| 1308 |
); |
| 1309 |
|
| 1310 |
$this->add_control( |
| 1311 |
'error_bg_color', |
| 1312 |
[ |
| 1313 |
'label' => __('Background Color', 'wpfnl'), |
| 1314 |
'type' => Controls_Manager::COLOR, |
| 1315 |
'selectors' => [ |
| 1316 |
'{{WRAPPER}} .woocommerce-error, |
| 1317 |
{{WRAPPER}} .woocommerce-NoticeGroup .woocommerce-error, |
| 1318 |
{{WRAPPER}} .woocommerce-notices-wrapper .woocommerce-error' => 'background-color: {{VALUE}};', |
| 1319 |
], |
| 1320 |
] |
| 1321 |
); |
| 1322 |
|
| 1323 |
$this->add_control( |
| 1324 |
'error_border_color', |
| 1325 |
[ |
| 1326 |
'label' => __('Border Color', 'wpfnl'), |
| 1327 |
'type' => Controls_Manager::COLOR, |
| 1328 |
'selectors' => [ |
| 1329 |
'{{WRAPPER}} .woocommerce-error, |
| 1330 |
{{WRAPPER}} .woocommerce-NoticeGroup .woocommerce-error, |
| 1331 |
{{WRAPPER}} .woocommerce-notices-wrapper .woocommerce-error' => 'border-color: {{VALUE}};', |
| 1332 |
'{{WRAPPER}} .woocommerce-error::before' => 'color: {{VALUE}};', |
| 1333 |
|
| 1334 |
], |
| 1335 |
] |
| 1336 |
); |
| 1337 |
|
| 1338 |
$this->end_controls_section(); |
| 1339 |
} |
| 1340 |
|
| 1341 |
/** |
| 1342 |
* Register Sections Style Controls. |
| 1343 |
* |
| 1344 |
* @since x.x.x |
| 1345 |
* @access protected |
| 1346 |
*/ |
| 1347 |
protected function register_payment_section_style_controls() |
| 1348 |
{ |
| 1349 |
$this->start_controls_section( |
| 1350 |
'section_payment_style_fields', |
| 1351 |
[ |
| 1352 |
'label' => __('Payment Section', 'wpfnl'), |
| 1353 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1354 |
] |
| 1355 |
); |
| 1356 |
|
| 1357 |
$this->add_control( |
| 1358 |
'payment_section_text_color', |
| 1359 |
[ |
| 1360 |
'label' => __('Text Color', 'wpfnl'), |
| 1361 |
'type' => Controls_Manager::COLOR, |
| 1362 |
'default' => '', |
| 1363 |
'selectors' => [ |
| 1364 |
'{{WRAPPER}} .wpfnl-checkout #payment .place-order, |
| 1365 |
{{WRAPPER}} .wpfnl-checkout #payment .place-order p' => 'color: {{VALUE}};', |
| 1366 |
], |
| 1367 |
] |
| 1368 |
); |
| 1369 |
|
| 1370 |
$this->add_control( |
| 1371 |
'payment_section_link_color', |
| 1372 |
[ |
| 1373 |
'label' => __('Link Color', 'wpfnl'), |
| 1374 |
'type' => Controls_Manager::COLOR, |
| 1375 |
'default' => '', |
| 1376 |
'selectors' => [ |
| 1377 |
'{{WRAPPER}} .wpfnl-checkout #payment .place-order a' => 'color: {{VALUE}};', |
| 1378 |
], |
| 1379 |
] |
| 1380 |
); |
| 1381 |
|
| 1382 |
$this->add_control( |
| 1383 |
'payment_section_bg_color', |
| 1384 |
[ |
| 1385 |
'label' => __('Background Color', 'wpfnl'), |
| 1386 |
'type' => Controls_Manager::COLOR, |
| 1387 |
'selectors' => [ |
| 1388 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment' => 'background-color: {{VALUE}};', |
| 1389 |
], |
| 1390 |
] |
| 1391 |
); |
| 1392 |
|
| 1393 |
$this->add_group_control( |
| 1394 |
Group_Control_Typography::get_type(), |
| 1395 |
[ |
| 1396 |
'name' => 'payment_section_typography', |
| 1397 |
'label' => 'Typography', |
| 1398 |
'selector' => '{{WRAPPER}} .wpfnl-checkout #payment .place-order, |
| 1399 |
{{WRAPPER}} .wpfnl-checkout #payment .place-order p', |
| 1400 |
] |
| 1401 |
); |
| 1402 |
|
| 1403 |
$this->add_responsive_control( |
| 1404 |
'payment_section_radius', |
| 1405 |
[ |
| 1406 |
'label' => __('Radius', 'wpfnl'), |
| 1407 |
'type' => Controls_Manager::DIMENSIONS, |
| 1408 |
'size_units' => ['px', 'em', '%'], |
| 1409 |
'selectors' => [ |
| 1410 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1411 |
], |
| 1412 |
'separator' => 'after', |
| 1413 |
] |
| 1414 |
); |
| 1415 |
|
| 1416 |
// ----Payment Method style----- |
| 1417 |
$this->add_control( |
| 1418 |
'payment_method_heading_style', |
| 1419 |
[ |
| 1420 |
'label' => __('Payment Method Style', 'wpfnl'), |
| 1421 |
'type' => Controls_Manager::HEADING, |
| 1422 |
'label_block' => true, |
| 1423 |
] |
| 1424 |
); |
| 1425 |
|
| 1426 |
$this->add_group_control( |
| 1427 |
Group_Control_Typography::get_type(), |
| 1428 |
[ |
| 1429 |
'name' => 'payment_method_typography', |
| 1430 |
'label' => 'Typography', |
| 1431 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods li, |
| 1432 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box', |
| 1433 |
] |
| 1434 |
); |
| 1435 |
|
| 1436 |
$this->add_control( |
| 1437 |
'payment_method_color', |
| 1438 |
[ |
| 1439 |
'label' => __('Color', 'wpfnl'), |
| 1440 |
'type' => Controls_Manager::COLOR, |
| 1441 |
'default' => '', |
| 1442 |
'selectors' => [ |
| 1443 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods li' => 'color: {{VALUE}};', |
| 1444 |
], |
| 1445 |
] |
| 1446 |
); |
| 1447 |
|
| 1448 |
$this->add_control( |
| 1449 |
'payment_method_bg_color', |
| 1450 |
[ |
| 1451 |
'label' => __('Background Color', 'wpfnl'), |
| 1452 |
'type' => Controls_Manager::COLOR, |
| 1453 |
'selectors' => [ |
| 1454 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'background-color: {{VALUE}};', |
| 1455 |
], |
| 1456 |
'separator' => 'after' |
| 1457 |
|
| 1458 |
] |
| 1459 |
); |
| 1460 |
|
| 1461 |
$this->add_control( |
| 1462 |
'payment_method_radio_default_color', |
| 1463 |
[ |
| 1464 |
'label' => __('Radio Button Default Color', 'wpfnl'), |
| 1465 |
'type' => Controls_Manager::COLOR, |
| 1466 |
'default' => '', |
| 1467 |
'selectors' => [ |
| 1468 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > label:before, |
| 1469 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods > li > label:before' => 'border-color: {{VALUE}};', |
| 1470 |
], |
| 1471 |
] |
| 1472 |
); |
| 1473 |
|
| 1474 |
$this->add_control( |
| 1475 |
'payment_method_radio_color', |
| 1476 |
[ |
| 1477 |
'label' => __('Radio Button Active Color', 'wpfnl'), |
| 1478 |
'type' => Controls_Manager::COLOR, |
| 1479 |
'default' => '', |
| 1480 |
'selectors' => [ |
| 1481 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > input[type=radio]:checked + label:before, |
| 1482 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods > li > input[type=radio]:checked + label:before' => 'border-color: {{VALUE}};', |
| 1483 |
|
| 1484 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > input[type=radio]:checked + label:after, |
| 1485 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods > li > input[type=radio]:checked + label:after' => 'background-color: {{VALUE}};', |
| 1486 |
], |
| 1487 |
'separator' => 'after' |
| 1488 |
] |
| 1489 |
); |
| 1490 |
|
| 1491 |
$this->add_control( |
| 1492 |
'saved_payment_checkbox_default_color', |
| 1493 |
[ |
| 1494 |
'label' => __('Checkbox Default Color', 'wpfnl'), |
| 1495 |
'type' => Controls_Manager::COLOR, |
| 1496 |
'default' => '', |
| 1497 |
'selectors' => [ |
| 1498 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-saveNew > label:before, |
| 1499 |
{{WRAPPER}} .wpfnl-checkout #mailpoet_woocommerce_checkout_optin_field #mailpoet_woocommerce_checkout_optin' => 'border-color: {{VALUE}};', |
| 1500 |
], |
| 1501 |
] |
| 1502 |
); |
| 1503 |
|
| 1504 |
$this->add_control( |
| 1505 |
'saved_payment_checkbox_color', |
| 1506 |
[ |
| 1507 |
'label' => __('Checkbox Active Color', 'wpfnl'), |
| 1508 |
'type' => Controls_Manager::COLOR, |
| 1509 |
'default' => '', |
| 1510 |
'selectors' => [ |
| 1511 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-saveNew > input[type=checkbox]:checked + label:before, |
| 1512 |
{{WRAPPER}} .wpfnl-checkout #mailpoet_woocommerce_checkout_optin_field #mailpoet_woocommerce_checkout_optin:checked' => 'background-color: {{VALUE}}; border-color: {{VALUE}};', |
| 1513 |
], |
| 1514 |
] |
| 1515 |
); |
| 1516 |
|
| 1517 |
$this->add_control( |
| 1518 |
'saved_payment_checkbox_tic_color', |
| 1519 |
[ |
| 1520 |
'label' => __('Checkbox Tic Sign Color', 'wpfnl'), |
| 1521 |
'type' => Controls_Manager::COLOR, |
| 1522 |
'default' => '', |
| 1523 |
'selectors' => [ |
| 1524 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-saveNew > label:after' => 'border-color: {{VALUE}};', |
| 1525 |
], |
| 1526 |
'separator' => 'after' |
| 1527 |
] |
| 1528 |
); |
| 1529 |
|
| 1530 |
|
| 1531 |
$this->add_control( |
| 1532 |
'payment_method_border_style', |
| 1533 |
[ |
| 1534 |
'label' => __('Border Style', 'wpfnl'), |
| 1535 |
'type' => Controls_Manager::SELECT, |
| 1536 |
'label_block' => false, |
| 1537 |
'default' => '', |
| 1538 |
'options' => [ |
| 1539 |
'' => __('Inherit', 'wpfnl'), |
| 1540 |
'solid' => __('Solid', 'wpfnl'), |
| 1541 |
'double' => __('Double', 'wpfnl'), |
| 1542 |
'dotted' => __('Dotted', 'wpfnl'), |
| 1543 |
'dashed' => __('Dashed', 'wpfnl'), |
| 1544 |
], |
| 1545 |
'selectors' => [ |
| 1546 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-style: {{VALUE}};', |
| 1547 |
], |
| 1548 |
] |
| 1549 |
); |
| 1550 |
|
| 1551 |
$this->add_control( |
| 1552 |
'payment_method_border_size', |
| 1553 |
[ |
| 1554 |
'label' => __('Border Width', 'wpfnl'), |
| 1555 |
'type' => Controls_Manager::DIMENSIONS, |
| 1556 |
'size_units' => ['px'], |
| 1557 |
'selectors' => [ |
| 1558 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1559 |
], |
| 1560 |
] |
| 1561 |
); |
| 1562 |
|
| 1563 |
$this->add_control( |
| 1564 |
'payment_method_border_color', |
| 1565 |
[ |
| 1566 |
'label' => __('Border Color', 'wpfnl'), |
| 1567 |
'type' => Controls_Manager::COLOR, |
| 1568 |
'selectors' => [ |
| 1569 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-color: {{VALUE}};', |
| 1570 |
], |
| 1571 |
|
| 1572 |
] |
| 1573 |
); |
| 1574 |
|
| 1575 |
$this->add_responsive_control( |
| 1576 |
'payment_method_radius', |
| 1577 |
[ |
| 1578 |
'label' => __('Radius', 'wpfnl'), |
| 1579 |
'type' => Controls_Manager::DIMENSIONS, |
| 1580 |
'size_units' => ['px', 'em', '%'], |
| 1581 |
'selectors' => [ |
| 1582 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1583 |
], |
| 1584 |
] |
| 1585 |
); |
| 1586 |
|
| 1587 |
$this->add_responsive_control( |
| 1588 |
'payment_method_padding', |
| 1589 |
[ |
| 1590 |
'label' => __('Padding', 'wpfnl'), |
| 1591 |
'type' => Controls_Manager::DIMENSIONS, |
| 1592 |
'size_units' => ['px', 'em', '%'], |
| 1593 |
'selectors' => [ |
| 1594 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1595 |
], |
| 1596 |
] |
| 1597 |
); |
| 1598 |
|
| 1599 |
$this->add_responsive_control( |
| 1600 |
'payment_method_margin', |
| 1601 |
[ |
| 1602 |
'label' => __('Margin', 'wpfnl'), |
| 1603 |
'type' => Controls_Manager::DIMENSIONS, |
| 1604 |
'size_units' => ['px', 'em', '%'], |
| 1605 |
'selectors' => [ |
| 1606 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1607 |
], |
| 1608 |
'separator' => 'after', |
| 1609 |
] |
| 1610 |
); |
| 1611 |
|
| 1612 |
// ----Payment Box style----- |
| 1613 |
$this->add_control( |
| 1614 |
'payment_box_heading_style', |
| 1615 |
[ |
| 1616 |
'label' => __('Payment Box Style', 'wpfnl'), |
| 1617 |
'type' => Controls_Manager::HEADING, |
| 1618 |
'label_block' => true, |
| 1619 |
] |
| 1620 |
); |
| 1621 |
|
| 1622 |
$this->add_control( |
| 1623 |
'payment_box_txt_color', |
| 1624 |
[ |
| 1625 |
'label' => __('Text Color', 'wpfnl'), |
| 1626 |
'type' => Controls_Manager::COLOR, |
| 1627 |
'default' => '', |
| 1628 |
'selectors' => [ |
| 1629 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'color: {{VALUE}};', |
| 1630 |
], |
| 1631 |
] |
| 1632 |
); |
| 1633 |
|
| 1634 |
$this->add_control( |
| 1635 |
'payment_box_bg_color', |
| 1636 |
[ |
| 1637 |
'label' => __('Background Color', 'wpfnl'), |
| 1638 |
'type' => Controls_Manager::COLOR, |
| 1639 |
'selectors' => [ |
| 1640 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'background-color: {{VALUE}};', |
| 1641 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box:before' => 'border-bottom-color: {{VALUE}};', |
| 1642 |
], |
| 1643 |
|
| 1644 |
] |
| 1645 |
); |
| 1646 |
$this->add_group_control( |
| 1647 |
Group_Control_Typography::get_type(), |
| 1648 |
[ |
| 1649 |
'name' => 'payment_box_typography', |
| 1650 |
'label' => 'Typography', |
| 1651 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box', |
| 1652 |
] |
| 1653 |
); |
| 1654 |
$this->add_responsive_control( |
| 1655 |
'payment_box_radius', |
| 1656 |
[ |
| 1657 |
'label' => __('Radius', 'wpfnl'), |
| 1658 |
'type' => Controls_Manager::DIMENSIONS, |
| 1659 |
'size_units' => ['px', 'em', '%'], |
| 1660 |
'selectors' => [ |
| 1661 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1662 |
], |
| 1663 |
] |
| 1664 |
); |
| 1665 |
|
| 1666 |
$this->add_responsive_control( |
| 1667 |
'payment_box_padding', |
| 1668 |
[ |
| 1669 |
'label' => __('Padding', 'wpfnl'), |
| 1670 |
'type' => Controls_Manager::DIMENSIONS, |
| 1671 |
'size_units' => ['px', 'em', '%'], |
| 1672 |
'selectors' => [ |
| 1673 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1674 |
], |
| 1675 |
] |
| 1676 |
); |
| 1677 |
|
| 1678 |
$this->add_responsive_control( |
| 1679 |
'payment_box_margin', |
| 1680 |
[ |
| 1681 |
'label' => __('Margin', 'wpfnl'), |
| 1682 |
'type' => Controls_Manager::DIMENSIONS, |
| 1683 |
'size_units' => ['px', 'em', '%'], |
| 1684 |
'selectors' => [ |
| 1685 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1686 |
], |
| 1687 |
'separator' => 'after', |
| 1688 |
] |
| 1689 |
); |
| 1690 |
|
| 1691 |
|
| 1692 |
// ----Order Button style----- |
| 1693 |
$this->add_control( |
| 1694 |
'order_button_heading_style', |
| 1695 |
[ |
| 1696 |
'label' => __('Order Button Style', 'wpfnl'), |
| 1697 |
'type' => Controls_Manager::HEADING, |
| 1698 |
'label_block' => true, |
| 1699 |
] |
| 1700 |
); |
| 1701 |
|
| 1702 |
$this->add_group_control( |
| 1703 |
Group_Control_Typography::get_type(), |
| 1704 |
[ |
| 1705 |
'name' => 'order_button_typography', |
| 1706 |
'label' => 'Typography', |
| 1707 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order', |
| 1708 |
] |
| 1709 |
); |
| 1710 |
|
| 1711 |
$this->start_controls_tabs('order_button_tab'); |
| 1712 |
$this->start_controls_tab( |
| 1713 |
'order_button_normal', |
| 1714 |
[ |
| 1715 |
'label' => __('Normal', 'wpfnl'), |
| 1716 |
] |
| 1717 |
); |
| 1718 |
|
| 1719 |
$this->add_control( |
| 1720 |
'order_button_color', |
| 1721 |
[ |
| 1722 |
'label' => __('Color', 'wpfnl'), |
| 1723 |
'type' => Controls_Manager::COLOR, |
| 1724 |
'default' => '', |
| 1725 |
'selectors' => [ |
| 1726 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'color: {{VALUE}};', |
| 1727 |
], |
| 1728 |
] |
| 1729 |
); |
| 1730 |
|
| 1731 |
$this->add_control( |
| 1732 |
'order_button_bg_color', |
| 1733 |
[ |
| 1734 |
'label' => __('Background Color', 'wpfnl'), |
| 1735 |
'type' => Controls_Manager::COLOR, |
| 1736 |
'selectors' => [ |
| 1737 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'background-color: {{VALUE}};', |
| 1738 |
], |
| 1739 |
|
| 1740 |
] |
| 1741 |
); |
| 1742 |
|
| 1743 |
$this->add_group_control( |
| 1744 |
Group_Control_Box_Shadow::get_type(), |
| 1745 |
[ |
| 1746 |
'name' => 'order_button_box_shadow', |
| 1747 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order', |
| 1748 |
] |
| 1749 |
); |
| 1750 |
$this->end_controls_tab(); |
| 1751 |
|
| 1752 |
//----hover style--- |
| 1753 |
$this->start_controls_tab( |
| 1754 |
'order_button_button_hover', |
| 1755 |
[ |
| 1756 |
'label' => __('Hover', 'wpfnl'), |
| 1757 |
] |
| 1758 |
); |
| 1759 |
|
| 1760 |
$this->add_control( |
| 1761 |
'order_button_color_hover', |
| 1762 |
[ |
| 1763 |
'label' => __('Color', 'wpfnl'), |
| 1764 |
'type' => Controls_Manager::COLOR, |
| 1765 |
'default' => '', |
| 1766 |
'selectors' => [ |
| 1767 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order:hover' => 'color: {{VALUE}};', |
| 1768 |
], |
| 1769 |
] |
| 1770 |
); |
| 1771 |
|
| 1772 |
$this->add_control( |
| 1773 |
'order_button_bg_color_hover', |
| 1774 |
[ |
| 1775 |
'label' => __('Background Color', 'wpfnl'), |
| 1776 |
'type' => Controls_Manager::COLOR, |
| 1777 |
'selectors' => [ |
| 1778 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order:hover' => 'background-color: {{VALUE}};', |
| 1779 |
], |
| 1780 |
] |
| 1781 |
); |
| 1782 |
|
| 1783 |
$this->add_group_control( |
| 1784 |
Group_Control_Box_Shadow::get_type(), |
| 1785 |
[ |
| 1786 |
'name' => 'order_button_box_shadow_hover', |
| 1787 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order:hover', |
| 1788 |
] |
| 1789 |
); |
| 1790 |
$this->end_controls_tab(); |
| 1791 |
$this->end_controls_tabs(); |
| 1792 |
//----------------------- |
| 1793 |
|
| 1794 |
$this->add_responsive_control( |
| 1795 |
'order_button_radius', |
| 1796 |
[ |
| 1797 |
'label' => __('Radius', 'wpfnl'), |
| 1798 |
'type' => Controls_Manager::DIMENSIONS, |
| 1799 |
'size_units' => ['px', 'em', '%'], |
| 1800 |
'selectors' => [ |
| 1801 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1802 |
], |
| 1803 |
'separator' => 'before', |
| 1804 |
] |
| 1805 |
); |
| 1806 |
|
| 1807 |
$this->add_responsive_control( |
| 1808 |
'order_button_padding', |
| 1809 |
[ |
| 1810 |
'label' => __('Padding', 'wpfnl'), |
| 1811 |
'type' => Controls_Manager::DIMENSIONS, |
| 1812 |
'size_units' => ['px', 'em', '%'], |
| 1813 |
'selectors' => [ |
| 1814 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1815 |
], |
| 1816 |
] |
| 1817 |
); |
| 1818 |
|
| 1819 |
$this->add_responsive_control( |
| 1820 |
'order_button_margin', |
| 1821 |
[ |
| 1822 |
'label' => __('Margin', 'wpfnl'), |
| 1823 |
'type' => Controls_Manager::DIMENSIONS, |
| 1824 |
'size_units' => ['px', 'em', '%'], |
| 1825 |
'selectors' => [ |
| 1826 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1827 |
], |
| 1828 |
'separator' => 'after', |
| 1829 |
] |
| 1830 |
); |
| 1831 |
|
| 1832 |
$this->end_controls_section(); |
| 1833 |
} |
| 1834 |
|
| 1835 |
/** |
| 1836 |
* Register General Style Controls. |
| 1837 |
* |
| 1838 |
* @since x.x.x |
| 1839 |
* @access protected |
| 1840 |
*/ |
| 1841 |
protected function register_global_style_controls() |
| 1842 |
{ |
| 1843 |
$this->start_controls_section( |
| 1844 |
'section_general_style_fields', |
| 1845 |
[ |
| 1846 |
'label' => __('Global', 'wpfnl'), |
| 1847 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1848 |
] |
| 1849 |
); |
| 1850 |
|
| 1851 |
$this->add_control( |
| 1852 |
'global_primary_color', |
| 1853 |
[ |
| 1854 |
'label' => __('Primary Color', 'wpfnl'), |
| 1855 |
'type' => Controls_Manager::COLOR, |
| 1856 |
'default' => '', |
| 1857 |
'selectors' => [ |
| 1858 |
'{{WRAPPER}} .woocommerce-checkout .product-name .remove:hover, |
| 1859 |
{{WRAPPER}} #payment input[type=checkbox]:checked:before, |
| 1860 |
{{WRAPPER}} .woocommerce-shipping-fields [type="checkbox"]:checked:before, |
| 1861 |
{{WRAPPER}} -info::before, |
| 1862 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-message::before, |
| 1863 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce a, |
| 1864 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .wpfunnels-current .step-name, |
| 1865 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-content-main-head .wpfunnels-content-modal-title .wpfunnels_first_name' => 'color: {{VALUE}};', |
| 1866 |
|
| 1867 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover, |
| 1868 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=checkbox]:focus, |
| 1869 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus, |
| 1870 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=radio]:checked:focus, |
| 1871 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus, |
| 1872 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1873 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1874 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small, |
| 1875 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1876 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1877 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1878 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1879 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1880 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small:hover, |
| 1881 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfunnels-next-button, |
| 1882 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-note, |
| 1883 |
body .wpfunnels-pre-checkout-offer-wrapper #wpfunnels-pre-checkout-offer-content button.wpfunnels-pre-checkout-offer-btn' => 'border-color: {{VALUE}};', |
| 1884 |
|
| 1885 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=radio]:checked:before, |
| 1886 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1887 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1888 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small, |
| 1889 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1890 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1891 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1892 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1893 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1894 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small:hover, |
| 1895 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .step-one.wpfunnels-current:before, |
| 1896 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .step-two.wpfunnels-current:before, |
| 1897 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .steps.wpfunnels-current:before, |
| 1898 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-note, |
| 1899 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-nav-bar-step.active .wpfunnels-progress-nav-step, |
| 1900 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-nav-bar-step.active .wpfunnels-nav-bar-step-line:before, |
| 1901 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-nav-bar-step.active .wpfunnels-nav-bar-step-line:after' => 'background-color: {{VALUE}};', |
| 1902 |
|
| 1903 |
'{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-note:before' => 'border-top-color: {{VALUE}};', |
| 1904 |
|
| 1905 |
'{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfunnels-next-button, |
| 1906 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns a.wpfunnels-next-button, |
| 1907 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1908 |
body .wpfunnels-pre-checkout-offer-wrapper #wpfunnels-pre-checkout-offer-content button.wpfunnels-pre-checkout-offer-btn' => 'background-color: {{VALUE}}; color: #fff;', |
| 1909 |
], |
| 1910 |
] |
| 1911 |
); |
| 1912 |
|
| 1913 |
$this->add_control( |
| 1914 |
'global_text_color', |
| 1915 |
[ |
| 1916 |
'label' => __('Text Color', 'wpfnl'), |
| 1917 |
'type' => Controls_Manager::COLOR, |
| 1918 |
'default' => '', |
| 1919 |
'selectors' => [ |
| 1920 |
'{{WRAPPER}} .wpfunnels-checkout-form, |
| 1921 |
{{WRAPPER}} .wpfunnels-checkout-form #payment .woocommerce-privacy-policy-text p' => 'color: {{VALUE}};', |
| 1922 |
], |
| 1923 |
] |
| 1924 |
); |
| 1925 |
|
| 1926 |
$this->add_group_control( |
| 1927 |
Group_Control_Typography::get_type(), |
| 1928 |
[ |
| 1929 |
'name' => 'global_typography', |
| 1930 |
'label' => 'Typography', |
| 1931 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form', |
| 1932 |
] |
| 1933 |
); |
| 1934 |
|
| 1935 |
$this->end_controls_section(); |
| 1936 |
} |
| 1937 |
|
| 1938 |
/** |
| 1939 |
* Register Button Style Controls. |
| 1940 |
* |
| 1941 |
* @since x.x.x |
| 1942 |
* @access protected |
| 1943 |
*/ |
| 1944 |
protected function register_button_style_controls() |
| 1945 |
{ |
| 1946 |
$this->start_controls_section( |
| 1947 |
'button_section', |
| 1948 |
[ |
| 1949 |
'label' => __('Buttons', 'wpfnl'), |
| 1950 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1951 |
] |
| 1952 |
); |
| 1953 |
|
| 1954 |
$this->add_group_control( |
| 1955 |
Group_Control_Typography::get_type(), |
| 1956 |
[ |
| 1957 |
'name' => 'buttons_typography', |
| 1958 |
'label' => 'Typography', |
| 1959 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1960 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1961 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1962 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1963 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1964 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1965 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1966 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 1967 |
] |
| 1968 |
); |
| 1969 |
|
| 1970 |
$this->start_controls_tabs('tabs_button_style'); |
| 1971 |
|
| 1972 |
$this->start_controls_tab( |
| 1973 |
'tab_button_normal', |
| 1974 |
[ |
| 1975 |
'label' => __('Normal', 'wpfnl'), |
| 1976 |
] |
| 1977 |
); |
| 1978 |
|
| 1979 |
$this->add_control( |
| 1980 |
'button_text_color', |
| 1981 |
[ |
| 1982 |
'label' => __('Text Color', 'wpfnl'), |
| 1983 |
'type' => Controls_Manager::COLOR, |
| 1984 |
'default' => '', |
| 1985 |
'selectors' => [ |
| 1986 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1987 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1988 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1989 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1990 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1991 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1992 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1993 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'color: {{VALUE}};', |
| 1994 |
], |
| 1995 |
] |
| 1996 |
); |
| 1997 |
|
| 1998 |
$this->add_group_control( |
| 1999 |
Group_Control_Background::get_type(), |
| 2000 |
[ |
| 2001 |
'name' => 'btn_background_color', |
| 2002 |
'label' => __('Background Color', 'wpfnl'), |
| 2003 |
'types' => ['classic', 'gradient'], |
| 2004 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 2005 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 2006 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 2007 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 2008 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 2009 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 2010 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 2011 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 2012 |
] |
| 2013 |
); |
| 2014 |
|
| 2015 |
$this->add_group_control( |
| 2016 |
Group_Control_Border::get_type(), |
| 2017 |
[ |
| 2018 |
'name' => 'btn_border', |
| 2019 |
'label' => __('Border', 'wpfnl'), |
| 2020 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 2021 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 2022 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 2023 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 2024 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 2025 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 2026 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 2027 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 2028 |
] |
| 2029 |
); |
| 2030 |
|
| 2031 |
$this->add_responsive_control( |
| 2032 |
'btn_border_radius', |
| 2033 |
[ |
| 2034 |
'label' => __('Rounded Corners', 'wpfnl'), |
| 2035 |
'type' => Controls_Manager::DIMENSIONS, |
| 2036 |
'size_units' => ['px', '%'], |
| 2037 |
'selectors' => [ |
| 2038 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 2039 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 2040 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 2041 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 2042 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 2043 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 2044 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 2045 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2046 |
], |
| 2047 |
] |
| 2048 |
); |
| 2049 |
|
| 2050 |
$this->add_group_control( |
| 2051 |
Group_Control_Box_Shadow::get_type(), |
| 2052 |
[ |
| 2053 |
'name' => 'button_box_shadow', |
| 2054 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 2055 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 2056 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 2057 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 2058 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 2059 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 2060 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 2061 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 2062 |
] |
| 2063 |
); |
| 2064 |
|
| 2065 |
$this->end_controls_tab(); |
| 2066 |
|
| 2067 |
$this->start_controls_tab( |
| 2068 |
'tab_button_hover', |
| 2069 |
[ |
| 2070 |
'label' => __('Hover', 'wpfnl'), |
| 2071 |
] |
| 2072 |
); |
| 2073 |
|
| 2074 |
$this->add_control( |
| 2075 |
'btn_hover_color', |
| 2076 |
[ |
| 2077 |
'label' => __('Text Color', 'wpfnl'), |
| 2078 |
'type' => Controls_Manager::COLOR, |
| 2079 |
'selectors' => [ |
| 2080 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 2081 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 2082 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 2083 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small:hover, |
| 2084 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button:hover, |
| 2085 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button:hover, |
| 2086 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'color: {{VALUE}};', |
| 2087 |
], |
| 2088 |
] |
| 2089 |
); |
| 2090 |
|
| 2091 |
$this->add_control( |
| 2092 |
'button_hover_border_color', |
| 2093 |
[ |
| 2094 |
'label' => __('Border Hover Color', 'wpfnl'), |
| 2095 |
'type' => Controls_Manager::COLOR, |
| 2096 |
'selectors' => [ |
| 2097 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 2098 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 2099 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 2100 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small:hover, |
| 2101 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button:hover, |
| 2102 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button:hover, |
| 2103 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'border-color: {{VALUE}};', |
| 2104 |
], |
| 2105 |
] |
| 2106 |
); |
| 2107 |
|
| 2108 |
$this->add_group_control( |
| 2109 |
Group_Control_Background::get_type(), |
| 2110 |
[ |
| 2111 |
'name' => 'button_background_hover_color', |
| 2112 |
'label' => __('Background Color', 'wpfnl'), |
| 2113 |
'types' => ['classic', 'gradient'], |
| 2114 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 2115 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 2116 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 2117 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small:hover, |
| 2118 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button:hover, |
| 2119 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button:hover, |
| 2120 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 2121 |
] |
| 2122 |
); |
| 2123 |
|
| 2124 |
$this->end_controls_tab(); |
| 2125 |
|
| 2126 |
$this->end_controls_tabs(); |
| 2127 |
|
| 2128 |
$this->end_controls_section(); |
| 2129 |
} |
| 2130 |
|
| 2131 |
/** |
| 2132 |
* Function to get skin types. |
| 2133 |
* |
| 2134 |
* @since x.x.x |
| 2135 |
* @access protected |
| 2136 |
*/ |
| 2137 |
protected function get_skin_types() |
| 2138 |
{ |
| 2139 |
$skin_options = []; |
| 2140 |
|
| 2141 |
$skin_options = [ |
| 2142 |
'default' => __('Default', 'wpfnl'), |
| 2143 |
'style-one' => __('Floating Labels', 'wpfnl'), |
| 2144 |
]; |
| 2145 |
|
| 2146 |
return $skin_options; |
| 2147 |
} |
| 2148 |
|
| 2149 |
/** |
| 2150 |
* Register Billing Fields Style Controls. |
| 2151 |
* |
| 2152 |
* @since x.x.x |
| 2153 |
* @access protected |
| 2154 |
*/ |
| 2155 |
protected function register_billing_style_controls() |
| 2156 |
{ |
| 2157 |
$this->start_controls_section( |
| 2158 |
'billing_input_section', |
| 2159 |
[ |
| 2160 |
'label' => __('Billing Section', 'wpfnl'), |
| 2161 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2162 |
] |
| 2163 |
); |
| 2164 |
|
| 2165 |
// ----headding style----- |
| 2166 |
$this->add_control( |
| 2167 |
'billing_heading_style', |
| 2168 |
[ |
| 2169 |
'label' => __('Heading Style', 'wpfnl'), |
| 2170 |
'type' => Controls_Manager::HEADING, |
| 2171 |
'label_block' => true, |
| 2172 |
] |
| 2173 |
); |
| 2174 |
|
| 2175 |
$this->add_control( |
| 2176 |
'billing_heading_text_color', |
| 2177 |
[ |
| 2178 |
'label' => __('Color', 'wpfnl'), |
| 2179 |
'type' => Controls_Manager::COLOR, |
| 2180 |
'default' => '', |
| 2181 |
'selectors' => [ |
| 2182 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3, |
| 2183 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3 span' => 'color: {{VALUE}};' |
| 2184 |
], |
| 2185 |
] |
| 2186 |
); |
| 2187 |
|
| 2188 |
$this->add_group_control( |
| 2189 |
Group_Control_Typography::get_type(), |
| 2190 |
[ |
| 2191 |
'name' => 'billing_heading_typography', |
| 2192 |
'label' => 'Typography', |
| 2193 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3, |
| 2194 |
{{WRAPPER}} .woocommerce.woocommerce-checkout #customer_details .woocommerce-billing-fields h3, |
| 2195 |
{{WRAPPER}} .woocommerce-page.woocommerce-checkout #customer_details .woocommerce-billing-fields h3', |
| 2196 |
] |
| 2197 |
); |
| 2198 |
|
| 2199 |
$this->add_responsive_control( |
| 2200 |
'billing_heading_margin', |
| 2201 |
[ |
| 2202 |
'label' => __('Margin', 'wpfnl'), |
| 2203 |
'type' => Controls_Manager::DIMENSIONS, |
| 2204 |
'size_units' => ['px', '%', 'em'], |
| 2205 |
'selectors' => [ |
| 2206 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2207 |
], |
| 2208 |
] |
| 2209 |
); |
| 2210 |
|
| 2211 |
$this->add_responsive_control( |
| 2212 |
'billing_heading_padding', |
| 2213 |
[ |
| 2214 |
'label' => __('Padding', 'wpfnl'), |
| 2215 |
'type' => Controls_Manager::DIMENSIONS, |
| 2216 |
'size_units' => ['px', '%', 'em'], |
| 2217 |
'selectors' => [ |
| 2218 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2219 |
], |
| 2220 |
'separator' => 'after', |
| 2221 |
] |
| 2222 |
); |
| 2223 |
//-----end heading style----- |
| 2224 |
|
| 2225 |
|
| 2226 |
// -----label style------ |
| 2227 |
$this->add_control( |
| 2228 |
'billing_label_style', |
| 2229 |
[ |
| 2230 |
'label' => __('Label Style', 'wpfnl'), |
| 2231 |
'type' => Controls_Manager::HEADING, |
| 2232 |
'label_block' => true, |
| 2233 |
] |
| 2234 |
); |
| 2235 |
|
| 2236 |
$this->add_control( |
| 2237 |
'billing_label_color', |
| 2238 |
[ |
| 2239 |
'label' => __('Color', 'wpfnl'), |
| 2240 |
'type' => Controls_Manager::COLOR, |
| 2241 |
'default' => '', |
| 2242 |
'selectors' => [ |
| 2243 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields p.form-row label' => 'color: {{VALUE}};' |
| 2244 |
], |
| 2245 |
] |
| 2246 |
); |
| 2247 |
|
| 2248 |
$this->add_group_control( |
| 2249 |
Group_Control_Typography::get_type(), |
| 2250 |
[ |
| 2251 |
'name' => 'billing_label_typography', |
| 2252 |
'label' => 'Typography', |
| 2253 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields p.form-row label', |
| 2254 |
] |
| 2255 |
); |
| 2256 |
|
| 2257 |
$this->add_responsive_control( |
| 2258 |
'billing_label_margin', |
| 2259 |
[ |
| 2260 |
'label' => __('Margin', 'wpfnl'), |
| 2261 |
'type' => Controls_Manager::DIMENSIONS, |
| 2262 |
'size_units' => ['px', '%', 'em'], |
| 2263 |
'selectors' => [ |
| 2264 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields p.form-row label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2265 |
], |
| 2266 |
'separator' => 'after', |
| 2267 |
] |
| 2268 |
); |
| 2269 |
//-----end label style----- |
| 2270 |
|
| 2271 |
|
| 2272 |
// -----input field style------ |
| 2273 |
$this->add_control( |
| 2274 |
'billing_input_field_style', |
| 2275 |
[ |
| 2276 |
'label' => __('Input Field Style', 'wpfnl'), |
| 2277 |
'type' => Controls_Manager::HEADING, |
| 2278 |
'label_block' => true, |
| 2279 |
] |
| 2280 |
); |
| 2281 |
|
| 2282 |
$this->add_control( |
| 2283 |
'billing_input_color', |
| 2284 |
[ |
| 2285 |
'label' => __('Text Color', 'wpfnl'), |
| 2286 |
'type' => Controls_Manager::COLOR, |
| 2287 |
'selectors' => [ |
| 2288 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 2289 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 2290 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2291 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 2292 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select, |
| 2293 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields ::placeholder, |
| 2294 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields ::-webkit-input-placeholder' => 'color: {{VALUE}} !important;', |
| 2295 |
], |
| 2296 |
] |
| 2297 |
); |
| 2298 |
|
| 2299 |
$this->add_group_control( |
| 2300 |
Group_Control_Typography::get_type(), |
| 2301 |
[ |
| 2302 |
'name' => 'billing_input_text_typography', |
| 2303 |
'label' => 'Typography', |
| 2304 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 2305 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2306 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 2307 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2308 |
{{WRAPPER}} .woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 2309 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 2310 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select, |
| 2311 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) input.input-text:not(#billing_address_2, #shipping_address_2), |
| 2312 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) textarea', |
| 2313 |
] |
| 2314 |
); |
| 2315 |
|
| 2316 |
$this->add_control( |
| 2317 |
'billing_input_bgcolor', |
| 2318 |
[ |
| 2319 |
'label' => __('Background Color', 'wpfnl'), |
| 2320 |
'type' => Controls_Manager::COLOR, |
| 2321 |
'selectors' => [ |
| 2322 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 2323 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2324 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 2325 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2326 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 2327 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select, |
| 2328 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) > label' => 'background-color: {{VALUE}};', |
| 2329 |
], |
| 2330 |
] |
| 2331 |
); |
| 2332 |
|
| 2333 |
|
| 2334 |
$this->add_control( |
| 2335 |
'billing_input_border_style', |
| 2336 |
[ |
| 2337 |
'label' => __('Border Style', 'wpfnl'), |
| 2338 |
'type' => Controls_Manager::SELECT, |
| 2339 |
'label_block' => false, |
| 2340 |
'default' => '', |
| 2341 |
'options' => [ |
| 2342 |
'' => __('Inherit', 'wpfnl'), |
| 2343 |
'solid' => __('Solid', 'wpfnl'), |
| 2344 |
'double' => __('Double', 'wpfnl'), |
| 2345 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2346 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2347 |
], |
| 2348 |
'selectors' => [ |
| 2349 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 2350 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2351 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 2352 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2353 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 2354 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select' => 'border-style: {{VALUE}};', |
| 2355 |
], |
| 2356 |
] |
| 2357 |
); |
| 2358 |
$this->add_control( |
| 2359 |
'billing_input_border_size', |
| 2360 |
[ |
| 2361 |
'label' => __('Border Width', 'wpfnl'), |
| 2362 |
'type' => Controls_Manager::DIMENSIONS, |
| 2363 |
'size_units' => ['px'], |
| 2364 |
'selectors' => [ |
| 2365 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 2366 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2367 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 2368 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2369 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 2370 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2371 |
], |
| 2372 |
] |
| 2373 |
); |
| 2374 |
|
| 2375 |
$this->add_control( |
| 2376 |
'billing_input_border_color', |
| 2377 |
[ |
| 2378 |
'label' => __('Border Color', 'wpfnl'), |
| 2379 |
'type' => Controls_Manager::COLOR, |
| 2380 |
'selectors' => [ |
| 2381 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row input.input-text, |
| 2382 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2383 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row textarea, |
| 2384 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2385 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select.select, |
| 2386 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--focus .select2-selection, |
| 2387 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select' => 'border-color: {{VALUE}}!important;', |
| 2388 |
], |
| 2389 |
] |
| 2390 |
); |
| 2391 |
|
| 2392 |
$this->add_responsive_control( |
| 2393 |
'billing_input_radius', |
| 2394 |
[ |
| 2395 |
'label' => __('Radius', 'wpfnl'), |
| 2396 |
'type' => Controls_Manager::DIMENSIONS, |
| 2397 |
'size_units' => ['px', 'em', '%'], |
| 2398 |
'selectors' => [ |
| 2399 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row input.input-text, |
| 2400 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2401 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row textarea, |
| 2402 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2403 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields select.select, |
| 2404 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2405 |
], |
| 2406 |
] |
| 2407 |
); |
| 2408 |
|
| 2409 |
$this->add_responsive_control( |
| 2410 |
'billing_input_padding', |
| 2411 |
[ |
| 2412 |
'label' => __('Padding', 'wpfnl'), |
| 2413 |
'type' => Controls_Manager::DIMENSIONS, |
| 2414 |
'size_units' => ['px', '%', 'em'], |
| 2415 |
'selectors' => [ |
| 2416 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row input.input-text, |
| 2417 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2418 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row textarea, |
| 2419 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields select.select, |
| 2420 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select, |
| 2421 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) input.input-text:not(#billing_address_2, #shipping_address_2), |
| 2422 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2423 |
|
| 2424 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container .select2-selection--single .select2-selection__rendered' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2425 |
], |
| 2426 |
|
| 2427 |
] |
| 2428 |
); |
| 2429 |
|
| 2430 |
$this->add_responsive_control( |
| 2431 |
'billing_input_margin', |
| 2432 |
[ |
| 2433 |
'label' => __('Margin', 'wpfnl'), |
| 2434 |
'type' => Controls_Manager::DIMENSIONS, |
| 2435 |
'size_units' => ['px', '%', 'em'], |
| 2436 |
'selectors' => [ |
| 2437 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields p.form-row:not(#billing_address_1_field), |
| 2438 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2439 |
], |
| 2440 |
|
| 2441 |
] |
| 2442 |
); |
| 2443 |
|
| 2444 |
$this->end_controls_section(); |
| 2445 |
} |
| 2446 |
|
| 2447 |
/** |
| 2448 |
* Register Shipping Fields Style Controls. |
| 2449 |
* |
| 2450 |
* @since x.x.x |
| 2451 |
* @access protected |
| 2452 |
*/ |
| 2453 |
protected function register_shipping_style_controls() |
| 2454 |
{ |
| 2455 |
$this->start_controls_section( |
| 2456 |
'shipping_input_section', |
| 2457 |
[ |
| 2458 |
'label' => __('Additional Info / Shipping Section', 'wpfnl'), |
| 2459 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2460 |
] |
| 2461 |
); |
| 2462 |
|
| 2463 |
// ----headding style----- |
| 2464 |
$this->add_control( |
| 2465 |
'shipping_heading_style', |
| 2466 |
[ |
| 2467 |
'label' => __('Heading Style', 'wpfnl'), |
| 2468 |
'type' => Controls_Manager::HEADING, |
| 2469 |
'label_block' => true, |
| 2470 |
] |
| 2471 |
); |
| 2472 |
|
| 2473 |
$this->add_control( |
| 2474 |
'shipping_heading_text_color', |
| 2475 |
[ |
| 2476 |
'label' => __('Color', 'wpfnl'), |
| 2477 |
'type' => Controls_Manager::COLOR, |
| 2478 |
'default' => '', |
| 2479 |
'selectors' => [ |
| 2480 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address label.woocommerce-form__label, |
| 2481 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' => 'color: {{VALUE}};' |
| 2482 |
], |
| 2483 |
] |
| 2484 |
); |
| 2485 |
|
| 2486 |
$this->add_group_control( |
| 2487 |
Group_Control_Typography::get_type(), |
| 2488 |
[ |
| 2489 |
'name' => 'shipping_heading_typography', |
| 2490 |
'label' => 'Typography', |
| 2491 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address span, |
| 2492 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' |
| 2493 |
] |
| 2494 |
); |
| 2495 |
|
| 2496 |
$this->add_responsive_control( |
| 2497 |
'shipping_heading_margin', |
| 2498 |
[ |
| 2499 |
'label' => __('Margin', 'wpfnl'), |
| 2500 |
'type' => Controls_Manager::DIMENSIONS, |
| 2501 |
'size_units' => ['px', '%', 'em'], |
| 2502 |
'selectors' => [ |
| 2503 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address, |
| 2504 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2505 |
], |
| 2506 |
] |
| 2507 |
); |
| 2508 |
|
| 2509 |
$this->add_responsive_control( |
| 2510 |
'shipping_heading_padding', |
| 2511 |
[ |
| 2512 |
'label' => __('Padding', 'wpfnl'), |
| 2513 |
'type' => Controls_Manager::DIMENSIONS, |
| 2514 |
'size_units' => ['px', '%', 'em'], |
| 2515 |
'selectors' => [ |
| 2516 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address, |
| 2517 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2518 |
], |
| 2519 |
'separator' => 'after', |
| 2520 |
] |
| 2521 |
); |
| 2522 |
//-----end heading style----- |
| 2523 |
|
| 2524 |
|
| 2525 |
// -----label style------ |
| 2526 |
$this->add_control( |
| 2527 |
'shipping_label_style', |
| 2528 |
[ |
| 2529 |
'label' => __('Label Style', 'wpfnl'), |
| 2530 |
'type' => Controls_Manager::HEADING, |
| 2531 |
'label_block' => true, |
| 2532 |
] |
| 2533 |
); |
| 2534 |
|
| 2535 |
$this->add_control( |
| 2536 |
'shipping_label_color', |
| 2537 |
[ |
| 2538 |
'label' => __('Color', 'wpfnl'), |
| 2539 |
'type' => Controls_Manager::COLOR, |
| 2540 |
'default' => '', |
| 2541 |
'selectors' => [ |
| 2542 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields p.form-row label, |
| 2543 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields p.form-row label' => 'color: {{VALUE}};' |
| 2544 |
], |
| 2545 |
] |
| 2546 |
); |
| 2547 |
|
| 2548 |
$this->add_group_control( |
| 2549 |
Group_Control_Typography::get_type(), |
| 2550 |
[ |
| 2551 |
'name' => 'shipping_label_typography', |
| 2552 |
'label' => 'Typography', |
| 2553 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields p.form-row label, |
| 2554 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields p.form-row label', |
| 2555 |
] |
| 2556 |
); |
| 2557 |
|
| 2558 |
$this->add_responsive_control( |
| 2559 |
'shipping_label_margin', |
| 2560 |
[ |
| 2561 |
'label' => __('Margin', 'wpfnl'), |
| 2562 |
'type' => Controls_Manager::DIMENSIONS, |
| 2563 |
'size_units' => ['px', '%', 'em'], |
| 2564 |
'selectors' => [ |
| 2565 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields p.form-row label, |
| 2566 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields p.form-row label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2567 |
], |
| 2568 |
'separator' => 'after', |
| 2569 |
] |
| 2570 |
); |
| 2571 |
//-----end label style----- |
| 2572 |
|
| 2573 |
|
| 2574 |
// -----input field style------ |
| 2575 |
$this->add_control( |
| 2576 |
'shipping_input_field_style', |
| 2577 |
[ |
| 2578 |
'label' => __('Input Field Style', 'wpfnl'), |
| 2579 |
'type' => Controls_Manager::HEADING, |
| 2580 |
'label_block' => true, |
| 2581 |
] |
| 2582 |
); |
| 2583 |
|
| 2584 |
$this->add_control( |
| 2585 |
'shipping_input_color', |
| 2586 |
[ |
| 2587 |
'label' => __('Text Color', 'wpfnl'), |
| 2588 |
'type' => Controls_Manager::COLOR, |
| 2589 |
'selectors' => [ |
| 2590 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2591 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2592 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2593 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 2594 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select, |
| 2595 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields ::placeholder, |
| 2596 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields ::-webkit-input-placeholder, |
| 2597 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields ::placeholder, |
| 2598 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields ::-webkit-input-placeholder' => 'color: {{VALUE}} !important;', |
| 2599 |
], |
| 2600 |
] |
| 2601 |
); |
| 2602 |
|
| 2603 |
$this->add_group_control( |
| 2604 |
Group_Control_Typography::get_type(), |
| 2605 |
[ |
| 2606 |
'name' => 'shipping_input_text_typography', |
| 2607 |
'label' => 'Typography', |
| 2608 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2609 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2610 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2611 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 2612 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2613 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select, |
| 2614 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) input.input-text:not(#billing_address_2, #shipping_address_2), |
| 2615 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) textarea', |
| 2616 |
] |
| 2617 |
); |
| 2618 |
|
| 2619 |
$this->add_control( |
| 2620 |
'shipping_input_bgcolor', |
| 2621 |
[ |
| 2622 |
'label' => __('Background Color', 'wpfnl'), |
| 2623 |
'type' => Controls_Manager::COLOR, |
| 2624 |
'selectors' => [ |
| 2625 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2626 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2627 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2628 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2629 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select, |
| 2630 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) > label' => 'background-color: {{VALUE}};', |
| 2631 |
], |
| 2632 |
] |
| 2633 |
); |
| 2634 |
|
| 2635 |
|
| 2636 |
$this->add_control( |
| 2637 |
'shipping_input_border_style', |
| 2638 |
[ |
| 2639 |
'label' => __('Border Style', 'wpfnl'), |
| 2640 |
'type' => Controls_Manager::SELECT, |
| 2641 |
'label_block' => false, |
| 2642 |
'default' => '', |
| 2643 |
'options' => [ |
| 2644 |
'' => __('Inherit', 'wpfnl'), |
| 2645 |
'solid' => __('Solid', 'wpfnl'), |
| 2646 |
'double' => __('Double', 'wpfnl'), |
| 2647 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2648 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2649 |
], |
| 2650 |
'selectors' => [ |
| 2651 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2652 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2653 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2654 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2655 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select' => 'border-style: {{VALUE}};', |
| 2656 |
], |
| 2657 |
] |
| 2658 |
); |
| 2659 |
$this->add_control( |
| 2660 |
'shipping_input_border_size', |
| 2661 |
[ |
| 2662 |
'label' => __('Border Width', 'wpfnl'), |
| 2663 |
'type' => Controls_Manager::DIMENSIONS, |
| 2664 |
'size_units' => ['px'], |
| 2665 |
'selectors' => [ |
| 2666 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2667 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2668 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2669 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2670 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2671 |
], |
| 2672 |
] |
| 2673 |
); |
| 2674 |
|
| 2675 |
$this->add_control( |
| 2676 |
'shipping_input_border_color', |
| 2677 |
[ |
| 2678 |
'label' => __('Border Color', 'wpfnl'), |
| 2679 |
'type' => Controls_Manager::COLOR, |
| 2680 |
'selectors' => [ |
| 2681 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row input.input-text, |
| 2682 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-additional-fields .form-row textarea, |
| 2683 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2684 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select.select, |
| 2685 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--focus .select2-selection, |
| 2686 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select' => 'border-color: {{VALUE}};', |
| 2687 |
], |
| 2688 |
] |
| 2689 |
); |
| 2690 |
|
| 2691 |
|
| 2692 |
$this->add_responsive_control( |
| 2693 |
'shipping_input_radius', |
| 2694 |
[ |
| 2695 |
'label' => __('Radius', 'wpfnl'), |
| 2696 |
'type' => Controls_Manager::DIMENSIONS, |
| 2697 |
'size_units' => ['px', 'em', '%'], |
| 2698 |
'selectors' => [ |
| 2699 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row input.input-text, |
| 2700 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-additional-fields .form-row textarea, |
| 2701 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2702 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields select.select, |
| 2703 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2704 |
], |
| 2705 |
] |
| 2706 |
); |
| 2707 |
|
| 2708 |
$this->add_responsive_control( |
| 2709 |
'shipping_input_padding', |
| 2710 |
[ |
| 2711 |
'label' => __('Padding', 'wpfnl'), |
| 2712 |
'type' => Controls_Manager::DIMENSIONS, |
| 2713 |
'size_units' => ['px', '%', 'em'], |
| 2714 |
'selectors' => [ |
| 2715 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row input.input-text, |
| 2716 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-additional-fields .form-row textarea, |
| 2717 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields select.select, |
| 2718 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select, |
| 2719 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) input.input-text:not(#billing_address_2, #shipping_address_2), |
| 2720 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2721 |
|
| 2722 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container .select2-selection--single .select2-selection__rendered' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2723 |
], |
| 2724 |
|
| 2725 |
] |
| 2726 |
); |
| 2727 |
|
| 2728 |
$this->add_responsive_control( |
| 2729 |
'shipping_input_margin', |
| 2730 |
[ |
| 2731 |
'label' => __('Margin', 'wpfnl'), |
| 2732 |
'type' => Controls_Manager::DIMENSIONS, |
| 2733 |
'size_units' => ['px', '%', 'em'], |
| 2734 |
'selectors' => [ |
| 2735 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields p.form-row:not(#shipping_address_1_field)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2736 |
], |
| 2737 |
|
| 2738 |
] |
| 2739 |
); |
| 2740 |
|
| 2741 |
$this->end_controls_section(); |
| 2742 |
} |
| 2743 |
|
| 2744 |
|
| 2745 |
/** |
| 2746 |
* Register Order Table Style Controls. |
| 2747 |
* |
| 2748 |
* @since x.x.x |
| 2749 |
* @access protected |
| 2750 |
*/ |
| 2751 |
protected function register_your_order_style_controls() |
| 2752 |
{ |
| 2753 |
$this->start_controls_section( |
| 2754 |
'your_order_section', |
| 2755 |
[ |
| 2756 |
'label' => __('Order Table Section', 'wpfnl'), |
| 2757 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2758 |
] |
| 2759 |
); |
| 2760 |
|
| 2761 |
// ----headding style----- |
| 2762 |
$this->add_control( |
| 2763 |
'order_heading_style', |
| 2764 |
[ |
| 2765 |
'label' => __('Heading Style', 'wpfnl'), |
| 2766 |
'type' => Controls_Manager::HEADING, |
| 2767 |
'label_block' => true, |
| 2768 |
] |
| 2769 |
); |
| 2770 |
|
| 2771 |
$this->add_control( |
| 2772 |
'order_heading_color', |
| 2773 |
[ |
| 2774 |
'label' => __('Color', 'wpfnl'), |
| 2775 |
'type' => Controls_Manager::COLOR, |
| 2776 |
'default' => '', |
| 2777 |
'selectors' => [ |
| 2778 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading' => 'color: {{VALUE}};' |
| 2779 |
], |
| 2780 |
] |
| 2781 |
); |
| 2782 |
|
| 2783 |
$this->add_group_control( |
| 2784 |
Group_Control_Typography::get_type(), |
| 2785 |
[ |
| 2786 |
'name' => 'order_heading_typography', |
| 2787 |
'label' => 'Typography', |
| 2788 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading', |
| 2789 |
] |
| 2790 |
); |
| 2791 |
|
| 2792 |
$this->add_responsive_control( |
| 2793 |
'order_heading_margin', |
| 2794 |
[ |
| 2795 |
'label' => __('Margin', 'wpfnl'), |
| 2796 |
'type' => Controls_Manager::DIMENSIONS, |
| 2797 |
'size_units' => ['px', '%', 'em'], |
| 2798 |
'selectors' => [ |
| 2799 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important', |
| 2800 |
], |
| 2801 |
] |
| 2802 |
); |
| 2803 |
|
| 2804 |
$this->add_responsive_control( |
| 2805 |
'order_heading_padding', |
| 2806 |
[ |
| 2807 |
'label' => __('Padding', 'wpfnl'), |
| 2808 |
'type' => Controls_Manager::DIMENSIONS, |
| 2809 |
'size_units' => ['px', '%', 'em'], |
| 2810 |
'selectors' => [ |
| 2811 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important', |
| 2812 |
], |
| 2813 |
'separator' => 'after', |
| 2814 |
] |
| 2815 |
); |
| 2816 |
//-----end heading style----- |
| 2817 |
|
| 2818 |
// ----order table style----- |
| 2819 |
$this->add_control( |
| 2820 |
'order_table_style', |
| 2821 |
[ |
| 2822 |
'label' => __('Table Style', 'wpfnl'), |
| 2823 |
'type' => Controls_Manager::HEADING, |
| 2824 |
'label_block' => true, |
| 2825 |
] |
| 2826 |
); |
| 2827 |
|
| 2828 |
$this->add_control( |
| 2829 |
'your_order_text_color', |
| 2830 |
[ |
| 2831 |
'label' => __('Color', 'wpfnl'), |
| 2832 |
'type' => Controls_Manager::COLOR, |
| 2833 |
'default' => '', |
| 2834 |
'selectors' => [ |
| 2835 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table td, |
| 2836 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table th' => 'color: {{VALUE}};' |
| 2837 |
], |
| 2838 |
] |
| 2839 |
); |
| 2840 |
|
| 2841 |
$this->add_group_control( |
| 2842 |
Group_Control_Typography::get_type(), |
| 2843 |
[ |
| 2844 |
'name' => 'your_order_text_typography', |
| 2845 |
'label' => 'Typography', |
| 2846 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table td, |
| 2847 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table th', |
| 2848 |
] |
| 2849 |
); |
| 2850 |
|
| 2851 |
$this->add_control( |
| 2852 |
'order_table_border_style', |
| 2853 |
[ |
| 2854 |
'label' => __('Border Style', 'wpfnl'), |
| 2855 |
'type' => Controls_Manager::SELECT, |
| 2856 |
'label_block' => false, |
| 2857 |
'default' => '', |
| 2858 |
'options' => [ |
| 2859 |
'' => __('Inherit', 'wpfnl'), |
| 2860 |
'solid' => __('Solid', 'wpfnl'), |
| 2861 |
'double' => __('Double', 'wpfnl'), |
| 2862 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2863 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2864 |
], |
| 2865 |
|
| 2866 |
'selectors' => [ |
| 2867 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-style: {{VALUE}}!important;', |
| 2868 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2869 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2870 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2871 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2872 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2873 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'border-left-style: {{VALUE}}!important; border-top-style: {{VALUE}}!important;', |
| 2874 |
], |
| 2875 |
] |
| 2876 |
); |
| 2877 |
|
| 2878 |
$this->add_control( |
| 2879 |
'order_table_border_size', |
| 2880 |
[ |
| 2881 |
'label' => __('Border Width', 'wpfnl'), |
| 2882 |
'type' => Controls_Manager::DIMENSIONS, |
| 2883 |
'size_units' => ['px'], |
| 2884 |
'selectors' => [ |
| 2885 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important; border-top: none!important;', |
| 2886 |
|
| 2887 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2888 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2889 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2890 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2891 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2892 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2893 |
|
| 2894 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th:first-child, |
| 2895 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td:first-child, |
| 2896 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th:first-child, |
| 2897 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td:first-child, |
| 2898 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td:first-child, |
| 2899 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th:first-child' => 'border-left: none!important;', |
| 2900 |
|
| 2901 |
], |
| 2902 |
] |
| 2903 |
); |
| 2904 |
|
| 2905 |
$this->add_control( |
| 2906 |
'order_table_border_color', |
| 2907 |
[ |
| 2908 |
'label' => __('Border Color', 'wpfnl'), |
| 2909 |
'type' => Controls_Manager::COLOR, |
| 2910 |
'selectors' => [ |
| 2911 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-color: {{VALUE}}!important;', |
| 2912 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2913 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2914 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2915 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2916 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2917 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'border-left-color: {{VALUE}}!important; border-top-color: {{VALUE}}!important;', |
| 2918 |
], |
| 2919 |
|
| 2920 |
] |
| 2921 |
); |
| 2922 |
|
| 2923 |
$this->add_responsive_control( |
| 2924 |
'order_table_radius', |
| 2925 |
[ |
| 2926 |
'label' => __('Radius', 'wpfnl'), |
| 2927 |
'type' => Controls_Manager::DIMENSIONS, |
| 2928 |
'size_units' => ['px', 'em', '%'], |
| 2929 |
'selectors' => [ |
| 2930 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2931 |
], |
| 2932 |
] |
| 2933 |
); |
| 2934 |
|
| 2935 |
$this->add_responsive_control( |
| 2936 |
'order_table_cell_padding', |
| 2937 |
[ |
| 2938 |
'label' => __('Cell Padding', 'wpfnl'), |
| 2939 |
'type' => Controls_Manager::DIMENSIONS, |
| 2940 |
'size_units' => ['px', '%', 'em'], |
| 2941 |
'selectors' => [ |
| 2942 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2943 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2944 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2945 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2946 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2947 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2948 |
], |
| 2949 |
|
| 2950 |
] |
| 2951 |
); |
| 2952 |
|
| 2953 |
$this->add_responsive_control( |
| 2954 |
'order_table_margin', |
| 2955 |
[ |
| 2956 |
'label' => __('Margin', 'wpfnl'), |
| 2957 |
'type' => Controls_Manager::DIMENSIONS, |
| 2958 |
'size_units' => ['px', '%', 'em'], |
| 2959 |
'selectors' => [ |
| 2960 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2961 |
], |
| 2962 |
|
| 2963 |
] |
| 2964 |
); |
| 2965 |
|
| 2966 |
$this->end_controls_section(); |
| 2967 |
} |
| 2968 |
|
| 2969 |
|
| 2970 |
/** |
| 2971 |
* Register Coupon Field Style Controls. |
| 2972 |
* |
| 2973 |
* @since x.x.x |
| 2974 |
* @access protected |
| 2975 |
*/ |
| 2976 |
protected function register_coupon_style_controls() |
| 2977 |
{ |
| 2978 |
$this->start_controls_section( |
| 2979 |
'coupon_section', |
| 2980 |
[ |
| 2981 |
'label' => __('Coupon Section', 'wpfnl'), |
| 2982 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2983 |
] |
| 2984 |
); |
| 2985 |
|
| 2986 |
// ----toggle area style----- |
| 2987 |
$this->add_control( |
| 2988 |
'coupon_toggle_area_style', |
| 2989 |
[ |
| 2990 |
'label' => __('Coupon Toggle Area Style', 'wpfnl'), |
| 2991 |
'type' => Controls_Manager::HEADING, |
| 2992 |
'label_block' => true, |
| 2993 |
] |
| 2994 |
); |
| 2995 |
|
| 2996 |
$this->add_control( |
| 2997 |
'coupon_toggle_color', |
| 2998 |
[ |
| 2999 |
'label' => __('Text Color', 'wpfnl'), |
| 3000 |
'type' => Controls_Manager::COLOR, |
| 3001 |
'selectors' => [ |
| 3002 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'color: {{VALUE}};', |
| 3003 |
], |
| 3004 |
] |
| 3005 |
); |
| 3006 |
|
| 3007 |
$this->add_control( |
| 3008 |
'coupon_toggle_link_color', |
| 3009 |
[ |
| 3010 |
'label' => __('Link Color', 'wpfnl'), |
| 3011 |
'type' => Controls_Manager::COLOR, |
| 3012 |
'selectors' => [ |
| 3013 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info a' => 'color: {{VALUE}};', |
| 3014 |
], |
| 3015 |
] |
| 3016 |
); |
| 3017 |
|
| 3018 |
$this->add_control( |
| 3019 |
'coupon_toggle_bgcolor', |
| 3020 |
[ |
| 3021 |
'label' => __('Background Color', 'wpfnl'), |
| 3022 |
'type' => Controls_Manager::COLOR, |
| 3023 |
'selectors' => [ |
| 3024 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'background-color: {{VALUE}};', |
| 3025 |
], |
| 3026 |
] |
| 3027 |
); |
| 3028 |
|
| 3029 |
$this->add_group_control( |
| 3030 |
Group_Control_Typography::get_type(), |
| 3031 |
[ |
| 3032 |
'name' => 'coupon_toggle_typography', |
| 3033 |
'label' => 'Typography', |
| 3034 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info', |
| 3035 |
] |
| 3036 |
); |
| 3037 |
|
| 3038 |
$this->add_control( |
| 3039 |
'coupon_toggle_border_style', |
| 3040 |
[ |
| 3041 |
'label' => __('Border Style', 'wpfnl'), |
| 3042 |
'type' => Controls_Manager::SELECT, |
| 3043 |
'label_block' => false, |
| 3044 |
'default' => '', |
| 3045 |
'options' => [ |
| 3046 |
'' => __('Inherit', 'wpfnl'), |
| 3047 |
'solid' => __('Solid', 'wpfnl'), |
| 3048 |
'double' => __('Double', 'wpfnl'), |
| 3049 |
'dotted' => __('Dotted', 'wpfnl'), |
| 3050 |
'dashed' => __('Dashed', 'wpfnl'), |
| 3051 |
], |
| 3052 |
'selectors' => [ |
| 3053 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-style: {{VALUE}};', |
| 3054 |
], |
| 3055 |
] |
| 3056 |
); |
| 3057 |
|
| 3058 |
$this->add_control( |
| 3059 |
'coupon_toggle_border_size', |
| 3060 |
[ |
| 3061 |
'label' => __('Border Width', 'wpfnl'), |
| 3062 |
'type' => Controls_Manager::DIMENSIONS, |
| 3063 |
'size_units' => ['px'], |
| 3064 |
'selectors' => [ |
| 3065 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3066 |
], |
| 3067 |
'condition' => [ |
| 3068 |
'coupon_toggle_border_style!' => '', |
| 3069 |
] |
| 3070 |
] |
| 3071 |
); |
| 3072 |
|
| 3073 |
$this->add_control( |
| 3074 |
'coupon_toggle_border_color', |
| 3075 |
[ |
| 3076 |
'label' => __('Border Color', 'wpfnl'), |
| 3077 |
'type' => Controls_Manager::COLOR, |
| 3078 |
'selectors' => [ |
| 3079 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-color: {{VALUE}};', |
| 3080 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before' => 'color: {{VALUE}};', |
| 3081 |
], |
| 3082 |
'condition' => [ |
| 3083 |
'coupon_toggle_border_style!' => '', |
| 3084 |
] |
| 3085 |
] |
| 3086 |
); |
| 3087 |
|
| 3088 |
|
| 3089 |
$this->add_responsive_control( |
| 3090 |
'coupon_toggle_radius', |
| 3091 |
[ |
| 3092 |
'label' => __('Radius', 'wpfnl'), |
| 3093 |
'type' => Controls_Manager::DIMENSIONS, |
| 3094 |
'size_units' => ['px', 'em', '%'], |
| 3095 |
'selectors' => [ |
| 3096 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3097 |
], |
| 3098 |
] |
| 3099 |
); |
| 3100 |
|
| 3101 |
$this->add_responsive_control( |
| 3102 |
'coupon_toggle_padding', |
| 3103 |
[ |
| 3104 |
'label' => __('Padding', 'wpfnl'), |
| 3105 |
'type' => Controls_Manager::DIMENSIONS, |
| 3106 |
'size_units' => ['px', '%', 'em'], |
| 3107 |
'selectors' => [ |
| 3108 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3109 |
|
| 3110 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before' => 'top: {{TOP}}{{UNIT}};', |
| 3111 |
], |
| 3112 |
|
| 3113 |
] |
| 3114 |
); |
| 3115 |
|
| 3116 |
$this->add_responsive_control( |
| 3117 |
'coupon_toggle_margin', |
| 3118 |
[ |
| 3119 |
'label' => __('Margin', 'wpfnl'), |
| 3120 |
'type' => Controls_Manager::DIMENSIONS, |
| 3121 |
'size_units' => ['px', '%', 'em'], |
| 3122 |
'selectors' => [ |
| 3123 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3124 |
], |
| 3125 |
'separator' => 'after' |
| 3126 |
|
| 3127 |
] |
| 3128 |
); |
| 3129 |
|
| 3130 |
|
| 3131 |
// ----coupon form box style----- |
| 3132 |
$this->add_control( |
| 3133 |
'coupon_form_box_style', |
| 3134 |
[ |
| 3135 |
'label' => __('Coupon Form Box Style', 'wpfnl'), |
| 3136 |
'type' => Controls_Manager::HEADING, |
| 3137 |
'label_block' => true, |
| 3138 |
] |
| 3139 |
); |
| 3140 |
|
| 3141 |
$this->add_control( |
| 3142 |
'coupon_form_box_color', |
| 3143 |
[ |
| 3144 |
'label' => __('Text Color', 'wpfnl'), |
| 3145 |
'type' => Controls_Manager::COLOR, |
| 3146 |
'selectors' => [ |
| 3147 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon p' => 'color: {{VALUE}};', |
| 3148 |
], |
| 3149 |
] |
| 3150 |
); |
| 3151 |
|
| 3152 |
$this->add_control( |
| 3153 |
'coupon_form_box_bgcolor', |
| 3154 |
[ |
| 3155 |
'label' => __('Background Color', 'wpfnl'), |
| 3156 |
'type' => Controls_Manager::COLOR, |
| 3157 |
'selectors' => [ |
| 3158 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'background-color: {{VALUE}};', |
| 3159 |
], |
| 3160 |
] |
| 3161 |
); |
| 3162 |
|
| 3163 |
$this->add_group_control( |
| 3164 |
Group_Control_Typography::get_type(), |
| 3165 |
[ |
| 3166 |
'name' => 'coupon_form_box_typography', |
| 3167 |
'label' => 'Typography', |
| 3168 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon p', |
| 3169 |
] |
| 3170 |
); |
| 3171 |
|
| 3172 |
$this->add_control( |
| 3173 |
'coupon_form_box_border_style', |
| 3174 |
[ |
| 3175 |
'label' => __('Border Style', 'wpfnl'), |
| 3176 |
'type' => Controls_Manager::SELECT, |
| 3177 |
'label_block' => false, |
| 3178 |
'default' => '', |
| 3179 |
'options' => [ |
| 3180 |
'' => __('Inherit', 'wpfnl'), |
| 3181 |
'solid' => __('Solid', 'wpfnl'), |
| 3182 |
'double' => __('Double', 'wpfnl'), |
| 3183 |
'dotted' => __('Dotted', 'wpfnl'), |
| 3184 |
'dashed' => __('Dashed', 'wpfnl'), |
| 3185 |
], |
| 3186 |
'selectors' => [ |
| 3187 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-style: {{VALUE}};', |
| 3188 |
], |
| 3189 |
] |
| 3190 |
); |
| 3191 |
|
| 3192 |
$this->add_control( |
| 3193 |
'coupon_form_box_border_size', |
| 3194 |
[ |
| 3195 |
'label' => __('Border Width', 'wpfnl'), |
| 3196 |
'type' => Controls_Manager::DIMENSIONS, |
| 3197 |
'size_units' => ['px'], |
| 3198 |
'selectors' => [ |
| 3199 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3200 |
], |
| 3201 |
'condition' => [ |
| 3202 |
'coupon_form_box_border_style!' => '', |
| 3203 |
] |
| 3204 |
] |
| 3205 |
); |
| 3206 |
|
| 3207 |
$this->add_control( |
| 3208 |
'coupon_form_box_border_color', |
| 3209 |
[ |
| 3210 |
'label' => __('Border Color', 'wpfnl'), |
| 3211 |
'type' => Controls_Manager::COLOR, |
| 3212 |
'selectors' => [ |
| 3213 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-color: {{VALUE}};', |
| 3214 |
], |
| 3215 |
'condition' => [ |
| 3216 |
'coupon_form_box_border_style!' => '', |
| 3217 |
] |
| 3218 |
] |
| 3219 |
); |
| 3220 |
|
| 3221 |
$this->add_responsive_control( |
| 3222 |
'coupon_form_box_radius', |
| 3223 |
[ |
| 3224 |
'label' => __('Radius', 'wpfnl'), |
| 3225 |
'type' => Controls_Manager::DIMENSIONS, |
| 3226 |
'size_units' => ['px', 'em', '%'], |
| 3227 |
'selectors' => [ |
| 3228 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3229 |
], |
| 3230 |
] |
| 3231 |
); |
| 3232 |
|
| 3233 |
$this->add_responsive_control( |
| 3234 |
'coupon_form_box_padding', |
| 3235 |
[ |
| 3236 |
'label' => __('Padding', 'wpfnl'), |
| 3237 |
'type' => Controls_Manager::DIMENSIONS, |
| 3238 |
'size_units' => ['px', '%', 'em'], |
| 3239 |
'selectors' => [ |
| 3240 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3241 |
], |
| 3242 |
|
| 3243 |
] |
| 3244 |
); |
| 3245 |
|
| 3246 |
$this->add_responsive_control( |
| 3247 |
'coupon_form_box_margin', |
| 3248 |
[ |
| 3249 |
'label' => __('Margin', 'wpfnl'), |
| 3250 |
'type' => Controls_Manager::DIMENSIONS, |
| 3251 |
'size_units' => ['px', '%', 'em'], |
| 3252 |
'selectors' => [ |
| 3253 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3254 |
], |
| 3255 |
'separator' => 'after' |
| 3256 |
] |
| 3257 |
); |
| 3258 |
|
| 3259 |
// ----coupon input field style----- |
| 3260 |
$this->add_control( |
| 3261 |
'coupon_input_field_style', |
| 3262 |
[ |
| 3263 |
'label' => __('Coupon Input field Style', 'wpfnl'), |
| 3264 |
'type' => Controls_Manager::HEADING, |
| 3265 |
'label_block' => true, |
| 3266 |
] |
| 3267 |
); |
| 3268 |
|
| 3269 |
$this->add_control( |
| 3270 |
'coupon_input_field_color', |
| 3271 |
[ |
| 3272 |
'label' => __('Color', 'wpfnl'), |
| 3273 |
'type' => Controls_Manager::COLOR, |
| 3274 |
'selectors' => [ |
| 3275 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text, |
| 3276 |
{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon ::placeholder, |
| 3277 |
{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon ::-webkit-input-placeholder' => 'color: {{VALUE}};', |
| 3278 |
], |
| 3279 |
] |
| 3280 |
); |
| 3281 |
|
| 3282 |
$this->add_control( |
| 3283 |
'coupon_input_field_bgcolor', |
| 3284 |
[ |
| 3285 |
'label' => __('Background Color', 'wpfnl'), |
| 3286 |
'type' => Controls_Manager::COLOR, |
| 3287 |
'selectors' => [ |
| 3288 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'background-color: {{VALUE}};', |
| 3289 |
], |
| 3290 |
] |
| 3291 |
); |
| 3292 |
|
| 3293 |
$this->add_group_control( |
| 3294 |
Group_Control_Typography::get_type(), |
| 3295 |
[ |
| 3296 |
'name' => 'coupon_input_field_typography', |
| 3297 |
'label' => 'Typography', |
| 3298 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text', |
| 3299 |
] |
| 3300 |
); |
| 3301 |
|
| 3302 |
$this->add_control( |
| 3303 |
'coupon_input_field_border_style', |
| 3304 |
[ |
| 3305 |
'label' => __('Border Style', 'wpfnl'), |
| 3306 |
'type' => Controls_Manager::SELECT, |
| 3307 |
'label_block' => false, |
| 3308 |
'default' => '', |
| 3309 |
'options' => [ |
| 3310 |
'' => __('Inherit', 'wpfnl'), |
| 3311 |
'solid' => __('Solid', 'wpfnl'), |
| 3312 |
'double' => __('Double', 'wpfnl'), |
| 3313 |
'dotted' => __('Dotted', 'wpfnl'), |
| 3314 |
'dashed' => __('Dashed', 'wpfnl'), |
| 3315 |
], |
| 3316 |
'selectors' => [ |
| 3317 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-style: {{VALUE}};', |
| 3318 |
], |
| 3319 |
] |
| 3320 |
); |
| 3321 |
|
| 3322 |
$this->add_control( |
| 3323 |
'coupon_input_field_border_size', |
| 3324 |
[ |
| 3325 |
'label' => __('Border Width', 'wpfnl'), |
| 3326 |
'type' => Controls_Manager::DIMENSIONS, |
| 3327 |
'size_units' => ['px'], |
| 3328 |
'selectors' => [ |
| 3329 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 3330 |
], |
| 3331 |
'condition' => [ |
| 3332 |
'coupon_input_field_border_style!' => '', |
| 3333 |
] |
| 3334 |
] |
| 3335 |
); |
| 3336 |
|
| 3337 |
$this->add_control( |
| 3338 |
'coupon_input_field_border_color', |
| 3339 |
[ |
| 3340 |
'label' => __('Border Color', 'wpfnl'), |
| 3341 |
'type' => Controls_Manager::COLOR, |
| 3342 |
'selectors' => [ |
| 3343 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-color: {{VALUE}};', |
| 3344 |
], |
| 3345 |
'condition' => [ |
| 3346 |
'coupon_input_field_border_style!' => '', |
| 3347 |
] |
| 3348 |
] |
| 3349 |
); |
| 3350 |
|
| 3351 |
|
| 3352 |
$this->add_responsive_control( |
| 3353 |
'coupon_input_field_radius', |
| 3354 |
[ |
| 3355 |
'label' => __('Radius', 'wpfnl'), |
| 3356 |
'type' => Controls_Manager::DIMENSIONS, |
| 3357 |
'size_units' => ['px', 'em', '%'], |
| 3358 |
'selectors' => [ |
| 3359 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3360 |
], |
| 3361 |
] |
| 3362 |
); |
| 3363 |
|
| 3364 |
$this->add_responsive_control( |
| 3365 |
'coupon_input_field_padding', |
| 3366 |
[ |
| 3367 |
'label' => __('Padding', 'wpfnl'), |
| 3368 |
'type' => Controls_Manager::DIMENSIONS, |
| 3369 |
'size_units' => ['px', '%', 'em'], |
| 3370 |
'selectors' => [ |
| 3371 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 3372 |
], |
| 3373 |
'separator' => 'after' |
| 3374 |
] |
| 3375 |
); |
| 3376 |
|
| 3377 |
|
| 3378 |
// ----Coupon Button style----- |
| 3379 |
$this->add_control( |
| 3380 |
'coupon_button_style', |
| 3381 |
[ |
| 3382 |
'label' => __('Coupon Button Style', 'wpfnl'), |
| 3383 |
'type' => Controls_Manager::HEADING, |
| 3384 |
'label_block' => true, |
| 3385 |
] |
| 3386 |
); |
| 3387 |
|
| 3388 |
$this->add_group_control( |
| 3389 |
Group_Control_Typography::get_type(), |
| 3390 |
[ |
| 3391 |
'name' => 'coupon_button_typography', |
| 3392 |
'label' => 'Typography', |
| 3393 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button', |
| 3394 |
] |
| 3395 |
); |
| 3396 |
|
| 3397 |
$this->start_controls_tabs('coupon_button_tab'); |
| 3398 |
$this->start_controls_tab( |
| 3399 |
'coupon_button_normal', |
| 3400 |
[ |
| 3401 |
'label' => __('Normal', 'wpfnl'), |
| 3402 |
] |
| 3403 |
); |
| 3404 |
|
| 3405 |
$this->add_control( |
| 3406 |
'coupon_button_color', |
| 3407 |
[ |
| 3408 |
'label' => __('Color', 'wpfnl'), |
| 3409 |
'type' => Controls_Manager::COLOR, |
| 3410 |
'default' => '', |
| 3411 |
'selectors' => [ |
| 3412 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'color: {{VALUE}};', |
| 3413 |
], |
| 3414 |
] |
| 3415 |
); |
| 3416 |
|
| 3417 |
$this->add_control( |
| 3418 |
'coupon_button_bg_color', |
| 3419 |
[ |
| 3420 |
'label' => __('Background Color', 'wpfnl'), |
| 3421 |
'type' => Controls_Manager::COLOR, |
| 3422 |
'selectors' => [ |
| 3423 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'background-color: {{VALUE}};', |
| 3424 |
], |
| 3425 |
|
| 3426 |
] |
| 3427 |
); |
| 3428 |
|
| 3429 |
$this->add_group_control( |
| 3430 |
Group_Control_Box_Shadow::get_type(), |
| 3431 |
[ |
| 3432 |
'name' => 'coupon_button_box_shadow', |
| 3433 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button', |
| 3434 |
] |
| 3435 |
); |
| 3436 |
$this->end_controls_tab(); |
| 3437 |
|
| 3438 |
//----hover style--- |
| 3439 |
$this->start_controls_tab( |
| 3440 |
'coupon_button_button_hover', |
| 3441 |
[ |
| 3442 |
'label' => __('Hover', 'wpfnl'), |
| 3443 |
] |
| 3444 |
); |
| 3445 |
|
| 3446 |
$this->add_control( |
| 3447 |
'coupon_button_color_hover', |
| 3448 |
[ |
| 3449 |
'label' => __('Color', 'wpfnl'), |
| 3450 |
'type' => Controls_Manager::COLOR, |
| 3451 |
'default' => '', |
| 3452 |
'selectors' => [ |
| 3453 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button:hover' => 'color: {{VALUE}};', |
| 3454 |
], |
| 3455 |
] |
| 3456 |
); |
| 3457 |
|
| 3458 |
$this->add_control( |
| 3459 |
'coupon_button_bg_color_hover', |
| 3460 |
[ |
| 3461 |
'label' => __('Background Color', 'wpfnl'), |
| 3462 |
'type' => Controls_Manager::COLOR, |
| 3463 |
'selectors' => [ |
| 3464 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button:hover' => 'background-color: {{VALUE}};', |
| 3465 |
], |
| 3466 |
] |
| 3467 |
); |
| 3468 |
|
| 3469 |
$this->add_group_control( |
| 3470 |
Group_Control_Box_Shadow::get_type(), |
| 3471 |
[ |
| 3472 |
'name' => 'coupon_button_box_shadow_hover', |
| 3473 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button:hover', |
| 3474 |
] |
| 3475 |
); |
| 3476 |
$this->end_controls_tab(); |
| 3477 |
$this->end_controls_tabs(); |
| 3478 |
//----------------------- |
| 3479 |
|
| 3480 |
$this->add_responsive_control( |
| 3481 |
'coupon_button_radius', |
| 3482 |
[ |
| 3483 |
'label' => __('Radius', 'wpfnl'), |
| 3484 |
'type' => Controls_Manager::DIMENSIONS, |
| 3485 |
'size_units' => ['px', 'em', '%'], |
| 3486 |
'selectors' => [ |
| 3487 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3488 |
], |
| 3489 |
'separator' => 'before', |
| 3490 |
] |
| 3491 |
); |
| 3492 |
|
| 3493 |
$this->add_responsive_control( |
| 3494 |
'coupon_button_padding', |
| 3495 |
[ |
| 3496 |
'label' => __('Padding', 'wpfnl'), |
| 3497 |
'type' => Controls_Manager::DIMENSIONS, |
| 3498 |
'size_units' => ['px', 'em', '%'], |
| 3499 |
'selectors' => [ |
| 3500 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3501 |
], |
| 3502 |
] |
| 3503 |
); |
| 3504 |
|
| 3505 |
|
| 3506 |
$this->end_controls_section(); |
| 3507 |
} |
| 3508 |
|
| 3509 |
|
| 3510 |
/** |
| 3511 |
* Render the widget output on the frontend. |
| 3512 |
* |
| 3513 |
* Written in PHP and used to generate the final HTML. |
| 3514 |
* |
| 3515 |
* @since 1.0.0 |
| 3516 |
* |
| 3517 |
* @access protected |
| 3518 |
*/ |
| 3519 |
protected function render() |
| 3520 |
{ |
| 3521 |
|
| 3522 |
$settings = $this->get_settings_for_display(); |
| 3523 |
|
| 3524 |
// ---- Display Conditions ---------------------------------------- |
| 3525 |
$display_condition = isset($settings['display_condition_type']) ? $settings['display_condition_type'] : 'none'; |
| 3526 |
|
| 3527 |
// Check display conditions and return early if widget should be hidden |
| 3528 |
if ($display_condition === 'user_state') { |
| 3529 |
$hide_logged_in = isset($settings['hide_from_logged_in']) ? $settings['hide_from_logged_in'] : 'no'; |
| 3530 |
$hide_logged_out = isset($settings['hide_from_logged_out']) ? $settings['hide_from_logged_out'] : 'no'; |
| 3531 |
|
| 3532 |
// Hide from logged in users |
| 3533 |
if ($hide_logged_in === 'yes' && is_user_logged_in()) { |
| 3534 |
return; |
| 3535 |
} |
| 3536 |
|
| 3537 |
// Hide from logged out users |
| 3538 |
if ($hide_logged_out === 'yes' && !is_user_logged_in()) { |
| 3539 |
return; |
| 3540 |
} |
| 3541 |
|
| 3542 |
} elseif ($display_condition === 'user_role') { |
| 3543 |
$hide_for_user_role = isset($settings['hide_for_user_role']) ? $settings['hide_for_user_role'] : 'none'; |
| 3544 |
|
| 3545 |
if ($hide_for_user_role !== 'none' && is_user_logged_in()) { |
| 3546 |
$user = wp_get_current_user(); |
| 3547 |
if (in_array($hide_for_user_role, $user->roles)) { |
| 3548 |
return; |
| 3549 |
} |
| 3550 |
} |
| 3551 |
|
| 3552 |
} elseif ($display_condition === 'day') { |
| 3553 |
$disable_on_days = isset($settings['disable_on_days']) ? $settings['disable_on_days'] : array(); |
| 3554 |
|
| 3555 |
if (!empty($disable_on_days) && is_array($disable_on_days)) { |
| 3556 |
$current_day = strtolower(date('l')); // e.g., 'monday' |
| 3557 |
if (in_array($current_day, $disable_on_days)) { |
| 3558 |
return; |
| 3559 |
} |
| 3560 |
} |
| 3561 |
|
| 3562 |
} elseif ($display_condition === 'browser') { |
| 3563 |
$hide_on_browser = isset($settings['hide_on_browser']) ? $settings['hide_on_browser'] : 'none'; |
| 3564 |
|
| 3565 |
if ($hide_on_browser !== 'none') { |
| 3566 |
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; |
| 3567 |
$current_browser = ''; |
| 3568 |
|
| 3569 |
// Detect browser from user agent |
| 3570 |
if (strpos($user_agent, 'edg') !== false) { |
| 3571 |
$current_browser = 'edge'; |
| 3572 |
} elseif (strpos($user_agent, 'opr') !== false || strpos($user_agent, 'opera') !== false) { |
| 3573 |
$current_browser = 'opera_mini'; |
| 3574 |
} elseif (strpos($user_agent, 'chrome') !== false) { |
| 3575 |
$current_browser = 'chrome'; |
| 3576 |
} elseif (strpos($user_agent, 'safari') !== false) { |
| 3577 |
$current_browser = 'safari'; |
| 3578 |
} elseif (strpos($user_agent, 'firefox') !== false) { |
| 3579 |
$current_browser = 'mozilla'; |
| 3580 |
} |
| 3581 |
|
| 3582 |
// Hide widget if current browser matches |
| 3583 |
if ($current_browser === $hide_on_browser) { |
| 3584 |
return; |
| 3585 |
} |
| 3586 |
} |
| 3587 |
} elseif ($display_condition === 'operating_system') { |
| 3588 |
$hide_on_os = isset($settings['hide_on_os']) ? $settings['hide_on_os'] : 'none'; |
| 3589 |
|
| 3590 |
if ($hide_on_os !== 'none') { |
| 3591 |
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; |
| 3592 |
$current_os = ''; |
| 3593 |
|
| 3594 |
// Detect operating system from user agent |
| 3595 |
if (strpos($user_agent, 'windows') !== false || strpos($user_agent, 'win32') !== false || strpos($user_agent, 'win64') !== false) { |
| 3596 |
$current_os = 'windows'; |
| 3597 |
} elseif (strpos($user_agent, 'macintosh') !== false || strpos($user_agent, 'mac os x') !== false) { |
| 3598 |
$current_os = 'macos'; |
| 3599 |
} elseif (strpos($user_agent, 'linux') !== false && strpos($user_agent, 'android') === false) { |
| 3600 |
$current_os = 'linux'; |
| 3601 |
} elseif (strpos($user_agent, 'android') !== false) { |
| 3602 |
$current_os = 'android'; |
| 3603 |
} elseif (strpos($user_agent, 'iphone') !== false || strpos($user_agent, 'ipad') !== false || strpos($user_agent, 'ipod') !== false) { |
| 3604 |
$current_os = 'ios'; |
| 3605 |
} elseif (strpos($user_agent, 'sunos') !== false) { |
| 3606 |
$current_os = 'sunos'; |
| 3607 |
} elseif (strpos($user_agent, 'openbsd') !== false) { |
| 3608 |
$current_os = 'openbsd'; |
| 3609 |
} |
| 3610 |
|
| 3611 |
// Hide widget if current OS matches |
| 3612 |
if ($current_os === $hide_on_os) { |
| 3613 |
return; |
| 3614 |
} |
| 3615 |
} |
| 3616 |
} |
| 3617 |
// ---- End Display Conditions ------------------------------------ |
| 3618 |
|
| 3619 |
$checkout = WC()->checkout(); |
| 3620 |
if( wp_doing_ajax() && isset($_REQUEST['action']) && 'elementor_ajax' === $_REQUEST['action'] ) { |
| 3621 |
$checkout_id = absint( $_REQUEST['editor_post_id'] ); |
| 3622 |
} else { |
| 3623 |
$checkout_id = get_the_ID(); |
| 3624 |
} |
| 3625 |
|
| 3626 |
//===Coupon Enabler===// |
| 3627 |
$coupon_enabler = get_post_meta(get_the_ID(), '_wpfnl_checkout_coupon', true); |
| 3628 |
if ( 'no' === $coupon_enabler ) { |
| 3629 |
remove_action('woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10); |
| 3630 |
} |
| 3631 |
|
| 3632 |
$checkout_layout = isset($settings['checkout_layout']) ? $settings['checkout_layout'] : 'two-column'; |
| 3633 |
|
| 3634 |
//-----floating label class----- |
| 3635 |
$floating_label = isset($settings['checkout_floating_label']) ? $settings['checkout_floating_label'] : ''; |
| 3636 |
|
| 3637 |
/** |
| 3638 |
* Check if pro is activated or not |
| 3639 |
*/ |
| 3640 |
if( !Wpfnl_functions::is_wpfnl_pro_activated() && ('wpfnl-multistep' === $checkout_layout || 'wpfnl-express-checkout' === $checkout_layout) ) { |
| 3641 |
$checkout_layout = 'wpfnl-col-2'; |
| 3642 |
} |
| 3643 |
|
| 3644 |
if( PHP_SESSION_DISABLED == session_status() ) { |
| 3645 |
session_start(); |
| 3646 |
} |
| 3647 |
$_SESSION[ 'checkout_layout' ] = $checkout_layout; |
| 3648 |
|
| 3649 |
/** |
| 3650 |
* Check if pro is activated and wpfnl-express-checkout selected |
| 3651 |
*/ |
| 3652 |
if( Wpfnl_functions::is_wpfnl_pro_activated() && 'wpfnl-express-checkout' === $checkout_layout ) { |
| 3653 |
$checkout_layout .= ' wpfnl-multistep'; |
| 3654 |
} |
| 3655 |
|
| 3656 |
/** |
| 3657 |
* Check if pro is activated and wpfnl-express-checkout selected |
| 3658 |
*/ |
| 3659 |
if( Wpfnl_functions::is_wpfnl_pro_activated() && 'wpfnl-2-step' === $checkout_layout ) { |
| 3660 |
$checkout_layout .= ' wpfnl-multistep'; |
| 3661 |
} |
| 3662 |
|
| 3663 |
// Add shared modern checkout class for both modern layouts |
| 3664 |
if( 'wpfnl-modern-one-column' === $checkout_layout || 'wpfnl-modern-checkout' === $checkout_layout ) { |
| 3665 |
if( false === strpos( $checkout_layout, 'wpfnl-modern-checkout' ) ) { |
| 3666 |
$checkout_layout .= ' wpfnl-modern-checkout'; |
| 3667 |
} |
| 3668 |
} |
| 3669 |
|
| 3670 |
/** |
| 3671 |
* Check wpfnl-modern-multistep selected |
| 3672 |
*/ |
| 3673 |
if('wpfnl-modern-multistep' === $checkout_layout ) { |
| 3674 |
$checkout_layout .= ' wpfnl-modern-checkout'; |
| 3675 |
} |
| 3676 |
|
| 3677 |
|
| 3678 |
query_posts('post_type="checkout"'); |
| 3679 |
|
| 3680 |
// Persist layout and floating label so the shortcode / template picks them up. |
| 3681 |
update_post_meta( $checkout_id, '_wpfnl_checkout_layout', isset( $settings['checkout_layout'] ) ? $settings['checkout_layout'] : 'wpfnl-col-2' ); |
| 3682 |
update_post_meta( $checkout_id, '_wpfnl_floating_label', $floating_label ); |
| 3683 |
|
| 3684 |
// Persist Place Order settings for WooCommerce AJAX checkout updates. |
| 3685 |
$place_order_meta = array( |
| 3686 |
'placeOrderBtnText' => isset( $settings['place_order_btn_text'] ) ? $settings['place_order_btn_text'] : 'Place Order', |
| 3687 |
'placeOrderSubText' => isset( $settings['place_order_sub_text'] ) ? $settings['place_order_sub_text'] : '', |
| 3688 |
'placeOrderEnableIcon' => isset( $settings['place_order_enable_icon'] ) ? ( 'yes' === $settings['place_order_enable_icon'] ) : false, |
| 3689 |
'placeOrderIconStyle' => isset( $settings['place_order_icon_style'] ) ? $settings['place_order_icon_style'] : 'lock1', |
| 3690 |
'placeOrderEnablePrice'=> isset( $settings['place_order_enable_price'] ) ? ( 'yes' === $settings['place_order_enable_price'] ) : false, |
| 3691 |
'placeOrderBelowText' => isset( $settings['place_order_below_text'] ) ? $settings['place_order_below_text'] : '', |
| 3692 |
); |
| 3693 |
update_post_meta( $checkout_id, '_wpfnl_place_order_settings', $place_order_meta ); |
| 3694 |
|
| 3695 |
$place_order_filter = $this->get_place_order_button_filter( $settings ); |
| 3696 |
add_filter( 'woocommerce_order_button_html', $place_order_filter ); |
| 3697 |
|
| 3698 |
$below_text = isset( $settings['place_order_below_text'] ) ? $settings['place_order_below_text'] : ''; |
| 3699 |
$below_btn_filter = null; |
| 3700 |
if ( ! empty( $below_text ) ) { |
| 3701 |
$below_btn_filter = function() use ( $below_text ) { |
| 3702 |
echo '<div class="wpfnl-below-place-order-btn">' . wp_kses_post( $below_text ) . '</div>'; |
| 3703 |
}; |
| 3704 |
add_action( 'woocommerce_review_order_after_submit', $below_btn_filter ); |
| 3705 |
} |
| 3706 |
|
| 3707 |
do_action( 'wpfunnels/before_elementor_checkout_form', $settings ); |
| 3708 |
do_action( 'wpfunnels/before_checkout_form', $checkout_id ); |
| 3709 |
?> |
| 3710 |
<div class="wpfnl-checkout <?php echo esc_attr( $checkout_layout . ' ' . $floating_label ); ?>"> |
| 3711 |
|
| 3712 |
<?php echo do_shortcode('[woocommerce_checkout]'); ?> |
| 3713 |
|
| 3714 |
<!-- when checkout layout Express Checkout selected then show --> |
| 3715 |
<?php if( Wpfnl_functions::is_wpfnl_pro_activated() && 'wpfnl-express-checkout' === $settings['checkout_layout'] ){ |
| 3716 |
?> |
| 3717 |
<?php } ?> |
| 3718 |
</div> |
| 3719 |
<?php |
| 3720 |
|
| 3721 |
remove_filter( 'woocommerce_order_button_html', $place_order_filter ); |
| 3722 |
if ( null !== $below_btn_filter ) { |
| 3723 |
remove_action( 'woocommerce_review_order_after_submit', $below_btn_filter ); |
| 3724 |
} |
| 3725 |
} |
| 3726 |
|
| 3727 |
public function render_popup_in_editor() |
| 3728 |
{ |
| 3729 |
if (\Elementor\Plugin::$instance->editor->is_edit_mode()) { |
| 3730 |
|
| 3731 |
add_action('woocommerce_before_checkout_form', [$this, 'render_order_bump'], 10); |
| 3732 |
} |
| 3733 |
} |
| 3734 |
|
| 3735 |
/** |
| 3736 |
* Render order bump data with hooks. |
| 3737 |
* |
| 3738 |
* @since 1.0.0 |
| 3739 |
* |
| 3740 |
* @access protected |
| 3741 |
*/ |
| 3742 |
public function render_order_bump() |
| 3743 |
{ |
| 3744 |
|
| 3745 |
|
| 3746 |
$step_id = get_the_ID(); |
| 3747 |
$order_bump = get_post_meta($step_id, 'order-bump', true); |
| 3748 |
$order_bump_settings = get_post_meta($step_id, 'order-bump-settings', true); |
| 3749 |
foreach( $order_bump_settings as $key=>$ob_settings ){ |
| 3750 |
if ( $ob_settings['isEnabled'] && isset($ob_settings['product']) && $ob_settings['product'] != '' ) { |
| 3751 |
// Check conditional rules before displaying |
| 3752 |
if ( Wpfnl_Order_Bump_Rules::should_display_order_bump( $ob_settings ) ) { |
| 3753 |
$this->render_order_bump_template($ob_settings); |
| 3754 |
} |
| 3755 |
} |
| 3756 |
} |
| 3757 |
|
| 3758 |
|
| 3759 |
} |
| 3760 |
|
| 3761 |
public function render_order_bump_template($settings) |
| 3762 |
{ |
| 3763 |
if (!empty($settings['selectedStyle'])) { |
| 3764 |
|
| 3765 |
if ($settings['position'] == 'popup') { |
| 3766 |
if (\Elementor\Plugin::$instance->editor->is_edit_mode()) { |
| 3767 |
echo '<h5 style="margin-bottom: 15px;"><strong>' . __('To see the pop-up offer in action, please preview or view the page.', 'wpfnl') . '</strong></h5>'; |
| 3768 |
} else { |
| 3769 |
require_once WPFNL_DIR . 'public/modules/checkout/templates-style/order-bump-template-' . $settings['selectedStyle'] . '.php'; |
| 3770 |
} |
| 3771 |
|
| 3772 |
} else { |
| 3773 |
require_once WPFNL_DIR . 'public/modules/checkout/templates-style/order-bump-template-' . $settings['selectedStyle'] . '.php'; |
| 3774 |
} |
| 3775 |
} |
| 3776 |
} |
| 3777 |
|
| 3778 |
} |
| 3779 |
|