Skip to content

Commit

Permalink
Removed dashboard rudiments from plugin. Fixed gulp build js warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
AliaksandrVahura-ScienceSoft committed Sep 14, 2016
1 parent 70b7944 commit 7a9e526
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 1,369 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Expand Up @@ -80,7 +80,7 @@
"shelljs" : false, // ShellJS
"worker" : false, // Web Workers
"wsh" : false, // Windows Scripting Host
"yui" : false, // Yahoo User Interface
"yui" : true, // Yahoo User Interface

// Custom Globals
"globals" : {
Expand Down
51 changes: 0 additions & 51 deletions laterpay/application/Controller/Admin.php
Expand Up @@ -310,57 +310,6 @@ protected function render_add_edit_post_page_help() {
) );
}

/**
* Add contextual help for dashboard tab.
*
* @return void
*/
protected function render_dashboard_tab_help() {
$screen = get_current_screen();
$screen->add_help_tab( array(
'id' => 'laterpay_dashboard_tab_help_conversion',
'title' => __( 'Conversion', 'laterpay' ),
'content' => __( '
<p>
The <strong>Conversion</strong> (short for Conversion Rate) is the share of visitors of a specific post, who actually <strong>bought</strong> the post.<br>
A conversion of 100% would mean that every user who has visited a post page and has read the teaser content had bought the post with LaterPay.<br>
The conversion rate is one of the most important metrics for selling your content successfully: It indicates, if the price is perceived as adequate and if your content fits your audience\'s interests.
</p>
<p>
The metric <strong>New Customers</strong> indicates the share of your customers who bought with LaterPay for the first time in the reporting period.<br>
Please note that this is only an approximate value.
</p>', 'laterpay'
),
) );
$screen->add_help_tab( array(
'id' => 'laterpay_dashboard_tab_help_items_sold',
'title' => __( 'Items Sold', 'laterpay' ),
'content' => __( '
<p>
The column <strong>Items Sold</strong> provides an overview of all your sales in the reporting period.
</p>
<p>
<strong>AVG Items Sold</strong> (short for Average Items Sold) indicates how many posts you sold on average per day in the reporting period.
</p>', 'laterpay'
),
) );
$screen->add_help_tab( array(
'id' => 'laterpay_dashboard_tab_help_gross_revenue',
'title' => __( 'Committed Revenue', 'laterpay' ),
'content' => __( '
<p>
<strong>Committed Revenue</strong> is the value of all purchases, for which your users have committed themselves to pay later (or paid immediately in case of a Single Sale purchase).
</p>
<p>
<strong>AVG Revenue</strong> (short for Average Revenue) indicates the average revenue per day in the reporting period.
</p>
<p>
Please note that this <strong>is not the amount of money you will receive with your next LaterPay payout</strong>, as a user will have to pay his invoice only once it reaches 5.00 Euro and LaterPay will deduct a fee of 15% for each purchase that was actually paid.
</p>', 'laterpay'
),
) );
}

/**
* Add contextual help for pricing tab.
*
Expand Down
3 changes: 0 additions & 3 deletions laterpay/application/Controller/Admin/Account.php
Expand Up @@ -268,9 +268,6 @@ protected static function update_plugin_mode( LaterPay_Core_Event $event ) {
$result = update_option( 'laterpay_plugin_is_in_live_mode', $plugin_mode );

if ( $result ) {
// delete dashboard cache directory after mode was changed
LaterPay_Helper_File::delete_directory( laterpay_get_plugin_config()->get( 'cache_dir' ) . 'cron/' );

if ( get_option( 'laterpay_plugin_is_in_live_mode' ) ) {
$event->set_result(
array(
Expand Down
19 changes: 0 additions & 19 deletions laterpay/application/Controller/Install.php
Expand Up @@ -45,7 +45,6 @@ public static function get_subscribed_events() {
array( 'maybe_add_is_in_visible_test_mode_option' ),
array( 'maybe_clean_api_key_options' ),
array( 'maybe_update_unlimited_access' ),
array( 'maybe_clear_dashboard_cache' ),
),
);
}
Expand Down Expand Up @@ -467,24 +466,6 @@ public function maybe_update_unlimited_access() {
}
}

/**
* Clear dashboard cache.
*
* @since 0.9.11
* @wp-hook admin_notices
*
* @return void
*/
public function maybe_clear_dashboard_cache() {
$current_version = get_option( 'laterpay_version' );
if ( version_compare( $current_version, '0.9.11', '<' ) ) {
return;
}

// remove cache directory
LaterPay_Helper_File::delete_directory( laterpay_get_plugin_config()->get( 'cache_dir' ) . 'cron/' );
}

/**
* Update vouchers structure.
*
Expand Down
258 changes: 0 additions & 258 deletions laterpay/asset_sources/js/laterpay-backend-dashboard-timepasses.js

This file was deleted.

0 comments on commit 7a9e526

Please sign in to comment.