Skip to content

Commit 16fef6c

Browse files
authored
Merge pull request #427 from Codeinwp/feat/sdk-banner
feat: add support for SDK banner
2 parents c0b2c63 + 5ac7e9f commit 16fef6c

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

classes/admin.class.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ function product_meta() {
212212
<?php endif; ?>
213213
</div>
214214
</div>
215+
<div id="tsdk_banner" class="ppom-banner"></div>
215216
<?php
216217
echo '<p>' . __( 'You can create different meta groups for different products.', 'woocommerce-product-addon' ) . '</p>';
217218
}
@@ -238,6 +239,14 @@ function product_meta() {
238239
// existing meta group tables show only ppom main page
239240
if ( $action != 'new' && $do_meta != 'edit' && $view != 'addons' && $view != 'changelog' ) {
240241
ppom_load_template( 'admin/existing-meta.php' );
242+
243+
// NOTE: Allow only for Tier 1 Plan or lower if license is present.
244+
$should_load_banner = NM_PersonalizedProduct::LICENSE_PLAN_1 >= NM_PersonalizedProduct::get_license_category( intval( apply_filters( 'product_ppom_license_plan', 0 ) ) );
245+
246+
if ( $should_load_banner ) {
247+
do_action( 'themeisle_sdk_load_banner', 'ppom' );
248+
}
249+
241250
}
242251

243252
echo '</div>';

css/ppom-admin.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,3 +1862,7 @@ header.ppom-modal-header {
18621862
.ppom-wrapper a.ppom-upsell-condition:hover{
18631863
text-decoration: none;
18641864
}
1865+
1866+
.ppom-banner:has(.tsdk-banner-cta) {
1867+
margin: 20px 0;
1868+
}

images/black-friday.jpg

90.1 KB
Loading

0 commit comments

Comments
 (0)