| 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 |
|
| 18 |
|
| 19 |
if (!defined('ABSPATH')) { |
| 20 |
exit; |
| 21 |
} // Exit if accessed directly |
| 22 |
|
| 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 |
protected function init_controls() { |
| 45 |
if ( version_compare(ELEMENTOR_VERSION, '3.1.0', '>=') ) { |
| 46 |
$this->register_controls(); |
| 47 |
} else { |
| 48 |
$this->_register_controls(); |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
/** |
| 53 |
* Retrieve the widget name. |
| 54 |
* |
| 55 |
* @return string Widget name. |
| 56 |
* @since 1.0.0 |
| 57 |
* |
| 58 |
* @access public |
| 59 |
*/ |
| 60 |
public function get_name() |
| 61 |
{ |
| 62 |
return 'wpfnl-checkout'; |
| 63 |
} |
| 64 |
|
| 65 |
/** |
| 66 |
* Retrieve the widget title. |
| 67 |
* |
| 68 |
* @return string Widget title. |
| 69 |
* @since 1.0.0 |
| 70 |
* |
| 71 |
* @access public |
| 72 |
*/ |
| 73 |
public function get_title() |
| 74 |
{ |
| 75 |
return __('Checkout', 'wpfnl'); |
| 76 |
} |
| 77 |
|
| 78 |
/** |
| 79 |
* Retrieve the widget icon. |
| 80 |
* |
| 81 |
* @return string Widget icon. |
| 82 |
* @since 1.0.0 |
| 83 |
* |
| 84 |
* @access public |
| 85 |
*order-bump-settings |
| 86 |
*/ |
| 87 |
public function get_icon() |
| 88 |
{ |
| 89 |
return 'icon-wpfnl checkout-icon'; |
| 90 |
} |
| 91 |
|
| 92 |
/** |
| 93 |
* Retrieve the list of categories the widget belongs to. |
| 94 |
* |
| 95 |
* Used to determine where to display the widget in the editor. |
| 96 |
* |
| 97 |
* Note that currently Elementor supports only one category. |
| 98 |
* When multiple categories passed, Elementor uses the first one. |
| 99 |
* |
| 100 |
* @return array Widget categories. |
| 101 |
* @since 1.0.0 |
| 102 |
* |
| 103 |
* @access public |
| 104 |
*/ |
| 105 |
public function get_categories() |
| 106 |
{ |
| 107 |
return ['wp-funnel']; |
| 108 |
} |
| 109 |
|
| 110 |
/** |
| 111 |
* Retrieve the list of scripts the widget depended on. |
| 112 |
* |
| 113 |
* Used to set scripts dependencies required to run the widget. |
| 114 |
* |
| 115 |
* @return array Widget scripts dependencies. |
| 116 |
* @since 1.0.0 |
| 117 |
* |
| 118 |
* @access public |
| 119 |
*/ |
| 120 |
public function get_script_depends() |
| 121 |
{ |
| 122 |
return ['wpfnl-checkout-widget']; |
| 123 |
} |
| 124 |
|
| 125 |
/** |
| 126 |
* Get all funnel steps |
| 127 |
* |
| 128 |
* @since 1.0.0 |
| 129 |
* |
| 130 |
* @access protected |
| 131 |
*/ |
| 132 |
protected function get_steps_array($type = 'upsell') |
| 133 |
{ |
| 134 |
$options = $this->get_prev_next_link_options(); |
| 135 |
$response = []; |
| 136 |
|
| 137 |
if (isset($options[$type])) { |
| 138 |
$prime_data = $options[$type]; |
| 139 |
foreach ($prime_data as $data) { |
| 140 |
$response[$data['id']] = $data['title']; |
| 141 |
} |
| 142 |
} |
| 143 |
return $response; |
| 144 |
} |
| 145 |
|
| 146 |
public function get_prev_next_link_options() |
| 147 |
{ |
| 148 |
$associate_funnel_id = get_post_meta(get_the_ID(), '_funnel_id', true); |
| 149 |
$steps_array = [ |
| 150 |
'upsell' => 'Upsell', |
| 151 |
'downsell' => 'Downsell', |
| 152 |
'thankyou' => 'Thankyou' |
| 153 |
]; |
| 154 |
$option_group = []; |
| 155 |
foreach ($steps_array as $key => $value) { |
| 156 |
$args = [ |
| 157 |
'posts_per_page' => -1, |
| 158 |
'orderby' => 'date', |
| 159 |
'order' => 'DESC', |
| 160 |
'post_type' => WPFNL_STEPS_POST_TYPE, |
| 161 |
'post_status' => 'publish', |
| 162 |
'post__not_in' => [$this->get_id()], |
| 163 |
'meta_query' => [ |
| 164 |
'relation' => 'AND', |
| 165 |
[ |
| 166 |
'key' => '_step_type', |
| 167 |
'value' => $key, |
| 168 |
'compare' => '=', |
| 169 |
], |
| 170 |
[ |
| 171 |
'key' => '_funnel_id', |
| 172 |
'value' => $associate_funnel_id, |
| 173 |
'compare' => '=', |
| 174 |
], |
| 175 |
], |
| 176 |
]; |
| 177 |
$query = new \WP_Query($args); |
| 178 |
$steps = $query->posts; |
| 179 |
if ($steps) { |
| 180 |
foreach ($steps as $s) { |
| 181 |
$option_group[$key][] = [ |
| 182 |
'id' => $s->ID, |
| 183 |
'title' => $s->post_title, |
| 184 |
]; |
| 185 |
} |
| 186 |
} |
| 187 |
} |
| 188 |
return $option_group; |
| 189 |
} |
| 190 |
|
| 191 |
/** |
| 192 |
* Get all WC products |
| 193 |
* |
| 194 |
* @since 1.0.0 |
| 195 |
* |
| 196 |
* @access protected |
| 197 |
*/ |
| 198 |
protected function get_products_array() |
| 199 |
{ |
| 200 |
$products = []; |
| 201 |
$ids = wc_get_products(['return' => 'ids', 'limit' => -1]); |
| 202 |
if( !empty($ids) ){ |
| 203 |
foreach ($ids as $id) { |
| 204 |
$title = get_the_title($id); |
| 205 |
$products[$id] = $title ? $title : ''; |
| 206 |
} |
| 207 |
} |
| 208 |
|
| 209 |
return $products; |
| 210 |
} |
| 211 |
|
| 212 |
/** |
| 213 |
* Order Bump Settings |
| 214 |
* |
| 215 |
* @since 1.0.0 |
| 216 |
* |
| 217 |
* @access protected |
| 218 |
*/ |
| 219 |
protected function order_bump_primary_settings() |
| 220 |
{ |
| 221 |
$default = [ |
| 222 |
]; |
| 223 |
|
| 224 |
$settings = get_post_meta(get_the_ID(), 'order-bump-settings', true); |
| 225 |
|
| 226 |
if ($settings) { |
| 227 |
return $settings; |
| 228 |
} |
| 229 |
|
| 230 |
return $default; |
| 231 |
} |
| 232 |
|
| 233 |
|
| 234 |
/** |
| 235 |
* Get layout types |
| 236 |
* |
| 237 |
* @return array |
| 238 |
*/ |
| 239 |
private function get_layout_types() { |
| 240 |
$layouts = array( |
| 241 |
'wpfnl-col-1' => __('1 Column Checkout', 'wpfnl'), |
| 242 |
'wpfnl-col-2' => __('2 Column Checkout', 'wpfnl'), |
| 243 |
'wpfnl-2-step' => __('2 Step Checkout', 'wpfnl'), |
| 244 |
'wpfnl-multistep' => __('Multistep Checkout', 'wpfnl'), |
| 245 |
'wpfnl-express-checkout' => __('Express Checkout', 'wpfnl'), |
| 246 |
); |
| 247 |
return $layouts; |
| 248 |
} |
| 249 |
|
| 250 |
|
| 251 |
/** |
| 252 |
* Register cart controls controls. |
| 253 |
* |
| 254 |
* @since 1.0.0 |
| 255 |
* @access protected |
| 256 |
*/ |
| 257 |
protected function _register_controls() |
| 258 |
{ |
| 259 |
$this->start_controls_section( |
| 260 |
'section_content', |
| 261 |
[ |
| 262 |
'label' => __('Funnel Checkout', 'wpfnl'), |
| 263 |
] |
| 264 |
); |
| 265 |
|
| 266 |
$this->add_control( |
| 267 |
'checkout_layout', |
| 268 |
[ |
| 269 |
'label' => __('Select Layout', 'wpfnl'), |
| 270 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 271 |
'default' => 'wpfnl-col-2', |
| 272 |
'label_block' => true, |
| 273 |
'options' => $this->get_layout_types(), |
| 274 |
] |
| 275 |
); |
| 276 |
|
| 277 |
$this->add_control( |
| 278 |
'checkout_floating_label', |
| 279 |
[ |
| 280 |
'label' => __('Floating Label', 'wpfnl'), |
| 281 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 282 |
'default' => '', |
| 283 |
'label_block' => true, |
| 284 |
'options' => array( |
| 285 |
'' => __('Select option', 'wpfnl'), |
| 286 |
'floating-label' => __('Floating Label', 'wpfnl'), |
| 287 |
), |
| 288 |
'separator' => 'after' |
| 289 |
] |
| 290 |
); |
| 291 |
|
| 292 |
if ( ! Wpfnl_functions::is_wpfnl_pro_activated() ) { |
| 293 |
|
| 294 |
$this->add_control( |
| 295 |
'layout_upgrade_pro', |
| 296 |
array( |
| 297 |
'type' => Controls_Manager::RAW_HTML, |
| 298 |
'raw' => sprintf( __( 'This is a pro feature. <a href="https://getwpfunnels.com/pricing/" target="_blank" rel="noopener">Upgrade Now!</a>.', 'wpfnl' )), |
| 299 |
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', |
| 300 |
'condition' => array( |
| 301 |
'checkout_layout' => ['wpfnl-multistep', 'wpfnl-express-checkout', 'wpfnl-2-step'], |
| 302 |
), |
| 303 |
) |
| 304 |
); |
| 305 |
} |
| 306 |
|
| 307 |
//=== Order Bump Start ===// |
| 308 |
$order_bump_enabler = ''; |
| 309 |
$this->ob_register_control(); |
| 310 |
//=== Order Bump End ===// |
| 311 |
|
| 312 |
$this->end_controls_section(); |
| 313 |
|
| 314 |
$this->register_billing_style_controls(); |
| 315 |
$this->register_shipping_style_controls(); |
| 316 |
$this->register_your_order_style_controls(); |
| 317 |
$this->register_payment_section_style_controls(); |
| 318 |
$this->register_coupon_style_controls(); |
| 319 |
$this->register_error_style_controls(); |
| 320 |
$this->register_multistep_style_controls(); |
| 321 |
} |
| 322 |
|
| 323 |
|
| 324 |
/** |
| 325 |
* Register cart controls controls. |
| 326 |
* |
| 327 |
* @since x.x.x |
| 328 |
* @access protected |
| 329 |
*/ |
| 330 |
protected function register_controls() |
| 331 |
{ |
| 332 |
$this->start_controls_section( |
| 333 |
'section_content', |
| 334 |
[ |
| 335 |
'label' => __('Funnel Checkout', 'wpfnl'), |
| 336 |
] |
| 337 |
); |
| 338 |
|
| 339 |
$this->add_control( |
| 340 |
'checkout_layout', |
| 341 |
[ |
| 342 |
'label' => __('Select Layout', 'wpfnl'), |
| 343 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 344 |
'default' => 'wpfnl-col-2', |
| 345 |
'label_block' => true, |
| 346 |
'options' => $this->get_layout_types(), |
| 347 |
] |
| 348 |
); |
| 349 |
|
| 350 |
$this->add_control( |
| 351 |
'checkout_floating_label', |
| 352 |
[ |
| 353 |
'label' => __('Floating Label', 'wpfnl'), |
| 354 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 355 |
'default' => '', |
| 356 |
'label_block' => true, |
| 357 |
'options' => array( |
| 358 |
'' => __('Select option', 'wpfnl'), |
| 359 |
'floating-label' => __('Floating Label', 'wpfnl'), |
| 360 |
), |
| 361 |
'separator' => 'after' |
| 362 |
] |
| 363 |
); |
| 364 |
|
| 365 |
if ( ! Wpfnl_functions::is_wpfnl_pro_activated() ) { |
| 366 |
|
| 367 |
$this->add_control( |
| 368 |
'layout_upgrade_pro', |
| 369 |
array( |
| 370 |
'type' => Controls_Manager::RAW_HTML, |
| 371 |
'raw' => sprintf( __( 'This is a pro feature. <a href="https://getwpfunnels.com/pricing/" target="_blank" rel="noopener">Upgrade Now!</a>.', 'wpfnl' ) ), |
| 372 |
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', |
| 373 |
'condition' => array( |
| 374 |
'checkout_layout' => ['wpfnl-multistep', 'wpfnl-express-checkout', 'wpfnl-2-step'], |
| 375 |
), |
| 376 |
) |
| 377 |
); |
| 378 |
} |
| 379 |
|
| 380 |
//=== Order Bump Start ===// |
| 381 |
$order_bump_enabler = ''; |
| 382 |
$this->ob_register_control(); |
| 383 |
|
| 384 |
$ob_settings = $this->order_bump_primary_settings(); |
| 385 |
//=== Order Bump End ===// |
| 386 |
|
| 387 |
$this->end_controls_section(); |
| 388 |
|
| 389 |
$this->register_billing_style_controls(); |
| 390 |
$this->register_shipping_style_controls(); |
| 391 |
$this->register_your_order_style_controls(); |
| 392 |
$this->register_payment_section_style_controls(); |
| 393 |
$this->register_coupon_style_controls(); |
| 394 |
$this->register_error_style_controls(); |
| 395 |
$this->register_multistep_style_controls(); |
| 396 |
} |
| 397 |
|
| 398 |
|
| 399 |
private function ob_register_control(){ |
| 400 |
$ob_settings = $this->order_bump_primary_settings(); |
| 401 |
if( count($ob_settings) > 0 ){ |
| 402 |
foreach( $ob_settings as $key=>$settings ){ |
| 403 |
$key = (int) $key; |
| 404 |
$index = ((int)($key) + 1); |
| 405 |
|
| 406 |
$this->add_control( |
| 407 |
'order_bump_'.$key, |
| 408 |
[ |
| 409 |
'label' => sprintf( __("Enable Order bump %s", "wpfnl"),$index ), // phpcs:ignore |
| 410 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 411 |
'default' => $settings['isEnabled'] ? 'yes' : 'no', |
| 412 |
'options' => [ |
| 413 |
'yes' => __('Yes', 'wpfnl'), |
| 414 |
'no' => __('No', 'wpfnl'), |
| 415 |
], |
| 416 |
] |
| 417 |
); |
| 418 |
|
| 419 |
$this->add_control( |
| 420 |
'order_bump_position_'.$key, |
| 421 |
[ |
| 422 |
'label' => sprintf( __( "Order bump %s Position", "wpfnl"), $index ), // phpcs:ignore |
| 423 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 424 |
'default' => $ob_settings[$key]['position'], |
| 425 |
'options' => [ |
| 426 |
'before-order' => __('Before Order Details', 'wpfnl'), |
| 427 |
'after-order' => __('After Order Details', 'wpfnl'), |
| 428 |
'before-checkout' => __('Before Checkout Details', 'wpfnl'), |
| 429 |
'after-customer-details' => __('After Customer Details', 'wpfnl'), |
| 430 |
'after-payment' => __('After Payment Options', 'wpfnl'), |
| 431 |
'before-payment' => __('Before Payment Options', 'wpfnl'), |
| 432 |
'popup' => __('Pop-up offer', 'wpfnl'), |
| 433 |
], |
| 434 |
'label_block' => true, |
| 435 |
'condition' => [ |
| 436 |
'order_bump_'.$key => 'yes', |
| 437 |
] |
| 438 |
] |
| 439 |
); |
| 440 |
|
| 441 |
} |
| 442 |
} |
| 443 |
} |
| 444 |
|
| 445 |
/** |
| 446 |
* Register Multistep style Controls. |
| 447 |
* |
| 448 |
* @since x.x.x |
| 449 |
* @access protected |
| 450 |
*/ |
| 451 |
protected function register_multistep_style_controls() |
| 452 |
{ |
| 453 |
$this->start_controls_section( |
| 454 |
'section_multistep_style_fields', |
| 455 |
[ |
| 456 |
'label' => __('Multistep Section', 'wpfnl'), |
| 457 |
'tab' => Controls_Manager::TAB_STYLE, |
| 458 |
'condition' => [ |
| 459 |
'checkout_layout' => ['wpfnl-multistep', 'wpfnl-express-checkout', 'wpfnl-2-step'], |
| 460 |
], |
| 461 |
] |
| 462 |
); |
| 463 |
|
| 464 |
|
| 465 |
// ----start step title style----- |
| 466 |
$this->add_control( |
| 467 |
'step_title_heading', |
| 468 |
[ |
| 469 |
'label' => __('Step Title', 'wpfnl'), |
| 470 |
'type' => Controls_Manager::HEADING, |
| 471 |
'label_block' => true, |
| 472 |
] |
| 473 |
); |
| 474 |
|
| 475 |
$this->add_control( |
| 476 |
'step_title_color', |
| 477 |
[ |
| 478 |
'label' => __('Color', 'wpfnl'), |
| 479 |
'type' => Controls_Manager::COLOR, |
| 480 |
'default' => '#363B4E', |
| 481 |
'selectors' => [ |
| 482 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-title' => 'color: {{VALUE}};' |
| 483 |
], |
| 484 |
|
| 485 |
|
| 486 |
] |
| 487 |
); |
| 488 |
|
| 489 |
$this->add_group_control( |
| 490 |
Group_Control_Typography::get_type(), |
| 491 |
[ |
| 492 |
'name' => 'step_title_typography', |
| 493 |
'label' => 'Typography', |
| 494 |
'selector' => '{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-title', |
| 495 |
] |
| 496 |
); |
| 497 |
|
| 498 |
// ----start active step style----- |
| 499 |
$this->add_control( |
| 500 |
'hr2', |
| 501 |
[ |
| 502 |
'type' => \Elementor\Controls_Manager::DIVIDER, |
| 503 |
] |
| 504 |
); |
| 505 |
|
| 506 |
$this->add_control( |
| 507 |
'multistep_checkout_state', |
| 508 |
[ |
| 509 |
'label' => __('Step State', 'wpfnl'), |
| 510 |
'type' => Controls_Manager::HEADING, |
| 511 |
'label_block' => true, |
| 512 |
] |
| 513 |
); |
| 514 |
|
| 515 |
$this->add_group_control( |
| 516 |
\Elementor\Group_Control_Box_Shadow::get_type(), |
| 517 |
[ |
| 518 |
'name' => 'step_box_shadow', |
| 519 |
'label' => __( 'Box Shadow', 'wpfnl' ), |
| 520 |
'selector' => '{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon', |
| 521 |
] |
| 522 |
); |
| 523 |
|
| 524 |
//----start normal tab style--- |
| 525 |
$this->start_controls_tabs('multistep_checkout_tab'); |
| 526 |
$this->start_controls_tab( |
| 527 |
'multistep_checkout_normal', |
| 528 |
[ |
| 529 |
'label' => __('Normal', 'wpfnl'), |
| 530 |
] |
| 531 |
); |
| 532 |
|
| 533 |
$this->add_control( |
| 534 |
'step_normal_line_color', |
| 535 |
[ |
| 536 |
'label' => __('Line Color', 'wpfnl'), |
| 537 |
'type' => Controls_Manager::COLOR, |
| 538 |
'default' => '#eee', |
| 539 |
'selectors' => [ |
| 540 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard:before' => 'background-color: {{VALUE}};', |
| 541 |
], |
| 542 |
] |
| 543 |
); |
| 544 |
|
| 545 |
$this->add_control( |
| 546 |
'step_normal_box_bgcolor', |
| 547 |
[ |
| 548 |
'label' => __('Box Background Color', 'wpfnl'), |
| 549 |
'type' => Controls_Manager::COLOR, |
| 550 |
'default' => '#e8e8ed', |
| 551 |
'selectors' => [ |
| 552 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'background-color: {{VALUE}};', |
| 553 |
], |
| 554 |
] |
| 555 |
); |
| 556 |
|
| 557 |
$this->add_control( |
| 558 |
'step_normal_icon_color', |
| 559 |
[ |
| 560 |
'label' => __('Icon Color', 'wpfnl'), |
| 561 |
'type' => Controls_Manager::COLOR, |
| 562 |
'default' => '#6E42D3', |
| 563 |
'selectors' => [ |
| 564 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon svg path' => 'fill: {{VALUE}};', |
| 565 |
], |
| 566 |
] |
| 567 |
); |
| 568 |
|
| 569 |
$this->add_control( |
| 570 |
'step_normal_box_border_style', |
| 571 |
[ |
| 572 |
'label' => __('Border Style', 'wpfnl'), |
| 573 |
'type' => Controls_Manager::SELECT, |
| 574 |
'label_block' => false, |
| 575 |
'default' => 'solid', |
| 576 |
'options' => [ |
| 577 |
'inherit' => __('None', 'wpfnl'), |
| 578 |
'solid' => __('Solid', 'wpfnl'), |
| 579 |
'double' => __('Double', 'wpfnl'), |
| 580 |
'dotted' => __('Dotted', 'wpfnl'), |
| 581 |
'dashed' => __('Dashed', 'wpfnl'), |
| 582 |
], |
| 583 |
'selectors' => [ |
| 584 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'border-style: {{VALUE}};', |
| 585 |
], |
| 586 |
] |
| 587 |
); |
| 588 |
|
| 589 |
$this->add_control( |
| 590 |
'step_normal_box_border_size', |
| 591 |
[ |
| 592 |
'label' => __('Border Width', 'wpfnl'), |
| 593 |
'type' => Controls_Manager::DIMENSIONS, |
| 594 |
'size_units' => ['px'], |
| 595 |
'selectors' => [ |
| 596 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 597 |
], |
| 598 |
'condition' => [ |
| 599 |
'step_normal_box_border_style!' => 'inherit', |
| 600 |
] |
| 601 |
] |
| 602 |
); |
| 603 |
|
| 604 |
$this->add_control( |
| 605 |
'step_normal_box_border_color', |
| 606 |
[ |
| 607 |
'label' => __('Border Color', 'wpfnl'), |
| 608 |
'type' => Controls_Manager::COLOR, |
| 609 |
'default' => '#ffffff', |
| 610 |
'selectors' => [ |
| 611 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li .step-icon' => 'border-color: {{VALUE}};', |
| 612 |
], |
| 613 |
'condition' => [ |
| 614 |
'step_normal_box_border_style!' => 'inherit', |
| 615 |
] |
| 616 |
|
| 617 |
] |
| 618 |
); |
| 619 |
|
| 620 |
$this->end_controls_tab(); |
| 621 |
//----end normal tab style--- |
| 622 |
|
| 623 |
//----active/completed tab style--- |
| 624 |
$this->start_controls_tab( |
| 625 |
'multistep_checkout_active', |
| 626 |
[ |
| 627 |
'label' => __('Active / Completed', 'wpfnl'), |
| 628 |
] |
| 629 |
); |
| 630 |
|
| 631 |
$this->add_control( |
| 632 |
'step_active_line_color', |
| 633 |
[ |
| 634 |
'label' => __('Line Color', 'wpfnl'), |
| 635 |
'type' => Controls_Manager::COLOR, |
| 636 |
'default' => '#6E42D3', |
| 637 |
'selectors' => [ |
| 638 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard > li.completed:before, |
| 639 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard > li.current:before' => 'background-color: {{VALUE}};', |
| 640 |
], |
| 641 |
] |
| 642 |
); |
| 643 |
|
| 644 |
$this->add_control( |
| 645 |
'step_active_box_bgcolor', |
| 646 |
[ |
| 647 |
'label' => __('Box Background Color', 'wpfnl'), |
| 648 |
'type' => Controls_Manager::COLOR, |
| 649 |
'default' => '#6E42D3', |
| 650 |
'selectors' => [ |
| 651 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 652 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'background-color: {{VALUE}};', |
| 653 |
], |
| 654 |
] |
| 655 |
); |
| 656 |
|
| 657 |
$this->add_control( |
| 658 |
'step_active_icon_color', |
| 659 |
[ |
| 660 |
'label' => __('Icon Color', 'wpfnl'), |
| 661 |
'type' => Controls_Manager::COLOR, |
| 662 |
'default' => '#ffffff', |
| 663 |
'selectors' => [ |
| 664 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon svg path, |
| 665 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon svg path' => 'fill: {{VALUE}};', |
| 666 |
], |
| 667 |
] |
| 668 |
); |
| 669 |
|
| 670 |
$this->add_control( |
| 671 |
'step_active_box_border_style', |
| 672 |
[ |
| 673 |
'label' => __('Border Style', 'wpfnl'), |
| 674 |
'type' => Controls_Manager::SELECT, |
| 675 |
'label_block' => false, |
| 676 |
'default' => 'solid', |
| 677 |
'options' => [ |
| 678 |
'inherit' => __('None', 'wpfnl'), |
| 679 |
'solid' => __('Solid', 'wpfnl'), |
| 680 |
'double' => __('Double', 'wpfnl'), |
| 681 |
'dotted' => __('Dotted', 'wpfnl'), |
| 682 |
'dashed' => __('Dashed', 'wpfnl'), |
| 683 |
], |
| 684 |
'selectors' => [ |
| 685 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 686 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'border-style: {{VALUE}};', |
| 687 |
], |
| 688 |
] |
| 689 |
); |
| 690 |
|
| 691 |
$this->add_control( |
| 692 |
'step_active_box_border_size', |
| 693 |
[ |
| 694 |
'label' => __('Border Width', 'wpfnl'), |
| 695 |
'type' => Controls_Manager::DIMENSIONS, |
| 696 |
'size_units' => ['px'], |
| 697 |
'selectors' => [ |
| 698 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 699 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 700 |
], |
| 701 |
'condition' => [ |
| 702 |
'step_active_box_border_style!' => 'inherit', |
| 703 |
] |
| 704 |
] |
| 705 |
); |
| 706 |
|
| 707 |
$this->add_control( |
| 708 |
'step_active_box_border_color', |
| 709 |
[ |
| 710 |
'label' => __('Border Color', 'wpfnl'), |
| 711 |
'type' => Controls_Manager::COLOR, |
| 712 |
'default' => '#6E42D3', |
| 713 |
'selectors' => [ |
| 714 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.completed .step-icon, |
| 715 |
{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-wizard li.current .step-icon' => 'border-color: {{VALUE}};', |
| 716 |
], |
| 717 |
'condition' => [ |
| 718 |
'step_active_box_border_style!' => 'inherit', |
| 719 |
] |
| 720 |
|
| 721 |
] |
| 722 |
); |
| 723 |
|
| 724 |
$this->end_controls_tab(); |
| 725 |
$this->end_controls_tabs(); |
| 726 |
// ----end active step style----- |
| 727 |
|
| 728 |
|
| 729 |
// ----start navigation button style----- |
| 730 |
$this->add_control( |
| 731 |
'hr3', |
| 732 |
[ |
| 733 |
'type' => \Elementor\Controls_Manager::DIVIDER, |
| 734 |
] |
| 735 |
); |
| 736 |
|
| 737 |
$this->add_control( |
| 738 |
'step_navigation_btn', |
| 739 |
[ |
| 740 |
'label' => __('Navigation Button', 'wpfnl'), |
| 741 |
'type' => Controls_Manager::HEADING, |
| 742 |
'label_block' => true, |
| 743 |
] |
| 744 |
); |
| 745 |
|
| 746 |
//----start normal tab style--- |
| 747 |
$this->start_controls_tabs('step_navigation_btn_tab'); |
| 748 |
$this->start_controls_tab( |
| 749 |
'step_navigation_btn_normal', |
| 750 |
[ |
| 751 |
'label' => __('Normal', 'wpfnl'), |
| 752 |
] |
| 753 |
); |
| 754 |
|
| 755 |
$this->add_control( |
| 756 |
'step_navigation_btn_color', |
| 757 |
[ |
| 758 |
'label' => __('Color', 'wpfnl'), |
| 759 |
'type' => Controls_Manager::COLOR, |
| 760 |
'default' => '', |
| 761 |
'selectors' => [ |
| 762 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'color: {{VALUE}}!important;', |
| 763 |
], |
| 764 |
] |
| 765 |
); |
| 766 |
|
| 767 |
$this->add_control( |
| 768 |
'step_navigation_btn_bgcolor', |
| 769 |
[ |
| 770 |
'label' => __('Background Color', 'wpfnl'), |
| 771 |
'type' => Controls_Manager::COLOR, |
| 772 |
'default' => '', |
| 773 |
'selectors' => [ |
| 774 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'background-color: {{VALUE}}!important;', |
| 775 |
], |
| 776 |
] |
| 777 |
); |
| 778 |
|
| 779 |
$this->end_controls_tab(); |
| 780 |
//----end normal tab style--- |
| 781 |
|
| 782 |
//----hover tab style--- |
| 783 |
$this->start_controls_tab( |
| 784 |
'step_navigation_btn_hover', |
| 785 |
[ |
| 786 |
'label' => __('Hover', 'wpfnl'), |
| 787 |
] |
| 788 |
); |
| 789 |
|
| 790 |
$this->add_control( |
| 791 |
'step_navigation_btn_hover_color', |
| 792 |
[ |
| 793 |
'label' => __('Color', 'wpfnl'), |
| 794 |
'type' => Controls_Manager::COLOR, |
| 795 |
'default' => '', |
| 796 |
'selectors' => [ |
| 797 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]:not(:disabled):hover' => 'color: {{VALUE}}!important;', |
| 798 |
], |
| 799 |
] |
| 800 |
); |
| 801 |
|
| 802 |
$this->add_control( |
| 803 |
'step_navigation_btn_hover_bgcolor', |
| 804 |
[ |
| 805 |
'label' => __('Background Color', 'wpfnl'), |
| 806 |
'type' => Controls_Manager::COLOR, |
| 807 |
'default' => '', |
| 808 |
'selectors' => [ |
| 809 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]:not(:disabled):hover' => 'background-color: {{VALUE}}!important;', |
| 810 |
], |
| 811 |
] |
| 812 |
); |
| 813 |
|
| 814 |
$this->end_controls_tab(); |
| 815 |
$this->end_controls_tabs(); |
| 816 |
// ----end hover step style----- |
| 817 |
|
| 818 |
$this->add_group_control( |
| 819 |
Group_Control_Typography::get_type(), |
| 820 |
[ |
| 821 |
'name' => 'step_navigation_btn_typography', |
| 822 |
'label' => 'Typography', |
| 823 |
'selector' => '{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]', |
| 824 |
] |
| 825 |
); |
| 826 |
|
| 827 |
$this->add_responsive_control( |
| 828 |
'step_navigation_btn_padding', |
| 829 |
[ |
| 830 |
'label' => __('Padding', 'wpfnl'), |
| 831 |
'type' => Controls_Manager::DIMENSIONS, |
| 832 |
'size_units' => ['px', 'em', '%'], |
| 833 |
'selectors' => [ |
| 834 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 835 |
], |
| 836 |
] |
| 837 |
); |
| 838 |
|
| 839 |
$this->add_responsive_control( |
| 840 |
'step_navigation_btn_radius', |
| 841 |
[ |
| 842 |
'label' => __('Radius', 'wpfnl'), |
| 843 |
'type' => Controls_Manager::DIMENSIONS, |
| 844 |
'size_units' => ['px', 'em', '%'], |
| 845 |
'selectors' => [ |
| 846 |
'{{WRAPPER}} .wpfnl-multistep .wpfnl-multistep-navigation button[type=button]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 847 |
], |
| 848 |
] |
| 849 |
); |
| 850 |
|
| 851 |
$this->end_controls_section(); |
| 852 |
} |
| 853 |
|
| 854 |
/** |
| 855 |
* Register Sections error Controls. |
| 856 |
* |
| 857 |
* @since x.x.x |
| 858 |
* @access protected |
| 859 |
*/ |
| 860 |
protected function register_error_style_controls() |
| 861 |
{ |
| 862 |
$this->start_controls_section( |
| 863 |
'section_error_style_fields', |
| 864 |
[ |
| 865 |
'label' => __('Field Validation & Error Messages', 'wpfnl'), |
| 866 |
'tab' => Controls_Manager::TAB_STYLE, |
| 867 |
] |
| 868 |
); |
| 869 |
|
| 870 |
$this->add_control( |
| 871 |
'error_fields_text', |
| 872 |
[ |
| 873 |
'label' => __('Field Validation', 'wpfnl'), |
| 874 |
'type' => Controls_Manager::HEADING, |
| 875 |
'label_block' => true, |
| 876 |
] |
| 877 |
); |
| 878 |
|
| 879 |
$this->add_control( |
| 880 |
'error_label_color', |
| 881 |
[ |
| 882 |
'label' => __('Label Color', 'wpfnl'), |
| 883 |
'type' => Controls_Manager::COLOR, |
| 884 |
'default' => '', |
| 885 |
'selectors' => [ |
| 886 |
'{{WRAPPER}} .woocommerce form .form-row.woocommerce-invalid label' => 'color: {{VALUE}};', |
| 887 |
], |
| 888 |
] |
| 889 |
); |
| 890 |
|
| 891 |
$this->add_control( |
| 892 |
'error_field_border_color', |
| 893 |
[ |
| 894 |
'label' => __('Field Border Color', 'wpfnl'), |
| 895 |
'type' => Controls_Manager::COLOR, |
| 896 |
'selectors' => [ |
| 897 |
'{{WRAPPER}} .wpfunnels-checkout-form .select2-container--default.field-required .select2-selection--single, |
| 898 |
{{WRAPPER}} form .form-row input.input-text.field-required, |
| 899 |
{{WRAPPER}} form .form-row textarea.input-text.field-required, |
| 900 |
{{WRAPPER}} #order_review .input-text.field-required |
| 901 |
{{WRAPPER}} form .form-row.woocommerce-invalid .select2-container, |
| 902 |
{{WRAPPER}} form .form-row.woocommerce-invalid input.input-text, |
| 903 |
{{WRAPPER}} form .form-row.woocommerce-invalid select' => 'border-color: {{VALUE}};', |
| 904 |
|
| 905 |
], |
| 906 |
'separator' => 'after', |
| 907 |
] |
| 908 |
); |
| 909 |
|
| 910 |
$this->add_control( |
| 911 |
'error_fields_section', |
| 912 |
[ |
| 913 |
'label' => __('Error Messages', 'wpfnl'), |
| 914 |
'type' => Controls_Manager::HEADING, |
| 915 |
'label_block' => true, |
| 916 |
] |
| 917 |
); |
| 918 |
|
| 919 |
$this->add_control( |
| 920 |
'error_text_color', |
| 921 |
[ |
| 922 |
'label' => __('Error Message Color', 'wpfnl'), |
| 923 |
'type' => Controls_Manager::COLOR, |
| 924 |
'default' => '', |
| 925 |
'selectors' => [ |
| 926 |
'{{WRAPPER}} .woocommerce-error, |
| 927 |
{{WRAPPER}} .woocommerce-NoticeGroup .woocommerce-error, |
| 928 |
{{WRAPPER}} .woocommerce-notices-wrapper .woocommerce-error' => 'color: {{VALUE}};', |
| 929 |
], |
| 930 |
] |
| 931 |
); |
| 932 |
|
| 933 |
$this->add_control( |
| 934 |
'error_bg_color', |
| 935 |
[ |
| 936 |
'label' => __('Background Color', 'wpfnl'), |
| 937 |
'type' => Controls_Manager::COLOR, |
| 938 |
'selectors' => [ |
| 939 |
'{{WRAPPER}} .woocommerce-error, |
| 940 |
{{WRAPPER}} .woocommerce-NoticeGroup .woocommerce-error, |
| 941 |
{{WRAPPER}} .woocommerce-notices-wrapper .woocommerce-error' => 'background-color: {{VALUE}};', |
| 942 |
], |
| 943 |
] |
| 944 |
); |
| 945 |
|
| 946 |
$this->add_control( |
| 947 |
'error_border_color', |
| 948 |
[ |
| 949 |
'label' => __('Border Color', 'wpfnl'), |
| 950 |
'type' => Controls_Manager::COLOR, |
| 951 |
'selectors' => [ |
| 952 |
'{{WRAPPER}} .woocommerce-error, |
| 953 |
{{WRAPPER}} .woocommerce-NoticeGroup .woocommerce-error, |
| 954 |
{{WRAPPER}} .woocommerce-notices-wrapper .woocommerce-error' => 'border-color: {{VALUE}};', |
| 955 |
'{{WRAPPER}} .woocommerce-error::before' => 'color: {{VALUE}};', |
| 956 |
|
| 957 |
], |
| 958 |
] |
| 959 |
); |
| 960 |
|
| 961 |
$this->end_controls_section(); |
| 962 |
} |
| 963 |
|
| 964 |
/** |
| 965 |
* Register Sections Style Controls. |
| 966 |
* |
| 967 |
* @since x.x.x |
| 968 |
* @access protected |
| 969 |
*/ |
| 970 |
protected function register_payment_section_style_controls() |
| 971 |
{ |
| 972 |
$this->start_controls_section( |
| 973 |
'section_payment_style_fields', |
| 974 |
[ |
| 975 |
'label' => __('Payment Section', 'wpfnl'), |
| 976 |
'tab' => Controls_Manager::TAB_STYLE, |
| 977 |
] |
| 978 |
); |
| 979 |
|
| 980 |
$this->add_control( |
| 981 |
'payment_section_text_color', |
| 982 |
[ |
| 983 |
'label' => __('Text Color', 'wpfnl'), |
| 984 |
'type' => Controls_Manager::COLOR, |
| 985 |
'default' => '', |
| 986 |
'selectors' => [ |
| 987 |
'{{WRAPPER}} .wpfnl-checkout #payment .place-order, |
| 988 |
{{WRAPPER}} .wpfnl-checkout #payment .place-order p' => 'color: {{VALUE}};', |
| 989 |
], |
| 990 |
] |
| 991 |
); |
| 992 |
|
| 993 |
$this->add_control( |
| 994 |
'payment_section_link_color', |
| 995 |
[ |
| 996 |
'label' => __('Link Color', 'wpfnl'), |
| 997 |
'type' => Controls_Manager::COLOR, |
| 998 |
'default' => '', |
| 999 |
'selectors' => [ |
| 1000 |
'{{WRAPPER}} .wpfnl-checkout #payment .place-order a' => 'color: {{VALUE}};', |
| 1001 |
], |
| 1002 |
] |
| 1003 |
); |
| 1004 |
|
| 1005 |
$this->add_control( |
| 1006 |
'payment_section_bg_color', |
| 1007 |
[ |
| 1008 |
'label' => __('Background Color', 'wpfnl'), |
| 1009 |
'type' => Controls_Manager::COLOR, |
| 1010 |
'selectors' => [ |
| 1011 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment' => 'background-color: {{VALUE}};', |
| 1012 |
], |
| 1013 |
] |
| 1014 |
); |
| 1015 |
|
| 1016 |
$this->add_group_control( |
| 1017 |
Group_Control_Typography::get_type(), |
| 1018 |
[ |
| 1019 |
'name' => 'payment_section_typography', |
| 1020 |
'label' => 'Typography', |
| 1021 |
'selector' => '{{WRAPPER}} .wpfnl-checkout #payment .place-order, |
| 1022 |
{{WRAPPER}} .wpfnl-checkout #payment .place-order p', |
| 1023 |
] |
| 1024 |
); |
| 1025 |
|
| 1026 |
$this->add_responsive_control( |
| 1027 |
'payment_section_radius', |
| 1028 |
[ |
| 1029 |
'label' => __('Radius', 'wpfnl'), |
| 1030 |
'type' => Controls_Manager::DIMENSIONS, |
| 1031 |
'size_units' => ['px', 'em', '%'], |
| 1032 |
'selectors' => [ |
| 1033 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1034 |
], |
| 1035 |
'separator' => 'after', |
| 1036 |
] |
| 1037 |
); |
| 1038 |
|
| 1039 |
// ----Payment Method style----- |
| 1040 |
$this->add_control( |
| 1041 |
'payment_method_heading_style', |
| 1042 |
[ |
| 1043 |
'label' => __('Payment Method Style', 'wpfnl'), |
| 1044 |
'type' => Controls_Manager::HEADING, |
| 1045 |
'label_block' => true, |
| 1046 |
] |
| 1047 |
); |
| 1048 |
|
| 1049 |
$this->add_group_control( |
| 1050 |
Group_Control_Typography::get_type(), |
| 1051 |
[ |
| 1052 |
'name' => 'payment_method_typography', |
| 1053 |
'label' => 'Typography', |
| 1054 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods li, |
| 1055 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box', |
| 1056 |
] |
| 1057 |
); |
| 1058 |
|
| 1059 |
$this->add_control( |
| 1060 |
'payment_method_color', |
| 1061 |
[ |
| 1062 |
'label' => __('Color', 'wpfnl'), |
| 1063 |
'type' => Controls_Manager::COLOR, |
| 1064 |
'default' => '', |
| 1065 |
'selectors' => [ |
| 1066 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods li' => 'color: {{VALUE}};', |
| 1067 |
], |
| 1068 |
] |
| 1069 |
); |
| 1070 |
|
| 1071 |
$this->add_control( |
| 1072 |
'payment_method_bg_color', |
| 1073 |
[ |
| 1074 |
'label' => __('Background Color', 'wpfnl'), |
| 1075 |
'type' => Controls_Manager::COLOR, |
| 1076 |
'selectors' => [ |
| 1077 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'background-color: {{VALUE}};', |
| 1078 |
], |
| 1079 |
'separator' => 'after' |
| 1080 |
|
| 1081 |
] |
| 1082 |
); |
| 1083 |
|
| 1084 |
$this->add_control( |
| 1085 |
'payment_method_radio_default_color', |
| 1086 |
[ |
| 1087 |
'label' => __('Radio Button Default Color', 'wpfnl'), |
| 1088 |
'type' => Controls_Manager::COLOR, |
| 1089 |
'default' => '', |
| 1090 |
'selectors' => [ |
| 1091 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > label:before, |
| 1092 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods > li > label:before' => 'border-color: {{VALUE}};', |
| 1093 |
], |
| 1094 |
] |
| 1095 |
); |
| 1096 |
|
| 1097 |
$this->add_control( |
| 1098 |
'payment_method_radio_color', |
| 1099 |
[ |
| 1100 |
'label' => __('Radio Button Active Color', 'wpfnl'), |
| 1101 |
'type' => Controls_Manager::COLOR, |
| 1102 |
'default' => '', |
| 1103 |
'selectors' => [ |
| 1104 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > input[type=radio]:checked + label:before, |
| 1105 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods > li > input[type=radio]:checked + label:before' => 'border-color: {{VALUE}};', |
| 1106 |
|
| 1107 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > input[type=radio]:checked + label:after, |
| 1108 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods > li > input[type=radio]:checked + label:after' => 'background-color: {{VALUE}};', |
| 1109 |
], |
| 1110 |
'separator' => 'after' |
| 1111 |
] |
| 1112 |
); |
| 1113 |
|
| 1114 |
$this->add_control( |
| 1115 |
'saved_payment_checkbox_default_color', |
| 1116 |
[ |
| 1117 |
'label' => __('Checkbox Default Color', 'wpfnl'), |
| 1118 |
'type' => Controls_Manager::COLOR, |
| 1119 |
'default' => '', |
| 1120 |
'selectors' => [ |
| 1121 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-saveNew > label:before, |
| 1122 |
{{WRAPPER}} .wpfnl-checkout #mailpoet_woocommerce_checkout_optin_field #mailpoet_woocommerce_checkout_optin' => 'border-color: {{VALUE}};', |
| 1123 |
], |
| 1124 |
] |
| 1125 |
); |
| 1126 |
|
| 1127 |
$this->add_control( |
| 1128 |
'saved_payment_checkbox_color', |
| 1129 |
[ |
| 1130 |
'label' => __('Checkbox Active Color', 'wpfnl'), |
| 1131 |
'type' => Controls_Manager::COLOR, |
| 1132 |
'default' => '', |
| 1133 |
'selectors' => [ |
| 1134 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-saveNew > input[type=checkbox]:checked + label:before, |
| 1135 |
{{WRAPPER}} .wpfnl-checkout #mailpoet_woocommerce_checkout_optin_field #mailpoet_woocommerce_checkout_optin:checked' => 'background-color: {{VALUE}}; border-color: {{VALUE}};', |
| 1136 |
], |
| 1137 |
] |
| 1138 |
); |
| 1139 |
|
| 1140 |
$this->add_control( |
| 1141 |
'saved_payment_checkbox_tic_color', |
| 1142 |
[ |
| 1143 |
'label' => __('Checkbox Tic Sign Color', 'wpfnl'), |
| 1144 |
'type' => Controls_Manager::COLOR, |
| 1145 |
'default' => '', |
| 1146 |
'selectors' => [ |
| 1147 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-saveNew > label:after' => 'border-color: {{VALUE}};', |
| 1148 |
], |
| 1149 |
'separator' => 'after' |
| 1150 |
] |
| 1151 |
); |
| 1152 |
|
| 1153 |
|
| 1154 |
$this->add_control( |
| 1155 |
'payment_method_border_style', |
| 1156 |
[ |
| 1157 |
'label' => __('Border Style', 'wpfnl'), |
| 1158 |
'type' => Controls_Manager::SELECT, |
| 1159 |
'label_block' => false, |
| 1160 |
'default' => '', |
| 1161 |
'options' => [ |
| 1162 |
'' => __('Inherit', 'wpfnl'), |
| 1163 |
'solid' => __('Solid', 'wpfnl'), |
| 1164 |
'double' => __('Double', 'wpfnl'), |
| 1165 |
'dotted' => __('Dotted', 'wpfnl'), |
| 1166 |
'dashed' => __('Dashed', 'wpfnl'), |
| 1167 |
], |
| 1168 |
'selectors' => [ |
| 1169 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-style: {{VALUE}};', |
| 1170 |
], |
| 1171 |
] |
| 1172 |
); |
| 1173 |
|
| 1174 |
$this->add_control( |
| 1175 |
'payment_method_border_size', |
| 1176 |
[ |
| 1177 |
'label' => __('Border Width', 'wpfnl'), |
| 1178 |
'type' => Controls_Manager::DIMENSIONS, |
| 1179 |
'size_units' => ['px'], |
| 1180 |
'selectors' => [ |
| 1181 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1182 |
], |
| 1183 |
] |
| 1184 |
); |
| 1185 |
|
| 1186 |
$this->add_control( |
| 1187 |
'payment_method_border_color', |
| 1188 |
[ |
| 1189 |
'label' => __('Border Color', 'wpfnl'), |
| 1190 |
'type' => Controls_Manager::COLOR, |
| 1191 |
'selectors' => [ |
| 1192 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-color: {{VALUE}};', |
| 1193 |
], |
| 1194 |
|
| 1195 |
] |
| 1196 |
); |
| 1197 |
|
| 1198 |
$this->add_responsive_control( |
| 1199 |
'payment_method_radius', |
| 1200 |
[ |
| 1201 |
'label' => __('Radius', 'wpfnl'), |
| 1202 |
'type' => Controls_Manager::DIMENSIONS, |
| 1203 |
'size_units' => ['px', 'em', '%'], |
| 1204 |
'selectors' => [ |
| 1205 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1206 |
], |
| 1207 |
] |
| 1208 |
); |
| 1209 |
|
| 1210 |
$this->add_responsive_control( |
| 1211 |
'payment_method_padding', |
| 1212 |
[ |
| 1213 |
'label' => __('Padding', 'wpfnl'), |
| 1214 |
'type' => Controls_Manager::DIMENSIONS, |
| 1215 |
'size_units' => ['px', 'em', '%'], |
| 1216 |
'selectors' => [ |
| 1217 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1218 |
], |
| 1219 |
] |
| 1220 |
); |
| 1221 |
|
| 1222 |
$this->add_responsive_control( |
| 1223 |
'payment_method_margin', |
| 1224 |
[ |
| 1225 |
'label' => __('Margin', 'wpfnl'), |
| 1226 |
'type' => Controls_Manager::DIMENSIONS, |
| 1227 |
'size_units' => ['px', 'em', '%'], |
| 1228 |
'selectors' => [ |
| 1229 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment ul.payment_methods' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1230 |
], |
| 1231 |
'separator' => 'after', |
| 1232 |
] |
| 1233 |
); |
| 1234 |
|
| 1235 |
// ----Payment Box style----- |
| 1236 |
$this->add_control( |
| 1237 |
'payment_box_heading_style', |
| 1238 |
[ |
| 1239 |
'label' => __('Payment Box Style', 'wpfnl'), |
| 1240 |
'type' => Controls_Manager::HEADING, |
| 1241 |
'label_block' => true, |
| 1242 |
] |
| 1243 |
); |
| 1244 |
|
| 1245 |
$this->add_control( |
| 1246 |
'payment_box_txt_color', |
| 1247 |
[ |
| 1248 |
'label' => __('Text Color', 'wpfnl'), |
| 1249 |
'type' => Controls_Manager::COLOR, |
| 1250 |
'default' => '', |
| 1251 |
'selectors' => [ |
| 1252 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'color: {{VALUE}};', |
| 1253 |
], |
| 1254 |
] |
| 1255 |
); |
| 1256 |
|
| 1257 |
$this->add_control( |
| 1258 |
'payment_box_bg_color', |
| 1259 |
[ |
| 1260 |
'label' => __('Background Color', 'wpfnl'), |
| 1261 |
'type' => Controls_Manager::COLOR, |
| 1262 |
'selectors' => [ |
| 1263 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'background-color: {{VALUE}};', |
| 1264 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box:before' => 'border-bottom-color: {{VALUE}};', |
| 1265 |
], |
| 1266 |
|
| 1267 |
] |
| 1268 |
); |
| 1269 |
$this->add_group_control( |
| 1270 |
Group_Control_Typography::get_type(), |
| 1271 |
[ |
| 1272 |
'name' => 'payment_box_typography', |
| 1273 |
'label' => 'Typography', |
| 1274 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box', |
| 1275 |
] |
| 1276 |
); |
| 1277 |
$this->add_responsive_control( |
| 1278 |
'payment_box_radius', |
| 1279 |
[ |
| 1280 |
'label' => __('Radius', 'wpfnl'), |
| 1281 |
'type' => Controls_Manager::DIMENSIONS, |
| 1282 |
'size_units' => ['px', 'em', '%'], |
| 1283 |
'selectors' => [ |
| 1284 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1285 |
], |
| 1286 |
] |
| 1287 |
); |
| 1288 |
|
| 1289 |
$this->add_responsive_control( |
| 1290 |
'payment_box_padding', |
| 1291 |
[ |
| 1292 |
'label' => __('Padding', 'wpfnl'), |
| 1293 |
'type' => Controls_Manager::DIMENSIONS, |
| 1294 |
'size_units' => ['px', 'em', '%'], |
| 1295 |
'selectors' => [ |
| 1296 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1297 |
], |
| 1298 |
] |
| 1299 |
); |
| 1300 |
|
| 1301 |
$this->add_responsive_control( |
| 1302 |
'payment_box_margin', |
| 1303 |
[ |
| 1304 |
'label' => __('Margin', 'wpfnl'), |
| 1305 |
'type' => Controls_Manager::DIMENSIONS, |
| 1306 |
'size_units' => ['px', 'em', '%'], |
| 1307 |
'selectors' => [ |
| 1308 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #payment div.payment_box' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1309 |
], |
| 1310 |
'separator' => 'after', |
| 1311 |
] |
| 1312 |
); |
| 1313 |
|
| 1314 |
|
| 1315 |
// ----Order Button style----- |
| 1316 |
$this->add_control( |
| 1317 |
'order_button_heading_style', |
| 1318 |
[ |
| 1319 |
'label' => __('Order Button Style', 'wpfnl'), |
| 1320 |
'type' => Controls_Manager::HEADING, |
| 1321 |
'label_block' => true, |
| 1322 |
] |
| 1323 |
); |
| 1324 |
|
| 1325 |
$this->add_group_control( |
| 1326 |
Group_Control_Typography::get_type(), |
| 1327 |
[ |
| 1328 |
'name' => 'order_button_typography', |
| 1329 |
'label' => 'Typography', |
| 1330 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order', |
| 1331 |
] |
| 1332 |
); |
| 1333 |
|
| 1334 |
$this->start_controls_tabs('order_button_tab'); |
| 1335 |
$this->start_controls_tab( |
| 1336 |
'order_button_normal', |
| 1337 |
[ |
| 1338 |
'label' => __('Normal', 'wpfnl'), |
| 1339 |
] |
| 1340 |
); |
| 1341 |
|
| 1342 |
$this->add_control( |
| 1343 |
'order_button_color', |
| 1344 |
[ |
| 1345 |
'label' => __('Color', 'wpfnl'), |
| 1346 |
'type' => Controls_Manager::COLOR, |
| 1347 |
'default' => '', |
| 1348 |
'selectors' => [ |
| 1349 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'color: {{VALUE}};', |
| 1350 |
], |
| 1351 |
] |
| 1352 |
); |
| 1353 |
|
| 1354 |
$this->add_control( |
| 1355 |
'order_button_bg_color', |
| 1356 |
[ |
| 1357 |
'label' => __('Background Color', 'wpfnl'), |
| 1358 |
'type' => Controls_Manager::COLOR, |
| 1359 |
'selectors' => [ |
| 1360 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'background-color: {{VALUE}};', |
| 1361 |
], |
| 1362 |
|
| 1363 |
] |
| 1364 |
); |
| 1365 |
|
| 1366 |
$this->add_group_control( |
| 1367 |
Group_Control_Box_Shadow::get_type(), |
| 1368 |
[ |
| 1369 |
'name' => 'order_button_box_shadow', |
| 1370 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order', |
| 1371 |
] |
| 1372 |
); |
| 1373 |
$this->end_controls_tab(); |
| 1374 |
|
| 1375 |
//----hover style--- |
| 1376 |
$this->start_controls_tab( |
| 1377 |
'order_button_button_hover', |
| 1378 |
[ |
| 1379 |
'label' => __('Hover', 'wpfnl'), |
| 1380 |
] |
| 1381 |
); |
| 1382 |
|
| 1383 |
$this->add_control( |
| 1384 |
'order_button_color_hover', |
| 1385 |
[ |
| 1386 |
'label' => __('Color', 'wpfnl'), |
| 1387 |
'type' => Controls_Manager::COLOR, |
| 1388 |
'default' => '', |
| 1389 |
'selectors' => [ |
| 1390 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order:hover' => 'color: {{VALUE}};', |
| 1391 |
], |
| 1392 |
] |
| 1393 |
); |
| 1394 |
|
| 1395 |
$this->add_control( |
| 1396 |
'order_button_bg_color_hover', |
| 1397 |
[ |
| 1398 |
'label' => __('Background Color', 'wpfnl'), |
| 1399 |
'type' => Controls_Manager::COLOR, |
| 1400 |
'selectors' => [ |
| 1401 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order:hover' => 'background-color: {{VALUE}};', |
| 1402 |
], |
| 1403 |
] |
| 1404 |
); |
| 1405 |
|
| 1406 |
$this->add_group_control( |
| 1407 |
Group_Control_Box_Shadow::get_type(), |
| 1408 |
[ |
| 1409 |
'name' => 'order_button_box_shadow_hover', |
| 1410 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order:hover', |
| 1411 |
] |
| 1412 |
); |
| 1413 |
$this->end_controls_tab(); |
| 1414 |
$this->end_controls_tabs(); |
| 1415 |
//----------------------- |
| 1416 |
|
| 1417 |
$this->add_responsive_control( |
| 1418 |
'order_button_radius', |
| 1419 |
[ |
| 1420 |
'label' => __('Radius', 'wpfnl'), |
| 1421 |
'type' => Controls_Manager::DIMENSIONS, |
| 1422 |
'size_units' => ['px', 'em', '%'], |
| 1423 |
'selectors' => [ |
| 1424 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1425 |
], |
| 1426 |
'separator' => 'before', |
| 1427 |
] |
| 1428 |
); |
| 1429 |
|
| 1430 |
$this->add_responsive_control( |
| 1431 |
'order_button_padding', |
| 1432 |
[ |
| 1433 |
'label' => __('Padding', 'wpfnl'), |
| 1434 |
'type' => Controls_Manager::DIMENSIONS, |
| 1435 |
'size_units' => ['px', 'em', '%'], |
| 1436 |
'selectors' => [ |
| 1437 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1438 |
], |
| 1439 |
] |
| 1440 |
); |
| 1441 |
|
| 1442 |
$this->add_responsive_control( |
| 1443 |
'order_button_margin', |
| 1444 |
[ |
| 1445 |
'label' => __('Margin', 'wpfnl'), |
| 1446 |
'type' => Controls_Manager::DIMENSIONS, |
| 1447 |
'size_units' => ['px', 'em', '%'], |
| 1448 |
'selectors' => [ |
| 1449 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce #payment #place_order' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1450 |
], |
| 1451 |
'separator' => 'after', |
| 1452 |
] |
| 1453 |
); |
| 1454 |
|
| 1455 |
$this->end_controls_section(); |
| 1456 |
} |
| 1457 |
|
| 1458 |
/** |
| 1459 |
* Register General Style Controls. |
| 1460 |
* |
| 1461 |
* @since x.x.x |
| 1462 |
* @access protected |
| 1463 |
*/ |
| 1464 |
protected function register_global_style_controls() |
| 1465 |
{ |
| 1466 |
$this->start_controls_section( |
| 1467 |
'section_general_style_fields', |
| 1468 |
[ |
| 1469 |
'label' => __('Global', 'wpfnl'), |
| 1470 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1471 |
] |
| 1472 |
); |
| 1473 |
|
| 1474 |
$this->add_control( |
| 1475 |
'global_primary_color', |
| 1476 |
[ |
| 1477 |
'label' => __('Primary Color', 'wpfnl'), |
| 1478 |
'type' => Controls_Manager::COLOR, |
| 1479 |
'default' => '', |
| 1480 |
'selectors' => [ |
| 1481 |
'{{WRAPPER}} .woocommerce-checkout .product-name .remove:hover, |
| 1482 |
{{WRAPPER}} #payment input[type=checkbox]:checked:before, |
| 1483 |
{{WRAPPER}} .woocommerce-shipping-fields [type="checkbox"]:checked:before, |
| 1484 |
{{WRAPPER}} -info::before, |
| 1485 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-message::before, |
| 1486 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce a, |
| 1487 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .wpfunnels-current .step-name, |
| 1488 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-content-main-head .wpfunnels-content-modal-title .wpfunnels_first_name' => 'color: {{VALUE}};', |
| 1489 |
|
| 1490 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce .woocommerce-checkout .product-name .remove:hover, |
| 1491 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=checkbox]:focus, |
| 1492 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce .woocommerce-shipping-fields [type="checkbox"]:focus, |
| 1493 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=radio]:checked:focus, |
| 1494 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=radio]:not(:checked):focus, |
| 1495 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1496 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1497 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small, |
| 1498 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1499 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1500 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1501 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1502 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1503 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small:hover, |
| 1504 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfunnels-next-button, |
| 1505 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-note, |
| 1506 |
body .wpfunnels-pre-checkout-offer-wrapper #wpfunnels-pre-checkout-offer-content button.wpfunnels-pre-checkout-offer-btn' => 'border-color: {{VALUE}};', |
| 1507 |
|
| 1508 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment input[type=radio]:checked:before, |
| 1509 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1510 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1511 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small, |
| 1512 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1513 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1514 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1515 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1516 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1517 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfunnels-btn-small:hover, |
| 1518 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .step-one.wpfunnels-current:before, |
| 1519 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .step-two.wpfunnels-current:before, |
| 1520 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-steps .steps.wpfunnels-current:before, |
| 1521 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-note, |
| 1522 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-nav-bar-step.active .wpfunnels-progress-nav-step, |
| 1523 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-nav-bar-step.active .wpfunnels-nav-bar-step-line:before, |
| 1524 |
body .wpfunnels-pre-checkout-offer-wrapper .wpfunnels-nav-bar-step.active .wpfunnels-nav-bar-step-line:after' => 'background-color: {{VALUE}};', |
| 1525 |
|
| 1526 |
'{{WRAPPER}} .wpfunnels-checkout-form-two-step .wpfunnels-checkout-form-note:before' => 'border-top-color: {{VALUE}};', |
| 1527 |
|
| 1528 |
'{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfunnels-next-button, |
| 1529 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns a.wpfunnels-next-button, |
| 1530 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1531 |
body .wpfunnels-pre-checkout-offer-wrapper #wpfunnels-pre-checkout-offer-content button.wpfunnels-pre-checkout-offer-btn' => 'background-color: {{VALUE}}; color: #fff;', |
| 1532 |
], |
| 1533 |
] |
| 1534 |
); |
| 1535 |
|
| 1536 |
$this->add_control( |
| 1537 |
'global_text_color', |
| 1538 |
[ |
| 1539 |
'label' => __('Text Color', 'wpfnl'), |
| 1540 |
'type' => Controls_Manager::COLOR, |
| 1541 |
'default' => '', |
| 1542 |
'selectors' => [ |
| 1543 |
'{{WRAPPER}} .wpfunnels-checkout-form, |
| 1544 |
{{WRAPPER}} .wpfunnels-checkout-form #payment .woocommerce-privacy-policy-text p' => 'color: {{VALUE}};', |
| 1545 |
], |
| 1546 |
] |
| 1547 |
); |
| 1548 |
|
| 1549 |
$this->add_group_control( |
| 1550 |
Group_Control_Typography::get_type(), |
| 1551 |
[ |
| 1552 |
'name' => 'global_typography', |
| 1553 |
'label' => 'Typography', |
| 1554 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form', |
| 1555 |
] |
| 1556 |
); |
| 1557 |
|
| 1558 |
$this->end_controls_section(); |
| 1559 |
} |
| 1560 |
|
| 1561 |
/** |
| 1562 |
* Register Button Style Controls. |
| 1563 |
* |
| 1564 |
* @since x.x.x |
| 1565 |
* @access protected |
| 1566 |
*/ |
| 1567 |
protected function register_button_style_controls() |
| 1568 |
{ |
| 1569 |
$this->start_controls_section( |
| 1570 |
'button_section', |
| 1571 |
[ |
| 1572 |
'label' => __('Buttons', 'wpfnl'), |
| 1573 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1574 |
] |
| 1575 |
); |
| 1576 |
|
| 1577 |
$this->add_group_control( |
| 1578 |
Group_Control_Typography::get_type(), |
| 1579 |
[ |
| 1580 |
'name' => 'buttons_typography', |
| 1581 |
'label' => 'Typography', |
| 1582 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1583 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1584 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1585 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1586 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1587 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1588 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1589 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 1590 |
] |
| 1591 |
); |
| 1592 |
|
| 1593 |
$this->start_controls_tabs('tabs_button_style'); |
| 1594 |
|
| 1595 |
$this->start_controls_tab( |
| 1596 |
'tab_button_normal', |
| 1597 |
[ |
| 1598 |
'label' => __('Normal', 'wpfnl'), |
| 1599 |
] |
| 1600 |
); |
| 1601 |
|
| 1602 |
$this->add_control( |
| 1603 |
'button_text_color', |
| 1604 |
[ |
| 1605 |
'label' => __('Text Color', 'wpfnl'), |
| 1606 |
'type' => Controls_Manager::COLOR, |
| 1607 |
'default' => '', |
| 1608 |
'selectors' => [ |
| 1609 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1610 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1611 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1612 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1613 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1614 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1615 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1616 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'color: {{VALUE}};', |
| 1617 |
], |
| 1618 |
] |
| 1619 |
); |
| 1620 |
|
| 1621 |
$this->add_group_control( |
| 1622 |
Group_Control_Background::get_type(), |
| 1623 |
[ |
| 1624 |
'name' => 'btn_background_color', |
| 1625 |
'label' => __('Background Color', 'wpfnl'), |
| 1626 |
'types' => ['classic', 'gradient'], |
| 1627 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1628 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1629 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1630 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1631 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1632 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1633 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1634 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 1635 |
] |
| 1636 |
); |
| 1637 |
|
| 1638 |
$this->add_group_control( |
| 1639 |
Group_Control_Border::get_type(), |
| 1640 |
[ |
| 1641 |
'name' => 'btn_border', |
| 1642 |
'label' => __('Border', 'wpfnl'), |
| 1643 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1644 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1645 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1646 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1647 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1648 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1649 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1650 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 1651 |
] |
| 1652 |
); |
| 1653 |
|
| 1654 |
$this->add_responsive_control( |
| 1655 |
'btn_border_radius', |
| 1656 |
[ |
| 1657 |
'label' => __('Rounded Corners', 'wpfnl'), |
| 1658 |
'type' => Controls_Manager::DIMENSIONS, |
| 1659 |
'size_units' => ['px', '%'], |
| 1660 |
'selectors' => [ |
| 1661 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1662 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1663 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1664 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1665 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1666 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1667 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1668 |
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}};', |
| 1669 |
], |
| 1670 |
] |
| 1671 |
); |
| 1672 |
|
| 1673 |
$this->add_group_control( |
| 1674 |
Group_Control_Box_Shadow::get_type(), |
| 1675 |
[ |
| 1676 |
'name' => 'button_box_shadow', |
| 1677 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button, |
| 1678 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce form.woocommerce-form-login .form-row button, |
| 1679 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small, |
| 1680 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.woocommerce-form-login .button, |
| 1681 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button, |
| 1682 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button, |
| 1683 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button, |
| 1684 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 1685 |
] |
| 1686 |
); |
| 1687 |
|
| 1688 |
$this->end_controls_tab(); |
| 1689 |
|
| 1690 |
$this->start_controls_tab( |
| 1691 |
'tab_button_hover', |
| 1692 |
[ |
| 1693 |
'label' => __('Hover', 'wpfnl'), |
| 1694 |
] |
| 1695 |
); |
| 1696 |
|
| 1697 |
$this->add_control( |
| 1698 |
'btn_hover_color', |
| 1699 |
[ |
| 1700 |
'label' => __('Text Color', 'wpfnl'), |
| 1701 |
'type' => Controls_Manager::COLOR, |
| 1702 |
'selectors' => [ |
| 1703 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1704 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1705 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1706 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small:hover, |
| 1707 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button:hover, |
| 1708 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button:hover, |
| 1709 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'color: {{VALUE}};', |
| 1710 |
], |
| 1711 |
] |
| 1712 |
); |
| 1713 |
|
| 1714 |
$this->add_control( |
| 1715 |
'button_hover_border_color', |
| 1716 |
[ |
| 1717 |
'label' => __('Border Hover Color', 'wpfnl'), |
| 1718 |
'type' => Controls_Manager::COLOR, |
| 1719 |
'selectors' => [ |
| 1720 |
'{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1721 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1722 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1723 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small:hover, |
| 1724 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button:hover, |
| 1725 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button:hover, |
| 1726 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn' => 'border-color: {{VALUE}};', |
| 1727 |
], |
| 1728 |
] |
| 1729 |
); |
| 1730 |
|
| 1731 |
$this->add_group_control( |
| 1732 |
Group_Control_Background::get_type(), |
| 1733 |
[ |
| 1734 |
'name' => 'button_background_hover_color', |
| 1735 |
'label' => __('Background Color', 'wpfnl'), |
| 1736 |
'types' => ['classic', 'gradient'], |
| 1737 |
'selector' => '{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.login .button:hover, |
| 1738 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce-checkout form.checkout_coupon .button:hover, |
| 1739 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #payment #place_order:hover, |
| 1740 |
{{WRAPPER}} .wpfunnels-checkout-form .woocommerce #order_review button.wpfnl-btn-small:hover, |
| 1741 |
{{WRAPPER}} .wpfunnels-checkout-form form.checkout_coupon .button:hover, |
| 1742 |
{{WRAPPER}} .wpfunnels-checkout-form-two-step .woocommerce .wpfunnels-checkout-form-nav-btns .wpfnl-next-button:hover, |
| 1743 |
body .wpfnl-pre-checkout-offer-wrapper #wpfnl-pre-checkout-offer-content button.wpfnl-pre-checkout-offer-btn', |
| 1744 |
] |
| 1745 |
); |
| 1746 |
|
| 1747 |
$this->end_controls_tab(); |
| 1748 |
|
| 1749 |
$this->end_controls_tabs(); |
| 1750 |
|
| 1751 |
$this->end_controls_section(); |
| 1752 |
} |
| 1753 |
|
| 1754 |
/** |
| 1755 |
* Function to get skin types. |
| 1756 |
* |
| 1757 |
* @since x.x.x |
| 1758 |
* @access protected |
| 1759 |
*/ |
| 1760 |
protected function get_skin_types() |
| 1761 |
{ |
| 1762 |
$skin_options = []; |
| 1763 |
|
| 1764 |
$skin_options = [ |
| 1765 |
'default' => __('Default', 'wpfnl'), |
| 1766 |
'style-one' => __('Floating Labels', 'wpfnl'), |
| 1767 |
]; |
| 1768 |
|
| 1769 |
return $skin_options; |
| 1770 |
} |
| 1771 |
|
| 1772 |
/** |
| 1773 |
* Register Billing Fields Style Controls. |
| 1774 |
* |
| 1775 |
* @since x.x.x |
| 1776 |
* @access protected |
| 1777 |
*/ |
| 1778 |
protected function register_billing_style_controls() |
| 1779 |
{ |
| 1780 |
$this->start_controls_section( |
| 1781 |
'billing_input_section', |
| 1782 |
[ |
| 1783 |
'label' => __('Billing Section', 'wpfnl'), |
| 1784 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1785 |
] |
| 1786 |
); |
| 1787 |
|
| 1788 |
// ----headding style----- |
| 1789 |
$this->add_control( |
| 1790 |
'billing_heading_style', |
| 1791 |
[ |
| 1792 |
'label' => __('Heading Style', 'wpfnl'), |
| 1793 |
'type' => Controls_Manager::HEADING, |
| 1794 |
'label_block' => true, |
| 1795 |
] |
| 1796 |
); |
| 1797 |
|
| 1798 |
$this->add_control( |
| 1799 |
'billing_heading_text_color', |
| 1800 |
[ |
| 1801 |
'label' => __('Color', 'wpfnl'), |
| 1802 |
'type' => Controls_Manager::COLOR, |
| 1803 |
'default' => '', |
| 1804 |
'selectors' => [ |
| 1805 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3, |
| 1806 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3 span' => 'color: {{VALUE}};' |
| 1807 |
], |
| 1808 |
] |
| 1809 |
); |
| 1810 |
|
| 1811 |
$this->add_group_control( |
| 1812 |
Group_Control_Typography::get_type(), |
| 1813 |
[ |
| 1814 |
'name' => 'billing_heading_typography', |
| 1815 |
'label' => 'Typography', |
| 1816 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3, |
| 1817 |
{{WRAPPER}} .woocommerce.woocommerce-checkout #customer_details .woocommerce-billing-fields h3, |
| 1818 |
{{WRAPPER}} .woocommerce-page.woocommerce-checkout #customer_details .woocommerce-billing-fields h3', |
| 1819 |
] |
| 1820 |
); |
| 1821 |
|
| 1822 |
$this->add_responsive_control( |
| 1823 |
'billing_heading_margin', |
| 1824 |
[ |
| 1825 |
'label' => __('Margin', 'wpfnl'), |
| 1826 |
'type' => Controls_Manager::DIMENSIONS, |
| 1827 |
'size_units' => ['px', '%', 'em'], |
| 1828 |
'selectors' => [ |
| 1829 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1830 |
], |
| 1831 |
] |
| 1832 |
); |
| 1833 |
|
| 1834 |
$this->add_responsive_control( |
| 1835 |
'billing_heading_padding', |
| 1836 |
[ |
| 1837 |
'label' => __('Padding', 'wpfnl'), |
| 1838 |
'type' => Controls_Manager::DIMENSIONS, |
| 1839 |
'size_units' => ['px', '%', 'em'], |
| 1840 |
'selectors' => [ |
| 1841 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields h3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1842 |
], |
| 1843 |
'separator' => 'after', |
| 1844 |
] |
| 1845 |
); |
| 1846 |
//-----end heading style----- |
| 1847 |
|
| 1848 |
|
| 1849 |
// -----label style------ |
| 1850 |
$this->add_control( |
| 1851 |
'billing_label_style', |
| 1852 |
[ |
| 1853 |
'label' => __('Label Style', 'wpfnl'), |
| 1854 |
'type' => Controls_Manager::HEADING, |
| 1855 |
'label_block' => true, |
| 1856 |
] |
| 1857 |
); |
| 1858 |
|
| 1859 |
$this->add_control( |
| 1860 |
'billing_label_color', |
| 1861 |
[ |
| 1862 |
'label' => __('Color', 'wpfnl'), |
| 1863 |
'type' => Controls_Manager::COLOR, |
| 1864 |
'default' => '', |
| 1865 |
'selectors' => [ |
| 1866 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields p.form-row label' => 'color: {{VALUE}};' |
| 1867 |
], |
| 1868 |
] |
| 1869 |
); |
| 1870 |
|
| 1871 |
$this->add_group_control( |
| 1872 |
Group_Control_Typography::get_type(), |
| 1873 |
[ |
| 1874 |
'name' => 'billing_label_typography', |
| 1875 |
'label' => 'Typography', |
| 1876 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields p.form-row label', |
| 1877 |
] |
| 1878 |
); |
| 1879 |
|
| 1880 |
$this->add_responsive_control( |
| 1881 |
'billing_label_margin', |
| 1882 |
[ |
| 1883 |
'label' => __('Margin', 'wpfnl'), |
| 1884 |
'type' => Controls_Manager::DIMENSIONS, |
| 1885 |
'size_units' => ['px', '%', 'em'], |
| 1886 |
'selectors' => [ |
| 1887 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields p.form-row label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1888 |
], |
| 1889 |
'separator' => 'after', |
| 1890 |
] |
| 1891 |
); |
| 1892 |
//-----end label style----- |
| 1893 |
|
| 1894 |
|
| 1895 |
// -----input field style------ |
| 1896 |
$this->add_control( |
| 1897 |
'billing_input_field_style', |
| 1898 |
[ |
| 1899 |
'label' => __('Input Field Style', 'wpfnl'), |
| 1900 |
'type' => Controls_Manager::HEADING, |
| 1901 |
'label_block' => true, |
| 1902 |
] |
| 1903 |
); |
| 1904 |
|
| 1905 |
$this->add_control( |
| 1906 |
'billing_input_color', |
| 1907 |
[ |
| 1908 |
'label' => __('Text Color', 'wpfnl'), |
| 1909 |
'type' => Controls_Manager::COLOR, |
| 1910 |
'selectors' => [ |
| 1911 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 1912 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 1913 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 1914 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 1915 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select, |
| 1916 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields ::placeholder, |
| 1917 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields ::-webkit-input-placeholder' => 'color: {{VALUE}} !important;', |
| 1918 |
], |
| 1919 |
] |
| 1920 |
); |
| 1921 |
|
| 1922 |
$this->add_group_control( |
| 1923 |
Group_Control_Typography::get_type(), |
| 1924 |
[ |
| 1925 |
'name' => 'billing_input_text_typography', |
| 1926 |
'label' => 'Typography', |
| 1927 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 1928 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 1929 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 1930 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 1931 |
{{WRAPPER}} .woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 1932 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 1933 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select, |
| 1934 |
{{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), |
| 1935 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) textarea', |
| 1936 |
] |
| 1937 |
); |
| 1938 |
|
| 1939 |
$this->add_control( |
| 1940 |
'billing_input_bgcolor', |
| 1941 |
[ |
| 1942 |
'label' => __('Background Color', 'wpfnl'), |
| 1943 |
'type' => Controls_Manager::COLOR, |
| 1944 |
'selectors' => [ |
| 1945 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 1946 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 1947 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 1948 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 1949 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 1950 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select, |
| 1951 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_billing .form-row:not(.create-account) > label' => 'background-color: {{VALUE}};', |
| 1952 |
], |
| 1953 |
] |
| 1954 |
); |
| 1955 |
|
| 1956 |
|
| 1957 |
$this->add_control( |
| 1958 |
'billing_input_border_style', |
| 1959 |
[ |
| 1960 |
'label' => __('Border Style', 'wpfnl'), |
| 1961 |
'type' => Controls_Manager::SELECT, |
| 1962 |
'label_block' => false, |
| 1963 |
'default' => '', |
| 1964 |
'options' => [ |
| 1965 |
'' => __('Inherit', 'wpfnl'), |
| 1966 |
'solid' => __('Solid', 'wpfnl'), |
| 1967 |
'double' => __('Double', 'wpfnl'), |
| 1968 |
'dotted' => __('Dotted', 'wpfnl'), |
| 1969 |
'dashed' => __('Dashed', 'wpfnl'), |
| 1970 |
], |
| 1971 |
'selectors' => [ |
| 1972 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 1973 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 1974 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 1975 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 1976 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 1977 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select' => 'border-style: {{VALUE}};', |
| 1978 |
], |
| 1979 |
] |
| 1980 |
); |
| 1981 |
$this->add_control( |
| 1982 |
'billing_input_border_size', |
| 1983 |
[ |
| 1984 |
'label' => __('Border Width', 'wpfnl'), |
| 1985 |
'type' => Controls_Manager::DIMENSIONS, |
| 1986 |
'size_units' => ['px'], |
| 1987 |
'selectors' => [ |
| 1988 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row input.input-text, |
| 1989 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 1990 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row textarea, |
| 1991 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 1992 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select.select, |
| 1993 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .form-row select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1994 |
], |
| 1995 |
] |
| 1996 |
); |
| 1997 |
|
| 1998 |
$this->add_control( |
| 1999 |
'billing_input_border_color', |
| 2000 |
[ |
| 2001 |
'label' => __('Border Color', 'wpfnl'), |
| 2002 |
'type' => Controls_Manager::COLOR, |
| 2003 |
'selectors' => [ |
| 2004 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row input.input-text, |
| 2005 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2006 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row textarea, |
| 2007 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2008 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select.select, |
| 2009 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container--focus .select2-selection, |
| 2010 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select' => 'border-color: {{VALUE}}!important;', |
| 2011 |
], |
| 2012 |
] |
| 2013 |
); |
| 2014 |
|
| 2015 |
$this->add_responsive_control( |
| 2016 |
'billing_input_radius', |
| 2017 |
[ |
| 2018 |
'label' => __('Radius', 'wpfnl'), |
| 2019 |
'type' => Controls_Manager::DIMENSIONS, |
| 2020 |
'size_units' => ['px', 'em', '%'], |
| 2021 |
'selectors' => [ |
| 2022 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row input.input-text, |
| 2023 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2024 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row textarea, |
| 2025 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .select2-container--default .select2-selection--single, |
| 2026 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields select.select, |
| 2027 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2028 |
], |
| 2029 |
] |
| 2030 |
); |
| 2031 |
|
| 2032 |
$this->add_responsive_control( |
| 2033 |
'billing_input_padding', |
| 2034 |
[ |
| 2035 |
'label' => __('Padding', 'wpfnl'), |
| 2036 |
'type' => Controls_Manager::DIMENSIONS, |
| 2037 |
'size_units' => ['px', '%', 'em'], |
| 2038 |
'selectors' => [ |
| 2039 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row input.input-text, |
| 2040 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row input.input-text, |
| 2041 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row textarea, |
| 2042 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields select.select, |
| 2043 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields .form-row select, |
| 2044 |
{{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), |
| 2045 |
{{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}};', |
| 2046 |
|
| 2047 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-billing-fields .select2-container .select2-selection--single .select2-selection__rendered' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2048 |
], |
| 2049 |
|
| 2050 |
] |
| 2051 |
); |
| 2052 |
|
| 2053 |
$this->add_responsive_control( |
| 2054 |
'billing_input_margin', |
| 2055 |
[ |
| 2056 |
'label' => __('Margin', 'wpfnl'), |
| 2057 |
'type' => Controls_Manager::DIMENSIONS, |
| 2058 |
'size_units' => ['px', '%', 'em'], |
| 2059 |
'selectors' => [ |
| 2060 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-billing-fields p.form-row:not(#billing_address_1_field), |
| 2061 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-account-fields .form-row' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2062 |
], |
| 2063 |
|
| 2064 |
] |
| 2065 |
); |
| 2066 |
|
| 2067 |
$this->end_controls_section(); |
| 2068 |
} |
| 2069 |
|
| 2070 |
/** |
| 2071 |
* Register Shipping Fields Style Controls. |
| 2072 |
* |
| 2073 |
* @since x.x.x |
| 2074 |
* @access protected |
| 2075 |
*/ |
| 2076 |
protected function register_shipping_style_controls() |
| 2077 |
{ |
| 2078 |
$this->start_controls_section( |
| 2079 |
'shipping_input_section', |
| 2080 |
[ |
| 2081 |
'label' => __('Additional Info / Shipping Section', 'wpfnl'), |
| 2082 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2083 |
] |
| 2084 |
); |
| 2085 |
|
| 2086 |
// ----headding style----- |
| 2087 |
$this->add_control( |
| 2088 |
'shipping_heading_style', |
| 2089 |
[ |
| 2090 |
'label' => __('Heading Style', 'wpfnl'), |
| 2091 |
'type' => Controls_Manager::HEADING, |
| 2092 |
'label_block' => true, |
| 2093 |
] |
| 2094 |
); |
| 2095 |
|
| 2096 |
$this->add_control( |
| 2097 |
'shipping_heading_text_color', |
| 2098 |
[ |
| 2099 |
'label' => __('Color', 'wpfnl'), |
| 2100 |
'type' => Controls_Manager::COLOR, |
| 2101 |
'default' => '', |
| 2102 |
'selectors' => [ |
| 2103 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address label.woocommerce-form__label, |
| 2104 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' => 'color: {{VALUE}};' |
| 2105 |
], |
| 2106 |
] |
| 2107 |
); |
| 2108 |
|
| 2109 |
$this->add_group_control( |
| 2110 |
Group_Control_Typography::get_type(), |
| 2111 |
[ |
| 2112 |
'name' => 'shipping_heading_typography', |
| 2113 |
'label' => 'Typography', |
| 2114 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address span, |
| 2115 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' |
| 2116 |
] |
| 2117 |
); |
| 2118 |
|
| 2119 |
$this->add_responsive_control( |
| 2120 |
'shipping_heading_margin', |
| 2121 |
[ |
| 2122 |
'label' => __('Margin', 'wpfnl'), |
| 2123 |
'type' => Controls_Manager::DIMENSIONS, |
| 2124 |
'size_units' => ['px', '%', 'em'], |
| 2125 |
'selectors' => [ |
| 2126 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address, |
| 2127 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2128 |
], |
| 2129 |
] |
| 2130 |
); |
| 2131 |
|
| 2132 |
$this->add_responsive_control( |
| 2133 |
'shipping_heading_padding', |
| 2134 |
[ |
| 2135 |
'label' => __('Padding', 'wpfnl'), |
| 2136 |
'type' => Controls_Manager::DIMENSIONS, |
| 2137 |
'size_units' => ['px', '%', 'em'], |
| 2138 |
'selectors' => [ |
| 2139 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields #ship-to-different-address, |
| 2140 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields > h3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2141 |
], |
| 2142 |
'separator' => 'after', |
| 2143 |
] |
| 2144 |
); |
| 2145 |
//-----end heading style----- |
| 2146 |
|
| 2147 |
|
| 2148 |
// -----label style------ |
| 2149 |
$this->add_control( |
| 2150 |
'shipping_label_style', |
| 2151 |
[ |
| 2152 |
'label' => __('Label Style', 'wpfnl'), |
| 2153 |
'type' => Controls_Manager::HEADING, |
| 2154 |
'label_block' => true, |
| 2155 |
] |
| 2156 |
); |
| 2157 |
|
| 2158 |
$this->add_control( |
| 2159 |
'shipping_label_color', |
| 2160 |
[ |
| 2161 |
'label' => __('Color', 'wpfnl'), |
| 2162 |
'type' => Controls_Manager::COLOR, |
| 2163 |
'default' => '', |
| 2164 |
'selectors' => [ |
| 2165 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields p.form-row label, |
| 2166 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields p.form-row label' => 'color: {{VALUE}};' |
| 2167 |
], |
| 2168 |
] |
| 2169 |
); |
| 2170 |
|
| 2171 |
$this->add_group_control( |
| 2172 |
Group_Control_Typography::get_type(), |
| 2173 |
[ |
| 2174 |
'name' => 'shipping_label_typography', |
| 2175 |
'label' => 'Typography', |
| 2176 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields p.form-row label, |
| 2177 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields p.form-row label', |
| 2178 |
] |
| 2179 |
); |
| 2180 |
|
| 2181 |
$this->add_responsive_control( |
| 2182 |
'shipping_label_margin', |
| 2183 |
[ |
| 2184 |
'label' => __('Margin', 'wpfnl'), |
| 2185 |
'type' => Controls_Manager::DIMENSIONS, |
| 2186 |
'size_units' => ['px', '%', 'em'], |
| 2187 |
'selectors' => [ |
| 2188 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields p.form-row label, |
| 2189 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields p.form-row label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 2190 |
], |
| 2191 |
'separator' => 'after', |
| 2192 |
] |
| 2193 |
); |
| 2194 |
//-----end label style----- |
| 2195 |
|
| 2196 |
|
| 2197 |
// -----input field style------ |
| 2198 |
$this->add_control( |
| 2199 |
'shipping_input_field_style', |
| 2200 |
[ |
| 2201 |
'label' => __('Input Field Style', 'wpfnl'), |
| 2202 |
'type' => Controls_Manager::HEADING, |
| 2203 |
'label_block' => true, |
| 2204 |
] |
| 2205 |
); |
| 2206 |
|
| 2207 |
$this->add_control( |
| 2208 |
'shipping_input_color', |
| 2209 |
[ |
| 2210 |
'label' => __('Text Color', 'wpfnl'), |
| 2211 |
'type' => Controls_Manager::COLOR, |
| 2212 |
'selectors' => [ |
| 2213 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2214 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2215 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2216 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 2217 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select, |
| 2218 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields ::placeholder, |
| 2219 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields ::-webkit-input-placeholder, |
| 2220 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields ::placeholder, |
| 2221 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields ::-webkit-input-placeholder' => 'color: {{VALUE}} !important;', |
| 2222 |
], |
| 2223 |
] |
| 2224 |
); |
| 2225 |
|
| 2226 |
$this->add_group_control( |
| 2227 |
Group_Control_Typography::get_type(), |
| 2228 |
[ |
| 2229 |
'name' => 'shipping_input_text_typography', |
| 2230 |
'label' => 'Typography', |
| 2231 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2232 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2233 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2234 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__rendered, |
| 2235 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2236 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select, |
| 2237 |
{{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), |
| 2238 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) textarea', |
| 2239 |
] |
| 2240 |
); |
| 2241 |
|
| 2242 |
$this->add_control( |
| 2243 |
'shipping_input_bgcolor', |
| 2244 |
[ |
| 2245 |
'label' => __('Background Color', 'wpfnl'), |
| 2246 |
'type' => Controls_Manager::COLOR, |
| 2247 |
'selectors' => [ |
| 2248 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2249 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2250 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2251 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2252 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select, |
| 2253 |
{{WRAPPER}} .wpfnl-checkout.floating-label #customer_details #wpfnl_checkout_shipping .form-row:not(.create-account) > label' => 'background-color: {{VALUE}};', |
| 2254 |
], |
| 2255 |
] |
| 2256 |
); |
| 2257 |
|
| 2258 |
|
| 2259 |
$this->add_control( |
| 2260 |
'shipping_input_border_style', |
| 2261 |
[ |
| 2262 |
'label' => __('Border Style', 'wpfnl'), |
| 2263 |
'type' => Controls_Manager::SELECT, |
| 2264 |
'label_block' => false, |
| 2265 |
'default' => '', |
| 2266 |
'options' => [ |
| 2267 |
'' => __('Inherit', 'wpfnl'), |
| 2268 |
'solid' => __('Solid', 'wpfnl'), |
| 2269 |
'double' => __('Double', 'wpfnl'), |
| 2270 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2271 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2272 |
], |
| 2273 |
'selectors' => [ |
| 2274 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2275 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2276 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2277 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2278 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select' => 'border-style: {{VALUE}};', |
| 2279 |
], |
| 2280 |
] |
| 2281 |
); |
| 2282 |
$this->add_control( |
| 2283 |
'shipping_input_border_size', |
| 2284 |
[ |
| 2285 |
'label' => __('Border Width', 'wpfnl'), |
| 2286 |
'type' => Controls_Manager::DIMENSIONS, |
| 2287 |
'size_units' => ['px'], |
| 2288 |
'selectors' => [ |
| 2289 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row input.input-text, |
| 2290 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-additional-fields .form-row textarea, |
| 2291 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2292 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select.select, |
| 2293 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .form-row select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2294 |
], |
| 2295 |
] |
| 2296 |
); |
| 2297 |
|
| 2298 |
$this->add_control( |
| 2299 |
'shipping_input_border_color', |
| 2300 |
[ |
| 2301 |
'label' => __('Border Color', 'wpfnl'), |
| 2302 |
'type' => Controls_Manager::COLOR, |
| 2303 |
'selectors' => [ |
| 2304 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row input.input-text, |
| 2305 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-additional-fields .form-row textarea, |
| 2306 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2307 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select.select, |
| 2308 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container--focus .select2-selection, |
| 2309 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select' => 'border-color: {{VALUE}};', |
| 2310 |
], |
| 2311 |
] |
| 2312 |
); |
| 2313 |
|
| 2314 |
|
| 2315 |
$this->add_responsive_control( |
| 2316 |
'shipping_input_radius', |
| 2317 |
[ |
| 2318 |
'label' => __('Radius', 'wpfnl'), |
| 2319 |
'type' => Controls_Manager::DIMENSIONS, |
| 2320 |
'size_units' => ['px', 'em', '%'], |
| 2321 |
'selectors' => [ |
| 2322 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row input.input-text, |
| 2323 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-additional-fields .form-row textarea, |
| 2324 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .select2-container--default .select2-selection--single, |
| 2325 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields select.select, |
| 2326 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2327 |
], |
| 2328 |
] |
| 2329 |
); |
| 2330 |
|
| 2331 |
$this->add_responsive_control( |
| 2332 |
'shipping_input_padding', |
| 2333 |
[ |
| 2334 |
'label' => __('Padding', 'wpfnl'), |
| 2335 |
'type' => Controls_Manager::DIMENSIONS, |
| 2336 |
'size_units' => ['px', '%', 'em'], |
| 2337 |
'selectors' => [ |
| 2338 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row input.input-text, |
| 2339 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-additional-fields .form-row textarea, |
| 2340 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields select.select, |
| 2341 |
{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields .form-row select, |
| 2342 |
{{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), |
| 2343 |
{{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}};', |
| 2344 |
|
| 2345 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-shipping-fields .select2-container .select2-selection--single .select2-selection__rendered' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2346 |
], |
| 2347 |
|
| 2348 |
] |
| 2349 |
); |
| 2350 |
|
| 2351 |
$this->add_responsive_control( |
| 2352 |
'shipping_input_margin', |
| 2353 |
[ |
| 2354 |
'label' => __('Margin', 'wpfnl'), |
| 2355 |
'type' => Controls_Manager::DIMENSIONS, |
| 2356 |
'size_units' => ['px', '%', 'em'], |
| 2357 |
'selectors' => [ |
| 2358 |
'{{WRAPPER}} .wpfnl-checkout form .woocommerce-shipping-fields p.form-row:not(#shipping_address_1_field)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2359 |
], |
| 2360 |
|
| 2361 |
] |
| 2362 |
); |
| 2363 |
|
| 2364 |
$this->end_controls_section(); |
| 2365 |
} |
| 2366 |
|
| 2367 |
|
| 2368 |
/** |
| 2369 |
* Register Order Table Style Controls. |
| 2370 |
* |
| 2371 |
* @since x.x.x |
| 2372 |
* @access protected |
| 2373 |
*/ |
| 2374 |
protected function register_your_order_style_controls() |
| 2375 |
{ |
| 2376 |
$this->start_controls_section( |
| 2377 |
'your_order_section', |
| 2378 |
[ |
| 2379 |
'label' => __('Order Table Section', 'wpfnl'), |
| 2380 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2381 |
] |
| 2382 |
); |
| 2383 |
|
| 2384 |
// ----headding style----- |
| 2385 |
$this->add_control( |
| 2386 |
'order_heading_style', |
| 2387 |
[ |
| 2388 |
'label' => __('Heading Style', 'wpfnl'), |
| 2389 |
'type' => Controls_Manager::HEADING, |
| 2390 |
'label_block' => true, |
| 2391 |
] |
| 2392 |
); |
| 2393 |
|
| 2394 |
$this->add_control( |
| 2395 |
'order_heading_color', |
| 2396 |
[ |
| 2397 |
'label' => __('Color', 'wpfnl'), |
| 2398 |
'type' => Controls_Manager::COLOR, |
| 2399 |
'default' => '', |
| 2400 |
'selectors' => [ |
| 2401 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading' => 'color: {{VALUE}};' |
| 2402 |
], |
| 2403 |
] |
| 2404 |
); |
| 2405 |
|
| 2406 |
$this->add_group_control( |
| 2407 |
Group_Control_Typography::get_type(), |
| 2408 |
[ |
| 2409 |
'name' => 'order_heading_typography', |
| 2410 |
'label' => 'Typography', |
| 2411 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading', |
| 2412 |
] |
| 2413 |
); |
| 2414 |
|
| 2415 |
$this->add_responsive_control( |
| 2416 |
'order_heading_margin', |
| 2417 |
[ |
| 2418 |
'label' => __('Margin', 'wpfnl'), |
| 2419 |
'type' => Controls_Manager::DIMENSIONS, |
| 2420 |
'size_units' => ['px', '%', 'em'], |
| 2421 |
'selectors' => [ |
| 2422 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important', |
| 2423 |
], |
| 2424 |
] |
| 2425 |
); |
| 2426 |
|
| 2427 |
$this->add_responsive_control( |
| 2428 |
'order_heading_padding', |
| 2429 |
[ |
| 2430 |
'label' => __('Padding', 'wpfnl'), |
| 2431 |
'type' => Controls_Manager::DIMENSIONS, |
| 2432 |
'size_units' => ['px', '%', 'em'], |
| 2433 |
'selectors' => [ |
| 2434 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout #order_review_heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important', |
| 2435 |
], |
| 2436 |
'separator' => 'after', |
| 2437 |
] |
| 2438 |
); |
| 2439 |
//-----end heading style----- |
| 2440 |
|
| 2441 |
// ----order table style----- |
| 2442 |
$this->add_control( |
| 2443 |
'order_table_style', |
| 2444 |
[ |
| 2445 |
'label' => __('Table Style', 'wpfnl'), |
| 2446 |
'type' => Controls_Manager::HEADING, |
| 2447 |
'label_block' => true, |
| 2448 |
] |
| 2449 |
); |
| 2450 |
|
| 2451 |
$this->add_control( |
| 2452 |
'your_order_text_color', |
| 2453 |
[ |
| 2454 |
'label' => __('Color', 'wpfnl'), |
| 2455 |
'type' => Controls_Manager::COLOR, |
| 2456 |
'default' => '', |
| 2457 |
'selectors' => [ |
| 2458 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table td, |
| 2459 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table th' => 'color: {{VALUE}};' |
| 2460 |
], |
| 2461 |
] |
| 2462 |
); |
| 2463 |
|
| 2464 |
$this->add_group_control( |
| 2465 |
Group_Control_Typography::get_type(), |
| 2466 |
[ |
| 2467 |
'name' => 'your_order_text_typography', |
| 2468 |
'label' => 'Typography', |
| 2469 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table td, |
| 2470 |
{{WRAPPER}} .wpfnl-checkout .woocommerce-checkout table.woocommerce-checkout-review-order-table th', |
| 2471 |
] |
| 2472 |
); |
| 2473 |
|
| 2474 |
$this->add_control( |
| 2475 |
'order_table_border_style', |
| 2476 |
[ |
| 2477 |
'label' => __('Border Style', 'wpfnl'), |
| 2478 |
'type' => Controls_Manager::SELECT, |
| 2479 |
'label_block' => false, |
| 2480 |
'default' => '', |
| 2481 |
'options' => [ |
| 2482 |
'' => __('Inherit', 'wpfnl'), |
| 2483 |
'solid' => __('Solid', 'wpfnl'), |
| 2484 |
'double' => __('Double', 'wpfnl'), |
| 2485 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2486 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2487 |
], |
| 2488 |
|
| 2489 |
'selectors' => [ |
| 2490 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-style: {{VALUE}}!important;', |
| 2491 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2492 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2493 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2494 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2495 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2496 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'border-left-style: {{VALUE}}!important; border-top-style: {{VALUE}}!important;', |
| 2497 |
], |
| 2498 |
] |
| 2499 |
); |
| 2500 |
|
| 2501 |
$this->add_control( |
| 2502 |
'order_table_border_size', |
| 2503 |
[ |
| 2504 |
'label' => __('Border Width', 'wpfnl'), |
| 2505 |
'type' => Controls_Manager::DIMENSIONS, |
| 2506 |
'size_units' => ['px'], |
| 2507 |
'selectors' => [ |
| 2508 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important; border-top: none!important;', |
| 2509 |
|
| 2510 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2511 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2512 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2513 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2514 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2515 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2516 |
|
| 2517 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th:first-child, |
| 2518 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td:first-child, |
| 2519 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th:first-child, |
| 2520 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td:first-child, |
| 2521 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td:first-child, |
| 2522 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th:first-child' => 'border-left: none!important;', |
| 2523 |
|
| 2524 |
], |
| 2525 |
] |
| 2526 |
); |
| 2527 |
|
| 2528 |
$this->add_control( |
| 2529 |
'order_table_border_color', |
| 2530 |
[ |
| 2531 |
'label' => __('Border Color', 'wpfnl'), |
| 2532 |
'type' => Controls_Manager::COLOR, |
| 2533 |
'selectors' => [ |
| 2534 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-color: {{VALUE}}!important;', |
| 2535 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2536 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2537 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2538 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2539 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2540 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'border-left-color: {{VALUE}}!important; border-top-color: {{VALUE}}!important;', |
| 2541 |
], |
| 2542 |
|
| 2543 |
] |
| 2544 |
); |
| 2545 |
|
| 2546 |
$this->add_responsive_control( |
| 2547 |
'order_table_radius', |
| 2548 |
[ |
| 2549 |
'label' => __('Radius', 'wpfnl'), |
| 2550 |
'type' => Controls_Manager::DIMENSIONS, |
| 2551 |
'size_units' => ['px', 'em', '%'], |
| 2552 |
'selectors' => [ |
| 2553 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2554 |
], |
| 2555 |
] |
| 2556 |
); |
| 2557 |
|
| 2558 |
$this->add_responsive_control( |
| 2559 |
'order_table_cell_padding', |
| 2560 |
[ |
| 2561 |
'label' => __('Cell Padding', 'wpfnl'), |
| 2562 |
'type' => Controls_Manager::DIMENSIONS, |
| 2563 |
'size_units' => ['px', '%', 'em'], |
| 2564 |
'selectors' => [ |
| 2565 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead th, |
| 2566 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table thead td, |
| 2567 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody th, |
| 2568 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tbody td, |
| 2569 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot td, |
| 2570 |
{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table tfoot th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2571 |
], |
| 2572 |
|
| 2573 |
] |
| 2574 |
); |
| 2575 |
|
| 2576 |
$this->add_responsive_control( |
| 2577 |
'order_table_margin', |
| 2578 |
[ |
| 2579 |
'label' => __('Margin', 'wpfnl'), |
| 2580 |
'type' => Controls_Manager::DIMENSIONS, |
| 2581 |
'size_units' => ['px', '%', 'em'], |
| 2582 |
'selectors' => [ |
| 2583 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce table.shop_table' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2584 |
], |
| 2585 |
|
| 2586 |
] |
| 2587 |
); |
| 2588 |
|
| 2589 |
$this->end_controls_section(); |
| 2590 |
} |
| 2591 |
|
| 2592 |
|
| 2593 |
/** |
| 2594 |
* Register Coupon Field Style Controls. |
| 2595 |
* |
| 2596 |
* @since x.x.x |
| 2597 |
* @access protected |
| 2598 |
*/ |
| 2599 |
protected function register_coupon_style_controls() |
| 2600 |
{ |
| 2601 |
$this->start_controls_section( |
| 2602 |
'coupon_section', |
| 2603 |
[ |
| 2604 |
'label' => __('Coupon Section', 'wpfnl'), |
| 2605 |
'tab' => Controls_Manager::TAB_STYLE, |
| 2606 |
] |
| 2607 |
); |
| 2608 |
|
| 2609 |
// ----toggle area style----- |
| 2610 |
$this->add_control( |
| 2611 |
'coupon_toggle_area_style', |
| 2612 |
[ |
| 2613 |
'label' => __('Coupon Toggle Area Style', 'wpfnl'), |
| 2614 |
'type' => Controls_Manager::HEADING, |
| 2615 |
'label_block' => true, |
| 2616 |
] |
| 2617 |
); |
| 2618 |
|
| 2619 |
$this->add_control( |
| 2620 |
'coupon_toggle_color', |
| 2621 |
[ |
| 2622 |
'label' => __('Text Color', 'wpfnl'), |
| 2623 |
'type' => Controls_Manager::COLOR, |
| 2624 |
'selectors' => [ |
| 2625 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'color: {{VALUE}};', |
| 2626 |
], |
| 2627 |
] |
| 2628 |
); |
| 2629 |
|
| 2630 |
$this->add_control( |
| 2631 |
'coupon_toggle_link_color', |
| 2632 |
[ |
| 2633 |
'label' => __('Link Color', 'wpfnl'), |
| 2634 |
'type' => Controls_Manager::COLOR, |
| 2635 |
'selectors' => [ |
| 2636 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info a' => 'color: {{VALUE}};', |
| 2637 |
], |
| 2638 |
] |
| 2639 |
); |
| 2640 |
|
| 2641 |
$this->add_control( |
| 2642 |
'coupon_toggle_bgcolor', |
| 2643 |
[ |
| 2644 |
'label' => __('Background Color', 'wpfnl'), |
| 2645 |
'type' => Controls_Manager::COLOR, |
| 2646 |
'selectors' => [ |
| 2647 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'background-color: {{VALUE}};', |
| 2648 |
], |
| 2649 |
] |
| 2650 |
); |
| 2651 |
|
| 2652 |
$this->add_group_control( |
| 2653 |
Group_Control_Typography::get_type(), |
| 2654 |
[ |
| 2655 |
'name' => 'coupon_toggle_typography', |
| 2656 |
'label' => 'Typography', |
| 2657 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info', |
| 2658 |
] |
| 2659 |
); |
| 2660 |
|
| 2661 |
$this->add_control( |
| 2662 |
'coupon_toggle_border_style', |
| 2663 |
[ |
| 2664 |
'label' => __('Border Style', 'wpfnl'), |
| 2665 |
'type' => Controls_Manager::SELECT, |
| 2666 |
'label_block' => false, |
| 2667 |
'default' => '', |
| 2668 |
'options' => [ |
| 2669 |
'' => __('Inherit', 'wpfnl'), |
| 2670 |
'solid' => __('Solid', 'wpfnl'), |
| 2671 |
'double' => __('Double', 'wpfnl'), |
| 2672 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2673 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2674 |
], |
| 2675 |
'selectors' => [ |
| 2676 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-style: {{VALUE}};', |
| 2677 |
], |
| 2678 |
] |
| 2679 |
); |
| 2680 |
|
| 2681 |
$this->add_control( |
| 2682 |
'coupon_toggle_border_size', |
| 2683 |
[ |
| 2684 |
'label' => __('Border Width', 'wpfnl'), |
| 2685 |
'type' => Controls_Manager::DIMENSIONS, |
| 2686 |
'size_units' => ['px'], |
| 2687 |
'selectors' => [ |
| 2688 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2689 |
], |
| 2690 |
'condition' => [ |
| 2691 |
'coupon_toggle_border_style!' => '', |
| 2692 |
] |
| 2693 |
] |
| 2694 |
); |
| 2695 |
|
| 2696 |
$this->add_control( |
| 2697 |
'coupon_toggle_border_color', |
| 2698 |
[ |
| 2699 |
'label' => __('Border Color', 'wpfnl'), |
| 2700 |
'type' => Controls_Manager::COLOR, |
| 2701 |
'selectors' => [ |
| 2702 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-color: {{VALUE}};', |
| 2703 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before' => 'color: {{VALUE}};', |
| 2704 |
], |
| 2705 |
'condition' => [ |
| 2706 |
'coupon_toggle_border_style!' => '', |
| 2707 |
] |
| 2708 |
] |
| 2709 |
); |
| 2710 |
|
| 2711 |
|
| 2712 |
$this->add_responsive_control( |
| 2713 |
'coupon_toggle_radius', |
| 2714 |
[ |
| 2715 |
'label' => __('Radius', 'wpfnl'), |
| 2716 |
'type' => Controls_Manager::DIMENSIONS, |
| 2717 |
'size_units' => ['px', 'em', '%'], |
| 2718 |
'selectors' => [ |
| 2719 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2720 |
], |
| 2721 |
] |
| 2722 |
); |
| 2723 |
|
| 2724 |
$this->add_responsive_control( |
| 2725 |
'coupon_toggle_padding', |
| 2726 |
[ |
| 2727 |
'label' => __('Padding', 'wpfnl'), |
| 2728 |
'type' => Controls_Manager::DIMENSIONS, |
| 2729 |
'size_units' => ['px', '%', 'em'], |
| 2730 |
'selectors' => [ |
| 2731 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2732 |
|
| 2733 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before' => 'top: {{TOP}}{{UNIT}};', |
| 2734 |
], |
| 2735 |
|
| 2736 |
] |
| 2737 |
); |
| 2738 |
|
| 2739 |
$this->add_responsive_control( |
| 2740 |
'coupon_toggle_margin', |
| 2741 |
[ |
| 2742 |
'label' => __('Margin', 'wpfnl'), |
| 2743 |
'type' => Controls_Manager::DIMENSIONS, |
| 2744 |
'size_units' => ['px', '%', 'em'], |
| 2745 |
'selectors' => [ |
| 2746 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce-form-coupon-toggle .woocommerce-info' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2747 |
], |
| 2748 |
'separator' => 'after' |
| 2749 |
|
| 2750 |
] |
| 2751 |
); |
| 2752 |
|
| 2753 |
|
| 2754 |
// ----coupon form box style----- |
| 2755 |
$this->add_control( |
| 2756 |
'coupon_form_box_style', |
| 2757 |
[ |
| 2758 |
'label' => __('Coupon Form Box Style', 'wpfnl'), |
| 2759 |
'type' => Controls_Manager::HEADING, |
| 2760 |
'label_block' => true, |
| 2761 |
] |
| 2762 |
); |
| 2763 |
|
| 2764 |
$this->add_control( |
| 2765 |
'coupon_form_box_color', |
| 2766 |
[ |
| 2767 |
'label' => __('Text Color', 'wpfnl'), |
| 2768 |
'type' => Controls_Manager::COLOR, |
| 2769 |
'selectors' => [ |
| 2770 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon p' => 'color: {{VALUE}};', |
| 2771 |
], |
| 2772 |
] |
| 2773 |
); |
| 2774 |
|
| 2775 |
$this->add_control( |
| 2776 |
'coupon_form_box_bgcolor', |
| 2777 |
[ |
| 2778 |
'label' => __('Background Color', 'wpfnl'), |
| 2779 |
'type' => Controls_Manager::COLOR, |
| 2780 |
'selectors' => [ |
| 2781 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'background-color: {{VALUE}};', |
| 2782 |
], |
| 2783 |
] |
| 2784 |
); |
| 2785 |
|
| 2786 |
$this->add_group_control( |
| 2787 |
Group_Control_Typography::get_type(), |
| 2788 |
[ |
| 2789 |
'name' => 'coupon_form_box_typography', |
| 2790 |
'label' => 'Typography', |
| 2791 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon p', |
| 2792 |
] |
| 2793 |
); |
| 2794 |
|
| 2795 |
$this->add_control( |
| 2796 |
'coupon_form_box_border_style', |
| 2797 |
[ |
| 2798 |
'label' => __('Border Style', 'wpfnl'), |
| 2799 |
'type' => Controls_Manager::SELECT, |
| 2800 |
'label_block' => false, |
| 2801 |
'default' => '', |
| 2802 |
'options' => [ |
| 2803 |
'' => __('Inherit', 'wpfnl'), |
| 2804 |
'solid' => __('Solid', 'wpfnl'), |
| 2805 |
'double' => __('Double', 'wpfnl'), |
| 2806 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2807 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2808 |
], |
| 2809 |
'selectors' => [ |
| 2810 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-style: {{VALUE}};', |
| 2811 |
], |
| 2812 |
] |
| 2813 |
); |
| 2814 |
|
| 2815 |
$this->add_control( |
| 2816 |
'coupon_form_box_border_size', |
| 2817 |
[ |
| 2818 |
'label' => __('Border Width', 'wpfnl'), |
| 2819 |
'type' => Controls_Manager::DIMENSIONS, |
| 2820 |
'size_units' => ['px'], |
| 2821 |
'selectors' => [ |
| 2822 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2823 |
], |
| 2824 |
'condition' => [ |
| 2825 |
'coupon_form_box_border_style!' => '', |
| 2826 |
] |
| 2827 |
] |
| 2828 |
); |
| 2829 |
|
| 2830 |
$this->add_control( |
| 2831 |
'coupon_form_box_border_color', |
| 2832 |
[ |
| 2833 |
'label' => __('Border Color', 'wpfnl'), |
| 2834 |
'type' => Controls_Manager::COLOR, |
| 2835 |
'selectors' => [ |
| 2836 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-color: {{VALUE}};', |
| 2837 |
], |
| 2838 |
'condition' => [ |
| 2839 |
'coupon_form_box_border_style!' => '', |
| 2840 |
] |
| 2841 |
] |
| 2842 |
); |
| 2843 |
|
| 2844 |
$this->add_responsive_control( |
| 2845 |
'coupon_form_box_radius', |
| 2846 |
[ |
| 2847 |
'label' => __('Radius', 'wpfnl'), |
| 2848 |
'type' => Controls_Manager::DIMENSIONS, |
| 2849 |
'size_units' => ['px', 'em', '%'], |
| 2850 |
'selectors' => [ |
| 2851 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2852 |
], |
| 2853 |
] |
| 2854 |
); |
| 2855 |
|
| 2856 |
$this->add_responsive_control( |
| 2857 |
'coupon_form_box_padding', |
| 2858 |
[ |
| 2859 |
'label' => __('Padding', 'wpfnl'), |
| 2860 |
'type' => Controls_Manager::DIMENSIONS, |
| 2861 |
'size_units' => ['px', '%', 'em'], |
| 2862 |
'selectors' => [ |
| 2863 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2864 |
], |
| 2865 |
|
| 2866 |
] |
| 2867 |
); |
| 2868 |
|
| 2869 |
$this->add_responsive_control( |
| 2870 |
'coupon_form_box_margin', |
| 2871 |
[ |
| 2872 |
'label' => __('Margin', 'wpfnl'), |
| 2873 |
'type' => Controls_Manager::DIMENSIONS, |
| 2874 |
'size_units' => ['px', '%', 'em'], |
| 2875 |
'selectors' => [ |
| 2876 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2877 |
], |
| 2878 |
'separator' => 'after' |
| 2879 |
] |
| 2880 |
); |
| 2881 |
|
| 2882 |
// ----coupon input field style----- |
| 2883 |
$this->add_control( |
| 2884 |
'coupon_input_field_style', |
| 2885 |
[ |
| 2886 |
'label' => __('Coupon Input field Style', 'wpfnl'), |
| 2887 |
'type' => Controls_Manager::HEADING, |
| 2888 |
'label_block' => true, |
| 2889 |
] |
| 2890 |
); |
| 2891 |
|
| 2892 |
$this->add_control( |
| 2893 |
'coupon_input_field_color', |
| 2894 |
[ |
| 2895 |
'label' => __('Color', 'wpfnl'), |
| 2896 |
'type' => Controls_Manager::COLOR, |
| 2897 |
'selectors' => [ |
| 2898 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text, |
| 2899 |
{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon ::placeholder, |
| 2900 |
{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon ::-webkit-input-placeholder' => 'color: {{VALUE}};', |
| 2901 |
], |
| 2902 |
] |
| 2903 |
); |
| 2904 |
|
| 2905 |
$this->add_control( |
| 2906 |
'coupon_input_field_bgcolor', |
| 2907 |
[ |
| 2908 |
'label' => __('Background Color', 'wpfnl'), |
| 2909 |
'type' => Controls_Manager::COLOR, |
| 2910 |
'selectors' => [ |
| 2911 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'background-color: {{VALUE}};', |
| 2912 |
], |
| 2913 |
] |
| 2914 |
); |
| 2915 |
|
| 2916 |
$this->add_group_control( |
| 2917 |
Group_Control_Typography::get_type(), |
| 2918 |
[ |
| 2919 |
'name' => 'coupon_input_field_typography', |
| 2920 |
'label' => 'Typography', |
| 2921 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text', |
| 2922 |
] |
| 2923 |
); |
| 2924 |
|
| 2925 |
$this->add_control( |
| 2926 |
'coupon_input_field_border_style', |
| 2927 |
[ |
| 2928 |
'label' => __('Border Style', 'wpfnl'), |
| 2929 |
'type' => Controls_Manager::SELECT, |
| 2930 |
'label_block' => false, |
| 2931 |
'default' => '', |
| 2932 |
'options' => [ |
| 2933 |
'' => __('Inherit', 'wpfnl'), |
| 2934 |
'solid' => __('Solid', 'wpfnl'), |
| 2935 |
'double' => __('Double', 'wpfnl'), |
| 2936 |
'dotted' => __('Dotted', 'wpfnl'), |
| 2937 |
'dashed' => __('Dashed', 'wpfnl'), |
| 2938 |
], |
| 2939 |
'selectors' => [ |
| 2940 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-style: {{VALUE}};', |
| 2941 |
], |
| 2942 |
] |
| 2943 |
); |
| 2944 |
|
| 2945 |
$this->add_control( |
| 2946 |
'coupon_input_field_border_size', |
| 2947 |
[ |
| 2948 |
'label' => __('Border Width', 'wpfnl'), |
| 2949 |
'type' => Controls_Manager::DIMENSIONS, |
| 2950 |
'size_units' => ['px'], |
| 2951 |
'selectors' => [ |
| 2952 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2953 |
], |
| 2954 |
'condition' => [ |
| 2955 |
'coupon_input_field_border_style!' => '', |
| 2956 |
] |
| 2957 |
] |
| 2958 |
); |
| 2959 |
|
| 2960 |
$this->add_control( |
| 2961 |
'coupon_input_field_border_color', |
| 2962 |
[ |
| 2963 |
'label' => __('Border Color', 'wpfnl'), |
| 2964 |
'type' => Controls_Manager::COLOR, |
| 2965 |
'selectors' => [ |
| 2966 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-color: {{VALUE}};', |
| 2967 |
], |
| 2968 |
'condition' => [ |
| 2969 |
'coupon_input_field_border_style!' => '', |
| 2970 |
] |
| 2971 |
] |
| 2972 |
); |
| 2973 |
|
| 2974 |
|
| 2975 |
$this->add_responsive_control( |
| 2976 |
'coupon_input_field_radius', |
| 2977 |
[ |
| 2978 |
'label' => __('Radius', 'wpfnl'), |
| 2979 |
'type' => Controls_Manager::DIMENSIONS, |
| 2980 |
'size_units' => ['px', 'em', '%'], |
| 2981 |
'selectors' => [ |
| 2982 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2983 |
], |
| 2984 |
] |
| 2985 |
); |
| 2986 |
|
| 2987 |
$this->add_responsive_control( |
| 2988 |
'coupon_input_field_padding', |
| 2989 |
[ |
| 2990 |
'label' => __('Padding', 'wpfnl'), |
| 2991 |
'type' => Controls_Manager::DIMENSIONS, |
| 2992 |
'size_units' => ['px', '%', 'em'], |
| 2993 |
'selectors' => [ |
| 2994 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon .input-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;', |
| 2995 |
], |
| 2996 |
'separator' => 'after' |
| 2997 |
] |
| 2998 |
); |
| 2999 |
|
| 3000 |
|
| 3001 |
// ----Coupon Button style----- |
| 3002 |
$this->add_control( |
| 3003 |
'coupon_button_style', |
| 3004 |
[ |
| 3005 |
'label' => __('Coupon Button Style', 'wpfnl'), |
| 3006 |
'type' => Controls_Manager::HEADING, |
| 3007 |
'label_block' => true, |
| 3008 |
] |
| 3009 |
); |
| 3010 |
|
| 3011 |
$this->add_group_control( |
| 3012 |
Group_Control_Typography::get_type(), |
| 3013 |
[ |
| 3014 |
'name' => 'coupon_button_typography', |
| 3015 |
'label' => 'Typography', |
| 3016 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button', |
| 3017 |
] |
| 3018 |
); |
| 3019 |
|
| 3020 |
$this->start_controls_tabs('coupon_button_tab'); |
| 3021 |
$this->start_controls_tab( |
| 3022 |
'coupon_button_normal', |
| 3023 |
[ |
| 3024 |
'label' => __('Normal', 'wpfnl'), |
| 3025 |
] |
| 3026 |
); |
| 3027 |
|
| 3028 |
$this->add_control( |
| 3029 |
'coupon_button_color', |
| 3030 |
[ |
| 3031 |
'label' => __('Color', 'wpfnl'), |
| 3032 |
'type' => Controls_Manager::COLOR, |
| 3033 |
'default' => '', |
| 3034 |
'selectors' => [ |
| 3035 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'color: {{VALUE}};', |
| 3036 |
], |
| 3037 |
] |
| 3038 |
); |
| 3039 |
|
| 3040 |
$this->add_control( |
| 3041 |
'coupon_button_bg_color', |
| 3042 |
[ |
| 3043 |
'label' => __('Background Color', 'wpfnl'), |
| 3044 |
'type' => Controls_Manager::COLOR, |
| 3045 |
'selectors' => [ |
| 3046 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'background-color: {{VALUE}};', |
| 3047 |
], |
| 3048 |
|
| 3049 |
] |
| 3050 |
); |
| 3051 |
|
| 3052 |
$this->add_group_control( |
| 3053 |
Group_Control_Box_Shadow::get_type(), |
| 3054 |
[ |
| 3055 |
'name' => 'coupon_button_box_shadow', |
| 3056 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button', |
| 3057 |
] |
| 3058 |
); |
| 3059 |
$this->end_controls_tab(); |
| 3060 |
|
| 3061 |
//----hover style--- |
| 3062 |
$this->start_controls_tab( |
| 3063 |
'coupon_button_button_hover', |
| 3064 |
[ |
| 3065 |
'label' => __('Hover', 'wpfnl'), |
| 3066 |
] |
| 3067 |
); |
| 3068 |
|
| 3069 |
$this->add_control( |
| 3070 |
'coupon_button_color_hover', |
| 3071 |
[ |
| 3072 |
'label' => __('Color', 'wpfnl'), |
| 3073 |
'type' => Controls_Manager::COLOR, |
| 3074 |
'default' => '', |
| 3075 |
'selectors' => [ |
| 3076 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button:hover' => 'color: {{VALUE}};', |
| 3077 |
], |
| 3078 |
] |
| 3079 |
); |
| 3080 |
|
| 3081 |
$this->add_control( |
| 3082 |
'coupon_button_bg_color_hover', |
| 3083 |
[ |
| 3084 |
'label' => __('Background Color', 'wpfnl'), |
| 3085 |
'type' => Controls_Manager::COLOR, |
| 3086 |
'selectors' => [ |
| 3087 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button:hover' => 'background-color: {{VALUE}};', |
| 3088 |
], |
| 3089 |
] |
| 3090 |
); |
| 3091 |
|
| 3092 |
$this->add_group_control( |
| 3093 |
Group_Control_Box_Shadow::get_type(), |
| 3094 |
[ |
| 3095 |
'name' => 'coupon_button_box_shadow_hover', |
| 3096 |
'selector' => '{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button:hover', |
| 3097 |
] |
| 3098 |
); |
| 3099 |
$this->end_controls_tab(); |
| 3100 |
$this->end_controls_tabs(); |
| 3101 |
//----------------------- |
| 3102 |
|
| 3103 |
$this->add_responsive_control( |
| 3104 |
'coupon_button_radius', |
| 3105 |
[ |
| 3106 |
'label' => __('Radius', 'wpfnl'), |
| 3107 |
'type' => Controls_Manager::DIMENSIONS, |
| 3108 |
'size_units' => ['px', 'em', '%'], |
| 3109 |
'selectors' => [ |
| 3110 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3111 |
], |
| 3112 |
'separator' => 'before', |
| 3113 |
] |
| 3114 |
); |
| 3115 |
|
| 3116 |
$this->add_responsive_control( |
| 3117 |
'coupon_button_padding', |
| 3118 |
[ |
| 3119 |
'label' => __('Padding', 'wpfnl'), |
| 3120 |
'type' => Controls_Manager::DIMENSIONS, |
| 3121 |
'size_units' => ['px', 'em', '%'], |
| 3122 |
'selectors' => [ |
| 3123 |
'{{WRAPPER}} .wpfnl-checkout .woocommerce form.woocommerce-form-coupon button.button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3124 |
], |
| 3125 |
] |
| 3126 |
); |
| 3127 |
|
| 3128 |
|
| 3129 |
$this->end_controls_section(); |
| 3130 |
} |
| 3131 |
|
| 3132 |
|
| 3133 |
/** |
| 3134 |
* Render the widget output on the frontend. |
| 3135 |
* |
| 3136 |
* Written in PHP and used to generate the final HTML. |
| 3137 |
* |
| 3138 |
* @since 1.0.0 |
| 3139 |
* |
| 3140 |
* @access protected |
| 3141 |
*/ |
| 3142 |
protected function render() |
| 3143 |
{ |
| 3144 |
|
| 3145 |
$settings = $this->get_settings_for_display(); |
| 3146 |
|
| 3147 |
$checkout = WC()->checkout(); |
| 3148 |
if( wp_doing_ajax() && isset($_REQUEST['action']) && 'elementor_ajax' === $_REQUEST['action'] ) { |
| 3149 |
$checkout_id = absint( $_REQUEST['editor_post_id'] ); |
| 3150 |
} else { |
| 3151 |
$checkout_id = get_the_ID(); |
| 3152 |
} |
| 3153 |
|
| 3154 |
//===Coupon Enabler===// |
| 3155 |
$coupon_enabler = get_post_meta(get_the_ID(), '_wpfnl_checkout_coupon', true); |
| 3156 |
if ( $coupon_enabler != 'yes' ) { |
| 3157 |
remove_action('woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10); |
| 3158 |
} |
| 3159 |
|
| 3160 |
$checkout_layout = isset($settings['checkout_layout']) ? $settings['checkout_layout'] : 'two-column'; |
| 3161 |
|
| 3162 |
//-----floating label class----- |
| 3163 |
$floating_label = isset($settings['checkout_floating_label']) ? $settings['checkout_floating_label'] : ''; |
| 3164 |
|
| 3165 |
/** |
| 3166 |
* Check if pro is activated or not |
| 3167 |
*/ |
| 3168 |
if( !Wpfnl_functions::is_wpfnl_pro_activated() && ('wpfnl-multistep' === $checkout_layout || 'wpfnl-express-checkout' === $checkout_layout) ) { |
| 3169 |
$checkout_layout = 'wpfnl-col-2'; |
| 3170 |
} |
| 3171 |
|
| 3172 |
if( PHP_SESSION_DISABLED == session_status() ) { |
| 3173 |
session_start(); |
| 3174 |
} |
| 3175 |
$_SESSION[ 'checkout_layout' ] = $checkout_layout; |
| 3176 |
|
| 3177 |
/** |
| 3178 |
* Check if pro is activated and wpfnl-express-checkout selected |
| 3179 |
*/ |
| 3180 |
if( Wpfnl_functions::is_wpfnl_pro_activated() && 'wpfnl-express-checkout' === $checkout_layout ) { |
| 3181 |
$checkout_layout .= ' wpfnl-multistep'; |
| 3182 |
} |
| 3183 |
|
| 3184 |
/** |
| 3185 |
* Check if pro is activated and wpfnl-express-checkout selected |
| 3186 |
*/ |
| 3187 |
if( Wpfnl_functions::is_wpfnl_pro_activated() && 'wpfnl-2-step' === $checkout_layout ) { |
| 3188 |
$checkout_layout .= ' wpfnl-multistep'; |
| 3189 |
} |
| 3190 |
query_posts('post_type="checkout"'); |
| 3191 |
|
| 3192 |
do_action( 'wpfunnels/before_elementor_checkout_form', $settings ); |
| 3193 |
do_action( 'wpfunnels/before_checkout_form', $checkout_id ); |
| 3194 |
?> |
| 3195 |
<div class="wpfnl-checkout <?php echo $checkout_layout .' '. $floating_label ?>"> |
| 3196 |
|
| 3197 |
<?php echo do_shortcode('[woocommerce_checkout]'); ?> |
| 3198 |
|
| 3199 |
<!-- when checkout layout Express Checkout selected then show --> |
| 3200 |
<?php if( Wpfnl_functions::is_wpfnl_pro_activated() && 'wpfnl-express-checkout' === $settings['checkout_layout'] ){ |
| 3201 |
?> |
| 3202 |
<?php } ?> |
| 3203 |
</div> |
| 3204 |
<?php |
| 3205 |
} |
| 3206 |
|
| 3207 |
public function render_popup_in_editor() |
| 3208 |
{ |
| 3209 |
if (\Elementor\Plugin::$instance->editor->is_edit_mode()) { |
| 3210 |
|
| 3211 |
add_action('woocommerce_before_checkout_form', [$this, 'render_order_bump'], 10); |
| 3212 |
} |
| 3213 |
} |
| 3214 |
|
| 3215 |
/** |
| 3216 |
* Render order bump data with hooks. |
| 3217 |
* |
| 3218 |
* @since 1.0.0 |
| 3219 |
* |
| 3220 |
* @access protected |
| 3221 |
*/ |
| 3222 |
public function render_order_bump() |
| 3223 |
{ |
| 3224 |
|
| 3225 |
|
| 3226 |
$step_id = get_the_ID(); |
| 3227 |
$order_bump = get_post_meta($step_id, 'order-bump', true); |
| 3228 |
$order_bump_settings = get_post_meta($step_id, 'order-bump-settings', true); |
| 3229 |
foreach( $order_bump_settings as $key=>$ob_settings ){ |
| 3230 |
if ( $ob_settings['isEnabled'] && isset($ob_settings['product']) && $ob_settings['product'] != '' ) { |
| 3231 |
$this->render_order_bump_template($ob_settings); |
| 3232 |
} |
| 3233 |
} |
| 3234 |
|
| 3235 |
|
| 3236 |
} |
| 3237 |
|
| 3238 |
public function render_order_bump_template($settings) |
| 3239 |
{ |
| 3240 |
if (!empty($settings['selectedStyle'])) { |
| 3241 |
|
| 3242 |
if ($settings['position'] == 'popup') { |
| 3243 |
if (\Elementor\Plugin::$instance->editor->is_edit_mode()) { |
| 3244 |
echo '<h5 style="margin-bottom: 15px;"><strong>' . __('To see the pop-up offer in action, please preview or view the page.', 'wpfnl') . '</strong></h5>'; |
| 3245 |
} else { |
| 3246 |
require_once WPFNL_DIR . 'public/modules/checkout/templates-style/order-bump-template-' . $settings['selectedStyle'] . '.php'; |
| 3247 |
} |
| 3248 |
|
| 3249 |
} else { |
| 3250 |
require_once WPFNL_DIR . 'public/modules/checkout/templates-style/order-bump-template-' . $settings['selectedStyle'] . '.php'; |
| 3251 |
} |
| 3252 |
} |
| 3253 |
} |
| 3254 |
|
| 3255 |
} |
| 3256 |
|