Plugin Directory

Changeset 3440359


Ignore:
Timestamp:
01/15/2026 01:04:04 PM (5 weeks ago)
Author:
dillerapp
Message:

Fixes an error when hiding plugin REST endpoints from public API discovery on certain WordPress configurations

Location:
diller-loyalty/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • diller-loyalty/trunk/README.txt

    r3422127 r3440359  
    44Requires at least: 4.7
    55Tested up to: 6.9
    6 Version: 2.5.2
    7 Stable tag: 2.5.2
     6Version: 2.5.3
     7Stable tag: 2.5.3
    88Requires PHP: 7.3
    99WC requires at least: 3.8.0
     
    6363
    6464== Changelog ==
     65= 2.5.3 =
     66* Fixes an error when hiding plugin REST endpoints from public API discovery on certain WordPress configurations
     67
    6568= 2.5.2 =
    6669* Fixes PHP 8.1+ warnings by ensuring the 'visible' property of departments is always present before access
  • diller-loyalty/trunk/diller-loyalty.php

    r3422127 r3440359  
    66 * Plugin URI:           https://diller.no/
    77 * Description:          Diller is a loyalty platform for businesses that is easy, affordable and profitable and integrates seamlessly with your WooCommerce shop.
    8  * Version:              2.5.2
     8 * Version:              2.5.3
    99 * Author:               Diller AS
    1010 * Author URI:           https://diller.no/kontakt/
     
    1313 * Text Domain:          diller-loyalty
    1414 * Domain Path:          /languages
    15  * Stable tag:           2.5.2
     15 * Stable tag:           2.5.3
    1616 * Requires at least:    4.7
    1717 * Tested up to:         6.8.3
     
    3131// Start at version 2.0.0 and use SemVer - https://semver.org
    3232if ( ! defined( 'DILLER_LOYALTY_VERSION' ) ) {
    33     define('DILLER_LOYALTY_VERSION', '2.5.2');
     33    define('DILLER_LOYALTY_VERSION', '2.5.3');
    3434}
    3535
  • diller-loyalty/trunk/includes/webhooks/class-diller-rest-endpoints.php

    r3371774 r3440359  
    3636     */
    3737    public function remove_diller_rest_endpoints_from_public_discovery($result, $instance, $request) {
    38         foreach ( $result["namespaces"] ?? array() as $index => $namespace ) {
     38        $result = is_object($result) ? (array) $result : $result;
     39
     40        if (!is_array($result)) {
     41            return $result;
     42        }
     43
     44        foreach ( $result["namespaces"] ?? array() as $index => $namespace ) {
    3945            if (preg_match( '/diller-loyalty/i', $namespace )){
    4046                unset($result["namespaces"][$index]);
Note: See TracChangeset for help on using the changeset viewer.