Plugin Directory

Changeset 3812583


Ignore:
Timestamp:
11/19/2026 10:04:28 PM (82 minutes ago)
Author:
coinolive
Message:

Coino Live Crypto Payments 1.1.3: clear error when the API URL points at a website (trunk, tag 1.1.3)

Location:
coinolive
Files:
23 added
3 edited
3 copied

Legend:

Unmodified
Added
Removed
  • coinolive/tags/1.1.3/coinolive.php

    r3812365 r3812583  
    44 * Plugin URI:           https://coino.live/woocommerce
    55 * Description:          Accept USDT, Bitcoin, Ethereum, TRON, TON, Solana and more in WooCommerce. Customers pay on the Coino Live checkout; orders update automatically.
    6  * Version:              1.1.2
     6 * Version:              1.1.3
    77 * Author:               Coino Live
    88 * Author URI:           https://coino.live
    … …  
    2020defined( 'ABSPATH' ) || exit;
    2121
    22 define( 'COINOLIVE_VERSION', '1.1.2' );
     22define( 'COINOLIVE_VERSION', '1.1.3' );
    2323define( 'COINOLIVE_FILE', __FILE__ );
    2424define( 'COINOLIVE_DIR', plugin_dir_path( __FILE__ ) );
  • coinolive/tags/1.1.3/includes/class-coinolive-client.php

    r3812365 r3812583  
    111111
    112112                // A redirect or an HTML 404 means the API URL points at a website, not at the API.
    113                 if ( ( $status >= 300 && $status < 400 ) || ( 404 === $status && ! is_array( $json ) ) ) {
     113                if ( ( $status >= 300 && $status < 400 ) || ( 404 === $status && ( ! is_array( $json ) || '' === (string) ( $json['message'] ?? '' ) ) ) ) {
    114114                        /* translators: 1: the API URL from the settings, 2: HTTP status code */
    115115                        throw new CoinoLive_Exception( esc_html( sprintf( __( 'There is no Coino Live API at %1$s (HTTP %2$d). Check the API URL setting.', 'coinolive' ), $this->base_url, $status ) ), (int) $status );
    116116                }
    117117                if ( $status < 200 || $status >= 300 ) {
    118                         $message = is_array( $json ) && isset( $json['message'] ) ? (string) $json['message'] : 'HTTP ' . $status;
     118                        $message = is_array( $json ) && ! empty( $json['message'] ) ? (string) $json['message'] : 'HTTP ' . $status;
    119119                        if ( is_array( $json ) && ! empty( $json['errors'] ) && is_array( $json['errors'] ) ) {
    120120                                $first = reset( $json['errors'] );
  • coinolive/tags/1.1.3/readme.txt

    r3812365 r3812583  
    77WC requires at least: 7.6
    88WC tested up to: 9.9
    9 Stable tag: 1.1.2
     9Stable tag: 1.1.3
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    6565== Changelog ==
    6666
     67= 1.1.3 =
     68* A website address entered as the API URL now gives a clear error instead of an empty one.
     69
    6770= 1.1.2 =
    6871* Plugin URI points to the plugin's page on coino.live.
  • coinolive/trunk/coinolive.php

    r3812365 r3812583  
    44 * Plugin URI:           https://coino.live/woocommerce
    55 * Description:          Accept USDT, Bitcoin, Ethereum, TRON, TON, Solana and more in WooCommerce. Customers pay on the Coino Live checkout; orders update automatically.
    6  * Version:              1.1.2
     6 * Version:              1.1.3
    77 * Author:               Coino Live
    88 * Author URI:           https://coino.live
    … …  
    2020defined( 'ABSPATH' ) || exit;
    2121
    22 define( 'COINOLIVE_VERSION', '1.1.2' );
     22define( 'COINOLIVE_VERSION', '1.1.3' );
    2323define( 'COINOLIVE_FILE', __FILE__ );
    2424define( 'COINOLIVE_DIR', plugin_dir_path( __FILE__ ) );
  • coinolive/trunk/includes/class-coinolive-client.php

    r3812365 r3812583  
    111111
    112112                // A redirect or an HTML 404 means the API URL points at a website, not at the API.
    113                 if ( ( $status >= 300 && $status < 400 ) || ( 404 === $status && ! is_array( $json ) ) ) {
     113                if ( ( $status >= 300 && $status < 400 ) || ( 404 === $status && ( ! is_array( $json ) || '' === (string) ( $json['message'] ?? '' ) ) ) ) {
    114114                        /* translators: 1: the API URL from the settings, 2: HTTP status code */
    115115                        throw new CoinoLive_Exception( esc_html( sprintf( __( 'There is no Coino Live API at %1$s (HTTP %2$d). Check the API URL setting.', 'coinolive' ), $this->base_url, $status ) ), (int) $status );
    116116                }
    117117                if ( $status < 200 || $status >= 300 ) {
    118                         $message = is_array( $json ) && isset( $json['message'] ) ? (string) $json['message'] : 'HTTP ' . $status;
     118                        $message = is_array( $json ) && ! empty( $json['message'] ) ? (string) $json['message'] : 'HTTP ' . $status;
    119119                        if ( is_array( $json ) && ! empty( $json['errors'] ) && is_array( $json['errors'] ) ) {
    120120                                $first = reset( $json['errors'] );
  • coinolive/trunk/readme.txt

    r3812365 r3812583  
    77WC requires at least: 7.6
    88WC tested up to: 9.9
    9 Stable tag: 1.1.2
     9Stable tag: 1.1.3
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    6565== Changelog ==
    6666
     67= 1.1.3 =
     68* A website address entered as the API URL now gives a clear error instead of an empty one.
     69
    6770= 1.1.2 =
    6871* Plugin URI points to the plugin's page on coino.live.
Note: See TracChangeset for help on using the changeset viewer.