Changeset 3283903
- Timestamp:
- 04/29/2025 08:17:09 AM (11 months ago)
- Location:
- uafrica-shipping/trunk
- Files:
-
- 4 edited
-
app/class-shipping.php (modified) (1 diff)
-
app/class-woocommerce.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
uafrica-shipping.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uafrica-shipping/trunk/app/class-shipping.php
r3267713 r3283903 57 57 ), 58 58 'hide' => array( 59 'title' => __( 'Hide WooCommerce Shipping Rates', 'uafrica-shipping' ),59 'title' => __( 'Hide WooCommerce shipping rates', 'uafrica-shipping' ), 60 60 'type' => 'checkbox', 61 61 'description' => __( 'Hide other WooCommerce shipping rates if Bob Go returns rates.', 'uafrica-shipping' ), -
uafrica-shipping/trunk/app/class-woocommerce.php
r3267713 r3283903 245 245 246 246 if ( ! empty($uafrica_shipping_settings['Additional_rate_info']) && $uafrica_shipping_settings['Additional_rate_info'] === 'yes') { 247 // Get shipping rates for the current package 248 $available_shipping_methods = WC()->session->get('shipping_for_package_0')['rates']; 249 250 foreach ($available_shipping_methods as $rate_id => $rate) { 251 $meta_data = self::get_shipping_metadata($rate); 252 253 $deliveryTimeFrame = self::calculate_delivery_timeframe($meta_data); 254 $description = ! empty($meta_data['method_description']) ? $meta_data['method_description'] : ''; 255 256 // Construct the description output 257 $descriptions[$rate_id] = self::format_description_output($deliveryTimeFrame, $description); 258 } 247 // Get shipping package information from the session 248 $shipping_package = WC()->session->get('shipping_for_package_0'); 249 250 // Check if the shipping package and rates exist before accessing 251 if ( isset($shipping_package['rates']) && is_array($shipping_package['rates']) ) { 252 $available_shipping_methods = $shipping_package['rates']; 253 254 foreach ($available_shipping_methods as $rate_id => $rate) { 255 $meta_data = self::get_shipping_metadata($rate); 256 257 $deliveryTimeFrame = self::calculate_delivery_timeframe($meta_data); 258 $description = !empty($meta_data['method_description']) ? $meta_data['method_description'] : ''; 259 260 // Construct the description output 261 $descriptions[$rate_id] = self::format_description_output($deliveryTimeFrame, $description); 262 } 263 } 259 264 } 260 265 -
uafrica-shipping/trunk/readme.txt
r3268433 r3283903 6 6 Tested up to: 6.7 7 7 Requires PHP: 7.0.0 8 Stable tag: 3.0. 728 Stable tag: 3.0.81 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 == Changelog == 79 79 80 = 3.0.81 = 81 * Fix handling rates in the shipping package 82 80 83 = 3.0.72 = 81 84 * Declare support for WordPress version 6.7 -
uafrica-shipping/trunk/uafrica-shipping.php
r3268433 r3283903 13 13 * Requires at least: 5.0 14 14 * Requires PHP: 7.0 15 * Version: 3.0. 7215 * Version: 3.0.81 16 16 * License: GPLv2 or later 17 17 * … … 25 25 */ 26 26 27 define( 'UAFRICA_SHIPPING_VERSION', '3.0. 72' );27 define( 'UAFRICA_SHIPPING_VERSION', '3.0.81' ); 28 28 // Endpoints for tracking orders. 29 29 define( 'UAFRICA_SHIPPING_API_TRACKING_V3', 'https://api.bobgo.co.za/tracking?channel=DOMAIN&tracking_reference=NUMBER' );
Note: See TracChangeset
for help on using the changeset viewer.