Plugin Directory

Changeset 2373362


Ignore:
Timestamp:
09/01/2020 08:14:56 PM (6 years ago)
Author:
transact
Message:

Version 5.2.1: Fix debug notice warning on WordPress 5.5

Location:
transact
Files:
6 edited
9 copied

Legend:

Unmodified
Added
Removed
  • transact/tags/5.2.1/frontend/controllers/account_meta.php

    r2346702 r2373362  
    9090        if($valid) {
    9191            $update_subscription_info = array(
    92                 'expires' => $subscription_info['expires'],
     92                'expires' => (gettype($valid) === 'boolean' ? $subscription_info['expires'] : $valid),
    9393                'sale_id' => $subscription_info['sale_id'],
    9494                'timestamp' => $subscription_info['timestamp'],
  • transact/tags/5.2.1/frontend/controllers/transact-api.php

    r2368117 r2373362  
    302302
    303303        if ($body->expires > time() * 1000) {
    304             // TODO if the expiration date has changed should we update meta?
    305             return true;
     304            return $body->expires;
    306305        } else {
    307306            return false;
  • transact/tags/5.2.1/frontend/controllers/transact-single-post.php

    r2368117 r2373362  
    8686                        'default' => 'post',
    8787                    )
    88                 )
     88                ),
     89                'permission_callback' => '__return_true'
    8990            ) );
    9091            register_rest_route( 'transact/v1', '/token/(?P<post_id>\d+)/(?P<affiliate_id>\d+)', array(
     
    105106                        'default' => 'post',
    106107                    )
    107                 )
     108                ),
     109                'permission_callback' => '__return_true'
    108110            ) );
    109111            register_rest_route( 'transact/v1', '/subscription/(?P<post_id>\d+)', array(
     
    119121                        'default' => 'subscription',
    120122                    )
    121                 )
     123                ),
     124                'permission_callback' => '__return_true'
    122125            ) );
    123126            register_rest_route( 'transact/v1', '/subscription/(?P<post_id>\d+)/(?P<affiliate_id>\d+)', array(
     
    138141                        'default' => 'subscription',
    139142                    )
    140                 )
     143                ),
     144                'permission_callback' => '__return_true'
    141145            ) );
    142146            register_rest_route( 'transact/v1', '/donation/(?P<post_id>\d+)/(?P<amount>\d+)', array(
     
    154158                        }
    155159                    )
    156                 )
     160                ),
     161                'permission_callback' => '__return_true'
    157162            ) );
    158163            register_rest_route( 'transact/v1', '/donation/(?P<post_id>\d+)/(?P<amount>\d+)/(?P<affiliate_id>\d+)', array(
     
    175180                        }
    176181                    )
    177                 )
     182                ),
     183                'permission_callback' => '__return_true'
    178184            ) );
    179185            register_rest_route( 'transact/v1', '/verify', array(
     
    187193                    ),
    188194                    'token' => array()
    189                 )
     195                ),
     196                'permission_callback' => '__return_true'
    190197            ) );
    191198            register_rest_route( 'transact/v1', '/premium/(?P<post_id>\d+)', array(
     
    198205                        }
    199206                    )
    200                 )
     207                ),
     208                'permission_callback' => function () {
     209                    return get_current_user_id();
     210                }
    201211            ) );
    202212            register_rest_route( 'transact/v1', '/comments_template/(?P<post_id>\d+)', array(
     
    209219                        }
    210220                    )
    211                 )
     221                ),
     222                'permission_callback' => function () {
     223                    return get_current_user_id();
     224                }
    212225            ) );
    213226        });
  • transact/tags/5.2.1/readme.txt

    r2368117 r2373362  
    55Requires at least: 5.0
    66Requires PHP: 5.6
    7 Tested up to: 5.4.2
     7Tested up to: 5.5.1
    88Stable tag: 5.2.0
    99License: APACHE-2.0
     
    8181== Changelog ==
    8282
     83= 5.2.1 =
     84* Fix notice warning on WordPress 5.5
    8385
    8486= 5.2.0 =
  • transact/tags/5.2.1/transact-plugin.php

    r2368117 r2373362  
    33 * Plugin Name: transact.io
    44 * Description: Integrates transact.io services into WP
    5  * Version: 5.2.0
     5 * Version: 5.2.1
    66 * Author: transact.io
    77 * Author URI: https://transact.io
  • transact/trunk/frontend/controllers/account_meta.php

    r2346702 r2373362  
    9090        if($valid) {
    9191            $update_subscription_info = array(
    92                 'expires' => $subscription_info['expires'],
     92                'expires' => (gettype($valid) === 'boolean' ? $subscription_info['expires'] : $valid),
    9393                'sale_id' => $subscription_info['sale_id'],
    9494                'timestamp' => $subscription_info['timestamp'],
  • transact/trunk/frontend/controllers/transact-api.php

    r2368117 r2373362  
    302302
    303303        if ($body->expires > time() * 1000) {
    304             // TODO if the expiration date has changed should we update meta?
    305             return true;
     304            return $body->expires;
    306305        } else {
    307306            return false;
  • transact/trunk/frontend/controllers/transact-single-post.php

    r2368117 r2373362  
    8686                        'default' => 'post',
    8787                    )
    88                 )
     88                ),
     89                'permission_callback' => '__return_true'
    8990            ) );
    9091            register_rest_route( 'transact/v1', '/token/(?P<post_id>\d+)/(?P<affiliate_id>\d+)', array(
     
    105106                        'default' => 'post',
    106107                    )
    107                 )
     108                ),
     109                'permission_callback' => '__return_true'
    108110            ) );
    109111            register_rest_route( 'transact/v1', '/subscription/(?P<post_id>\d+)', array(
     
    119121                        'default' => 'subscription',
    120122                    )
    121                 )
     123                ),
     124                'permission_callback' => '__return_true'
    122125            ) );
    123126            register_rest_route( 'transact/v1', '/subscription/(?P<post_id>\d+)/(?P<affiliate_id>\d+)', array(
     
    138141                        'default' => 'subscription',
    139142                    )
    140                 )
     143                ),
     144                'permission_callback' => '__return_true'
    141145            ) );
    142146            register_rest_route( 'transact/v1', '/donation/(?P<post_id>\d+)/(?P<amount>\d+)', array(
     
    154158                        }
    155159                    )
    156                 )
     160                ),
     161                'permission_callback' => '__return_true'
    157162            ) );
    158163            register_rest_route( 'transact/v1', '/donation/(?P<post_id>\d+)/(?P<amount>\d+)/(?P<affiliate_id>\d+)', array(
     
    175180                        }
    176181                    )
    177                 )
     182                ),
     183                'permission_callback' => '__return_true'
    178184            ) );
    179185            register_rest_route( 'transact/v1', '/verify', array(
     
    187193                    ),
    188194                    'token' => array()
    189                 )
     195                ),
     196                'permission_callback' => '__return_true'
    190197            ) );
    191198            register_rest_route( 'transact/v1', '/premium/(?P<post_id>\d+)', array(
     
    198205                        }
    199206                    )
    200                 )
     207                ),
     208                'permission_callback' => function () {
     209                    return get_current_user_id();
     210                }
    201211            ) );
    202212            register_rest_route( 'transact/v1', '/comments_template/(?P<post_id>\d+)', array(
     
    209219                        }
    210220                    )
    211                 )
     221                ),
     222                'permission_callback' => function () {
     223                    return get_current_user_id();
     224                }
    212225            ) );
    213226        });
  • transact/trunk/readme.txt

    r2368117 r2373362  
    55Requires at least: 5.0
    66Requires PHP: 5.6
    7 Tested up to: 5.4.2
     7Tested up to: 5.5.1
    88Stable tag: 5.2.0
    99License: APACHE-2.0
     
    8181== Changelog ==
    8282
     83= 5.2.1 =
     84* Fix notice warning on WordPress 5.5
    8385
    8486= 5.2.0 =
  • transact/trunk/transact-plugin.php

    r2368117 r2373362  
    33 * Plugin Name: transact.io
    44 * Description: Integrates transact.io services into WP
    5  * Version: 5.2.0
     5 * Version: 5.2.1
    66 * Author: transact.io
    77 * Author URI: https://transact.io
Note: See TracChangeset for help on using the changeset viewer.