This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FS_API_SCOPE="developer" | |
FS_API_DEV_ID=000 | |
FS_API_PUBLIC_KEY="" | |
FS_API_SECRET_KEY="" | |
TICKSY_SECRET_KEY="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param bool $show | |
* @param array $msg { | |
* @var string $message The actual message. | |
* @var string $title An optional message title. | |
* @var string $type The type of the message ('success', 'update', 'warning', 'promotion'). | |
* @var string $id The unique identifier of the message. | |
* @var string $manager_id The unique identifier of the notices manager. For plugins it would be the plugin's slug, for themes - `<slug>-theme`. | |
* @var string $plugin The product's title. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_premium_support_forum_url( $wp_org_support_forum_url ) { | |
return 'https://my-awesome-site.com/forum/'; | |
} | |
if ( my_fs()->is_premium() ) { | |
my_fs()->add_filter( 'support_forum_url', 'my_premium_support_forum_url' ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Gist was kindly contributed by @jamesckemp from @iconicwp. Thanks! | |
// | |
handler.open({ | |
... | |
purchaseCompleted: function( response ) { | |
var trial = response.purchase.trial_ends !== null, | |
total = trial ? 0 : response.purchase.initial_amount.toString(), | |
productName = 'Product Name', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add GA tracking only if user opted-in OR if non-WP.org compliant product. | |
function my_after_purchase_js( $js_function ) { | |
return 'function ( response ) { | |
/** | |
* Since the user just entered their personal & billing information, agreed to the TOS & privacy, | |
* know they are running within a secure iframe from an external domain, they implicitly permit tracking | |
* this purchase. So initizlizing GA here (after the purchase), is legitimate. | |
*/ | |
ga('create', 'UA-XXXXXXX', 'auto'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="wrap"> | |
<h2 class="nav-tab-wrapper"> | |
<a href="#" class="nav-tab nav-tab-active"><?php __( 'Getting Started', 'text-domain' ) ?></a> | |
</h2> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This IF block will be auto removed from the Free version. | |
if ( my_fs()->is__premium_only() ) { | |
// This IF will be executed only if the user in a trial mode or have a valid license. | |
if ( my_fs()->can_use_premium_code() ) { | |
// ... logic related to any paid plan ... | |
} | |
if ( my_fs()->is_plan('starter') ) { | |
// ... logic related to starter plan and higher plans ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _uninstall_plugin_event( $check_user = true ) { | |
$this->_logger->entrance( 'slug = ' . $this->_slug ); | |
if ( $check_user && ! current_user_can( 'activate_plugins' ) ) { | |
return; | |
} | |
$params = array(); | |
$uninstall_reason = null; |