Skip to content

Commit

Permalink
chore: licence check for live-search deps action
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Sep 19, 2023
1 parent ecaa389 commit 1c9a6b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/otter-pro/inc/plugins/class-live-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public function render_blocks( $block_content, $block ) {
* @static
*/
public static function load_deps() {

$has_license = in_array( License::get_license_type(), array( 2, 3 ) ) || ( License::has_active_license() && isset( License::get_license_data()->otter_pro ) );

if ( ! $has_license ) {
return;
}

$asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/live-search.asset.php';
wp_enqueue_script(
'otter-live-search',
Expand Down

0 comments on commit 1c9a6b3

Please sign in to comment.