Skip to content

Commit 134db3f

Browse files
authored
Merge pull request #1389 from laterpay/develop
Tag 2.9.3
2 parents 7a97108 + 53dc5c7 commit 134db3f

33 files changed

Lines changed: 138 additions & 150 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "laterpay/laterpay-wordpress-plugin",
33
"description": "This is the official LaterPay plugin for selling digital content with WordPress",
44
"license": "MIT",
5-
"version": "2.9.2",
5+
"version": "2.9.3",
66
"config": {
77
"vendor-dir": "laterpay/vendor",
88
"secure-http": true

composer.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var gulp = require('gulp'),
3939
// OPTIONS -------------------------------------------------------------------------------------------------------------
4040
var gulpKnownOptions = {
4141
string: 'version',
42-
default: { version: '2.9.2' }
42+
default: { version: '2.9.3' }
4343
};
4444
var gulpOptions = minimist(process.argv.slice(2), gulpKnownOptions);
4545
gulpOptions.svn = {};

laterpay/README.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Tags: contribution, conversion, earn-money, micropayment, monetization, monetize
66
Requires at least: 4.6
77
Tested up to: 5.3.2
88
Requires PHP: 5.6
9-
Stable tag: 2.9.2
9+
Stable tag: 2.9.3
1010
Author URI: https://laterpay.net
1111
Plugin URI: https://github.com/laterpay/laterpay-wordpress-plugin
1212
License: MIT
@@ -90,6 +90,10 @@ Yes!
9090
7. The plugin provides a variety of advanced settings to customize the LaterPay plugin and adjust it to your needs.
9191

9292
== Changelog ==
93+
= 2.9.3 ( March 19, 2020 ) =
94+
* Lower Pay Now limit from 1.49€ to 1.00€ for EU region.
95+
* Reduce unnecessary API request to `validatesignature` endpoint.
96+
9397
= 2.9.2 ( January 22, 2020 ) =
9498
* Fix voucher price validation in "LaterPay > Paywall" tab.
9599

@@ -702,8 +706,8 @@ KNOWN BUGS:
702706

703707
== Upgrade notice ==
704708

705-
= 2.9.2 =
706-
Fixes voucher price validation in "LaterPay > Paywall" tab.
709+
= 2.9.3 =
710+
Reduces unnecessary API call to `validatesignature` endpoint.
707711

708712
== Arbitrary section ==
709713

laterpay/application/Controller/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ protected function render_add_edit_post_page_help() {
307307
<strong>Pay Now</strong><br>
308308
If you sell your content as <strong>Pay Now</strong>, a user has to <strong>log in</strong> to LaterPay and <strong>pay</strong> for your content <strong>immediately</strong>.<br>
309309
Pay Now are especially suitable for higher-value content and / or content that immediately occasions costs (e. g. license fees for a video stream).<br>
310-
Pay Now are possible for prices between (including) <strong>1.49 € (in Europe) / $ 1.99 (in the U.S.)</strong> and (including) <strong>149.99</strong>.
310+
Pay Now are possible for prices between (including) <strong>1.00 € (in Europe) / $ 1.99 (in the U.S.)</strong> and (including) <strong>149.99</strong>.
311311
</p>', 'laterpay'
312312
),
313313
) );

laterpay/application/Controller/Admin/Account.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -512,32 +512,4 @@ private function get_client_instance_for_config( $api_root = '', $web_root = ''
512512

513513
return $client;
514514
}
515-
516-
/**
517-
* Get a client instance based on current region and set plugin mode to test.
518-
*/
519-
public static function validate_current_credentials() {
520-
521-
// Get current client options, and new client instance.
522-
$client_options = LaterPay_Helper_Config::get_php_client_options();
523-
$client = new LaterPay_Client(
524-
$client_options['cp_key'],
525-
$client_options['api_key'],
526-
$client_options['api_root'],
527-
$client_options['web_root'],
528-
$client_options['token_name']
529-
);
530-
531-
// Check if current config is valid or not.
532-
$response = json_decode( $client->check_health( true ), true );
533-
534-
// Change plugin mode to test.
535-
if ( false === $response['is_valid'] ) {
536-
update_option( 'laterpay_plugin_is_in_live_mode', '0' );
537-
return false;
538-
}
539-
540-
return true;
541-
}
542-
543515
}

