Skip to content

Commit

Permalink
Merge pull request #427 from Codeinwp/feat/sdk-banner
Browse files Browse the repository at this point in the history
feat: add support for SDK banner
  • Loading branch information
selul authored Nov 7, 2024
2 parents c0b2c63 + 5ac7e9f commit 16fef6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions classes/admin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ function product_meta() {
<?php endif; ?>
</div>
</div>
<div id="tsdk_banner" class="ppom-banner"></div>
<?php
echo '<p>' . __( 'You can create different meta groups for different products.', 'woocommerce-product-addon' ) . '</p>';
}
Expand All @@ -238,6 +239,14 @@ function product_meta() {
// existing meta group tables show only ppom main page
if ( $action != 'new' && $do_meta != 'edit' && $view != 'addons' && $view != 'changelog' ) {
ppom_load_template( 'admin/existing-meta.php' );

// NOTE: Allow only for Tier 1 Plan or lower if license is present.
$should_load_banner = NM_PersonalizedProduct::LICENSE_PLAN_1 >= NM_PersonalizedProduct::get_license_category( intval( apply_filters( 'product_ppom_license_plan', 0 ) ) );

if ( $should_load_banner ) {
do_action( 'themeisle_sdk_load_banner', 'ppom' );
}

}

echo '</div>';
Expand Down
4 changes: 4 additions & 0 deletions css/ppom-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -1862,3 +1862,7 @@ header.ppom-modal-header {
.ppom-wrapper a.ppom-upsell-condition:hover{
text-decoration: none;
}

.ppom-banner:has(.tsdk-banner-cta) {
margin: 20px 0;
}
Binary file added images/black-friday.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 16fef6c

Please sign in to comment.