Skip to content

Commit 613bcf5

Browse files
committed
Added Product Catalog and Settings menu in pro upgrade class
Signed-off-by: Tareq Hasan <tareq1988@gmail.com>
1 parent 31ae175 commit 613bcf5

4 files changed

Lines changed: 38 additions & 2 deletions

File tree

assets/css/style.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Woocommerce-Conversion-Tracking - v1.0.0
3-
Generated: 2018-02-20 (1519108668998)
3+
Generated: 2018-02-20 (1519126580166)
44
PLEASE DO NOT MODIFY*/
55
.wcct-admin {
66
/**
@@ -10,6 +10,9 @@ PLEASE DO NOT MODIFY*/
1010
* Sidebar Area
1111
*/
1212
}
13+
.wcct-admin .nav-tab.disabled {
14+
color: #b1b1b1;
15+
}
1316
.wcct-admin .wcct-two-column {
1417
display: flex;
1518
}

assets/less/style.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
.wcct-admin {
44

5+
.nav-tab.disabled {
6+
color: #b1b1b1;
7+
}
8+
59
.wcct-two-column {
610
display: flex;
711

includes/class-admin.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ public function show_navigation() {
9494
$html = '<h2 class="nav-tab-wrapper">';
9595
foreach ( $tabs as $tab ) {
9696
$active_class = ( $tab['id'] == $active ) ? 'nav-tab-active' : '';
97-
$html .= sprintf( '<a href="admin.php?page=conversion-tracking&tab=%s" class="nav-tab %s">%s</a>', $tab['id'], $active_class, $tab['title'] );
97+
98+
if ( !empty( $tab['id'] ) ) {
99+
$html .= sprintf( '<a href="admin.php?page=conversion-tracking&tab=%s" class="nav-tab %s">%s</a>', $tab['id'], $active_class, $tab['title'] );
100+
} else {
101+
$html .= sprintf( '<a href="#" class="nav-tab disabled">%s</a>', $tab['title'] );
102+
}
98103
}
99104

100105
$html .= '</h2>';

includes/class-integration-pro-features.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ function __construct() {
1414
add_filter( 'wcct_settings_adwords', array( $this, 'adwords_pro_features' ), 10, 1 );
1515
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
1616

17+
add_filter( 'wcct_nav_tab', array( $this, 'pro_tabs' ) );
18+
1719
add_action( 'wcct_sidebar', array( $this, 'profeature_ad' ) );
1820
}
1921

@@ -23,6 +25,28 @@ public function enqueue_script() {
2325

2426
}
2527

28+
/**
29+
* Add facebook product catalog tab
30+
*
31+
* @param array $sections
32+
*
33+
* @return array
34+
*/
35+
public function pro_tabs( $sections ) {
36+
37+
$sections[] = array(
38+
'id' => '',
39+
'title' => __( 'Facebook Product Catalog (Pro)', 'woocommerce-conversion-tracking' ),
40+
);
41+
42+
$sections[] = array(
43+
'id' => '',
44+
'title' => __( 'Settings (Pro)', 'woocommerce-conversion-tracking' ),
45+
);
46+
47+
return $sections;
48+
}
49+
2650
/**
2751
* Displaying facebook pro-features
2852
*

0 commit comments

Comments
 (0)