Skip to content

Commit

Permalink
Merge pull request #1267 from laterpay/develop
Browse files Browse the repository at this point in the history
Tag 2.6.2
  • Loading branch information
thrijith authored Aug 8, 2019
2 parents 22ea38f + 221c4e1 commit ff08eba
Show file tree
Hide file tree
Showing 75 changed files with 3,862 additions and 2,265 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "laterpay/laterpay-wordpress-plugin",
"description": "This is the official LaterPay plugin for selling digital content with WordPress",
"license": "MIT",
"version": "2.6.1",
"version": "2.6.2",
"config": {
"vendor-dir": "laterpay/vendor",
"secure-http": true
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"require-dev": {
"wp-coding-standards/wpcs": "*",
"automattic/vipwpcs": "^0.3.0",
"automattic/vipwpcs": "^2",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
"phpcompatibility/phpcompatibility-wp": "^2.0"
},
Expand Down
45 changes: 24 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var gulp = require('gulp'),
// OPTIONS -------------------------------------------------------------------------------------------------------------
var gulpKnownOptions = {
string: 'version',
default: { version: '2.6.1' }
default: { version: '2.6.2' }
};
var gulpOptions = minimist(process.argv.slice(2), gulpKnownOptions);
gulpOptions.svn = {};
Expand Down
12 changes: 9 additions & 3 deletions laterpay/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Donate link: https://laterpay.net
Tags: laterpay, accept micropayments, accept payments, access control, billing, buy now pay later, content monetization, creditcard, debitcard, free to read, laterpay for wordpress, laterpay payment, laterpay plugin, micropayments, monetize, paid content, pay button, pay per use, payments, paywall, PPU, sell digital content, sell digital goods, single sale, wordpress laterpay, Payments, Content Monetization, Paywall, Paid Content, Publisher, Blogger, conversion, paygate, monetization
Requires at least: 4.6
Tested up to: 5.2.2
Stable tag: 2.6.1
Stable tag: 2.6.2
Author URI: https://laterpay.net
Plugin URI: https://github.com/laterpay/laterpay-wordpress-plugin
License: MIT
Expand Down Expand Up @@ -88,6 +88,12 @@ Yes!
6. The plugin provides a variety of advanced settings to customize the LaterPay plugin and adjust it to your needs.

== Changelog ==
= 2.6.2 ( August 8, 2019 ) =
* Add [laterpay_check_access] shortcode and function so that merchant can show or hide content based on the level of access a user has purchased.
* Add content_type="link" type to [laterpay_premium_download] shortcode.
* Add Wisdom Tracking Library for collecting plugin usage data.
* Fix Pricing bugs in Edit Post Page.

= 2.6.1 ( July 22, 2019 ) =
* Add option to customize purchase options in Purchase Overlay.
* Add option to pre-select purchase option for Purchase Overlay.
Expand Down Expand Up @@ -651,8 +657,8 @@ KNOWN BUGS:

== Upgrade notice ==

= 2.6.1 ( July 22, 2019 ) =
Add option to customzie purchase options in overlay, Add support for vouchers in single post purchase and various improvements with LaterPay functionality.
= 2.6.2 ( August 8, 2019 ) =
New shortcode to check access based on various options to help merchant customize site experience, Premium Download shortcode adds support for link type, Added Wisdom Tracking Library for plugin usage stats and minor bug fixes with LaterPay functionality.

== Arbitrary section ==

Expand Down
11 changes: 7 additions & 4 deletions laterpay/application/Controller/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ public function run( $tab = '' ) {
$account_controller = new LaterPay_Controller_Admin_Account( $this->config );
$account_controller->render_page();
break;

// render advanced tab
case 'advanced':
$advanced_controller = new LaterPay_Controller_Admin_Advanced( $this->config );
Expand Down Expand Up @@ -888,10 +889,12 @@ public static function register_common_scripts( $page, $data_for_localize = [] )
$ga_data['update_highlights'] = get_option( 'lp_update_highlights', [] );

if ( ! empty( $ga_data['update_highlights']['version'] ) ) {
$version_update_number = $ga_data['update_highlights']['version'];
$ga_data['update_highlights']['version'] = sprintf( __( 'Version %s Highlights:', 'laterpay' ), $version_update_number );
$ga_data['update_highlights']['notice'] = sprintf( __( 'Thanks to feedback from customers like you, we are excited to announce that you can now make an individual post free directly on the Edit Post Page. You can also customize the order of the items in your Purchase Overlay from a new section available on the Pricing Tab.', 'laterpay' ) );
$ga_data['update_highlights_nonce'] = wp_create_nonce( 'update_highlights_nonce' );
$version_update_number = $ga_data['update_highlights']['version'];
$ga_data['update_highlights']['version'] = sprintf( __( 'Version %s Highlights:', 'laterpay' ), $version_update_number );
$ga_data['update_highlights']['notice'] = sprintf( __( 'Create an ad-free experience & much more with our newest shortcode. Check out the "Dynamic Access" section on the Advanced tab or ', 'laterpay' ) );
$ga_data['update_highlights']['notice_link'] = __( ' click here ', 'laterpay' );
$ga_data['update_highlights']['notice_extra'] = __( ' for more details.', 'laterpay' );
$ga_data['update_highlights_nonce'] = wp_create_nonce( 'update_highlights_nonce' );
}

$data_for_localize['lp_instructional_info'] = [];
Expand Down
13 changes: 3 additions & 10 deletions laterpay/application/Controller/Admin/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public static function get_subscribed_events() {
public function load_assets() {
parent::load_assets();

// Update Wisdom opt_out status if necessary.
$this->lp_update_optout_value();

// Get data for GA.
$merchant_key = LaterPay_Controller_Admin::get_merchant_id_for_ga();
$site_url = get_site_url();
Expand Down Expand Up @@ -130,16 +133,6 @@ public static function process_ajax_requests( LaterPay_Core_Event $event ) {
}

switch ( $submitted_form_value ) {
case 'laterpay_sandbox_merchant_id':
$event->set_argument( 'is_live', false );
self::update_merchant_id( $event );
break;

case 'laterpay_sandbox_api_key':
$event->set_argument( 'is_live', false );
self::update_api_key( $event );
break;

case 'laterpay_live_merchant_id':
$event->set_argument( 'is_live', true );
self::update_merchant_id( $event );
Expand Down
Loading

0 comments on commit ff08eba

Please sign in to comment.