WordPress.org

Plugin Directory

Changeset 472887


Ignore:
Timestamp:
12/09/11 16:50:57 (2 years ago)
Author:
woothemes
Message:

1.3.2

Location:
woocommerce/trunk
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • woocommerce/trunk/admin/admin-dashboard.php

    r459016 r472887  
    5656 
    5757function woocommerce_right_now() { 
    58  
    59     $woocommerce_orders = &new woocommerce_orders(); 
     58    $pending_count      = get_term_by( 'slug', 'pending', 'shop_order_status' )->count; 
     59    $completed_count    = get_term_by( 'slug', 'completed', 'shop_order_status' )->count; 
     60    $on_hold_count      = get_term_by( 'slug', 'on-hold', 'shop_order_status' )->count; 
     61    $processing_count   = get_term_by( 'slug', 'processing', 'shop_order_status' )->count; 
    6062    ?> 
    6163    </table> 
     
    6365    <table> 
    6466        <tr> 
    65             <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=pending"><span class="total-count"><?php echo $woocommerce_orders->pending_count; ?></span></a></td> 
     67            <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=pending"><span class="total-count"><?php echo $pending_count; ?></span></a></td> 
    6668            <td class="last t"><a class="pending" href="edit.php?post_type=shop_order&shop_order_status=pending"><?php _e('Pending', 'woothemes'); ?></a></td> 
    6769        </tr> 
    6870        <tr> 
    69             <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=on-hold"><span class="total-count"><?php echo $woocommerce_orders->on_hold_count; ?></span></a></td> 
     71            <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=on-hold"><span class="total-count"><?php echo $on_hold_count; ?></span></a></td> 
    7072            <td class="last t"><a class="onhold" href="edit.php?post_type=shop_order&shop_order_status=on-hold"><?php _e('On-Hold', 'woothemes'); ?></a></td> 
    7173        </tr> 
    7274        <tr> 
    73             <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=processing"><span class="total-count"><?php echo $woocommerce_orders->processing_count; ?></span></a></td> 
     75            <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=processing"><span class="total-count"><?php echo $processing_count; ?></span></a></td> 
    7476            <td class="last t"><a class="processing" href="edit.php?post_type=shop_order&shop_order_status=processing"><?php _e('Processing', 'woothemes'); ?></a></td> 
    7577        </tr> 
    7678        <tr> 
    77             <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=completed"><span class="total-count"><?php echo $woocommerce_orders->completed_count; ?></span></a></td> 
     79            <td class="b"><a href="edit.php?post_type=shop_order&shop_order_status=completed"><span class="total-count"><?php echo $completed_count; ?></span></a></td> 
    7880            <td class="last t"><a class="complete" href="edit.php?post_type=shop_order&shop_order_status=completed"><?php _e('Completed', 'woothemes'); ?></a></td> 
    7981        </tr> 
  • woocommerce/trunk/admin/admin-init.php

    r472505 r472887  
    244244 
    245245/** 
     246 * Fix 'insert into post' buttons for images 
     247 **/ 
     248add_filter('get_media_item_args', 'woocommerce_allow_img_insertion'); 
     249 
     250function woocommerce_allow_img_insertion($vars) { 
     251    $vars['send'] = true; // 'send' as in "Send to Editor" 
     252    return($vars); 
     253} 
     254 
     255/** 
    246256 * Duplicate a product action 
    247257 * 
  • woocommerce/trunk/admin/admin-reports.php

    r472505 r472887  
    10691069        $product_totals = array(); 
    10701070         
     1071        // Get ID's related to product 
     1072        $chosen_product = &new woocommerce_product( $chosen_product_id ); 
     1073        $child_ids = $chosen_product->get_children(); 
     1074         
    10711075        if ($orders) : 
    10721076            foreach ($orders as $order) : 
     
    10741078                $order_items = (array) get_post_meta( $order->ID, '_order_items', true ); 
    10751079                foreach ($order_items as $item) : 
    1076                     if ($item['id']!=$chosen_product_id) continue; 
     1080                    if ($item['id']!=$chosen_product_id && !in_array($item['id'], $child_ids)) continue; 
    10771081                    $product_sales[$date] = isset($product_sales[$date]) ? $product_sales[$date] + $item['qty'] : $item['qty']; 
    10781082                    $product_totals[$date] = isset($product_totals[$date]) ? $product_totals[$date] + ($item['qty'] * $item['cost']) : ($item['qty'] * $item['cost']); 
  • woocommerce/trunk/classes/customer.class.php

    r472505 r472887  
    33 * Customer 
    44 *  
    5  * The WooCommerce custoemr class handles storage of the current customer's data, such as location. 
     5 * The WooCommerce customer class handles storage of the current customer's data, such as location. 
    66 * 
    77 * @class woocommerce_customer 
     
    211211         
    212212    } 
    213      
     213 
    214214} 
  • woocommerce/trunk/classes/shipping/shipping.class.php

    r472505 r472887  
    4141             
    4242            $args = array( 
    43                 'hide_empty' => '1' 
     43                'hide_empty' => '0' 
    4444            ); 
    4545            $classes = get_terms( 'product_shipping_class', $args ); 
  • woocommerce/trunk/readme.txt

    r472505 r472887  
    55Requires at least: 3.1 
    66Tested up to: 3.3 
    7 Stable tag: 1.3.1 
     7Stable tag: 1.3.2 
    88 
    99An e-commerce toolkit that helps you sell anything. Beautifully. 
     
    8282 
    8383== Changelog == 
     84 
     85= 1.3.2 - 09/12/2011 =  
     86* Fixed error when adding an order manually 
     87* Dumped the orders class (hardly used) 
     88* Shipping classes can be set up without assigning products first 
     89* Product reports: Combines children so grouped products have stats 
    8490 
    8591= 1.3.1 - 08/12/2011 = 
  • woocommerce/trunk/shortcodes/shortcode-my_account.php

    r472505 r472887  
    4747        <h2><?php _e('Recent Orders', 'woothemes'); ?></h2> 
    4848        <?php 
    49         $woocommerce_orders = &new woocommerce_orders(); 
    50         $woocommerce_orders->get_customer_orders( get_current_user_id(), $recent_orders ); 
    51         if ($woocommerce_orders->orders) : 
     49        $args = array( 
     50            'numberposts'     => $recent_orders, 
     51            'meta_key'        => '_customer_user', 
     52            'meta_value'      => get_current_user_id(), 
     53            'post_type'       => 'shop_order', 
     54            'post_status'     => 'publish'  
     55        ); 
     56        $customer_orders = get_posts($args); 
     57        if ($customer_orders) : 
    5258        ?> 
    5359            <table class="shop_table my_account_orders"> 
     
    6470                 
    6571                <tbody><?php 
    66                     foreach ($woocommerce_orders->orders as $order) : 
     72                    foreach ($customer_orders as $customer_order) : 
     73                        $order = &new woocommerce_order(); 
     74                        $order->populate($customer_order); 
    6775                        ?><tr class="order"> 
    6876                            <td><?php echo $order->id; ?></td> 
  • woocommerce/trunk/woocommerce.php

    r472505 r472887  
    44Plugin URI: http://www.woothemes.com/woocommerce/ 
    55Description: An eCommerce plugin for wordpress. 
    6 Version: 1.3.1 
     6Version: 1.3.2 
    77Author: WooThemes 
    88Author URI: http://woothemes.com 
     
    1616 * Constants 
    1717 **/  
    18 define("WOOCOMMERCE_VERSION", "1.3.1"); 
     18define("WOOCOMMERCE_VERSION", "1.3.2"); 
    1919if (!defined('WOOCOMMERCE_TEMPLATE_URL')) define('WOOCOMMERCE_TEMPLATE_URL', 'woocommerce/');    
    2020 
     
    4444 **/ 
    4545if (defined('DOING_AJAX')) : 
    46     include_once( 'woocommerce_ajax.php' ); 
     46    include_once( 'woocommerce_ajax.php' );                 // Ajax functions for admin and the front-end 
    4747endif; 
    4848 
    4949if ( !is_admin() || defined('DOING_AJAX') ) : 
    50     include_once( 'woocommerce_templates.php' ); 
    51     include_once( 'woocommerce_template_actions.php' ); 
    52     include_once( 'shortcodes/shortcodes-init.php' ); 
    53     include_once( 'classes/woocommerce_query.class.php' ); 
    54     add_action( 'init', 'include_template_functions', 99 ); 
     50    include_once( 'woocommerce_template_actions.php' );     // Template actions used on the front-end 
     51    include_once( 'shortcodes/shortcodes-init.php' );       // Init the shortcodes 
     52    include_once( 'classes/woocommerce_query.class.php' );  // The main store queries 
     53    add_action( 'init', 'include_template_functions', 99 ); // Defer loading template functions so functions are pluggable by themes 
    5554endif; 
    5655 
    57 include_once( 'woocommerce_taxonomy.php' ); 
    58 include_once( 'widgets/widgets-init.php' ); 
    59 include_once( 'woocommerce_actions.php' ); 
    60 include_once( 'woocommerce_emails.php' ); 
    61 include_once( 'classes/cart.class.php' ); 
    62 include_once( 'classes/countries.class.php' ); 
    63 include_once( 'classes/coupons.class.php' ); 
    64 include_once( 'classes/customer.class.php' );  
    65 include_once( 'classes/order.class.php' ); 
    66 include_once( 'classes/orders.class.php' ); 
    67 include_once( 'classes/product.class.php' ); 
    68 include_once( 'classes/product_variation.class.php' ); 
    69 include_once( 'classes/tax.class.php' ); 
    70 include_once( 'classes/woocommerce.class.php' ); 
     56include_once( 'classes/cart.class.php' );               // The main cart class 
     57include_once( 'classes/coupons.class.php' );            // Coupons class 
     58include_once( 'classes/customer.class.php' );           // Customer class 
     59include_once( 'woocommerce_templates.php' );            // Loads template files - used in admin and front-end 
     60include_once( 'woocommerce_taxonomy.php' );             // Defines post formats and taxonomies 
     61include_once( 'widgets/widgets-init.php' );             // Widget classes 
     62include_once( 'woocommerce_actions.php' );              // Contains action hooks and functions for various events 
     63include_once( 'woocommerce_emails.php' );               // Email template handlers 
     64include_once( 'classes/countries.class.php' );          // Defines countries and states 
     65include_once( 'classes/order.class.php' );              // Single order class 
     66include_once( 'classes/product.class.php' );            // Product class 
     67include_once( 'classes/product_variation.class.php' );  // Product variation class 
     68include_once( 'classes/tax.class.php' );                // Tax class - used in admin and on the front-end 
     69include_once( 'classes/woocommerce.class.php' );        // Main WooCommerce class 
    7170 
    7271/** 
     
    399398 
    400399/** 
    401  * Fix 'insert into post' buttons for images 
    402  **/ 
    403 add_filter('get_media_item_args', 'woocommerce_allow_img_insertion'); 
    404  
    405 function woocommerce_allow_img_insertion($vars) { 
    406     $vars['send'] = true; // 'send' as in "Send to Editor" 
    407     return($vars); 
    408 } 
    409  
    410 /** 
    411400 * Currency 
    412401 **/ 
Note: See TracChangeset for help on using the changeset viewer.