Plugin Directory

Changeset 3173079


Ignore:
Timestamp:
10/21/2024 04:39:03 PM (18 months ago)
Author:
tamarasolution
Message:

v1.9.8 - Fix cron issues

Location:
tamara-checkout/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tamara-checkout/trunk/package.json

    r3121832 r3173079  
    11{
    22  "name": "tamara_checkout",
    3   "version": "1.9.7",
     3  "version": "1.9.8",
    44  "description": "Plugin for checking out using Tamara payment method",
    55  "scripts": {
  • tamara-checkout/trunk/readme.txt

    r3121925 r3173079  
    55Tested up to: 6.6
    66Requires PHP: 7.2+
    7 Stable tag: 1.9.7
     7Stable tag: 1.9.8
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8080
    8181== Changelog ==
     82
     83= 1.9.8 - 2024-10-21 =
     84
     85Bugfixes:
     86
     87* Fix the cron issues
    8288
    8389= 1.9.7 - 2024-07-18 =
  • tamara-checkout/trunk/src/Services/WCTamaraGateway.php

    r3121832 r3173079  
    441441            $tamaraCheckoutSessionId = $checkoutResponse->getCheckoutResponse()->getCheckoutId();
    442442
     443            update_post_meta($orderId, '_tamara_checkout_session_id', $tamaraCheckoutSessionId);
    443444            update_post_meta($orderId, 'tamara_checkout_session_id', $tamaraCheckoutSessionId);
     445            update_post_meta($orderId, '_tamara_checkout_url', $tamaraCheckoutUrl);
    444446            update_post_meta($orderId, 'tamara_checkout_url', $tamaraCheckoutUrl);
     447            update_post_meta($orderId, '_tamara_payment_type', $checkoutPaymentType);
    445448            update_post_meta($orderId, 'tamara_payment_type', $checkoutPaymentType);
    446449            if ($checkoutPaymentType === static::PAYMENT_TYPE_PAY_BY_INSTALMENTS && !empty($instalmentPeriod)) {
  • tamara-checkout/trunk/src/TamaraCheckout.php

    r3121832 r3173079  
    260260        add_action('woocommerce_checkout_update_order_review', [$this, 'getUpdatedPhoneNumberOnCheckout']);
    261261
    262         if ($this->isCronjobEnabled()) {
     262        if ($this->isCronjobEnabled() && rand(0,20) === 1) {
    263263            add_action('admin_footer', [$this, 'addCronJobTriggerScript']);
    264264        }
     
    642642            'post_status' => $tamaraCapturePaymentStatus,
    643643            'date_query' => [
     644                'before' => date('Y-m-d', strtotime('-14 days')),
    644645                'after' => date('Y-m-d', strtotime('-180 days')),
    645646                'inclusive' => true,
     
    648649                'relation' => 'AND',
    649650                [
    650                     'key' => 'tamara_order_id',
     651                    'key' => '_tamara_order_id',
    651652                    'compare' => 'EXISTS',
    652653                ],
    653654                [
    654                     'key' => 'capture_id',
     655                    'key' => '_tamara_capture_id',
     656                    'compare' => 'NOT EXISTS',
     657                ],
     658                [
     659                    'key' => '_tamara_force_capture_checked',
    655660                    'compare' => 'NOT EXISTS',
    656661                ],
     
    663668
    664669        foreach ($wcOrderIds as $wcOrderId) {
     670            update_post_meta($wcOrderId, '_tamara_force_capture_checked', 1);
     671
    665672            if (static::TAMARA_FULLY_CAPTURED_STATUS === TamaraCheckout::getInstance()->getTamaraOrderStatus($wcOrderId)) {
    666673                $wcOrder = wc_get_order($wcOrderId);
    667674                $wcOrder->add_order_note(__('Tamara - The payment has been captured successfully.', $this->textDomain));
     675                $tamaraCaptureId = $this->getWCTamaraGatewayService()->getTamaraCaptureId($wcOrderId);
     676                update_post_meta($wcOrderId, '_tamara_capture_id', $tamaraCaptureId);
     677
    668678                return true;
    669679            } else {
     
    685695            'post_status' => $toAuthoriseStatus,
    686696            'date_query' => [
     697                'before' => date('Y-m-d', strtotime('-3 days')),
    687698                'after' => date('Y-m-d', strtotime('-180 days')),
    688699                'inclusive' => true,
     
    695706                ],
    696707                [
    697                     'key' => 'tamara_order_id',
     708                    'key' => '_tamara_order_id',
     709                    'compare' => 'NOT EXISTS',
     710                ],
     711                [
     712                    'key' => '_tamara_force_authorise_checked',
    698713                    'compare' => 'NOT EXISTS',
    699714                ],
     
    706721
    707722        foreach ($wcOrderIds as $wcOrderId) {
     723            update_post_meta($wcOrderId, '_tamara_force_authorise_checked', 1);
    708724            if (!$this->isOrderAuthorised($wcOrderId)) {
    709725                $this->authoriseOrder($wcOrderId);
  • tamara-checkout/trunk/tamara-checkout.php

    r3121832 r3173079  
    66 * Author:      dev@tamara.co
    77 * Author URI:  https://tamara.co/
    8  * Version:     1.9.7
     8 * Version:     1.9.8
    99 * Text Domain: tamara
    1010 */
     
    1212use Tamara\Wp\Plugin\TamaraCheckout;
    1313
    14 defined('TAMARA_CHECKOUT_VERSION') || define('TAMARA_CHECKOUT_VERSION', '1.9.7');
     14defined('TAMARA_CHECKOUT_VERSION') || define('TAMARA_CHECKOUT_VERSION', '1.9.8');
    1515
    1616// Use autoload if it isn't loaded before
Note: See TracChangeset for help on using the changeset viewer.