Plugin Directory

Changeset 3422751


Ignore:
Timestamp:
12/18/2025 10:58:13 AM (3 months ago)
Author:
shipbubble
Message:

Multi site compability fix

Location:
shipbubble
Files:
59 added
4 edited

Legend:

Unmodified
Added
Removed
  • shipbubble/trunk/includes/compatibilities.php

    r3394617 r3422751  
    11<?php
    22
    3 if (is_plugin_active('funnel-builder/funnel-builder.php')) {
     3if (shipbubble_is_plugin_active('funnel-builder/funnel-builder.php')) {
    44    add_filter('wfacp_show_shipping_options', '__return_true' ,9999);
    55    add_filter('wfacp_show_shipping_package_name', '__return_true' ,9999);
  • shipbubble/trunk/includes/core-methods.php

    r3326861 r3422751  
    422422        ),
    423423        array(
    424             'check' => function() { return (is_plugin_active('yaycurrency/yay-currency.php') || is_plugin_active('yaycurrency-pro/yay-currency.php')) && class_exists('Yay_Currency\Helpers\YayCurrencyHelper'); },
     424            'check' => function() { return (shipbubble_is_plugin_active('yaycurrency/yay-currency.php') || shipbubble_is_plugin_active('yaycurrency-pro/yay-currency.php')) && class_exists('Yay_Currency\Helpers\YayCurrencyHelper'); },
    425425            'get_currency' => function() {
    426426                $currency_data = YayCurrencyHelper::get_current_currency();
     
    641641    return $address . ', ' . $state . ', ' . $country;
    642642}
     643
     644
     645/**
     646 * Checks if a WordPress plugin is active, considering both single-site and multisite installations.
     647 *
     648 * @param $plugin_slug
     649 * @return bool
     650 */
     651function shipbubble_is_plugin_active($plugin_slug): bool
     652{
     653    if (!function_exists('is_plugin_active')) require_once ABSPATH . 'wp-admin/includes/plugin.php';
     654
     655    if (is_multisite()) {
     656        return is_plugin_active_for_network($plugin_slug) || is_plugin_active($plugin_slug);
     657    }
     658
     659    return is_plugin_active($plugin_slug);
     660}
  • shipbubble/trunk/readme.txt

    r3409333 r3422751  
    55Requires at least: 4.0
    66Tested up to: 6.5
    7 Stable tag: 2.10.2
     7Stable tag: 2.10.3
    88Requires PHP: 5.6
    99License: GPLv3 or later
     
    7070
    7171== Changelog ==
     72== 2.10.3 =
     73* Multi site compability fix
     74
    7275= 2.10.2 =
    7376* Fixes and Improvements
  • shipbubble/trunk/shipbubble.php

    r3409333 r3422751  
    99 * Requires at least: 4.0
    1010 * Tested up to: 6.8
    11  * Version: 2.10.2
     11 * Version: 2.10.3
    1212 * Requires PHP: 5.6
    1313 * Text Domain:  shipbubble
Note: See TracChangeset for help on using the changeset viewer.