<?php

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound -- APD is the established namespace shared with the Pro add-on and retained for backward compatibility.
namespace APD\Support;

defined('ABSPATH') || exit;

class Helpers
{
    public static function isWooActive() : bool
    {
        return class_exists(\WooCommerce::class);
    }

    public static function arrayGet(array $data, string $key, mixed $default = null) : mixed
    {
        return $data[$key] ?? $default;
    }
}
