Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -17209,6 +17209,10 @@ function opt_in(
$params['is_extensions_tracking_allowed'] = FS_Permission_Manager::instance( $this )->is_extensions_tracking_allowed();
$params['is_diagnostic_tracking_allowed'] = FS_Permission_Manager::instance( $this )->is_diagnostic_tracking_allowed();

// We want to allow people activating license on unpublished plugins if they are using a license key
if ( ! empty($license_key))
$params['show_pending'] = true;

$request = array(
'method' => 'POST',
'body' => $params,
Expand Down
23 changes: 22 additions & 1 deletion templates/add-ons.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,28 @@

<?php $fs->do_action( 'addons/after_title' ) ?>

<div id="poststuff">
<?php
if (defined('WP_FS__DEV_MODE') && WP_FS__DEV_MODE && ! $fs->has_secret_key()) :
$integration_url = 'https://dashboard.freemius.com/#!/live/plugins/' . $fs->get_id() . '/integration/';
$secret_const = 'WP_FS__' . $slug . '_SECRET_KEY';
?>
<div class="notice notice-warning">
<?php echo sprintf(
/* translators: %s: constant name to add into wp-config.php */
'<p>You have enabled <code>WP_FS__DEV_MODE</code>, but no secret key is defined for this plugin. As a result, add-ons that are not publicly released yet, or that do not have publicly visible pricing, will not appear in the list below.</p>
<p>To configure your development environment properly, add the <code>%s</code> constant to your wp-config.php, then reload this page.
<a href="%s" target="_blank" rel="noopener">%s</a></p>',
$secret_const,
esc_url( $integration_url ),
esc_html( fs_text_inline( 'Read the integration guide', 'read-integration-guide', $slug ) )
); ?>
</div>
<?php
endif;
?>


<div id="poststuff">
<?php if ( ! $has_addons ) : ?>
<h3><?php echo esc_html( sprintf(
'%s... %s',
Expand Down