protected function register_controls() {
// Pricing Table
$this -> start_controls_section(
'pricing_table',
[
'label' => esc_html__('Pricing Table', 'elementor-addon'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this -> add_control(
'pricing_section_layout',
[
'label' => esc_html__('Layout', 'elementor-addon'),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'style_one',
'options' => [
'style_one' => esc_html__('Style 1', 'elementor-addon'),
'style_two' => esc_html__('Style 2', 'elementor-addon'),
],
]
);
$this -> add_control(
'pricing_table_data',
[
'label' => esc_html__('Pricing Items', 'elementor-addon'),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => [
[
'name' => 'pricing_package_title',
'label' => esc_html__('Title', 'elementor-addon'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__('Standard' , 'elementor-addon'),
'placeholder' => esc_html__('Type pricing package title', 'elementor-addon'),
],
[
'name' => 'pricing_package_items',
'label' => esc_html__('Items', 'elementor-addon'),
'type' => \Elementor\Controls_Manager::WYSIWYG,
'default' => esc_html__('Far far away.'),
'placeholder' => esc_html__('Type package items here', 'elementor-addon'),
'condition' => [
'pricing_section_layout' => 'style_two',
]
],
],
'title_field' => '
pricing_package_title
',
]
);
$this -> end_controls_section();
}