Plugin Directory

Changeset 3431754


Ignore:
Timestamp:
01/03/2026 05:22:04 PM (3 months ago)
Author:
camoo
Message:

Fix rest api compatibility issue

Location:
camoo-pay-for-ecommerce/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • camoo-pay-for-ecommerce/trunk/camoo-pay-for-ecommerce.php

    r3431194 r3431754  
    88 * Plugin URI: https://github.com/camoo/camoo-woocommerce-gateway
    99 * Description: Receive Mobile Money payments on your store using CamooPay for WooCommerce.
    10  * Version: 1.0.8
     10 * Version: 1.0.9
    1111 * Tested up to: 6.9
    1212 * Author: Camoo Sarl
     
    2626
    2727if (version_compare(PHP_VERSION, '8.1', '<')) {
    28     add_action('admin_notices', static function () {
     28
     29    add_action('admin_notices', static function(): void {
    2930        echo '<div class="notice notice-error"><p>'
    3031            . esc_html('CamooPay for e-Commerce requires PHP 8.1 or higher.')
     
    4243add_action('plugins_loaded', static function () {
    4344    if (!class_exists('\WooCommerce')) {
    44         add_action('admin_notices', static function () {
     45        add_action('admin_notices', static function(): void {
    4546            echo '<div class="notice notice-error"><p>'
    4647                . esc_html__('WooCommerce must be active to use CamooPay.', 'camoo-pay-for-ecommerce')
     
    5253
    5354    // Defer real plugin startup
    54     add_action('init', function () {
     55    add_action('init', static function(): void {
    5556        $plugin = new Plugin(
    5657            __FILE__,
     
    5859            'Gateway',
    5960            'CamooPay for e-commerce payment gateway',
    60             '1.0.8'
     61            '1.0.9'
    6162        );
    6263
  • camoo-pay-for-ecommerce/trunk/includes/Gateway.php

    r3431194 r3431754  
    442442
    443443        // Show only while waiting for Mobile Money confirmation
    444         if (in_array($order->get_status(), ['pending', 'on-hold'], true)) {
     444        if (in_array($order->get_status(), ['pending', 'on-hold', 'processing'], true)) {
    445445            echo '<p class="woocommerce-info">';
    446446            echo esc_html__(
  • camoo-pay-for-ecommerce/trunk/includes/Media.php

    r3238396 r3431754  
    1515    {
    1616        // Ensure that the logger is instantiated correctly
    17         if ($this->logger === null) {
    18             $this->logger = new Logger(Plugin::WC_CAMOO_PAY_GATEWAY_ID, WP_DEBUG);
    19         }
     17        $this->logger ??= new Logger(Plugin::WC_CAMOO_PAY_GATEWAY_ID, WP_DEBUG);
    2018    }
    2119
  • camoo-pay-for-ecommerce/trunk/includes/Plugin.php

    r3431194 r3431754  
    2828    class Plugin
    2929    {
    30         public const WC_CAMOO_PAY_DB_VERSION = '1.0.8';
     30        public const WC_CAMOO_PAY_DB_VERSION = '1.0.9';
    3131
    3232        public const DEFAULT_TITLE = 'CamooPay';
     
    286286                        'status_time' => [
    287287                            'required' => false,
    288                             'validate_callback' => 'is_string',
     288                            'validate_callback' => static function ($value): bool {
     289                                return is_string($value);
     290                            },
    289291                        ],
    290292                        'payment_id' => [
    291293                            'required' => false,
    292                             'validate_callback' => 'is_string',
     294                            'validate_callback' => static function ($value): bool {
     295                                return is_string($value);
     296                            },
    293297                        ],
    294298                    ],
  • camoo-pay-for-ecommerce/trunk/includes/admin/Enum/MediaEnum.php

    r3237199 r3431754  
    55namespace Camoo\Pay\WooCommerce\Admin\Enum;
    66
     7defined('ABSPATH') || exit;
     8
    79enum MediaEnum: string
    810{
  • camoo-pay-for-ecommerce/trunk/includes/admin/Enum/MetaKeysEnum.php

    r3244543 r3431754  
    44
    55namespace Camoo\Pay\WooCommerce\Admin\Enum;
     6
     7defined('ABSPATH') || exit;
    68
    79enum MetaKeysEnum: string
  • camoo-pay-for-ecommerce/trunk/includes/assets/css/style.css

    r3431194 r3431754  
    4242}
    4343
    44 
    4544/* ===============================
    4645   CAMOO PAY – SHARED STYLES
     
    5352    margin-top: 16px;
    5453}
    55 
    5654.camoo-pay-phone-input:focus {
    5755    outline: none;
     
    6765    margin-top: 8px;
    6866}
    69 
    7067.wc-block-components-payment-method__content .camoo-pay-fields p {
    7168    margin-bottom: 10px;
     
    7370    color: #333;
    7471}
    75 
    7672/* Input + icon row */
    7773.camoo-pay-fields .camoo-pay-input-row {
     
    8076    gap: 10px;
    8177}
    82 
    8378/* Icon inside Blocks */
    8479.camoo-pay-fields img {
     
    8782    object-fit: contain;
    8883}
    89 
    9084.wc-block-components-payment-method-label img[alt="CamooPay"] {
    9185    max-height: 22px;
  • camoo-pay-for-ecommerce/trunk/readme.txt

    r3431194 r3431754  
    44Requires Plugins: woocommerce
    55Tested up to: 6.9
    6 Stable tag: 1.0.8
     6Stable tag: 1.0.9
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8888
    8989== Changelog ==
     90= 1.0.9: Jan 03, 2026 =
     91* Fixed - Fix rest API compatibility issue
     92* Tweak - General code improvements
     93
    9094= 1.0.8: Jan 02, 2026 =
    9195* Tweak - Support for new WooCommerce block checkout improvements
  • camoo-pay-for-ecommerce/trunk/uninstall.php

    r3420361 r3431754  
    3535    $wpdb->query("DELETE FROM {$wpdb->options} WHERE `option_name` LIKE 'woocommerce_wc_camoo_pay%';");
    3636}
     37
    3738/**
    3839 * Remove the CamooPay gateway from the WooCommerce payment gateways list.
Note: See TracChangeset for help on using the changeset viewer.