Merge pull request #1047 from foxrunsoftware/master

Order Number Changes
This commit is contained in:
Mike Jolley 2012-05-16 02:40:37 -07:00
commit 00d6ab00a6
4 changed files with 7 additions and 7 deletions

View File

@ -77,7 +77,7 @@ function woocommerce_custom_order_columns($column) {
$user = __('Guest', 'woocommerce'); $user = __('Guest', 'woocommerce');
endif; endif;
echo '<a href="'.admin_url('post.php?post='.$post->ID.'&action=edit').'"><strong>'.sprintf( __('Order #%s', 'woocommerce'), $post->ID ).'</strong></a> ' . __('made by', 'woocommerce') . ' ' . $user; echo '<a href="'.admin_url('post.php?post='.$post->ID.'&action=edit').'"><strong>'.sprintf( __('Order %s', 'woocommerce'), $order->get_order_number() ).'</strong></a> ' . __('made by', 'woocommerce') . ' ' . $user;
if ($order->billing_email) : if ($order->billing_email) :
echo '<small class="meta">'.__('Email:', 'woocommerce') . ' ' . '<a href="' . esc_url( 'mailto:'.$order->billing_email ).'">'.esc_html( $order->billing_email ).'</a></small>'; echo '<small class="meta">'.__('Email:', 'woocommerce') . ' ' . '<a href="' . esc_url( 'mailto:'.$order->billing_email ).'">'.esc_html( $order->billing_email ).'</a></small>';
@ -330,7 +330,7 @@ function woocommerce_shop_order_search_custom_fields( $wp ) {
if( !isset( $wp->query_vars['s'] ) || !$wp->query_vars['s'] ) return $wp; if( !isset( $wp->query_vars['s'] ) || !$wp->query_vars['s'] ) return $wp;
if ($wp->query_vars['post_type']!='shop_order') return $wp; if ($wp->query_vars['post_type']!='shop_order') return $wp;
$search_fields = array( $search_fields = apply_filters( 'woocommerce_shop_order_search_fields', array(
'_order_key', '_order_key',
'_billing_first_name', '_billing_first_name',
'_billing_last_name', '_billing_last_name',
@ -344,7 +344,7 @@ function woocommerce_shop_order_search_custom_fields( $wp ) {
'_billing_email', '_billing_email',
'_order_items', '_order_items',
'_billing_phone' '_billing_phone'
); ) );
// Query matching custom fields - this seems faster than meta_query // Query matching custom fields - this seems faster than meta_query
$post_ids = $wpdb->get_col($wpdb->prepare('SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key IN ('.'"'.implode('","', $search_fields).'"'.') AND meta_value LIKE "%%%s%%"', esc_attr($_GET['s']) )); $post_ids = $wpdb->get_col($wpdb->prepare('SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key IN ('.'"'.implode('","', $search_fields).'"'.') AND meta_value LIKE "%%%s%%"', esc_attr($_GET['s']) ));

View File

@ -52,7 +52,7 @@ function woocommerce_order_data_meta_box($post) {
<div class="order_data_left"> <div class="order_data_left">
<h2><?php _e('Order Details', 'woocommerce'); ?> &mdash; #<?php echo $thepostid; ?></h2> <h2><?php _e('Order Details', 'woocommerce'); ?> &mdash; <?php echo $order->get_order_number(); ?></h2>
<p class="form-field"><label for="order_status"><?php _e('Order status:', 'woocommerce') ?></label> <p class="form-field"><label for="order_status"><?php _e('Order status:', 'woocommerce') ?></label>
<select id="order_status" name="order_status" class="chosen_select"> <select id="order_status" name="order_status" class="chosen_select">

View File

@ -121,7 +121,7 @@ class WC_Email {
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
$subject = apply_filters( 'woocommerce_email_subject_new_order', sprintf( __( '[%s] New Customer Order (# %s)', 'woocommerce' ), $blogname, $order_id ), $order ); $subject = apply_filters( 'woocommerce_email_subject_new_order', sprintf( __( '[%s] New Customer Order (%s)', 'woocommerce' ), $blogname, $order->get_order_number() ), $order );
// Buffer // Buffer
ob_start(); ob_start();

View File

@ -27,10 +27,10 @@ function woocommerce_order_tracking( $atts ) {
$woocommerce->verify_nonce( 'order_tracking' ); $woocommerce->verify_nonce( 'order_tracking' );
if (isset($_POST['orderid']) && $_POST['orderid'] > 0) $order_id = (int) $_POST['orderid']; else $order_id = 0; if (isset($_POST['orderid']) && $_POST['orderid']) $order_id = $_POST['orderid']; else $order_id = 0;
if (isset($_POST['order_email']) && $_POST['order_email']) $order_email = trim($_POST['order_email']); else $order_email = ''; if (isset($_POST['order_email']) && $_POST['order_email']) $order_email = trim($_POST['order_email']); else $order_email = '';
$order = new WC_Order( $order_id ); $order = new WC_Order( apply_filters( 'woocommerce_shortcode_order_tracking_order_id', $order_id ) );
if ($order->id && $order_email) : if ($order->id && $order_email) :