Changeset 3459455
- Timestamp:
- 02/12/2026 01:23:50 AM (4 weeks ago)
- Location:
- music-store/trunk
- Files:
-
- 5 edited
-
changelog.txt (modified) (1 diff)
-
ms-core/ms-woocommerce/ms-woocommerce.php (modified) (2 diffs)
-
ms-layouts/03/style.css (modified) (1 diff)
-
music-store.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
music-store/trunk/changelog.txt
r3458583 r3459455 1 1 == Changelog == 2 3 = 1.3.1 = 4 5 * Modifies the WooCommerce integration module to ensure the compatibility with latest WooCommerce updates. 2 6 3 7 = 1.3.0 = -
music-store/trunk/ms-core/ms-woocommerce/ms-woocommerce.php
r2806821 r3459455 70 70 $values['data'] instanceof MSSong_WC 71 71 ) { 72 $item = new WC_Order_Item_Product_MS(); 73 } 72 73 $new_item = new WC_Order_Item_Product_MS(); 74 75 // Copy standard props 76 $new_item->set_props( $item->get_data() ); 77 78 // Proper WooCommerce way to assign product 79 $product = $values['data']; 80 81 $new_item->set_product( $product ); 82 $new_item->set_product_id( $product->get_id() ); 83 $new_item->set_variation_id( ! empty( $values['variation_id'] ) ? $values['variation_id'] : 0 ); 84 85 return $new_item; 86 } 87 74 88 return $item; 75 89 } // End ms_woocommerce_checkout_create_order_line_item_object 76 90 77 91 function ms_woocommerce_get_order_item_classname( $classname, $item_type, $id ) { 78 global $wpdb; 79 80 if ( 'WC_Order_Item_Product' == $classname ) { 81 $post_type = $wpdb->get_var( $wpdb->prepare( 'SELECT posts.post_type FROM ' . $wpdb->prefix . 'wc_order_product_lookup product_loockup INNER JOIN ' . $wpdb->posts . ' posts ON (product_loockup.product_id=posts.ID) WHERE order_item_id=%d', $id ) ); 82 83 if ( ! empty( $post_type ) && 'ms_song' == $post_type ) { 84 return 'WC_Order_Item_Product_MS'; 85 } 86 } 92 if ( 'WC_Order_Item_Product' !== $classname ) { 93 return $classname; 94 } 95 96 $product_id = wc_get_order_item_meta( $id, '_product_id', true ); 97 98 if ( ! $product_id ) { 99 return $classname; 100 } 101 102 $post = get_post( $product_id ); 103 104 if ( $post && $post->post_type === 'ms_song' ) { 105 return 'WC_Order_Item_Product_MS'; 106 } 107 87 108 return $classname; 88 109 … … 217 238 ); 218 239 240 add_action( 241 'woocommerce_checkout_create_order_line_item', 242 function( $item, $cart_item_key, $values ) { 243 if ( isset( $values['data'] ) && $values['data'] instanceof MSSong_WC ) { 244 $item->set_product_id( $values['data']->get_id() ); 245 } 246 }, 247 20, 248 3 249 ); 250 219 251 // EDIT GLOBAL SETTINGS 220 252 -
music-store/trunk/ms-layouts/03/style.css
r2334552 r3459455 19 19 .music-store-header 20 20 { 21 z-index: 9999 9;21 z-index: 9999; 22 22 min-height:48px; 23 23 } -
music-store/trunk/music-store.php
r3458583 r3459455 3 3 Plugin Name: Music Store - WordPress eCommerce 4 4 Plugin URI: http://musicstore.dwbooster.com 5 Version: 1.3. 05 Version: 1.3.1 6 6 Author: CodePeople 7 7 Author URI: http://musicstore.dwbooster.com … … 121 121 class MusicStore { 122 122 123 public static $version = '1.3. 0';123 public static $version = '1.3.1'; 124 124 125 125 private $music_store_slug = 'music-store-menu'; -
music-store/trunk/readme.txt
r3458583 r3459455 5 5 Requires at least: 3.5.0 6 6 Tested up to: 6.9 7 Stable tag: 1.3. 07 Stable tag: 1.3.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 577 577 == Changelog == 578 578 579 = 1.3.1 = 580 581 * Modifies the WooCommerce integration module to ensure the compatibility with latest WooCommerce updates. 582 579 583 = 1.3.0 = 580 584
Note: See TracChangeset
for help on using the changeset viewer.