Skip to content

Commit 7ef9f95

Browse files
authored
[theme] Fix premium theme badge on the themes page for themes using a custom premium slug. (#818)
1 parent 427b526 commit 7ef9f95

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

start.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @var string
1717
*/
18-
$this_sdk_version = '2.12.1.1';
18+
$this_sdk_version = '2.12.1.2';
1919

2020
#region SDK Selection Logic --------------------------------------------------------------------
2121

templates/js/style-premium-theme.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
*/
1818
$fs = freemius( $VARS['id'] );
1919

20-
$slug = $fs->get_slug();
20+
$premium_slug = $fs->get_premium_slug();
2121

2222
?>
2323
<script type="text/javascript">
2424
(function ($) {
2525
// Select the premium theme version.
26-
var $theme = $('#<?php echo $slug ?>-premium-name').parents('.theme'),
26+
var $theme = $('#<?php echo $premium_slug ?>-name').parents('.theme'),
2727
addPremiumMetadata = function (firstCall) {
2828
if (!firstCall) {
2929
// Seems like the original theme element is removed from the DOM,
3030
// so we need to reselect the updated one.
31-
$theme = $('#<?php echo $slug ?>-premium-name').parents('.theme');
31+
$theme = $('#<?php echo $premium_slug ?>-name').parents('.theme');
3232
}
3333

3434
if (0 === $theme.find('.fs-premium-theme-badge-container').length) {

0 commit comments

Comments
 (0)