Plugin Directory

Changeset 3438445


Ignore:
Timestamp:
01/13/2026 09:36:25 AM (3 months ago)
Author:
adrianpo
Message:

tagging version 7.0.1

Location:
plationline
Files:
2 added
3 edited
23 copied

Legend:

Unmodified
Added
Removed
  • plationline/tags/7.0.1/inc/admin/class-admin.php

    r3437666 r3438445  
    143143    public function query()
    144144    {
    145         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     145        if (!current_user_can('edit_shop_orders')) {
     146            $this->response('error', 'Unauthorized');
     147            wp_die();
     148        }
     149
     150        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    146151            $this->response('error', 'Invalid nonce');
    147152            wp_die();
     
    155160        $order_id = (int)$_POST['order'];
    156161        $order = wc_get_order($order_id);
     162
     163        if (!$order instanceof WC_Order) {
     164            $this->response('error', 'Invalid order');
     165            wp_die();
     166        }
     167
    157168        $transid = $order->get_transaction_id();
    158169
     
    201212    public function void()
    202213    {
    203         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     214        if (!current_user_can('edit_shop_orders')) {
     215            $this->response('error', 'Unauthorized');
     216            wp_die();
     217        }
     218
     219        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    204220            $this->response('error', 'Invalid nonce');
    205221            wp_die();
     
    208224        if (empty($_POST['order'])) {
    209225            $this->response('No post sent');
    210             die();
     226            wp_die();
    211227        }
    212228        $order_id = (int)$_POST['order'];
    213229        $order = wc_get_order($order_id);
     230
     231        if (!$order instanceof WC_Order) {
     232            $this->response('error', 'Invalid order');
     233            wp_die();
     234        }
     235
    214236        $transid = $order->get_transaction_id();
    215237
     
    261283    public function cancel_recurrence()
    262284    {
    263         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     285        if (!current_user_can('edit_shop_orders')) {
     286            $this->response('error', 'Unauthorized');
     287            wp_die();
     288        }
     289
     290        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    264291            $this->response('error', 'Invalid nonce');
    265292            wp_die();
     
    268295        if (empty($_POST['order'])) {
    269296            $this->response('No post sent');
    270             die();
     297            wp_die();
    271298        }
    272299        $order_id = (int)$_POST['order'];
    273300        $order = wc_get_order($order_id);
     301
     302        if (!$order instanceof WC_Order) {
     303            $this->response('error', 'Invalid order');
     304            wp_die();
     305        }
     306
    274307        $transid = $order->get_transaction_id();
    275308
     
    317350    public function settle()
    318351    {
    319         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     352        if (!current_user_can('edit_shop_orders')) {
     353            $this->response('error', 'Unauthorized');
     354            wp_die();
     355        }
     356
     357        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    320358            $this->response('error', 'Invalid nonce');
    321359            wp_die();
     
    328366        $order_id = (int)$_POST['order'];
    329367        $order = wc_get_order($order_id);
     368
     369        if (!$order instanceof WC_Order) {
     370            $this->response('error', 'Invalid order');
     371            wp_die();
     372        }
     373
    330374        $transid = $order->get_transaction_id();
    331375
     
    379423    public function refund()
    380424    {
    381         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     425        if (!current_user_can('edit_shop_orders')) {
     426            $this->response('error', 'Unauthorized');
     427            wp_die();
     428        }
     429
     430        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    382431            $this->response('error', 'Invalid nonce');
    383432            wp_die();
     
    385434
    386435        if (empty($_POST['order'])) {
    387             $this->response('No post sent');
     436            $this->response('error', 'No post sent');
    388437            wp_die();
    389438        }
    390439        $order_id = (int)$_POST['order'];
    391440        $order = wc_get_order($order_id);
     441
     442        if (!$order instanceof WC_Order) {
     443            $this->response('error', 'Invalid order');
     444            wp_die();
     445        }
     446
    392447        $transid = $order->get_transaction_id();
    393448
     
    439494    public function settle_amount()
    440495    {
    441         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     496        if (!current_user_can('edit_shop_orders')) {
     497            $this->response('error', 'Unauthorized');
     498            wp_die();
     499        }
     500
     501        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    442502            $this->response('error', 'Invalid nonce');
    443503            wp_die();
     
    445505
    446506        if (empty($_POST['order'])) {
    447             $this->response('No post sent');
     507            $this->response('error', 'No post sent');
    448508            wp_die();
    449509        }
    450510        $order_id = (int)$_POST['order'];
    451511        $order = wc_get_order($order_id);
     512
     513        if (!$order instanceof WC_Order) {
     514            $this->response('error', 'Invalid order');
     515            wp_die();
     516        }
     517
    452518        $transid = $order->get_transaction_id();
    453519
  • plationline/tags/7.0.1/plationline.php

    r3437666 r3438445  
    1616 * Plugin URI:          https://plati.online
    1717 * Description:         Online payment by card and Login with Plati.Online account
    18  * Version:             7.0.0
     18 * Version:             7.0.1
    1919 * Author:              PlatiOnline
    2020 * Author URI:          https://plati.online
     
    4141define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\');
    4242define(NS . 'PLUGIN_NAME', 'plationline');
    43 define(NS . 'PLUGIN_VERSION', '7.0.0');
     43define(NS . 'PLUGIN_VERSION', '7.0.1');
    4444define(NS . 'PLUGIN_NAME_DIR', plugin_dir_path(__FILE__));
    4545define(NS . 'PLUGIN_NAME_URL', plugin_dir_url(__FILE__));
  • plationline/tags/7.0.1/readme.txt

    r3437666 r3438445  
    44Requires at least: 6.0
    55Tested up to: 6.9
    6 Stable tag: 7.0.0
     6Stable tag: 7.0.1
    77Requires PHP: 5.6
    88WC requires at least: 8.3.0
     
    106106== Changelog ==
    107107
     108= 7.0.1 =
     109* added admin remote actions extra validation
     110
    108111= 7.0.0 =
    109112* support Woocommerce blocks checkout
  • plationline/trunk/inc/admin/class-admin.php

    r3437666 r3438445  
    143143    public function query()
    144144    {
    145         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     145        if (!current_user_can('edit_shop_orders')) {
     146            $this->response('error', 'Unauthorized');
     147            wp_die();
     148        }
     149
     150        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    146151            $this->response('error', 'Invalid nonce');
    147152            wp_die();
     
    155160        $order_id = (int)$_POST['order'];
    156161        $order = wc_get_order($order_id);
     162
     163        if (!$order instanceof WC_Order) {
     164            $this->response('error', 'Invalid order');
     165            wp_die();
     166        }
     167
    157168        $transid = $order->get_transaction_id();
    158169
     
    201212    public function void()
    202213    {
    203         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     214        if (!current_user_can('edit_shop_orders')) {
     215            $this->response('error', 'Unauthorized');
     216            wp_die();
     217        }
     218
     219        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    204220            $this->response('error', 'Invalid nonce');
    205221            wp_die();
     
    208224        if (empty($_POST['order'])) {
    209225            $this->response('No post sent');
    210             die();
     226            wp_die();
    211227        }
    212228        $order_id = (int)$_POST['order'];
    213229        $order = wc_get_order($order_id);
     230
     231        if (!$order instanceof WC_Order) {
     232            $this->response('error', 'Invalid order');
     233            wp_die();
     234        }
     235
    214236        $transid = $order->get_transaction_id();
    215237
     
    261283    public function cancel_recurrence()
    262284    {
    263         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     285        if (!current_user_can('edit_shop_orders')) {
     286            $this->response('error', 'Unauthorized');
     287            wp_die();
     288        }
     289
     290        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    264291            $this->response('error', 'Invalid nonce');
    265292            wp_die();
     
    268295        if (empty($_POST['order'])) {
    269296            $this->response('No post sent');
    270             die();
     297            wp_die();
    271298        }
    272299        $order_id = (int)$_POST['order'];
    273300        $order = wc_get_order($order_id);
     301
     302        if (!$order instanceof WC_Order) {
     303            $this->response('error', 'Invalid order');
     304            wp_die();
     305        }
     306
    274307        $transid = $order->get_transaction_id();
    275308
     
    317350    public function settle()
    318351    {
    319         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     352        if (!current_user_can('edit_shop_orders')) {
     353            $this->response('error', 'Unauthorized');
     354            wp_die();
     355        }
     356
     357        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    320358            $this->response('error', 'Invalid nonce');
    321359            wp_die();
     
    328366        $order_id = (int)$_POST['order'];
    329367        $order = wc_get_order($order_id);
     368
     369        if (!$order instanceof WC_Order) {
     370            $this->response('error', 'Invalid order');
     371            wp_die();
     372        }
     373
    330374        $transid = $order->get_transaction_id();
    331375
     
    379423    public function refund()
    380424    {
    381         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     425        if (!current_user_can('edit_shop_orders')) {
     426            $this->response('error', 'Unauthorized');
     427            wp_die();
     428        }
     429
     430        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    382431            $this->response('error', 'Invalid nonce');
    383432            wp_die();
     
    385434
    386435        if (empty($_POST['order'])) {
    387             $this->response('No post sent');
     436            $this->response('error', 'No post sent');
    388437            wp_die();
    389438        }
    390439        $order_id = (int)$_POST['order'];
    391440        $order = wc_get_order($order_id);
     441
     442        if (!$order instanceof WC_Order) {
     443            $this->response('error', 'Invalid order');
     444            wp_die();
     445        }
     446
    392447        $transid = $order->get_transaction_id();
    393448
     
    439494    public function settle_amount()
    440495    {
    441         if (!wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
     496        if (!current_user_can('edit_shop_orders')) {
     497            $this->response('error', 'Unauthorized');
     498            wp_die();
     499        }
     500
     501        if (empty($_GET['_po_wpnonce']) || !wp_verify_nonce($_GET['_po_wpnonce'], 'plationline-admin')) {
    442502            $this->response('error', 'Invalid nonce');
    443503            wp_die();
     
    445505
    446506        if (empty($_POST['order'])) {
    447             $this->response('No post sent');
     507            $this->response('error', 'No post sent');
    448508            wp_die();
    449509        }
    450510        $order_id = (int)$_POST['order'];
    451511        $order = wc_get_order($order_id);
     512
     513        if (!$order instanceof WC_Order) {
     514            $this->response('error', 'Invalid order');
     515            wp_die();
     516        }
     517
    452518        $transid = $order->get_transaction_id();
    453519
  • plationline/trunk/plationline.php

    r3437666 r3438445  
    1616 * Plugin URI:          https://plati.online
    1717 * Description:         Online payment by card and Login with Plati.Online account
    18  * Version:             7.0.0
     18 * Version:             7.0.1
    1919 * Author:              PlatiOnline
    2020 * Author URI:          https://plati.online
     
    4141define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\');
    4242define(NS . 'PLUGIN_NAME', 'plationline');
    43 define(NS . 'PLUGIN_VERSION', '7.0.0');
     43define(NS . 'PLUGIN_VERSION', '7.0.1');
    4444define(NS . 'PLUGIN_NAME_DIR', plugin_dir_path(__FILE__));
    4545define(NS . 'PLUGIN_NAME_URL', plugin_dir_url(__FILE__));
  • plationline/trunk/readme.txt

    r3437666 r3438445  
    44Requires at least: 6.0
    55Tested up to: 6.9
    6 Stable tag: 7.0.0
     6Stable tag: 7.0.1
    77Requires PHP: 5.6
    88WC requires at least: 8.3.0
     
    106106== Changelog ==
    107107
     108= 7.0.1 =
     109* added admin remote actions extra validation
     110
    108111= 7.0.0 =
    109112* support Woocommerce blocks checkout
Note: See TracChangeset for help on using the changeset viewer.