Plugin Directory

Changeset 3296162


Ignore:
Timestamp:
05/19/2025 06:12:01 AM (11 months ago)
Author:
themepaste
Message:

Update to version 1.0.4 from GitHub

Location:
shipping-manager
Files:
2 added
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shipping-manager/tags/1.0.4/app/App.php

    r3291937 r3296162  
    4848            new Classes\Front();
    4949        }
    50 
    51         // You may add any other classes that run in both admin and frontend here.
    5250    }
    5351}
  • shipping-manager/tags/1.0.4/app/Helpers/Utility.php

    r3291937 r3296162  
    3535    }
    3636
    37         /**
     37    /**
    3838     * Includes a template file from the 'view' directory.
    3939     *
     
    5656
    5757    /**
     58     * Includes a template file from the 'shipping-manager-pro/views' directory.
     59     *
     60     * This method is used to load a view/template file specifically from the pro version
     61     * of the plugin. It supports passing variables to the template via an associative array.
     62     *
     63     * @param string $template The relative path to the template file inside the 'shipping-manager-pro/views/' directory.
     64     * @param array  $args     Optional. An associative array of variables to extract into the template's scope.
     65     *
     66     * @return string|null The output of the template file, or null if the file doesn't exist.
     67     */
     68    public static function get_pro_template( $template, $args = array() ) {
     69        if ( is_plugin_active( 'shipping-manager-pro/shipping-manager-pro.php' ) ) {
     70            $path = TPSM_REAL_PATH . '/shipping-manager-pro/views/' . $template;
     71   
     72            if ( file_exists( $path ) ) {
     73                if ( ! empty( $args ) && is_array( $args ) ) {
     74                    extract( $args );
     75                }
     76   
     77                ob_start();
     78                include $path;
     79                return ob_get_clean();
     80            }
     81        }
     82    }
     83
     84    /**
    5885     * @param string $var the variable name
    5986     * @return string
  • shipping-manager/tags/1.0.4/readme.txt

    r3292256 r3296162  
    77WC tested up to: 9.8
    88Requires PHP: 7.0
    9 Stable tag: 1.0.3
     9Stable tag: 1.0.4
    1010License: GPLv3 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4747🔗[Official Facebook Page](https://www.facebook.com/themepaste)
    4848🔗[Pinterest](https://uk.pinterest.com/themepaste/)
    49 🔗[Linkedin](https://www.linkedin.com/company/themepaste)
    50 🔗[Linkedin](https://www.linkedin.com/company/themepaste)
     49🔗[Linkedin](https://www.linkedin.com/company/themepaste)
    5150🔗[Instagram](https://www.instagram.com/themepasteuk)
    5251🔗[Official Support Page](https://themepaste.com/contact-us)
     
    204203
    205204== Changelog ==
     205= v1.0.4 - 2025.05.19 = 
     206* [fix] Fix issues.
    206207
    207208= v1.0.1 - v1.0.3 - 2025.05.13 = 
  • shipping-manager/tags/1.0.4/shipping-manager.php

    r3292256 r3296162  
    44 * Plugin URI:        https://themepaste.com/product/wordpress-plugins/shipping-manager-for-woocommerce
    55 * Description:       Optimize WooCommerce shipping with dynamic rules, box management & real-time rates. Boost profits & customer satisfaction.
    6  * Version:           1.0.3
     6 * Version:           1.0.4
    77 * Requires at least: 5.8
    88 * Requires PHP:      7.0
     
    1515 */
    1616   
    17 if (!defined('ABSPATH')) {
     17if ( !defined( 'ABSPATH' ) ) {
    1818    exit;
    1919} // Exit if accessed directly
     
    3838     */
    3939    private function define() {
    40        define( "DEVS", true ); // 'true' | is development mode on
     40       define( "TPSM_DEVS", false ); // 'true' | is development mode on
    4141
    4242       define( 'TPSM_PLUGIN_FILE', __FILE__ );
     
    4747       define( 'TPSM_PLUGIN_URL', plugin_dir_url( TPSM_PLUGIN_FILE ) );
    4848       define( 'TPSM_ASSETS_URL', plugins_url( 'assets', TPSM_PLUGIN_FILE ) );
     49       define( 'TPSM_REAL_PATH', realpath( dirname( TPSM_PLUGIN_DIR ) ) );
    4950
    50        if( DEVS ) {
     51       if( TPSM_DEVS ) {
    5152           define( 'TPSM_ASSETS_VERSION', time() );
    5253       }
     
    6061     */
    6162    private function include() {
    62         require_once( dirname( __FILE__ ) . '/inc/functions.php' );
    63         require_once( dirname( __FILE__ ) . '/vendor/autoload.php' );
     63        // Include custom helper functions from the inc/functions.php file
     64        require_once dirname( __FILE__ ) . '/inc/functions.php';
     65
     66        /**
     67         * Check if the Composer autoloader class for TPShippingManager exists.
     68         *
     69         * The class name usually includes the suffix defined in the composer.json
     70         * file, typically something like 'ComposerAutoloaderInitTPShippingManager'.
     71         *
     72         * If the class does not exist, include the Composer autoloader file to
     73         * register the necessary autoload mappings.
     74         */
     75        if ( ! class_exists( 'ComposerAutoloaderInitTPShippingManager' ) ) {
     76            require_once dirname( __FILE__ ) . '/vendor/autoload.php';
     77        }
    6478    }
    6579
  • shipping-manager/tags/1.0.4/vendor/autoload.php

    r3292236 r3296162  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInitd751713988987e9331980363e24189ce::getLoader();
     22return ComposerAutoloaderInitTPShippingManager::getLoader();
  • shipping-manager/tags/1.0.4/vendor/composer/autoload_real.php

    r3292236 r3296162  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd751713988987e9331980363e24189ce
     5class ComposerAutoloaderInitTPShippingManager
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitd751713988987e9331980363e24189ce', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitd751713988987e9331980363e24189ce', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitd751713988987e9331980363e24189ce::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInitTPShippingManager::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • shipping-manager/tags/1.0.4/vendor/composer/autoload_static.php

    r3292236 r3296162  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitd751713988987e9331980363e24189ce
     7class ComposerStaticInitTPShippingManager
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    2828    {
    2929        return \Closure::bind(function () use ($loader) {
    30             $loader->prefixLengthsPsr4 = ComposerStaticInitd751713988987e9331980363e24189ce::$prefixLengthsPsr4;
    31             $loader->prefixDirsPsr4 = ComposerStaticInitd751713988987e9331980363e24189ce::$prefixDirsPsr4;
    32             $loader->classMap = ComposerStaticInitd751713988987e9331980363e24189ce::$classMap;
     30            $loader->prefixLengthsPsr4 = ComposerStaticInitTPShippingManager::$prefixLengthsPsr4;
     31            $loader->prefixDirsPsr4 = ComposerStaticInitTPShippingManager::$prefixDirsPsr4;
     32            $loader->classMap = ComposerStaticInitTPShippingManager::$classMap;
    3333
    3434        }, null, ClassLoader::class);
  • shipping-manager/tags/1.0.4/vendor/composer/installed.php

    r3292236 r3296162  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '386a283d6dbcea8222372b86189fd1edd9d3c35a',
     6        'reference' => 'd88f98c3285c2a216891647be81bfc6475437920',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '386a283d6dbcea8222372b86189fd1edd9d3c35a',
     16            'reference' => 'd88f98c3285c2a216891647be81bfc6475437920',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • shipping-manager/tags/1.0.4/views/settings/pages/general.php

    r3291937 r3296162  
    100100            ?>
    101101
     102            <?php do_action( 'tpsm_license_activation_field' ); ?>
     103
    102104            <div class="tpsm-save-button">
    103105                <button type="submit" name="<?php echo esc_attr( $submit_button ); ?>"><?php esc_html_e( 'Save Settings', 'shipping-manager' ); ?></button>
    104106            </div>
     107
    105108        </form>
    106109    </div>
  • shipping-manager/tags/1.0.4/views/settings/parts/main.php

    r3291937 r3296162  
    1818                // Attempt to retrieve the template for the active settings page
    1919                $template = Utility::get_template( 'settings/pages/' . $key . '.php', $args );
     20                $pro_template = Utility::get_pro_template( 'settings/pages/' . $key . '.php', $args );
    2021
    2122                // If a valid template is returned, output it
    2223                if ( $template ) {
    2324                    echo $template;
    24 
    25                 // Otherwise, show an upgrade message prompting for the Pro version
     25                } else if( $pro_template ) {
     26                    echo $pro_template;
    2627                } else {
    2728                    ?>
  • shipping-manager/trunk/app/App.php

    r3291937 r3296162  
    4848            new Classes\Front();
    4949        }
    50 
    51         // You may add any other classes that run in both admin and frontend here.
    5250    }
    5351}
  • shipping-manager/trunk/app/Helpers/Utility.php

    r3291937 r3296162  
    3535    }
    3636
    37         /**
     37    /**
    3838     * Includes a template file from the 'view' directory.
    3939     *
     
    5656
    5757    /**
     58     * Includes a template file from the 'shipping-manager-pro/views' directory.
     59     *
     60     * This method is used to load a view/template file specifically from the pro version
     61     * of the plugin. It supports passing variables to the template via an associative array.
     62     *
     63     * @param string $template The relative path to the template file inside the 'shipping-manager-pro/views/' directory.
     64     * @param array  $args     Optional. An associative array of variables to extract into the template's scope.
     65     *
     66     * @return string|null The output of the template file, or null if the file doesn't exist.
     67     */
     68    public static function get_pro_template( $template, $args = array() ) {
     69        if ( is_plugin_active( 'shipping-manager-pro/shipping-manager-pro.php' ) ) {
     70            $path = TPSM_REAL_PATH . '/shipping-manager-pro/views/' . $template;
     71   
     72            if ( file_exists( $path ) ) {
     73                if ( ! empty( $args ) && is_array( $args ) ) {
     74                    extract( $args );
     75                }
     76   
     77                ob_start();
     78                include $path;
     79                return ob_get_clean();
     80            }
     81        }
     82    }
     83
     84    /**
    5885     * @param string $var the variable name
    5986     * @return string
  • shipping-manager/trunk/readme.txt

    r3292256 r3296162  
    77WC tested up to: 9.8
    88Requires PHP: 7.0
    9 Stable tag: 1.0.3
     9Stable tag: 1.0.4
    1010License: GPLv3 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4747🔗[Official Facebook Page](https://www.facebook.com/themepaste)
    4848🔗[Pinterest](https://uk.pinterest.com/themepaste/)
    49 🔗[Linkedin](https://www.linkedin.com/company/themepaste)
    50 🔗[Linkedin](https://www.linkedin.com/company/themepaste)
     49🔗[Linkedin](https://www.linkedin.com/company/themepaste)
    5150🔗[Instagram](https://www.instagram.com/themepasteuk)
    5251🔗[Official Support Page](https://themepaste.com/contact-us)
     
    204203
    205204== Changelog ==
     205= v1.0.4 - 2025.05.19 = 
     206* [fix] Fix issues.
    206207
    207208= v1.0.1 - v1.0.3 - 2025.05.13 = 
  • shipping-manager/trunk/shipping-manager.php

    r3292256 r3296162  
    44 * Plugin URI:        https://themepaste.com/product/wordpress-plugins/shipping-manager-for-woocommerce
    55 * Description:       Optimize WooCommerce shipping with dynamic rules, box management & real-time rates. Boost profits & customer satisfaction.
    6  * Version:           1.0.3
     6 * Version:           1.0.4
    77 * Requires at least: 5.8
    88 * Requires PHP:      7.0
     
    1515 */
    1616   
    17 if (!defined('ABSPATH')) {
     17if ( !defined( 'ABSPATH' ) ) {
    1818    exit;
    1919} // Exit if accessed directly
     
    3838     */
    3939    private function define() {
    40        define( "DEVS", true ); // 'true' | is development mode on
     40       define( "TPSM_DEVS", false ); // 'true' | is development mode on
    4141
    4242       define( 'TPSM_PLUGIN_FILE', __FILE__ );
     
    4747       define( 'TPSM_PLUGIN_URL', plugin_dir_url( TPSM_PLUGIN_FILE ) );
    4848       define( 'TPSM_ASSETS_URL', plugins_url( 'assets', TPSM_PLUGIN_FILE ) );
     49       define( 'TPSM_REAL_PATH', realpath( dirname( TPSM_PLUGIN_DIR ) ) );
    4950
    50        if( DEVS ) {
     51       if( TPSM_DEVS ) {
    5152           define( 'TPSM_ASSETS_VERSION', time() );
    5253       }
     
    6061     */
    6162    private function include() {
    62         require_once( dirname( __FILE__ ) . '/inc/functions.php' );
    63         require_once( dirname( __FILE__ ) . '/vendor/autoload.php' );
     63        // Include custom helper functions from the inc/functions.php file
     64        require_once dirname( __FILE__ ) . '/inc/functions.php';
     65
     66        /**
     67         * Check if the Composer autoloader class for TPShippingManager exists.
     68         *
     69         * The class name usually includes the suffix defined in the composer.json
     70         * file, typically something like 'ComposerAutoloaderInitTPShippingManager'.
     71         *
     72         * If the class does not exist, include the Composer autoloader file to
     73         * register the necessary autoload mappings.
     74         */
     75        if ( ! class_exists( 'ComposerAutoloaderInitTPShippingManager' ) ) {
     76            require_once dirname( __FILE__ ) . '/vendor/autoload.php';
     77        }
    6478    }
    6579
  • shipping-manager/trunk/vendor/autoload.php

    r3292236 r3296162  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInitd751713988987e9331980363e24189ce::getLoader();
     22return ComposerAutoloaderInitTPShippingManager::getLoader();
  • shipping-manager/trunk/vendor/composer/autoload_real.php

    r3292236 r3296162  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd751713988987e9331980363e24189ce
     5class ComposerAutoloaderInitTPShippingManager
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitd751713988987e9331980363e24189ce', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitd751713988987e9331980363e24189ce', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitd751713988987e9331980363e24189ce::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInitTPShippingManager::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • shipping-manager/trunk/vendor/composer/autoload_static.php

    r3292236 r3296162  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitd751713988987e9331980363e24189ce
     7class ComposerStaticInitTPShippingManager
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    2828    {
    2929        return \Closure::bind(function () use ($loader) {
    30             $loader->prefixLengthsPsr4 = ComposerStaticInitd751713988987e9331980363e24189ce::$prefixLengthsPsr4;
    31             $loader->prefixDirsPsr4 = ComposerStaticInitd751713988987e9331980363e24189ce::$prefixDirsPsr4;
    32             $loader->classMap = ComposerStaticInitd751713988987e9331980363e24189ce::$classMap;
     30            $loader->prefixLengthsPsr4 = ComposerStaticInitTPShippingManager::$prefixLengthsPsr4;
     31            $loader->prefixDirsPsr4 = ComposerStaticInitTPShippingManager::$prefixDirsPsr4;
     32            $loader->classMap = ComposerStaticInitTPShippingManager::$classMap;
    3333
    3434        }, null, ClassLoader::class);
  • shipping-manager/trunk/vendor/composer/installed.php

    r3292236 r3296162  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '386a283d6dbcea8222372b86189fd1edd9d3c35a',
     6        'reference' => 'd88f98c3285c2a216891647be81bfc6475437920',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '386a283d6dbcea8222372b86189fd1edd9d3c35a',
     16            'reference' => 'd88f98c3285c2a216891647be81bfc6475437920',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • shipping-manager/trunk/views/settings/pages/general.php

    r3291937 r3296162  
    100100            ?>
    101101
     102            <?php do_action( 'tpsm_license_activation_field' ); ?>
     103
    102104            <div class="tpsm-save-button">
    103105                <button type="submit" name="<?php echo esc_attr( $submit_button ); ?>"><?php esc_html_e( 'Save Settings', 'shipping-manager' ); ?></button>
    104106            </div>
     107
    105108        </form>
    106109    </div>
  • shipping-manager/trunk/views/settings/parts/main.php

    r3291937 r3296162  
    1818                // Attempt to retrieve the template for the active settings page
    1919                $template = Utility::get_template( 'settings/pages/' . $key . '.php', $args );
     20                $pro_template = Utility::get_pro_template( 'settings/pages/' . $key . '.php', $args );
    2021
    2122                // If a valid template is returned, output it
    2223                if ( $template ) {
    2324                    echo $template;
    24 
    25                 // Otherwise, show an upgrade message prompting for the Pro version
     25                } else if( $pro_template ) {
     26                    echo $pro_template;
    2627                } else {
    2728                    ?>
Note: See TracChangeset for help on using the changeset viewer.