laterpay/application/Controller/Admin/Pricing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public function load_assets() {
111111
'confirmDeleteSubscription' => __( 'Do you really want to discontinue this subscription? If you delete it, it will continue to renew for users who have an active subscription until the user cancels it. Existing subscribers will still have access to the content in their subscription. New users won\'t be able to buy the subscription anymore. Do you want to delete this subscription?', 'laterpay' ),
112112
'voucherText' => __( 'reduces the price to', 'laterpay' ),
113113
'payLaterToolTip' => esc_html__( 'Pay Later allows users to gain access now by committing to pay once their invoice reaches $5 or 5€; it is available for posts with pricing between 0.05 and 5.00', 'laterpay' ),
114-
'payNowToolTip' => esc_html__( 'Pay Now requires users pay for purchased content immediately; available for posts with pricing above $1.99 or 1.49', 'laterpay' ),
115-
'subVoucherMinimum' => esc_html__( 'Subscriptions, like other Pay Now content, must have pricing above $1.99 or 1.49', 'laterpay' ),
114+
'payNowToolTip' => esc_html__( 'Pay Now requires users pay for purchased content immediately; available for posts with pricing above $1.99 or 1.00', 'laterpay' ),
115+
'subVoucherMinimum' => esc_html__( 'Subscriptions, like other Pay Now content, must have pricing above $1.99 or 1.00', 'laterpay' ),
116116
'subVoucherMaximumPrice' => esc_html__( 'The voucher price must be less than or equal to the subscription price.', 'laterpay' ),
117117
'tpVoucherMaximumPrice' => esc_html__( 'The voucher price must be less than or equal to the time pass price.', 'laterpay' ),
118118
'codeTooShort' => esc_html__( 'Please enter a six-digit voucher code.', 'laterpay' ),

laterpay/application/Controller/Frontend/Post.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public static function get_subscribed_events() {
1616
return array(
1717
'laterpay_post_content' => array(
1818
array( 'laterpay_on_plugin_is_working', 250 ),
19-
array( 'laterpay_on_valid_account_credential', 200 ),
2019
array( 'modify_post_content' ),
2120
),
2221
'laterpay_posts' => array(

laterpay/application/Helper/Config.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class LaterPay_Helper_Config {
3030
'limits' => array(
3131
'default' => array(
3232
'ppu_min' => 0.05,
33-
'ppu_only_limit' => 1.48,
33+
'ppu_only_limit' => 0.99,
3434
'ppu_max' => 5.00,
35-
'sis_min' => 1.49,
35+
'sis_min' => 1.00,
3636
'sis_only_limit' => 5.00,
3737
'sis_max' => 1000.00
3838
)
@@ -387,12 +387,20 @@ public static function erase_plugin_data() {
387387
delete_option( 'laterpay_api_fallback_behavior' );
388388
delete_option( 'laterpay_api_enabled_on_homepage' );
389389

390+
// Delete GA related configurations.
391+
delete_option( 'laterpay_user_tracking_data' );
392+
delete_option( 'laterpay_tracking_data' );
393+
394+
// Delete appearance config.
390395
delete_option( 'laterpay_main_color' );
391396
delete_option( 'laterpay_hover_color' );
392397
delete_option( 'laterpay_overlay_header_bg_color' );
398+
delete_option( 'laterpay_overlay_header_title' );
393399
delete_option( 'laterpay_overlay_main_bg_color' );
394400
delete_option( 'laterpay_overlay_main_text_color' );
395401
delete_option( 'laterpay_overlay_description_color' );
402+
delete_option( 'laterpay_overlay_button_bg_color' );
403+
delete_option( 'laterpay_overlay_button_hover_color' );
396404
delete_option( 'laterpay_overlay_button_hover_text_color' );
397405
delete_option( 'laterpay_overlay_button_text_color' );
398406
delete_option( 'laterpay_overlay_link_main_color' );
@@ -406,11 +414,16 @@ public static function erase_plugin_data() {
406414
delete_option( 'laterpay_show_cache_msg' );
407415
delete_option( 'lp_tabular_info' );
408416
delete_option( 'lp_custom_overlay_options' );
417+
delete_option( 'laterpay_overlay_show_footer' );
409418
delete_option( 'laterpay_global_voucher_codes' );
410419
delete_option( 'laterpay_plugin_version' );
411420
delete_option( 'lp_custom_overlay_options' );
412421
delete_option( 'lp_wisdom_tracking_info' );
413422

423+
// Delete internal counters for time pass and subscription.
424+
delete_option( 'lp_pass_count' );
425+
delete_option( 'lp_sub_count' );
426+
414427
// unset wisdom tracking data.
415428
LaterPay_Controller_Admin_Advanced::unset_wisdom_tracking_info();
416429

laterpay/application/Helper/Pricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ public static function get_dynamic_prices( WP_Post $post, $price = null ) {
656656
// Single Sale (sis), if price >= 5.01
657657
$end_price = $currency['sis_only_limit'];
658658
} elseif ( $post_price >= $currency['sis_min'] ) {
659-
// Single Sale or Pay-per-Use, if 1.49 >= price <= 5.00
659+
// Single Sale or Pay-per-Use, if 1.00 >= price <= 5.00
660660
$end_price = $currency['sis_min'];
661661
} else {
662662
// Pay-per-Use (ppu), if price <= 1.48

0 commit comments

Comments
 (0)