Changeset 3296162
- Timestamp:
- 05/19/2025 06:12:01 AM (11 months ago)
- Location:
- shipping-manager
- Files:
-
- 2 added
- 20 edited
- 1 copied
-
tags/1.0.4 (copied) (copied from shipping-manager/trunk)
-
tags/1.0.4/app/App.php (modified) (1 diff)
-
tags/1.0.4/app/Classes/Pro.php (added)
-
tags/1.0.4/app/Helpers/Utility.php (modified) (2 diffs)
-
tags/1.0.4/readme.txt (modified) (3 diffs)
-
tags/1.0.4/shipping-manager.php (modified) (5 diffs)
-
tags/1.0.4/vendor/autoload.php (modified) (1 diff)
-
tags/1.0.4/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/1.0.4/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.0.4/vendor/composer/installed.php (modified) (2 diffs)
-
tags/1.0.4/views/settings/pages/general.php (modified) (1 diff)
-
tags/1.0.4/views/settings/parts/main.php (modified) (1 diff)
-
trunk/app/App.php (modified) (1 diff)
-
trunk/app/Classes/Pro.php (added)
-
trunk/app/Helpers/Utility.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/shipping-manager.php (modified) (5 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/views/settings/pages/general.php (modified) (1 diff)
-
trunk/views/settings/parts/main.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shipping-manager/tags/1.0.4/app/App.php
r3291937 r3296162 48 48 new Classes\Front(); 49 49 } 50 51 // You may add any other classes that run in both admin and frontend here.52 50 } 53 51 } -
shipping-manager/tags/1.0.4/app/Helpers/Utility.php
r3291937 r3296162 35 35 } 36 36 37 /**37 /** 38 38 * Includes a template file from the 'view' directory. 39 39 * … … 56 56 57 57 /** 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 /** 58 85 * @param string $var the variable name 59 86 * @return string -
shipping-manager/tags/1.0.4/readme.txt
r3292256 r3296162 7 7 WC tested up to: 9.8 8 8 Requires PHP: 7.0 9 Stable tag: 1.0. 39 Stable tag: 1.0.4 10 10 License: GPLv3 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 47 47 🔗[Official Facebook Page](https://www.facebook.com/themepaste) 48 48 🔗[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) 51 50 🔗[Instagram](https://www.instagram.com/themepasteuk) 52 51 🔗[Official Support Page](https://themepaste.com/contact-us) … … 204 203 205 204 == Changelog == 205 = v1.0.4 - 2025.05.19 = 206 * [fix] Fix issues. 206 207 207 208 = v1.0.1 - v1.0.3 - 2025.05.13 = -
shipping-manager/tags/1.0.4/shipping-manager.php
r3292256 r3296162 4 4 * Plugin URI: https://themepaste.com/product/wordpress-plugins/shipping-manager-for-woocommerce 5 5 * Description: Optimize WooCommerce shipping with dynamic rules, box management & real-time rates. Boost profits & customer satisfaction. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Requires at least: 5.8 8 8 * Requires PHP: 7.0 … … 15 15 */ 16 16 17 if ( !defined('ABSPATH')) {17 if ( !defined( 'ABSPATH' ) ) { 18 18 exit; 19 19 } // Exit if accessed directly … … 38 38 */ 39 39 private function define() { 40 define( " DEVS", true ); // 'true' | is development mode on40 define( "TPSM_DEVS", false ); // 'true' | is development mode on 41 41 42 42 define( 'TPSM_PLUGIN_FILE', __FILE__ ); … … 47 47 define( 'TPSM_PLUGIN_URL', plugin_dir_url( TPSM_PLUGIN_FILE ) ); 48 48 define( 'TPSM_ASSETS_URL', plugins_url( 'assets', TPSM_PLUGIN_FILE ) ); 49 define( 'TPSM_REAL_PATH', realpath( dirname( TPSM_PLUGIN_DIR ) ) ); 49 50 50 if( DEVS ) {51 if( TPSM_DEVS ) { 51 52 define( 'TPSM_ASSETS_VERSION', time() ); 52 53 } … … 60 61 */ 61 62 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 } 64 78 } 65 79 -
shipping-manager/tags/1.0.4/vendor/autoload.php
r3292236 r3296162 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit d751713988987e9331980363e24189ce::getLoader();22 return ComposerAutoloaderInitTPShippingManager::getLoader(); -
shipping-manager/tags/1.0.4/vendor/composer/autoload_real.php
r3292236 r3296162 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit d751713988987e9331980363e24189ce5 class ComposerAutoloaderInitTPShippingManager 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit d751713988987e9331980363e24189ce', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit d751713988987e9331980363e24189ce', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit d751713988987e9331980363e24189ce::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInitTPShippingManager::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
shipping-manager/tags/1.0.4/vendor/composer/autoload_static.php
r3292236 r3296162 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit d751713988987e9331980363e24189ce7 class ComposerStaticInitTPShippingManager 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 28 28 { 29 29 return \Closure::bind(function () use ($loader) { 30 $loader->prefixLengthsPsr4 = ComposerStaticInit d751713988987e9331980363e24189ce::$prefixLengthsPsr4;31 $loader->prefixDirsPsr4 = ComposerStaticInit d751713988987e9331980363e24189ce::$prefixDirsPsr4;32 $loader->classMap = ComposerStaticInit d751713988987e9331980363e24189ce::$classMap;30 $loader->prefixLengthsPsr4 = ComposerStaticInitTPShippingManager::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInitTPShippingManager::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInitTPShippingManager::$classMap; 33 33 34 34 }, null, ClassLoader::class); -
shipping-manager/tags/1.0.4/vendor/composer/installed.php
r3292236 r3296162 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 386a283d6dbcea8222372b86189fd1edd9d3c35a',6 'reference' => 'd88f98c3285c2a216891647be81bfc6475437920', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 386a283d6dbcea8222372b86189fd1edd9d3c35a',16 'reference' => 'd88f98c3285c2a216891647be81bfc6475437920', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
shipping-manager/tags/1.0.4/views/settings/pages/general.php
r3291937 r3296162 100 100 ?> 101 101 102 <?php do_action( 'tpsm_license_activation_field' ); ?> 103 102 104 <div class="tpsm-save-button"> 103 105 <button type="submit" name="<?php echo esc_attr( $submit_button ); ?>"><?php esc_html_e( 'Save Settings', 'shipping-manager' ); ?></button> 104 106 </div> 107 105 108 </form> 106 109 </div> -
shipping-manager/tags/1.0.4/views/settings/parts/main.php
r3291937 r3296162 18 18 // Attempt to retrieve the template for the active settings page 19 19 $template = Utility::get_template( 'settings/pages/' . $key . '.php', $args ); 20 $pro_template = Utility::get_pro_template( 'settings/pages/' . $key . '.php', $args ); 20 21 21 22 // If a valid template is returned, output it 22 23 if ( $template ) { 23 24 echo $template; 24 25 // Otherwise, show an upgrade message prompting for the Pro version25 } else if( $pro_template ) { 26 echo $pro_template; 26 27 } else { 27 28 ?> -
shipping-manager/trunk/app/App.php
r3291937 r3296162 48 48 new Classes\Front(); 49 49 } 50 51 // You may add any other classes that run in both admin and frontend here.52 50 } 53 51 } -
shipping-manager/trunk/app/Helpers/Utility.php
r3291937 r3296162 35 35 } 36 36 37 /**37 /** 38 38 * Includes a template file from the 'view' directory. 39 39 * … … 56 56 57 57 /** 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 /** 58 85 * @param string $var the variable name 59 86 * @return string -
shipping-manager/trunk/readme.txt
r3292256 r3296162 7 7 WC tested up to: 9.8 8 8 Requires PHP: 7.0 9 Stable tag: 1.0. 39 Stable tag: 1.0.4 10 10 License: GPLv3 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 47 47 🔗[Official Facebook Page](https://www.facebook.com/themepaste) 48 48 🔗[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) 51 50 🔗[Instagram](https://www.instagram.com/themepasteuk) 52 51 🔗[Official Support Page](https://themepaste.com/contact-us) … … 204 203 205 204 == Changelog == 205 = v1.0.4 - 2025.05.19 = 206 * [fix] Fix issues. 206 207 207 208 = v1.0.1 - v1.0.3 - 2025.05.13 = -
shipping-manager/trunk/shipping-manager.php
r3292256 r3296162 4 4 * Plugin URI: https://themepaste.com/product/wordpress-plugins/shipping-manager-for-woocommerce 5 5 * Description: Optimize WooCommerce shipping with dynamic rules, box management & real-time rates. Boost profits & customer satisfaction. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Requires at least: 5.8 8 8 * Requires PHP: 7.0 … … 15 15 */ 16 16 17 if ( !defined('ABSPATH')) {17 if ( !defined( 'ABSPATH' ) ) { 18 18 exit; 19 19 } // Exit if accessed directly … … 38 38 */ 39 39 private function define() { 40 define( " DEVS", true ); // 'true' | is development mode on40 define( "TPSM_DEVS", false ); // 'true' | is development mode on 41 41 42 42 define( 'TPSM_PLUGIN_FILE', __FILE__ ); … … 47 47 define( 'TPSM_PLUGIN_URL', plugin_dir_url( TPSM_PLUGIN_FILE ) ); 48 48 define( 'TPSM_ASSETS_URL', plugins_url( 'assets', TPSM_PLUGIN_FILE ) ); 49 define( 'TPSM_REAL_PATH', realpath( dirname( TPSM_PLUGIN_DIR ) ) ); 49 50 50 if( DEVS ) {51 if( TPSM_DEVS ) { 51 52 define( 'TPSM_ASSETS_VERSION', time() ); 52 53 } … … 60 61 */ 61 62 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 } 64 78 } 65 79 -
shipping-manager/trunk/vendor/autoload.php
r3292236 r3296162 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit d751713988987e9331980363e24189ce::getLoader();22 return ComposerAutoloaderInitTPShippingManager::getLoader(); -
shipping-manager/trunk/vendor/composer/autoload_real.php
r3292236 r3296162 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit d751713988987e9331980363e24189ce5 class ComposerAutoloaderInitTPShippingManager 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit d751713988987e9331980363e24189ce', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit d751713988987e9331980363e24189ce', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInitTPShippingManager', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit d751713988987e9331980363e24189ce::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInitTPShippingManager::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
shipping-manager/trunk/vendor/composer/autoload_static.php
r3292236 r3296162 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit d751713988987e9331980363e24189ce7 class ComposerStaticInitTPShippingManager 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 28 28 { 29 29 return \Closure::bind(function () use ($loader) { 30 $loader->prefixLengthsPsr4 = ComposerStaticInit d751713988987e9331980363e24189ce::$prefixLengthsPsr4;31 $loader->prefixDirsPsr4 = ComposerStaticInit d751713988987e9331980363e24189ce::$prefixDirsPsr4;32 $loader->classMap = ComposerStaticInit d751713988987e9331980363e24189ce::$classMap;30 $loader->prefixLengthsPsr4 = ComposerStaticInitTPShippingManager::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInitTPShippingManager::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInitTPShippingManager::$classMap; 33 33 34 34 }, null, ClassLoader::class); -
shipping-manager/trunk/vendor/composer/installed.php
r3292236 r3296162 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 386a283d6dbcea8222372b86189fd1edd9d3c35a',6 'reference' => 'd88f98c3285c2a216891647be81bfc6475437920', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 386a283d6dbcea8222372b86189fd1edd9d3c35a',16 'reference' => 'd88f98c3285c2a216891647be81bfc6475437920', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
shipping-manager/trunk/views/settings/pages/general.php
r3291937 r3296162 100 100 ?> 101 101 102 <?php do_action( 'tpsm_license_activation_field' ); ?> 103 102 104 <div class="tpsm-save-button"> 103 105 <button type="submit" name="<?php echo esc_attr( $submit_button ); ?>"><?php esc_html_e( 'Save Settings', 'shipping-manager' ); ?></button> 104 106 </div> 107 105 108 </form> 106 109 </div> -
shipping-manager/trunk/views/settings/parts/main.php
r3291937 r3296162 18 18 // Attempt to retrieve the template for the active settings page 19 19 $template = Utility::get_template( 'settings/pages/' . $key . '.php', $args ); 20 $pro_template = Utility::get_pro_template( 'settings/pages/' . $key . '.php', $args ); 20 21 21 22 // If a valid template is returned, output it 22 23 if ( $template ) { 23 24 echo $template; 24 25 // Otherwise, show an upgrade message prompting for the Pro version25 } else if( $pro_template ) { 26 echo $pro_template; 26 27 } else { 27 28 ?>
Note: See TracChangeset
for help on using the changeset viewer.