Merge branch 'master' of https://github.com/woothemes/woocommerce
|
@ -59,7 +59,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|||
else
|
||||
$file = ABSPATH . $this->file_url;
|
||||
|
||||
add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) );
|
||||
add_filter( 'http_request_timeout', array( $this, 'bump_request_timeout' ) );
|
||||
|
||||
if ( function_exists( 'gc_enable' ) )
|
||||
gc_enable();
|
||||
|
|
|
@ -82,7 +82,7 @@ function woocommerce_edit_product_columns( $columns ) {
|
|||
unset( $columns['title'], $columns['comments'], $columns['date'] );
|
||||
|
||||
$columns["cb"] = "<input type=\"checkbox\" />";
|
||||
$columns["thumb"] = __( 'Image', 'woocommerce' );
|
||||
$columns["thumb"] = '<img src="' . $woocommerce->plugin_url() . '/assets/images/image.png" alt="' . __( 'Image', 'woocommerce' ) . '" class="tips" data-tip="' . __( 'Image', 'woocommerce' ) . '" width="14" height="14" />';
|
||||
|
||||
$columns["name"] = __( 'Name', 'woocommerce' );
|
||||
|
||||
|
@ -114,12 +114,14 @@ add_filter('manage_edit-product_columns', 'woocommerce_edit_product_columns');
|
|||
* @return void
|
||||
*/
|
||||
function woocommerce_custom_product_columns( $column ) {
|
||||
global $post, $woocommerce;
|
||||
$product = get_product($post);
|
||||
global $post, $woocommerce, $the_product;
|
||||
|
||||
if ( empty( $the_product ) || $the_product->id != $post->ID )
|
||||
$the_product = get_product( $post );
|
||||
|
||||
switch ($column) {
|
||||
case "thumb" :
|
||||
echo $product->get_image();
|
||||
echo '<a href="' . get_edit_post_link( $post->ID ) . '">' . $the_product->get_image() . '</a>';
|
||||
break;
|
||||
case "name" :
|
||||
$edit_link = get_edit_post_link( $post->ID );
|
||||
|
@ -183,51 +185,51 @@ function woocommerce_custom_product_columns( $column ) {
|
|||
echo '
|
||||
<div class="hidden" id="woocommerce_inline_' . $post->ID . '">
|
||||
<div class="menu_order">' . $post->menu_order . '</div>
|
||||
<div class="sku">' . $product->sku . '</div>
|
||||
<div class="regular_price">' . $product->regular_price . '</div>
|
||||
<div class="sale_price">' . $product->sale_price . '</div>
|
||||
<div class="weight">' . $product->weight . '</div>
|
||||
<div class="length">' . $product->length . '</div>
|
||||
<div class="width">' . $product->width . '</div>
|
||||
<div class="height">' . $product->height . '</div>
|
||||
<div class="visibility">' . $product->visibility . '</div>
|
||||
<div class="stock_status">' . $product->stock_status . '</div>
|
||||
<div class="stock">' . $product->stock . '</div>
|
||||
<div class="manage_stock">' . $product->manage_stock . '</div>
|
||||
<div class="featured">' . $product->featured . '</div>
|
||||
<div class="product_type">' . $product->product_type . '</div>
|
||||
<div class="product_is_virtual">' . $product->virtual . '</div>
|
||||
<div class="sku">' . $the_product->sku . '</div>
|
||||
<div class="regular_price">' . $the_product->regular_price . '</div>
|
||||
<div class="sale_price">' . $the_product->sale_price . '</div>
|
||||
<div class="weight">' . $the_product->weight . '</div>
|
||||
<div class="length">' . $the_product->length . '</div>
|
||||
<div class="width">' . $the_product->width . '</div>
|
||||
<div class="height">' . $the_product->height . '</div>
|
||||
<div class="visibility">' . $the_product->visibility . '</div>
|
||||
<div class="stock_status">' . $the_product->stock_status . '</div>
|
||||
<div class="stock">' . $the_product->stock . '</div>
|
||||
<div class="manage_stock">' . $the_product->manage_stock . '</div>
|
||||
<div class="featured">' . $the_product->featured . '</div>
|
||||
<div class="product_type">' . $the_product->product_type . '</div>
|
||||
<div class="product_is_virtual">' . $the_product->virtual . '</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
break;
|
||||
case "sku" :
|
||||
if ($product->get_sku()) echo $product->get_sku(); else echo '<span class="na">–</span>';
|
||||
if ($the_product->get_sku()) echo $the_product->get_sku(); else echo '<span class="na">–</span>';
|
||||
break;
|
||||
case "product_type" :
|
||||
if( $product->product_type == 'grouped' ):
|
||||
echo '<span class="product-type tips '.$product->product_type.'" data-tip="' . __( 'Grouped', 'woocommerce' ) . '"></span>';
|
||||
elseif ( $product->product_type == 'external' ):
|
||||
echo '<span class="product-type tips '.$product->product_type.'" data-tip="' . __( 'External/Affiliate', 'woocommerce' ) . '"></span>';
|
||||
elseif ( $product->product_type == 'simple' ):
|
||||
if( $the_product->product_type == 'grouped' ):
|
||||
echo '<span class="product-type tips '.$the_product->product_type.'" data-tip="' . __( 'Grouped', 'woocommerce' ) . '"></span>';
|
||||
elseif ( $the_product->product_type == 'external' ):
|
||||
echo '<span class="product-type tips '.$the_product->product_type.'" data-tip="' . __( 'External/Affiliate', 'woocommerce' ) . '"></span>';
|
||||
elseif ( $the_product->product_type == 'simple' ):
|
||||
|
||||
if ($product->is_virtual()) {
|
||||
if ($the_product->is_virtual()) {
|
||||
echo '<span class="product-type tips virtual" data-tip="' . __( 'Virtual', 'woocommerce' ) . '"></span>';
|
||||
} elseif ($product->is_downloadable()) {
|
||||
} elseif ($the_product->is_downloadable()) {
|
||||
echo '<span class="product-type tips downloadable" data-tip="' . __( 'Downloadable', 'woocommerce' ) . '"></span>';
|
||||
} else {
|
||||
echo '<span class="product-type tips '.$product->product_type.'" data-tip="' . __( 'Simple', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips '.$the_product->product_type.'" data-tip="' . __( 'Simple', 'woocommerce' ) . '"></span>';
|
||||
}
|
||||
|
||||
elseif ( $product->product_type == 'variable' ):
|
||||
echo '<span class="product-type tips '.$product->product_type.'" data-tip="' . __( 'Variable', 'woocommerce' ) . '"></span>';
|
||||
elseif ( $the_product->product_type == 'variable' ):
|
||||
echo '<span class="product-type tips '.$the_product->product_type.'" data-tip="' . __( 'Variable', 'woocommerce' ) . '"></span>';
|
||||
else:
|
||||
// Assuming that we have other types in future
|
||||
echo '<span class="product-type tips '.$product->product_type.'" data-tip="' . ucwords($product->product_type) . '"></span>';
|
||||
echo '<span class="product-type tips '.$the_product->product_type.'" data-tip="' . ucwords($the_product->product_type) . '"></span>';
|
||||
endif;
|
||||
break;
|
||||
case "price":
|
||||
if ($product->get_price_html()) echo $product->get_price_html(); else echo '<span class="na">–</span>';
|
||||
if ($the_product->get_price_html()) echo $the_product->get_price_html(); else echo '<span class="na">–</span>';
|
||||
break;
|
||||
case "product_cat" :
|
||||
case "product_tag" :
|
||||
|
@ -244,20 +246,20 @@ function woocommerce_custom_product_columns( $column ) {
|
|||
case "featured" :
|
||||
$url = wp_nonce_url( admin_url('admin-ajax.php?action=woocommerce-feature-product&product_id=' . $post->ID), 'woocommerce-feature-product' );
|
||||
echo '<a href="'.$url.'" title="'.__( 'Change', 'woocommerce' ) .'">';
|
||||
if ($product->is_featured()) echo '<a href="'.$url.'"><img src="'.$woocommerce->plugin_url().'/assets/images/featured.png" alt="yes" height="14" width="14" />';
|
||||
if ($the_product->is_featured()) echo '<a href="'.$url.'"><img src="'.$woocommerce->plugin_url().'/assets/images/featured.png" alt="yes" height="14" width="14" />';
|
||||
else echo '<img src="'.$woocommerce->plugin_url().'/assets/images/featured-off.png" alt="no" height="14" width="14" />';
|
||||
echo '</a>';
|
||||
break;
|
||||
case "is_in_stock" :
|
||||
|
||||
if ($product->is_in_stock()) {
|
||||
if ($the_product->is_in_stock()) {
|
||||
echo '<mark class="instock">' . __( 'In stock', 'woocommerce' ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="outofstock">' . __( 'Out of stock', 'woocommerce' ) . '</mark>';
|
||||
}
|
||||
|
||||
if ( $product->managing_stock() ) :
|
||||
echo ' × ' . $product->get_total_stock();
|
||||
if ( $the_product->managing_stock() ) :
|
||||
echo ' × ' . $the_product->get_total_stock();
|
||||
endif;
|
||||
|
||||
break;
|
||||
|
@ -1197,3 +1199,24 @@ function woocommerce_disable_checked_ontop( $args ) {
|
|||
}
|
||||
|
||||
add_filter( 'wp_terms_checklist_args', 'woocommerce_disable_checked_ontop' );
|
||||
|
||||
/**
|
||||
* Change label for insert buttons.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $translation
|
||||
* @param mixed $original
|
||||
* @return void
|
||||
*/
|
||||
function woocommerce_change_insert_into_post( $strings ) {
|
||||
global $post_type;
|
||||
|
||||
if ( $post_type == 'product' ) {
|
||||
$strings['insertIntoPost'] = __( 'Insert into product', 'woocommerce' );
|
||||
$strings['uploadedToThisPost'] = __( 'Uploaded to this product', 'woocommerce' );
|
||||
}
|
||||
|
||||
return $strings;
|
||||
}
|
||||
|
||||
add_filter( 'media_view_strings', 'woocommerce_change_insert_into_post' );
|
||||
|
|
|
@ -64,20 +64,21 @@ add_filter('manage_edit-shop_order_columns', 'woocommerce_edit_order_columns');
|
|||
* @return void
|
||||
*/
|
||||
function woocommerce_custom_order_columns( $column ) {
|
||||
global $post, $woocommerce, $the_order;
|
||||
|
||||
global $post, $woocommerce;
|
||||
$order = new WC_Order( $post->ID );
|
||||
if ( empty( $the_order ) || $the_order->id != $post->ID )
|
||||
$the_order = new WC_Order( $post->ID );
|
||||
|
||||
switch ( $column ) {
|
||||
case "order_status" :
|
||||
|
||||
printf( '<mark class="%s">%s</mark>', sanitize_title( $order->status ), esc_html__( $order->status, 'woocommerce' ) );
|
||||
printf( '<mark class="%s">%s</mark>', sanitize_title( $the_order->status ), esc_html__( $the_order->status, 'woocommerce' ) );
|
||||
|
||||
break;
|
||||
case "order_title" :
|
||||
|
||||
if ( $order->user_id )
|
||||
$user_info = get_userdata( $order->user_id );
|
||||
if ( $the_order->user_id )
|
||||
$user_info = get_userdata( $the_order->user_id );
|
||||
|
||||
if ( ! empty( $user_info ) ) {
|
||||
|
||||
|
@ -94,35 +95,35 @@ function woocommerce_custom_order_columns( $column ) {
|
|||
$user = __( 'Guest', 'woocommerce' );
|
||||
}
|
||||
|
||||
echo '<a href="' . admin_url( 'post.php?post=' . absint( $post->ID ) . '&action=edit' ) . '"><strong>' . sprintf( __( 'Order %s', 'woocommerce' ), esc_attr( $order->get_order_number() ) ) . '</strong></a> ' . __( 'made by', 'woocommerce' ) . ' ' . $user;
|
||||
echo '<a href="' . admin_url( 'post.php?post=' . absint( $post->ID ) . '&action=edit' ) . '"><strong>' . sprintf( __( 'Order %s', 'woocommerce' ), esc_attr( $the_order->get_order_number() ) ) . '</strong></a> ' . __( 'made by', 'woocommerce' ) . ' ' . $user;
|
||||
|
||||
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>';
|
||||
if ( $the_order->billing_email )
|
||||
echo '<small class="meta">' . __( 'Email:', 'woocommerce' ) . ' ' . '<a href="' . esc_url( 'mailto:' . $the_order->billing_email ) . '">' . esc_html( $the_order->billing_email ) . '</a></small>';
|
||||
|
||||
if ( $order->billing_phone )
|
||||
echo '<small class="meta">' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $order->billing_phone ) . '</small>';
|
||||
if ( $the_order->billing_phone )
|
||||
echo '<small class="meta">' . __( 'Tel:', 'woocommerce' ) . ' ' . esc_html( $the_order->billing_phone ) . '</small>';
|
||||
|
||||
break;
|
||||
case "billing_address" :
|
||||
if ( $order->get_formatted_billing_address() )
|
||||
echo '<a target="_blank" href="' . esc_url( 'http://maps.google.com/maps?&q=' . urlencode( $order->get_billing_address() ) . '&z=16' ) . '">' . esc_html( preg_replace( '#<br\s*/?>#i', ', ', $order->get_formatted_billing_address() ) ) .'</a>';
|
||||
if ( $the_order->get_formatted_billing_address() )
|
||||
echo '<a target="_blank" href="' . esc_url( 'http://maps.google.com/maps?&q=' . urlencode( $the_order->get_billing_address() ) . '&z=16' ) . '">' . esc_html( preg_replace( '#<br\s*/?>#i', ', ', $the_order->get_formatted_billing_address() ) ) .'</a>';
|
||||
else
|
||||
echo '–';
|
||||
|
||||
if ( $order->payment_method_title )
|
||||
echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $order->payment_method_title ) . '</small>';
|
||||
if ( $the_order->payment_method_title )
|
||||
echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . '</small>';
|
||||
break;
|
||||
case "shipping_address" :
|
||||
if ( $order->get_formatted_shipping_address() )
|
||||
echo '<a target="_blank" href="' . esc_url( 'http://maps.google.com/maps?&q=' . urlencode( $order->get_shipping_address() ) . '&z=16' ) . '">'. esc_html( preg_replace('#<br\s*/?>#i', ', ', $order->get_formatted_shipping_address() ) ) .'</a>';
|
||||
if ( $the_order->get_formatted_shipping_address() )
|
||||
echo '<a target="_blank" href="' . esc_url( 'http://maps.google.com/maps?&q=' . urlencode( $the_order->get_shipping_address() ) . '&z=16' ) . '">'. esc_html( preg_replace('#<br\s*/?>#i', ', ', $the_order->get_formatted_shipping_address() ) ) .'</a>';
|
||||
else
|
||||
echo '–';
|
||||
|
||||
if ( $order->shipping_method_title )
|
||||
echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $order->shipping_method_title ) . '</small>';
|
||||
if ( $the_order->shipping_method_title )
|
||||
echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->shipping_method_title ) . '</small>';
|
||||
break;
|
||||
case "total_cost" :
|
||||
echo esc_html( strip_tags( $order->get_formatted_order_total() ) );
|
||||
echo esc_html( strip_tags( $the_order->get_formatted_order_total() ) );
|
||||
break;
|
||||
case "order_date" :
|
||||
|
||||
|
@ -147,18 +148,18 @@ function woocommerce_custom_order_columns( $column ) {
|
|||
|
||||
?><p>
|
||||
<?php
|
||||
do_action( 'woocommerce_admin_order_actions_start', $order );
|
||||
do_action( 'woocommerce_admin_order_actions_start', $the_order );
|
||||
|
||||
$actions = array();
|
||||
|
||||
if ( in_array( $order->status, array( 'pending', 'on-hold' ) ) )
|
||||
if ( in_array( $the_order->status, array( 'pending', 'on-hold' ) ) )
|
||||
$actions[] = array(
|
||||
'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce-mark-order-processing&order_id=' . $post->ID ), 'woocommerce-mark-order-processing' ),
|
||||
'name' => __( 'Processing', 'woocommerce' ),
|
||||
'action' => "processing"
|
||||
);
|
||||
|
||||
if ( in_array( $order->status, array( 'pending', 'on-hold', 'processing' ) ) )
|
||||
if ( in_array( $the_order->status, array( 'pending', 'on-hold', 'processing' ) ) )
|
||||
$actions[] = array(
|
||||
'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce-mark-order-complete&order_id=' . $post->ID ), 'woocommerce-mark-order-complete' ),
|
||||
'name' => __( 'Complete', 'woocommerce' ),
|
||||
|
@ -171,21 +172,21 @@ function woocommerce_custom_order_columns( $column ) {
|
|||
'action' => "view"
|
||||
);
|
||||
|
||||
$actions = apply_filters( 'woocommerce_admin_order_actions', $actions, $order );
|
||||
$actions = apply_filters( 'woocommerce_admin_order_actions', $actions, $the_order );
|
||||
|
||||
foreach ( $actions as $action ) {
|
||||
$image = ( isset( $action['image_url'] ) ) ? $action['image_url'] : $woocommerce->plugin_url() . '/assets/images/icons/' . $action['action'] . '.png';
|
||||
printf( '<a class="button tips" href="%s" data-tip="%s"><img src="%s" alt="%s" width="14" /></a>', esc_url( $action['url'] ), esc_attr( $action['name'] ), esc_attr( $image ), esc_attr( $action['name'] ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_admin_order_actions_end', $order );
|
||||
do_action( 'woocommerce_admin_order_actions_end', $the_order );
|
||||
?>
|
||||
</p><?php
|
||||
|
||||
break;
|
||||
case "note" :
|
||||
|
||||
if ( $order->customer_note )
|
||||
if ( $the_order->customer_note )
|
||||
echo '<img src="'.$woocommerce->plugin_url().'/assets/images/note.png" alt="yes" class="tips" data-tip="' . __( 'Yes', 'woocommerce' ) . '" width="14" height="14" />';
|
||||
else
|
||||
echo '<img src="'.$woocommerce->plugin_url().'/assets/images/note-off.png" alt="no" class="tips" data-tip="' . __( 'No', 'woocommerce' ) . '" width="14" height="14" />';
|
||||
|
|
|
@ -132,7 +132,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
<div class="file_path_field">
|
||||
<label><?php _e( 'File paths:', 'woocommerce' ); ?> <a class="tips" data-tip="<?php _e( 'Enter one or more File Paths, one per line, to make this variation a downloadable product, or leave blank.', 'woocommerce' ); ?>" href="#">[?]</a></label>
|
||||
<textarea style="float:left;" class="short file_paths" cols="20" rows="2" placeholder="<?php _e( 'File paths/URLs, one per line', 'woocommerce' ); ?>" name="variable_file_paths[<?php echo $loop; ?>]" wrap="off"><?php if ( isset( $_file_paths ) ) echo esc_textarea( $_file_paths ); ?></textarea>
|
||||
<input type="button" class="upload_file_button button" value="<?php _e( 'Upload a file', 'woocommerce' ); ?>" title="<?php _e( 'Upload', 'woocommerce' ); ?>" />
|
||||
<input type="button" class="upload_file_button button" value="<?php _e( 'Choose a file', 'woocommerce' ); ?>" title="<?php _e( 'Upload', 'woocommerce' ); ?>" data-choose="<?php _e( 'Choose a file', 'woocommerce' ); ?>" data-update="<?php _e( 'Insert file URL', 'woocommerce' ); ?>" value="<?php _e( 'Choose a file', 'woocommerce' ); ?>" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -329,7 +329,7 @@ function woocommerce_order_items_meta_box( $post ) {
|
|||
|
||||
$order = $theorder;
|
||||
|
||||
$data = get_post_custom( $post->ID );
|
||||
$data = get_post_meta( $post->ID );
|
||||
?>
|
||||
<div class="woocommerce_order_items_wrapper">
|
||||
<table cellpadding="0" cellspacing="0" class="woocommerce_order_items">
|
||||
|
@ -482,7 +482,7 @@ function woocommerce_order_totals_meta_box( $post ) {
|
|||
|
||||
$order = $theorder;
|
||||
|
||||
$data = get_post_custom( $post->ID );
|
||||
$data = get_post_meta( $post->ID );
|
||||
?>
|
||||
<div class="totals_group">
|
||||
<h4><span class="discount_total_display inline_total"></span><?php _e( 'Discounts', 'woocommerce' ); ?></h4>
|
||||
|
|
|
@ -74,6 +74,10 @@ function variable_product_type_options() {
|
|||
<a href="#" class="close_all"><?php _e( 'Close all', 'woocommerce' ); ?></a><a href="#" class="expand_all"><?php _e( 'Expand all', 'woocommerce' ); ?></a>
|
||||
<strong><?php _e( 'Bulk edit:', 'woocommerce' ); ?></strong>
|
||||
<select id="field_to_edit">
|
||||
<option value="toggle_enabled"><?php _e( 'Toggle "Enabled"', 'woocommerce' ); ?></option>
|
||||
<option value="toggle_downloadable"><?php _e( 'Toggle "Downloadable"', 'woocommerce' ); ?></option>
|
||||
<option value="toggle_virtual"><?php _e( 'Toggle "Virtual"', 'woocommerce' ); ?></option>
|
||||
<option value="delete_all"><?php _e( 'Delete all variations', 'woocommerce' ); ?></option>
|
||||
<option value="variable_regular_price"><?php _e( 'Prices', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price"><?php _e( 'Sale prices', 'woocommerce' ); ?></option>
|
||||
<option value="variable_stock"><?php _e( 'Stock', 'woocommerce' ); ?></option>
|
||||
|
@ -85,8 +89,7 @@ function variable_product_type_options() {
|
|||
<option value="variable_download_limit"><?php _e( 'Download limit', 'woocommerce' ); ?></option>
|
||||
<option value="variable_download_expiry"><?php _e( 'Download Expiry', 'woocommerce' ); ?></option>
|
||||
</select>
|
||||
<a class="button bulk_edit plus"><?php _e( 'Edit', 'woocommerce' ); ?></a>
|
||||
<a class="button toggle toggle_downloadable" href="#"><?php _e( 'Downloadable', 'woocommerce' ); ?></a> <a class="button toggle toggle_virtual" href="#"><?php _e( 'Virtual', 'woocommerce' ); ?></a> <a class="button toggle toggle_enabled" href="#"><?php _e( 'Enabled', 'woocommerce' ); ?></a> <a href="#" class="button delete_variations"><?php _e( 'Delete all', 'woocommerce' ); ?></a>
|
||||
<a class="button bulk_edit"><?php _e( 'Go', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<div class="woocommerce_variations wc-metaboxes">
|
||||
|
@ -131,7 +134,7 @@ function variable_product_type_options() {
|
|||
|
||||
$variation_id = absint( $variation->ID );
|
||||
$variation_post_status = esc_attr( $variation->post_status );
|
||||
$variation_data = get_post_custom( $variation_id );
|
||||
$variation_data = get_post_meta( $variation_id );
|
||||
$variation_data['variation_post_id'] = $variation_id;
|
||||
|
||||
// Grab shipping classes
|
||||
|
@ -344,71 +347,73 @@ function variable_product_type_options() {
|
|||
return false;
|
||||
});
|
||||
|
||||
jQuery('#variable_product_options').on('click', 'a.delete_variations', function(){
|
||||
var answer = confirm('<?php _e( 'Are you sure you want to delete all variations? This cannot be undone.', 'woocommerce' ); ?>');
|
||||
if (answer){
|
||||
jQuery('.wc-metaboxes-wrapper').on('click', 'a.bulk_edit', function(event){
|
||||
var field_to_edit = jQuery('select#field_to_edit').val();
|
||||
|
||||
var answer = confirm('<?php _e( 'Last warning, are you sure?', 'woocommerce' ); ?>');
|
||||
if ( field_to_edit == 'toggle_enabled' ) {
|
||||
var checkbox = jQuery('input[name^="variable_enabled"]');
|
||||
checkbox.attr('checked', !checkbox.attr('checked'));
|
||||
return false;
|
||||
}
|
||||
else if ( field_to_edit == 'toggle_downloadable' ) {
|
||||
var checkbox = jQuery('input[name^="variable_is_downloadable"]');
|
||||
checkbox.attr('checked', !checkbox.attr('checked'));
|
||||
jQuery('input.variable_is_downloadable').change();
|
||||
return false;
|
||||
}
|
||||
else if ( field_to_edit == 'toggle_virtual' ) {
|
||||
var checkbox = jQuery('input[name^="variable_is_virtual"]');
|
||||
checkbox.attr('checked', !checkbox.attr('checked'));
|
||||
jQuery('input.variable_is_virtual').change();
|
||||
return false;
|
||||
}
|
||||
else if ( field_to_edit == 'delete_all' ) {
|
||||
|
||||
if (answer) {
|
||||
var answer = confirm('<?php _e( 'Are you sure you want to delete all variations? This cannot be undone.', 'woocommerce' ); ?>');
|
||||
if (answer){
|
||||
|
||||
var variation_ids = [];
|
||||
var answer = confirm('<?php _e( 'Last warning, are you sure?', 'woocommerce' ); ?>');
|
||||
|
||||
jQuery('.woocommerce_variations .woocommerce_variation').block({ message: null, overlayCSS: { background: '#fff url(<?php echo $woocommerce->plugin_url(); ?>/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
|
||||
if (answer) {
|
||||
|
||||
jQuery('.woocommerce_variations .woocommerce_variation .remove_variation').each(function(){
|
||||
var variation_ids = [];
|
||||
|
||||
var variation = jQuery(this).attr('rel');
|
||||
if (variation>0) {
|
||||
variation_ids.push(variation);
|
||||
}
|
||||
});
|
||||
jQuery('.woocommerce_variations .woocommerce_variation').block({ message: null, overlayCSS: { background: '#fff url(<?php echo $woocommerce->plugin_url(); ?>/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
|
||||
|
||||
var data = {
|
||||
action: 'woocommerce_remove_variations',
|
||||
variation_ids: variation_ids,
|
||||
security: '<?php echo wp_create_nonce("delete-variations"); ?>'
|
||||
};
|
||||
jQuery('.woocommerce_variations .woocommerce_variation .remove_variation').each(function(){
|
||||
|
||||
jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', data, function(response) {
|
||||
jQuery('.woocommerce_variations .woocommerce_variation').fadeOut('300', function(){
|
||||
jQuery('.woocommerce_variations .woocommerce_variation').remove();
|
||||
var variation = jQuery(this).attr('rel');
|
||||
if (variation>0) {
|
||||
variation_ids.push(variation);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var data = {
|
||||
action: 'woocommerce_remove_variations',
|
||||
variation_ids: variation_ids,
|
||||
security: '<?php echo wp_create_nonce("delete-variations"); ?>'
|
||||
};
|
||||
|
||||
jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', data, function(response) {
|
||||
jQuery('.woocommerce_variations .woocommerce_variation').fadeOut('300', function(){
|
||||
jQuery('.woocommerce_variations .woocommerce_variation').remove();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
||||
var input_tag = jQuery('select#field_to_edit :selected').attr('rel') ? jQuery('select#field_to_edit :selected').attr('rel') : 'input';
|
||||
|
||||
var value = prompt("<?php _e( 'Enter a value', 'woocommerce' ); ?>");
|
||||
jQuery(input_tag + '[name^="' + field_to_edit + '"]').val( value );
|
||||
return false;
|
||||
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('a.bulk_edit').click(function() {
|
||||
var field_to_edit = jQuery('select#field_to_edit').val();
|
||||
var input_tag = jQuery('select#field_to_edit :selected').attr('rel') ? jQuery('select#field_to_edit :selected').attr('rel') : 'input';
|
||||
|
||||
var value = prompt("<?php _e( 'Enter a value', 'woocommerce' ); ?>");
|
||||
jQuery(input_tag + '[name^="' + field_to_edit + '"]').val( value );
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('a.toggle_virtual').click(function(){
|
||||
var checkbox = jQuery('input[name^="variable_is_virtual"]');
|
||||
checkbox.attr('checked', !checkbox.attr('checked'));
|
||||
jQuery('input.variable_is_virtual').change();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('a.toggle_downloadable').click(function(){
|
||||
var checkbox = jQuery('input[name^="variable_is_downloadable"]');
|
||||
checkbox.attr('checked', !checkbox.attr('checked'));
|
||||
jQuery('input.variable_is_downloadable').change();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('a.toggle_enabled').click(function(){
|
||||
var checkbox = jQuery('input[name^="variable_enabled"]');
|
||||
checkbox.attr('checked', !checkbox.attr('checked'));
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('#variable_product_options').on('change', 'input.variable_is_downloadable', function(){
|
||||
|
@ -459,53 +464,69 @@ function variable_product_type_options() {
|
|||
});
|
||||
};
|
||||
|
||||
var current_field_wrapper;
|
||||
// Uploader
|
||||
var variable_image_frame;
|
||||
var setting_variation_image_id;
|
||||
var setting_variation_image;
|
||||
var wp_media_post_id = wp.media.model.settings.post.id;
|
||||
|
||||
window.send_to_editor_default = window.send_to_editor;
|
||||
jQuery('#variable_product_options').on('click', '.upload_image_button', function( event ) {
|
||||
|
||||
jQuery('#variable_product_options').on('click', '.upload_image_button', function(){
|
||||
var $button = jQuery( this );
|
||||
var post_id = $button.attr('rel');
|
||||
var $parent = $button.closest('.upload_image');
|
||||
setting_variation_image = $parent;
|
||||
setting_variation_image_id = post_id;
|
||||
|
||||
var post_id = jQuery(this).attr('rel');
|
||||
var parent = jQuery(this).parent();
|
||||
current_field_wrapper = parent;
|
||||
event.preventDefault();
|
||||
|
||||
if (jQuery(this).is('.remove')) {
|
||||
if ( $button.is('.remove') ) {
|
||||
|
||||
jQuery('.upload_image_id', current_field_wrapper).val('');
|
||||
jQuery('img', current_field_wrapper).attr('src', '<?php echo woocommerce_placeholder_img_src(); ?>');
|
||||
jQuery(this).removeClass('remove');
|
||||
setting_variation_image.find( '.upload_image_id' ).val( '' );
|
||||
setting_variation_image.find( 'img' ).attr( 'src', '<?php echo woocommerce_placeholder_img_src(); ?>' );
|
||||
setting_variation_image.find( '.upload_image_button' ).removeClass( 'remove' );
|
||||
|
||||
} else {
|
||||
|
||||
window.send_to_editor = window.send_to_cproduct;
|
||||
formfield = jQuery('.upload_image_id', parent).attr('name');
|
||||
tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true');
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( variable_image_frame ) {
|
||||
variable_image_frame.uploader.uploader.param( 'post_id', setting_variation_image_id );
|
||||
variable_image_frame.open();
|
||||
return;
|
||||
} else {
|
||||
wp.media.model.settings.post.id = setting_variation_image_id;
|
||||
}
|
||||
|
||||
// Create the media frame.
|
||||
variable_image_frame = wp.media.frames.variable_image = wp.media({
|
||||
// Set the title of the modal.
|
||||
title: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',
|
||||
button: {
|
||||
text: '<?php _e( 'Set variation image', 'woocommerce' ); ?>'
|
||||
}
|
||||
});
|
||||
|
||||
// When an image is selected, run a callback.
|
||||
variable_image_frame.on( 'select', function() {
|
||||
|
||||
attachment = variable_image_frame.state().get('selection').first().toJSON();
|
||||
|
||||
setting_variation_image.find( '.upload_image_id' ).val( attachment.id );
|
||||
setting_variation_image.find( '.upload_image_button' ).addClass( 'remove' );
|
||||
setting_variation_image.find( 'img' ).attr( 'src', attachment.url );
|
||||
|
||||
wp.media.model.settings.post.id = wp_media_post_id;
|
||||
});
|
||||
|
||||
// Finally, open the modal.
|
||||
variable_image_frame.open();
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
window.send_to_cproduct = function(html) {
|
||||
|
||||
jQuery('body').append('<div id="temp_image">' + html + '</div>');
|
||||
|
||||
var img = jQuery('#temp_image').find('img');
|
||||
|
||||
imgurl = img.attr('src');
|
||||
imgclass = img.attr('class');
|
||||
imgid = parseInt(imgclass.replace(/\D/g, ''), 10);
|
||||
|
||||
jQuery('.upload_image_id', current_field_wrapper).val(imgid);
|
||||
jQuery('.upload_image_button', current_field_wrapper).addClass('remove');
|
||||
|
||||
jQuery('img', current_field_wrapper).attr('src', imgurl);
|
||||
tb_remove();
|
||||
jQuery('#temp_image').remove();
|
||||
|
||||
window.send_to_editor = window.send_to_editor_default;
|
||||
|
||||
}
|
||||
// Restore ID
|
||||
jQuery('a.add_media').on('click', function() {
|
||||
wp.media.model.settings.post.id = wp_media_post_id;
|
||||
} );
|
||||
|
||||
});
|
||||
<?php
|
||||
|
|
|
@ -151,7 +151,7 @@ function woocommerce_product_data_box() {
|
|||
|
||||
echo '<p class="form-field"><label for="_file_paths">' . __( 'File paths (one per line)', 'woocommerce' ) . ':</label>
|
||||
<textarea style="float:left;height:5em;" id="_file_paths" class="short file_paths" cols="20" rows="3" placeholder="' . __( 'File paths/URLs, one per line', 'woocommerce' ) . '" name="_file_paths" wrap="off">' . esc_textarea( $file_paths ) . '</textarea>
|
||||
<input type="button" class="upload_file_button button" value="' . __( 'Upload a file', 'woocommerce' ) . '" />
|
||||
<input type="button" class="upload_file_button button" data-choose="' . __( 'Choose a file', 'woocommerce' ) . '" data-update="' . __( 'Insert file URL', 'woocommerce' ) . '" value="' . __( 'Choose a file', 'woocommerce' ) . '" />
|
||||
</p>';
|
||||
|
||||
// Download Limit
|
||||
|
@ -648,8 +648,9 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
|||
update_post_meta( $post_id, '_downloadable', $is_downloadable );
|
||||
update_post_meta( $post_id, '_virtual', $is_virtual );
|
||||
|
||||
// Set transient for product type
|
||||
set_transient( 'wc_product_type_' . $post_id, $product_type );
|
||||
// Gallery Images
|
||||
$attachment_ids = array_filter( explode( ',', woocommerce_clean( $_POST['product_image_gallery'] ) ) );
|
||||
update_post_meta( $post_id, '_product_image_gallery', implode( ',', $attachment_ids ) );
|
||||
|
||||
// Update post meta
|
||||
update_post_meta( $post_id, '_regular_price', stripslashes( $_POST['_regular_price'] ) );
|
||||
|
@ -766,14 +767,10 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
|||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
if ( ! $attribute_values[ $i ] ) continue;
|
||||
// Format values
|
||||
$values = esc_html( stripslashes( $attribute_values[ $i ] ) );
|
||||
} elseif ( isset( $attribute_values[ $i ] ) ) {
|
||||
|
||||
// Text based, separate by pipe
|
||||
$values = explode( '|', $values );
|
||||
$values = array_map( 'trim', $values );
|
||||
$values = implode( '|', $values );
|
||||
$values = implode( '|', array_map( 'esc_html', array_map( 'trim', explode( '|', stripslashes( $attribute_values[ $i ] ) ) ) ) );
|
||||
|
||||
// Custom attribute - Add attribute to array and set the values
|
||||
$attributes[ sanitize_title( $attribute_names[ $i ] ) ] = array(
|
||||
|
@ -1015,29 +1012,6 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
|||
add_action('woocommerce_process_product_meta', 'woocommerce_process_product_meta', 1, 2);
|
||||
|
||||
|
||||
/**
|
||||
* Change label for insert buttons.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $translation
|
||||
* @param mixed $original
|
||||
* @return void
|
||||
*/
|
||||
function woocommerce_change_insert_into_post( $translation, $original ) {
|
||||
if ( ! isset( $_REQUEST['from'] ) )
|
||||
return $translation;
|
||||
|
||||
$original = strtolower( $original );
|
||||
|
||||
if ( $_REQUEST['from'] == 'wc01' && ( $original == 'insert into post' || $original == 'use this image' ) )
|
||||
return __( 'Use this file', 'woocommerce' );
|
||||
|
||||
return $translation;
|
||||
}
|
||||
|
||||
add_filter( 'gettext', 'woocommerce_change_insert_into_post', null, 2 );
|
||||
|
||||
|
||||
/**
|
||||
* Output product visibility options.
|
||||
*
|
||||
|
|
|
@ -24,259 +24,138 @@ function woocommerce_product_images_box() {
|
|||
<div id="product_images_container">
|
||||
<ul class="product_images">
|
||||
<?php
|
||||
$thumbnail_id = get_post_thumbnail_id( $post->ID );
|
||||
|
||||
if ( $thumbnail_id )
|
||||
echo '<li class="image" data-post_id="' . $thumbnail_id . '">
|
||||
' . wp_get_attachment_image( $thumbnail_id, 'full' ) . '
|
||||
<span class="loading"></span>
|
||||
<ul class="actions">
|
||||
<li><a href="#" class="delete" title="' . __( 'Delete image', 'woocommerce' ) . '">' . __( 'Delete', 'woocommerce' ) . '</a></li>
|
||||
<li><a href="' . admin_url( 'media-upload.php?post_id=' . $post->ID . '&attachment_id=' . $thumbnail_id . '&tab=library&width=640&height=553&TB_iframe=1' ) . '" class="view thickbox" onclick="return false;" title="' . __( 'Edit image', 'woocommerce' ) . '">' . __( 'View', 'woocommerce' ) . '</a></li>
|
||||
</ul>
|
||||
</li>';
|
||||
|
||||
$attachments =& get_children( 'post_parent=' . $post->ID . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image' );
|
||||
|
||||
foreach ( $attachments as $attachment_id => $attachment ) {
|
||||
if ( $thumbnail_id == $attachment_id )
|
||||
continue;
|
||||
|
||||
$exclude_class = get_post_meta( $attachment_id, '_woocommerce_exclude_image', true ) == 1 ? 'excluded' : '';
|
||||
|
||||
echo '<li class="image ' . $exclude_class . '" data-post_id="' . $attachment_id . '">
|
||||
' . wp_get_attachment_image( $attachment_id, 'full' ) . '
|
||||
<span class="loading"></span>
|
||||
<ul class="actions">
|
||||
<li><a href="#" class="delete" title="' . __( 'Delete image', 'woocommerce' ) . '">' . __( 'Delete', 'woocommerce' ) . '</a></li>
|
||||
<li><a href="' . admin_url( 'media-upload.php?post_id=' . $post->ID . '&attachment_id=' . $attachment_id . '&tab=library&width=640&height=553&TB_iframe=1' ) . '" class="view thickbox" onclick="return false;" title="' . __( 'Edit image', 'woocommerce' ) . '">' . __( 'View', 'woocommerce' ) . '</a></li>
|
||||
</ul>
|
||||
</li>';
|
||||
if ( metadata_exists( 'post', $post->ID, '_product_image_gallery' ) ) {
|
||||
$product_image_gallery = get_post_meta( $post->ID, '_product_image_gallery', true );
|
||||
} else {
|
||||
// Backwards compat
|
||||
$attachment_ids = array_filter( array_diff( get_posts( 'post_parent=' . $post->ID . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids' ), array( get_post_thumbnail_id() ) ) );
|
||||
$product_image_gallery = implode( ',', $attachment_ids );
|
||||
}
|
||||
|
||||
$attachments = array_filter( explode( ',', $product_image_gallery ) );
|
||||
|
||||
if ( $attachments )
|
||||
foreach ( $attachments as $attachment_id ) {
|
||||
echo '<li class="image" data-attachment_id="' . $attachment_id . '">
|
||||
' . wp_get_attachment_image( $attachment_id, 'full' ) . '
|
||||
<ul class="actions">
|
||||
<li><a href="#" class="delete" title="' . __( 'Delete image', 'woocommerce' ) . '">' . __( 'Delete', 'woocommerce' ) . '</a></li>
|
||||
</ul>
|
||||
</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Uploader section -->
|
||||
<div id="plupload-upload-ui" class="hide-if-no-js">
|
||||
<div id="drag-drop-area">
|
||||
<p class="drag-drop-info"><?php _e('Drop files here'); ?></p>
|
||||
<p><?php _ex('or', 'Uploader: Drop files here - or - Select Files'); ?></p>
|
||||
<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Select Files'); ?>" class="button" /></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// Drag and drop code adapted from Drag & Drop Featured Image by Jonathan Lundström
|
||||
$plupload_init = array(
|
||||
'runtimes' => 'html5,silverlight,flash,html4',
|
||||
'browse_button' => 'plupload-browse-button',
|
||||
'container' => 'plupload-upload-ui',
|
||||
'drop_element' => 'drag-drop-area',
|
||||
'file_data_name' => 'async-upload',
|
||||
'multiple_queues' => true,
|
||||
'max_file_size' => wp_max_upload_size() . 'b',
|
||||
'url' => admin_url('admin-ajax.php'),
|
||||
'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
|
||||
'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
|
||||
'filters' => array( array( 'title' => __( 'Allowed Files' ), 'extensions' => '*') ),
|
||||
'multipart' => true,
|
||||
'urlstream_upload' => true,
|
||||
'multipart_params' => array(
|
||||
'_ajax_nonce' => wp_create_nonce( 'product-images-box-upload' ),
|
||||
'action' => 'woocommerce_product_images_box_upload',
|
||||
'post_id' => $post->ID
|
||||
)
|
||||
);
|
||||
<input type="hidden" id="product_image_gallery" name="product_image_gallery" value="<?php echo esc_attr( $product_image_gallery ); ?>" />
|
||||
|
||||
// Apply filters to initiate plupload:
|
||||
$plupload_init = apply_filters( 'plupload_init', $plupload_init );
|
||||
?>
|
||||
</div>
|
||||
<p class="add_product_images hide-if-no-js">
|
||||
<a href="#"><?php _e( 'Add product gallery images', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
function product_images_container_init() {
|
||||
// Attribute ordering
|
||||
$('#product_images_container ul.product_images').sortable({
|
||||
items: 'li.image',
|
||||
cursor: 'move',
|
||||
scrollSensitivity:40,
|
||||
forcePlaceholderSize: true,
|
||||
forceHelperSize: false,
|
||||
helper: 'clone',
|
||||
opacity: 0.65,
|
||||
placeholder: 'wc-metabox-sortable-placeholder',
|
||||
start:function(event,ui){
|
||||
ui.item.css('background-color','#f6f6f6');
|
||||
},
|
||||
stop:function(event,ui){
|
||||
ui.item.removeAttr('style');
|
||||
},
|
||||
update: function(event, ui) {
|
||||
$('#product_images_container ul li.image').css('cursor','default');
|
||||
$('#product_images_container ul.product_images').sortable('disable');
|
||||
// Uploading files
|
||||
var product_gallery_frame;
|
||||
var $image_gallery_ids = $('#product_image_gallery');
|
||||
var $product_images = $('#product_images_container ul.product_images');
|
||||
|
||||
var post_id = <?php echo $post->ID; ?>;
|
||||
var attachment_id = ui.item.attr( 'data-post_id' );
|
||||
var prev_attachment_id = ui.item.prev().attr( 'data-post_id' );
|
||||
var next_attachment_id = ui.item.next().attr( 'data-post_id' );
|
||||
jQuery('.add_product_images a').live('click', function( event ){
|
||||
|
||||
// show spinner
|
||||
ui.item.addClass('loading');
|
||||
var $el = $(this);
|
||||
var attachment_ids = $image_gallery_ids.val();
|
||||
|
||||
// go do the sorting stuff via ajax
|
||||
jQuery.post( ajaxurl, {
|
||||
action: 'woocommerce_product_image_ordering',
|
||||
post_id: post_id,
|
||||
attachment_id: attachment_id,
|
||||
prev_attachment_id: prev_attachment_id,
|
||||
next_attachment_id: next_attachment_id,
|
||||
_ajax_nonce: '<?php echo wp_create_nonce( 'product-image-ordering' ); ?>'
|
||||
}, function( response ) {
|
||||
ui.item.removeClass('loading');
|
||||
$('#product_images_container ul li.image').css('cursor','move');
|
||||
$('#product_images_container ul.product_images').sortable('enable');
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
|
||||
product_images_container_init();
|
||||
|
||||
// Delete images
|
||||
$('#product_images_container').on( 'click', 'a.delete', function() {
|
||||
|
||||
$image = $(this).closest('li.image');
|
||||
|
||||
var attachment_id = $image.attr('data-post_id');
|
||||
|
||||
if ( attachment_id ) {
|
||||
|
||||
$image.addClass('loading');
|
||||
|
||||
var answer = confirm('<?php _e( 'Are you sure you want to remove this attachment?', 'woocommerce' ); ?>');
|
||||
|
||||
if ( answer ) {
|
||||
jQuery.post( ajaxurl, {
|
||||
action: 'woocommerce_product_image_delete',
|
||||
post_id: <?php echo $post->ID; ?>,
|
||||
attachment_id: attachment_id,
|
||||
_ajax_nonce: '<?php echo wp_create_nonce( 'product-image-delete' ); ?>'
|
||||
}, function( response ) {
|
||||
$image.remove();
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
||||
$image.removeClass('loading');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
|
||||
// Drag and drop uploading of images
|
||||
var uploader = new plupload.Uploader(<?php echo json_encode( $plupload_init ); ?>);
|
||||
|
||||
// Check for drag'n'drop functionality:
|
||||
uploader.bind('Init', function(up){
|
||||
var uploaddiv = $('#plupload-upload-ui');
|
||||
|
||||
// Add classes and bind actions:
|
||||
if(up.features.dragdrop){
|
||||
uploaddiv.addClass('drag-drop');
|
||||
$('#drag-drop-area')
|
||||
.bind('dragover.wp-uploader', function() { uploaddiv.addClass('drag-over'); })
|
||||
.bind('dragleave.wp-uploader, drop.wp-uploader', function(){ uploaddiv.removeClass('drag-over'); });
|
||||
|
||||
} else{
|
||||
uploaddiv.removeClass('drag-drop');
|
||||
$('#drag-drop-area').unbind('.wp-uploader');
|
||||
}
|
||||
});
|
||||
|
||||
// Initiate uploading script:
|
||||
uploader.init();
|
||||
|
||||
// File queue handler
|
||||
uploader.bind('FilesAdded', function(up, files){
|
||||
var hundredmb = 100 * 1024 * 1024, max = parseInt(up.settings.max_file_size, 10);
|
||||
|
||||
// Loop through files:
|
||||
plupload.each(files, function(file){
|
||||
if ( max > hundredmb && file.size > hundredmb && up.runtime != 'html5' ) {
|
||||
alert( "<?php _e( 'The file you selected exceeds the maximum filesize specified in this installation.', 'woocommerce' ); ?>" );
|
||||
}
|
||||
});
|
||||
|
||||
// Refresh and start:
|
||||
up.refresh();
|
||||
up.start();
|
||||
|
||||
// Block the UI
|
||||
$('#product_images_container').block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_writepanel_params.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
|
||||
});
|
||||
|
||||
// Handle new uploads
|
||||
uploader.bind( 'FileUploaded', function( up, file, response ) {
|
||||
|
||||
response = $.parseJSON( response.response );
|
||||
|
||||
if ( response.error ) {
|
||||
|
||||
alert( response.error );
|
||||
|
||||
} else {
|
||||
|
||||
$('#product_images_container ul').append('<li class="image" data-post_id="' + response.post_id + '">\
|
||||
<img src="' + response.src + '" />\
|
||||
<span class="loading"></span>\
|
||||
<ul class="actions">\
|
||||
<li><a href="#" class="delete" title="<?php _e( 'Delete image', 'woocommerce' ); ?>"><?php _e( 'Delete', 'woocommerce' ) ?></a></li>\
|
||||
<li><a href="' + response.edit_url + '" class="view thickbox" onclick="return false;" title="<?php _e( 'Edit image', 'woocommerce' ); ?>"><?php _e( 'View', 'woocommerce' ) ?></a></li>\
|
||||
</ul>\
|
||||
</li>');
|
||||
|
||||
}
|
||||
|
||||
$('#product_images_container').unblock();
|
||||
});
|
||||
|
||||
|
||||
// Refresh images when a thickbox (images) closes
|
||||
var loading_product_images = false;
|
||||
|
||||
jQuery(document).bind( 'tb_unload', function() {
|
||||
if ( loading_product_images )
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( product_gallery_frame ) {
|
||||
product_gallery_frame.open();
|
||||
return;
|
||||
}
|
||||
|
||||
loading_product_images = true;
|
||||
// Create the media frame.
|
||||
product_gallery_frame = wp.media.frames.downloadable_file = wp.media({
|
||||
// Set the title of the modal.
|
||||
title: '<?php _e( 'Add Images to Product Gallery', 'woocommerce' ); ?>',
|
||||
button: {
|
||||
text: '<?php _e( 'Add to gallery', 'woocommerce' ); ?>',
|
||||
},
|
||||
multiple: true
|
||||
});
|
||||
|
||||
// Block
|
||||
$('#product_images_container').block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_writepanel_params.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', opacity: 0.6 } });
|
||||
// When an image is selected, run a callback.
|
||||
product_gallery_frame.on( 'select', function() {
|
||||
|
||||
// Re-load images
|
||||
jQuery.post( ajaxurl, {
|
||||
action: 'woocommerce_product_image_refresh',
|
||||
post_id: <?php echo $post->ID; ?>,
|
||||
_ajax_nonce: '<?php echo wp_create_nonce( 'product-image-refresh' ); ?>'
|
||||
}, function( response ) {
|
||||
if ( response ) {
|
||||
$("#product_images_container").html(response);
|
||||
var selection = product_gallery_frame.state().get('selection');
|
||||
|
||||
selection.map( function( attachment ) {
|
||||
|
||||
attachment = attachment.toJSON();
|
||||
|
||||
if ( attachment.id ) {
|
||||
attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
|
||||
|
||||
$product_images.append('\
|
||||
<li class="image" data-attachment_id="' + attachment.id + '">\
|
||||
<img src="' + attachment.url + '" />\
|
||||
<ul class="actions">\
|
||||
<li><a href="#" class="delete" title="<?php _e( 'Delete image', 'woocommerce' ); ?>"><?php _e( 'Delete', 'woocommerce' ); ?></a></li>\
|
||||
</ul>\
|
||||
</li>');
|
||||
}
|
||||
|
||||
// Re-init
|
||||
product_images_container_init();
|
||||
} );
|
||||
|
||||
// Unblock
|
||||
$('#product_images_container').unblock();
|
||||
$image_gallery_ids.val( attachment_ids );
|
||||
});
|
||||
|
||||
loading_product_images = false;
|
||||
}
|
||||
);
|
||||
// Finally, open the modal.
|
||||
product_gallery_frame.open();
|
||||
});
|
||||
|
||||
// Image ordering
|
||||
$product_images.sortable({
|
||||
items: 'li.image',
|
||||
cursor: 'move',
|
||||
scrollSensitivity:40,
|
||||
forcePlaceholderSize: true,
|
||||
forceHelperSize: false,
|
||||
helper: 'clone',
|
||||
opacity: 0.65,
|
||||
placeholder: 'wc-metabox-sortable-placeholder',
|
||||
start:function(event,ui){
|
||||
ui.item.css('background-color','#f6f6f6');
|
||||
},
|
||||
stop:function(event,ui){
|
||||
ui.item.removeAttr('style');
|
||||
},
|
||||
update: function(event, ui) {
|
||||
var attachment_ids = '';
|
||||
|
||||
$('#product_images_container ul li.image').css('cursor','default').each(function() {
|
||||
var attachment_id = jQuery(this).attr( 'data-attachment_id' );
|
||||
attachment_ids = attachment_ids + attachment_id + ',';
|
||||
});
|
||||
|
||||
$image_gallery_ids.val( attachment_ids );
|
||||
}
|
||||
});
|
||||
|
||||
// Remove images
|
||||
$('#product_images_container').on( 'click', 'a.delete', function() {
|
||||
|
||||
$(this).closest('li.image').remove();
|
||||
|
||||
var attachment_ids = '';
|
||||
|
||||
$('#product_images_container ul li.image').css('cursor','default').each(function() {
|
||||
var attachment_id = jQuery(this).attr( 'data-attachment_id' );
|
||||
attachment_ids = attachment_ids + attachment_id + ',';
|
||||
});
|
||||
|
||||
$image_gallery_ids.val( attachment_ids );
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
});
|
||||
|
|
|
@ -44,11 +44,10 @@ function woocommerce_meta_boxes() {
|
|||
|
||||
// Products
|
||||
add_meta_box( 'woocommerce-product-data', __( 'Product Data', 'woocommerce' ), 'woocommerce_product_data_box', 'product', 'normal', 'high' );
|
||||
add_meta_box( 'woocommerce-product-images', __( 'Product Images', 'woocommerce' ), 'woocommerce_product_images_box', 'product', 'side' );
|
||||
add_meta_box( 'woocommerce-product-images', __( 'Product Gallery', 'woocommerce' ), 'woocommerce_product_images_box', 'product', 'side' );
|
||||
|
||||
remove_meta_box( 'product_shipping_classdiv', 'product', 'side' );
|
||||
remove_meta_box( 'pageparentdiv', 'product', 'side' );
|
||||
remove_meta_box( 'postimagediv', 'product', 'side' );
|
||||
|
||||
// Excerpt
|
||||
if ( function_exists('wp_editor') ) {
|
||||
|
|
|
@ -996,12 +996,24 @@ $woocommerce_settings['tax'] = apply_filters('woocommerce_tax_settings', array(
|
|||
'default' => 'shipping',
|
||||
'type' => 'select',
|
||||
'options' => array(
|
||||
'shipping' => __( 'Shipping address', 'woocommerce' ),
|
||||
'billing' => __( 'Billing address', 'woocommerce' ),
|
||||
'shipping' => __( 'Customer shipping address', 'woocommerce' ),
|
||||
'billing' => __( 'Customer billing address', 'woocommerce' ),
|
||||
'base' => __( 'Shop base address', 'woocommerce' )
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Default Customer Address:', 'woocommerce' ),
|
||||
'id' => 'woocommerce_default_customer_address',
|
||||
'desc_tip' => __( 'This option determines the customers default address (before they input their own).', 'woocommerce' ),
|
||||
'default' => 'base',
|
||||
'type' => 'select',
|
||||
'options' => array(
|
||||
'' => __( 'No address', 'woocommerce' ),
|
||||
'base' => __( 'Shop base address', 'woocommerce' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Shipping Tax Class:', 'woocommerce' ),
|
||||
'desc' => __( 'Optionally control which tax class shipping gets, or leave it so shipping tax is based on the cart items themselves.', 'woocommerce' ),
|
||||
|
|
|
@ -76,7 +76,7 @@ function woocommerce_update_options( $options ) {
|
|||
if ( isset( $_POST[ $value['id'] ] ) ) {
|
||||
$option_value = esc_attr( $_POST[ $value['id'] ] );
|
||||
} else {
|
||||
$option_value = '';
|
||||
$option_value = '';
|
||||
}
|
||||
|
||||
} elseif ( $value['id'] == 'woocommerce_price_num_decimals' ) {
|
||||
|
@ -188,7 +188,7 @@ function woocommerce_update_options( $options ) {
|
|||
|
||||
// Now save the options
|
||||
foreach( $update_options as $name => $value )
|
||||
update_option( $name, $value, true );
|
||||
update_option( $name, $value );
|
||||
|
||||
return true;
|
||||
}
|
|
@ -471,11 +471,13 @@ function woocommerce_tax_rates_setting_save() {
|
|||
|
||||
if ( is_numeric( $postcode_parts[0] ) && is_numeric( $postcode_parts[1] ) && $postcode_parts[1] > $postcode_parts[0] ) {
|
||||
for ( $i = $postcode_parts[0]; $i <= $postcode_parts[1]; $i ++ ) {
|
||||
$postcode_query[] = "( '$i', $tax_rate_id, 'postcode' )";
|
||||
if ( $i )
|
||||
$postcode_query[] = "( '$i', $tax_rate_id, 'postcode' )";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$postcode_query[] = "( '$postcode', $tax_rate_id, 'postcode' )";
|
||||
if ( $postcode )
|
||||
$postcode_query[] = "( '$postcode', $tax_rate_id, 'postcode' )";
|
||||
}
|
||||
|
||||
$wpdb->query( "INSERT INTO {$wpdb->prefix}woocommerce_tax_rate_locations ( location_code, tax_rate_id, location_type ) VALUES " . implode( ',', $postcode_query ) );
|
||||
|
@ -491,14 +493,16 @@ function woocommerce_tax_rates_setting_save() {
|
|||
$cities = explode( ';', $city );
|
||||
$cities = array_map( 'strtoupper', array_map( 'woocommerce_clean', $cities ) );
|
||||
foreach( $cities as $city ) {
|
||||
$wpdb->insert(
|
||||
$wpdb->prefix . "woocommerce_tax_rate_locations",
|
||||
array(
|
||||
'location_code' => $city,
|
||||
'tax_rate_id' => $tax_rate_id,
|
||||
'location_type' => 'city',
|
||||
)
|
||||
);
|
||||
if ( $city ) {
|
||||
$wpdb->insert(
|
||||
$wpdb->prefix . "woocommerce_tax_rate_locations",
|
||||
array(
|
||||
'location_code' => $city,
|
||||
'tax_rate_id' => $tax_rate_id,
|
||||
'location_type' => 'city',
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ function woocommerce_attributes() {
|
|||
)
|
||||
);
|
||||
|
||||
delete_transient( 'wc_attribute_taxonomies' );
|
||||
|
||||
wp_safe_redirect( get_admin_url() . 'edit.php?post_type=product&page=woocommerce_attributes' );
|
||||
exit;
|
||||
}
|
||||
|
@ -141,6 +143,8 @@ function woocommerce_attributes() {
|
|||
);
|
||||
}
|
||||
|
||||
delete_transient( 'wc_attribute_taxonomies' );
|
||||
|
||||
wp_safe_redirect( get_admin_url() . 'edit.php?post_type=product&page=woocommerce_attributes' );
|
||||
exit;
|
||||
|
||||
|
@ -165,6 +169,8 @@ function woocommerce_attributes() {
|
|||
|
||||
}
|
||||
|
||||
delete_transient( 'wc_attribute_taxonomies' );
|
||||
|
||||
wp_safe_redirect( get_admin_url() . 'edit.php?post_type=product&page=woocommerce_attributes' );
|
||||
exit;
|
||||
|
||||
|
|
|
@ -254,20 +254,6 @@ function woocommerce_prevent_admin_access() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fix 'insert into post' buttons for images
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $vars
|
||||
* @return array
|
||||
*/
|
||||
function woocommerce_allow_img_insertion( $vars ) {
|
||||
$vars['send'] = true; // 'send' as in "Send to Editor"
|
||||
return($vars);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter the directory for uploads.
|
||||
*
|
||||
|
@ -277,16 +263,15 @@ function woocommerce_allow_img_insertion( $vars ) {
|
|||
*/
|
||||
function woocommerce_downloads_upload_dir( $pathdata ) {
|
||||
|
||||
if (isset($_POST['type']) && $_POST['type'] == 'downloadable_product') :
|
||||
|
||||
// Change upload dir
|
||||
if ( isset( $_POST['type'] ) && $_POST['type'] == 'downloadable_product' ) {
|
||||
// Uploading a downloadable file
|
||||
$subdir = '/woocommerce_uploads'.$pathdata['subdir'];
|
||||
$pathdata['path'] = str_replace($pathdata['subdir'], $subdir, $pathdata['path']);
|
||||
$pathdata['url'] = str_replace($pathdata['subdir'], $subdir, $pathdata['url']);
|
||||
$pathdata['subdir'] = str_replace($pathdata['subdir'], $subdir, $pathdata['subdir']);
|
||||
return $pathdata;
|
||||
|
||||
endif;
|
||||
}
|
||||
|
||||
return $pathdata;
|
||||
}
|
||||
|
|
|
@ -31,13 +31,6 @@ add_action('admin_init', 'woocommerce_prevent_admin_access');
|
|||
add_action('woocommerce_settings_saved', 'woocomerce_check_download_folder_protection');
|
||||
add_filter('mod_rewrite_rules', 'woocommerce_ms_protect_download_rewite_rules');
|
||||
|
||||
/**
|
||||
* Filters
|
||||
*
|
||||
* @see woocommerce_allow_img_insertion()
|
||||
*/
|
||||
add_filter('get_media_item_args', 'woocommerce_allow_img_insertion');
|
||||
|
||||
/**
|
||||
* File uploads
|
||||
*
|
||||
|
|
|
@ -363,8 +363,7 @@ function woocommerce_admin_scripts() {
|
|||
// Edit product category pages
|
||||
if (in_array( $screen->id, array('edit-product_cat') )) :
|
||||
|
||||
wp_enqueue_script( 'media-upload' );
|
||||
wp_enqueue_script( 'thickbox' );
|
||||
wp_enqueue_media();
|
||||
|
||||
endif;
|
||||
|
||||
|
@ -373,8 +372,7 @@ function woocommerce_admin_scripts() {
|
|||
|
||||
wp_enqueue_script( 'woocommerce_writepanel' );
|
||||
wp_enqueue_script( 'jquery-ui-datepicker' );
|
||||
wp_enqueue_script( 'media-upload' );
|
||||
wp_enqueue_script( 'thickbox' );
|
||||
wp_enqueue_media();
|
||||
wp_enqueue_script( 'ajax-chosen' );
|
||||
wp_enqueue_script( 'chosen' );
|
||||
wp_enqueue_script( 'plupload-all' );
|
||||
|
@ -474,7 +472,6 @@ function woocommerce_admin_css() {
|
|||
endif;
|
||||
|
||||
if ( $typenow == '' || $typenow=="product" || $typenow=="shop_order" || $typenow=="shop_coupon" ) :
|
||||
wp_enqueue_style( 'thickbox' );
|
||||
wp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css' );
|
||||
wp_enqueue_style( 'jquery-ui-style', (is_ssl()) ? 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' : 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
|
||||
endif;
|
||||
|
@ -580,79 +577,6 @@ function woocommerce_admin_head() {
|
|||
add_action('admin_head', 'woocommerce_admin_head');
|
||||
|
||||
|
||||
/**
|
||||
* Add functionality to the image uploader on product pages to exclude an image
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $fields
|
||||
* @param mixed $object
|
||||
* @return void
|
||||
*/
|
||||
function woocommerce_exclude_image_from_product_page_field( $fields, $object ) {
|
||||
|
||||
if (!$object->post_parent) return $fields;
|
||||
|
||||
$parent = get_post( $object->post_parent );
|
||||
|
||||
if ( $parent->post_type !== 'product' )
|
||||
return $fields;
|
||||
|
||||
$exclude_image = get_post_meta( absint( $object->ID ), '_woocommerce_exclude_image', true );
|
||||
|
||||
$label = __( 'Exclude image', 'woocommerce' );
|
||||
|
||||
$html = '<input type="checkbox" '.checked($exclude_image, 1, false).' name="attachments['.$object->ID.'][woocommerce_exclude_image]" id="attachments['.$object->ID.'][woocommerce_exclude_image" />';
|
||||
|
||||
$fields['woocommerce_exclude_image'] = array(
|
||||
'label' => $label,
|
||||
'input' => 'html',
|
||||
'html' => $html,
|
||||
'value' => '',
|
||||
'helps' => __( 'Enabling this option will hide it from the product page image gallery.', 'woocommerce' )
|
||||
);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
add_filter('attachment_fields_to_edit', 'woocommerce_exclude_image_from_product_page_field', 1, 2);
|
||||
add_filter('attachment_fields_to_save', 'woocommerce_exclude_image_from_product_page_field_save', 1, 2);
|
||||
add_action('add_attachment', 'woocommerce_exclude_image_from_product_page_field_add');
|
||||
|
||||
|
||||
/**
|
||||
* Save the meta for exlcuding images from galleries.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $post
|
||||
* @param mixed $attachment
|
||||
* @return void
|
||||
*/
|
||||
function woocommerce_exclude_image_from_product_page_field_save( $post, $attachment ) {
|
||||
|
||||
if (isset($_REQUEST['attachments'][$post['ID']]['woocommerce_exclude_image'])) :
|
||||
delete_post_meta( (int) $post['ID'], '_woocommerce_exclude_image' );
|
||||
update_post_meta( (int) $post['ID'], '_woocommerce_exclude_image', 1);
|
||||
else :
|
||||
delete_post_meta( (int) $post['ID'], '_woocommerce_exclude_image' );
|
||||
update_post_meta( (int) $post['ID'], '_woocommerce_exclude_image', 0);
|
||||
endif;
|
||||
|
||||
return $post;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the meta for exlcuding images from galleries.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $post_id
|
||||
* @return void
|
||||
*/
|
||||
function woocommerce_exclude_image_from_product_page_field_add( $post_id ) {
|
||||
add_post_meta( $post_id, '_woocommerce_exclude_image', 0, true );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Duplicate a product action
|
||||
*
|
||||
|
|
|
@ -288,7 +288,7 @@ CREATE TABLE ". $wpdb->prefix . "woocommerce_downloadable_product_permissions (
|
|||
$sql = "
|
||||
CREATE TABLE ". $wpdb->prefix . "woocommerce_order_items (
|
||||
order_item_id bigint(20) NOT NULL auto_increment,
|
||||
order_item_name longtext NOT NULL DEFAULT '',
|
||||
order_item_name longtext NOT NULL,
|
||||
order_item_type varchar(200) NOT NULL DEFAULT '',
|
||||
order_id bigint(20) NOT NULL,
|
||||
PRIMARY KEY (order_item_id)
|
||||
|
|
|
@ -553,10 +553,10 @@ function woocommerce_settings_get_option( $option_name, $default = '' ) {
|
|||
|
||||
if ( is_array( $option_value ) )
|
||||
$option_value = array_map( 'stripslashes', $option_value );
|
||||
elseif ( $option_value )
|
||||
elseif ( ! is_null( $option_value ) )
|
||||
$option_value = stripslashes( $option_value );
|
||||
|
||||
return $option_value == null ? $default : $option_value;
|
||||
return $option_value === null ? $default : $option_value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,35 +44,39 @@ function woocommerce_add_category_fields() {
|
|||
if ( ! jQuery('#product_cat_thumbnail_id').val() )
|
||||
jQuery('.remove_image_button').hide();
|
||||
|
||||
window.send_to_editor_default = window.send_to_editor;
|
||||
// Uploading files
|
||||
var file_frame;
|
||||
|
||||
window.send_to_termmeta = function(html) {
|
||||
jQuery('.upload_image_button').live('click', function( event ){
|
||||
|
||||
jQuery('body').append('<div id="temp_image">' + html + '</div>');
|
||||
event.preventDefault();
|
||||
|
||||
var img = jQuery('#temp_image').find('img');
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( file_frame ) {
|
||||
file_frame.open();
|
||||
return;
|
||||
}
|
||||
|
||||
imgurl = img.attr('src');
|
||||
imgclass = img.attr('class');
|
||||
imgid = parseInt(imgclass.replace(/\D/g, ''), 10);
|
||||
// Create the media frame.
|
||||
file_frame = wp.media.frames.downloadable_file = wp.media({
|
||||
title: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',
|
||||
button: {
|
||||
text: '<?php _e( 'Use image', 'woocommerce' ); ?>',
|
||||
},
|
||||
multiple: false
|
||||
});
|
||||
|
||||
jQuery('#product_cat_thumbnail_id').val(imgid);
|
||||
jQuery('#product_cat_thumbnail img').attr('src', imgurl);
|
||||
jQuery('.remove_image_button').show();
|
||||
jQuery('#temp_image').remove();
|
||||
// When an image is selected, run a callback.
|
||||
file_frame.on( 'select', function() {
|
||||
attachment = file_frame.state().get('selection').first().toJSON();
|
||||
|
||||
tb_remove();
|
||||
jQuery('#product_cat_thumbnail_id').val( attachment.id );
|
||||
jQuery('#product_cat_thumbnail img').attr('src', attachment.url );
|
||||
jQuery('.remove_image_button').show();
|
||||
});
|
||||
|
||||
window.send_to_editor = window.send_to_editor_default;
|
||||
}
|
||||
|
||||
jQuery('.upload_image_button').live('click', function(){
|
||||
var post_id = 0;
|
||||
|
||||
window.send_to_editor = window.send_to_termmeta;
|
||||
|
||||
tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true');
|
||||
return false;
|
||||
// Finally, open the modal.
|
||||
file_frame.open();
|
||||
});
|
||||
|
||||
jQuery('.remove_image_button').live('click', function(){
|
||||
|
@ -132,35 +136,45 @@ function woocommerce_edit_category_fields( $term, $taxonomy ) {
|
|||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
window.send_to_termmeta = function(html) {
|
||||
// Uploading files
|
||||
var file_frame;
|
||||
|
||||
jQuery('body').append('<div id="temp_image">' + html + '</div>');
|
||||
jQuery('.upload_image_button').live('click', function( event ){
|
||||
|
||||
var img = jQuery('#temp_image').find('img');
|
||||
event.preventDefault();
|
||||
|
||||
imgurl = img.attr('src');
|
||||
imgclass = img.attr('class');
|
||||
imgid = parseInt(imgclass.replace(/\D/g, ''), 10);
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( file_frame ) {
|
||||
file_frame.open();
|
||||
return;
|
||||
}
|
||||
|
||||
jQuery('#product_cat_thumbnail_id').val(imgid);
|
||||
jQuery('#product_cat_thumbnail img').attr('src', imgurl);
|
||||
jQuery('#temp_image').remove();
|
||||
// Create the media frame.
|
||||
file_frame = wp.media.frames.downloadable_file = wp.media({
|
||||
title: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',
|
||||
button: {
|
||||
text: '<?php _e( 'Use image', 'woocommerce' ); ?>',
|
||||
},
|
||||
multiple: false
|
||||
});
|
||||
|
||||
tb_remove();
|
||||
}
|
||||
// When an image is selected, run a callback.
|
||||
file_frame.on( 'select', function() {
|
||||
attachment = file_frame.state().get('selection').first().toJSON();
|
||||
|
||||
jQuery('.upload_image_button').live('click', function(){
|
||||
var post_id = 0;
|
||||
jQuery('#product_cat_thumbnail_id').val( attachment.id );
|
||||
jQuery('#product_cat_thumbnail img').attr('src', attachment.url );
|
||||
jQuery('.remove_image_button').show();
|
||||
});
|
||||
|
||||
window.send_to_editor = window.send_to_termmeta;
|
||||
|
||||
tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true');
|
||||
return false;
|
||||
// Finally, open the modal.
|
||||
file_frame.open();
|
||||
});
|
||||
|
||||
jQuery('.remove_image_button').live('click', function(){
|
||||
jQuery('#product_cat_thumbnail img').attr('src', '<?php echo woocommerce_placeholder_img_src(); ?>');
|
||||
jQuery('#product_cat_thumbnail_id').val('');
|
||||
jQuery('.remove_image_button').hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
.woocommerce-message{position:relative;z-index:100;border:1px solid #b76ca9!important;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,0.04);-moz-box-shadow:inset 0 0 15px rgba(0,0,0,0.04);box-shadow:inset 0 0 15px rgba(0,0,0,0.04);overflow:hidden;padding:10px 0 10px!important;background:#cc99c2 url(../images/message.png) no-repeat right bottom!important}.woocommerce-message .squeezer{max-width:960px;margin:0;padding:0 10px;text-align:left;overflow:hidden}.woocommerce-message h4{margin:0 10px 0 0;font-size:18px;line-height:36px;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;font-weight:normal;color:#fff;text-shadow:0 1px 1px #b574a8;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;float:left;vertical-align:middle}.woocommerce-message p{margin:0!important;padding:2px 0!important;float:left!important;line-height:32px;vertical-align:middle}.woocommerce-message p a.button-primary{font-size:16px!important;line-height:16px!important;height:auto!important;margin:0 5px 0 0;padding:6px 15px;vertical-align:middle;color:#fff;text-align:center;text-decoration:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #88537e;background:#a46497;-moz-box-shadow:inset 0 0 2px #fff,0 1px 1px rgba(0,0,0,0.1);-webkit-box-shadow:inset 0 0 2px #fff,0 1px 1px rgba(0,0,0,0.1);box-shadow:inset 0 0 2px #fff,0 1px 1px rgba(0,0,0,0.1);text-shadow:0 -1px 0 rgba(0,0,0,0.3);-webkit-transition-duration:.3s;-moz-transition-duration:.3s;cursor:pointer;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.woocommerce-message p a.button-primary:hover,.woocommerce-message p a.button-primary:active{background-color:#f0a000;border-color:#c87800;-webkit-transition-duration:.3s;outline:0;opacity:1}.woocommerce-message p a.skip,.woocommerce-message p a.docs{opacity:.5}.woocommerce-message .twitter-share-button{vertical-align:middle}
|
||||
.woocommerce-message{position:relative;z-index:100;border:1px solid #b76ca9!important;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,0.04);-moz-box-shadow:inset 0 0 15px rgba(0,0,0,0.04);box-shadow:inset 0 0 15px rgba(0,0,0,0.04);overflow:hidden;padding:10px 0 10px!important;background:#cc99c2 url(../images/message.png) no-repeat right bottom!important}.woocommerce-message .squeezer{max-width:960px;margin:0;padding:0 10px;text-align:left;overflow:hidden}.woocommerce-message h4{margin:0 10px 0 0;font-size:18px;line-height:36px;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;font-weight:normal;color:#fff;text-shadow:0 1px 1px #b574a8;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;float:left;vertical-align:middle}.woocommerce-message p{margin:0!important;padding:2px 0!important;float:left!important;line-height:32px;vertical-align:middle}.woocommerce-message p a.button-primary{font-size:14px!important;line-height:16px!important;height:auto!important;-webkit-border-radius:3px;border-radius:3px;margin:0 5px 0 0;padding:5px 12px;vertical-align:middle;color:#fff;text-align:center;text-decoration:none;border:1px solid #76456d;-webkit-transition:none;-moz-transition:none;cursor:pointer;outline:0;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;text-shadow:0 1px 0 rgba(0,0,0,0.3);background-color:#a46497;background-image:-webkit-gradient(linear,left top,left bottom,from(#a46497),to(#864f7b));background-image:-webkit-linear-gradient(top,#a46497,#864f7b);background-image:-moz-linear-gradient(top,#a46497,#864f7b);background-image:-ms-linear-gradient(top,#a46497,#864f7b);background-image:-o-linear-gradient(top,#a46497,#864f7b);background-image:linear-gradient(to bottom,#a46497,#864f7b);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),inset 0 -1px 0 rgba(0,0,0,0.1)}.woocommerce-message p a.button-primary:hover{text-shadow:0 -1px 0 rgba(0,0,0,0.3);border:1px solid #76456d;background-color:#ad74a2;background-image:-webkit-gradient(linear,left top,left bottom,from(#ad74a2),to(#864f7b));background-image:-webkit-linear-gradient(top,#ad74a2,#864f7b);background-image:-moz-linear-gradient(top,#ad74a2,#864f7b);background-image:-ms-linear-gradient(top,#ad74a2,#864f7b);background-image:-o-linear-gradient(top,#ad74a2,#864f7b);background-image:linear-gradient(to bottom,#ad74a2,#864f7b);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),inset 0 -1px 0 rgba(0,0,0,0.1)}.woocommerce-message p a.button-primary:active{border:1px solid #76456d;text-shadow:0 1px 0 rgba(0,0,0,0.3);background-color:#864f7b;background-image:-webkit-gradient(linear,left top,left bottom,from(#864f7b),to(#864f7b));background-image:-webkit-linear-gradient(top,#864f7b,#a46497);background-image:-moz-linear-gradient(top,#864f7b,#a46497);background-image:-ms-linear-gradient(top,#864f7b,#a46497);background-image:-o-linear-gradient(top,#864f7b,#a46497);background-image:linear-gradient(to bottom,#a46497,#a46497);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2)}.woocommerce-message p a.skip,.woocommerce-message p a.docs{opacity:.7}.woocommerce-message .twitter-share-button{vertical-align:middle;margin-left:3px}
|
|
@ -39,41 +39,74 @@
|
|||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
a.button-primary {
|
||||
font-size: 16px !important;
|
||||
font-size: 14px !important;
|
||||
line-height: 16px !important;
|
||||
height: auto !important;
|
||||
-webkit-border-radius:3px;
|
||||
border-radius:3px;
|
||||
margin: 0 5px 0 0;
|
||||
padding: 6px 15px;
|
||||
padding: 5px 12px;
|
||||
vertical-align: middle;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #88537e;
|
||||
background: #a46497;
|
||||
-moz-box-shadow: inset 0 0 2px rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
|
||||
-webkit-box-shadow: inset 0 0 2px rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
|
||||
box-shadow: inset 0 0 2px rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
|
||||
text-shadow: 0px -1px 0px rgba( 0,0,0,0.3);
|
||||
-webkit-transition-duration: .3s;
|
||||
-moz-transition-duration: .3s;
|
||||
border: 1px solid #76456d;
|
||||
-webkit-transition:none;
|
||||
-moz-transition:none;
|
||||
cursor: pointer;
|
||||
outline:none;
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;
|
||||
text-shadow: 0px 1px 0px rgba(0,0,0,0.3);
|
||||
background-color: #a46497;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#a46497), to(#864f7b)); /* Saf4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(top, #a46497, #864f7b); /* Chrome 10+, Saf5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(top, #a46497, #864f7b); /* FF3.6+ */
|
||||
background-image: -ms-linear-gradient(top, #a46497, #864f7b); /* IE10 */
|
||||
background-image: -o-linear-gradient(top, #a46497, #864f7b); /* Opera 11.10+ */
|
||||
background-image: linear-gradient(to bottom, #a46497, #864f7b);
|
||||
-webkit-box-shadow:
|
||||
inset 0 1px 0 rgba(255,255,255,0.2),
|
||||
inset 0 -1px 0 rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 1px 0 rgba(255,255,255,0.2),
|
||||
inset 0 -1px 0 rgba(0,0,0,0.1);
|
||||
}
|
||||
a.button-primary:hover, a.button-primary:active {
|
||||
background-color: #f0a000;
|
||||
border-color: #c87800;
|
||||
-webkit-transition-duration: .3s;
|
||||
outline: none;
|
||||
opacity: 1;
|
||||
a.button-primary:hover {
|
||||
text-shadow: 0px -1px 0px rgba(0,0,0,0.3);
|
||||
border: 1px solid #76456d;
|
||||
background-color: #ad74a2;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ad74a2), to(#864f7b)); /* Saf4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(top, #ad74a2, #864f7b); /* Chrome 10+, Saf5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(top, #ad74a2, #864f7b); /* FF3.6+ */
|
||||
background-image: -ms-linear-gradient(top, #ad74a2, #864f7b); /* IE10 */
|
||||
background-image: -o-linear-gradient(top, #ad74a2, #864f7b); /* Opera 11.10+ */
|
||||
background-image: linear-gradient(to bottom, #ad74a2, #864f7b);
|
||||
-webkit-box-shadow:
|
||||
inset 0 1px 0 rgba(255,255,255,0.2),
|
||||
inset 0 -1px 0 rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 1px 0 rgba(255,255,255,0.2),
|
||||
inset 0 -1px 0 rgba(0,0,0,0.1);
|
||||
}
|
||||
a.button-primary:active {
|
||||
border: 1px solid #76456d;
|
||||
text-shadow: 0px 1px 0px rgba(0,0,0,0.3);
|
||||
background-color: #864f7b;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#864f7b), to(#864f7b)); /* Saf4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(top, #864f7b, #a46497); /* Chrome 10+, Saf5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(top, #864f7b, #a46497); /* FF3.6+ */
|
||||
background-image: -ms-linear-gradient(top, #864f7b, #a46497); /* IE10 */
|
||||
background-image: -o-linear-gradient(top, #864f7b, #a46497); /* Opera 11.10+ */
|
||||
background-image: linear-gradient(to bottom, #a46497, #a46497);
|
||||
-webkit-box-shadow:
|
||||
inset 0 1px 1px rgba(0,0,0,0.2);
|
||||
}
|
||||
a.skip, a.docs {
|
||||
opacity: 0.5;
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
.twitter-share-button {
|
||||
vertical-align: middle;
|
||||
margin-left:3px;
|
||||
}
|
||||
}
|
|
@ -1140,13 +1140,13 @@ table.wp-list-table {
|
|||
img {
|
||||
margin: 1px 2px;
|
||||
}
|
||||
.column-thumb img {
|
||||
padding: 2px;
|
||||
td.column-thumb img {
|
||||
margin: 0;
|
||||
border: 1px solid #dfdfdf;
|
||||
vertical-align: middle;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 40px;
|
||||
max-height: 40px;
|
||||
}
|
||||
span.na {
|
||||
color: #999;
|
||||
|
@ -1534,9 +1534,8 @@ img.help_tip {
|
|||
padding-right: 24px;
|
||||
}
|
||||
th img.help_tip {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
margin: 0 -24px 0 0;
|
||||
float: right;
|
||||
}
|
||||
fieldset {
|
||||
img.help_tip {
|
||||
|
@ -1608,12 +1607,21 @@ img.help_tip {
|
|||
#product_variation-parent #parent_id {
|
||||
width: 100%;
|
||||
}
|
||||
#postimagediv {
|
||||
img {
|
||||
border: 1px solid #d5d5d5;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
#woocommerce-product-images {
|
||||
.inside {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.add_product_images {
|
||||
padding: 0 9px;
|
||||
}
|
||||
#product_images_container {
|
||||
padding: 9px 0 0 9px;
|
||||
padding: 0 0 0 9px;
|
||||
ul {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
|
@ -1625,7 +1633,7 @@ img.help_tip {
|
|||
float: left;
|
||||
cursor: move;
|
||||
border: 1px solid #d5d5d5;
|
||||
margin: 0 9px 9px 0;
|
||||
margin: 9px 9px 0 0;
|
||||
background: #f7f7f7;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
|
@ -1639,41 +1647,11 @@ img.help_tip {
|
|||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
.loading {
|
||||
background: #fff url(../images/ajax-loader.gif) no-repeat center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.5;
|
||||
position: absolute;
|
||||
display: none;
|
||||
top:0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
li.excluded {
|
||||
opacity: 0.2;
|
||||
}
|
||||
li.loading {
|
||||
.loading {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
li.image:first-child {
|
||||
margin: 0 0 9px 0;
|
||||
width: 258px;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
li.wc-metabox-sortable-placeholder {
|
||||
border: 4px dashed #dddddd;
|
||||
background: #f7f7f7 url(../images/image_watermark.png) no-repeat center;
|
||||
}
|
||||
li.wc-metabox-sortable-placeholder:first-child {
|
||||
background: #f7f7f7 url(../images/star_watermark.png) no-repeat center;
|
||||
width: 258px;
|
||||
height: 258px;
|
||||
}
|
||||
ul.actions {
|
||||
position: absolute;
|
||||
top:0;
|
||||
|
@ -1710,36 +1688,6 @@ img.help_tip {
|
|||
}
|
||||
}
|
||||
}
|
||||
#plupload-upload-ui {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
background: none;
|
||||
cursor: default !important;
|
||||
border: 0;
|
||||
width: 258px;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
padding: 0 0 9px 9px;
|
||||
#drag-drop-area {
|
||||
padding: 20px 0;
|
||||
height: auto;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
box-sizing: border-box; /* Opera/IE 8+ */
|
||||
line-height: 1.4em;
|
||||
p {
|
||||
color: #AAA;
|
||||
font-size: 14px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
p.drag-drop-info {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#woocommerce-product-data {
|
||||
|
@ -2061,7 +2009,10 @@ img.help_tip {
|
|||
}
|
||||
.upload_file_button {
|
||||
padding-left: 20px;
|
||||
background: #fefefe url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAQ0lEQVQYV3WPUQoAMAhC1+E6tYdrFBgiW185X7biSAGolpkZfN6GJg1CA7ip0CYo+FzxBTqeE/7J1qGAXsTEAdxQfQHJTymZe4oqiAAAAABJRU5ErkJggg==) no-repeat 8px 5px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAQ0lEQVQYV3WPUQoAMAhC1+E6tYdrFBgiW185X7biSAGolpkZfN6GJg1CA7ip0CYo+FzxBTqeE/7J1qGAXsTEAdxQfQHJTymZe4oqiAAAAABJRU5ErkJggg==) !important;
|
||||
background-color: #FEFEFE !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-position: 8px 7px !important;
|
||||
}
|
||||
}
|
||||
#woocommerce-product-data input.dp-applied {
|
||||
|
@ -2177,6 +2128,11 @@ img.help_tip {
|
|||
padding: 4px;
|
||||
color: #555;
|
||||
}
|
||||
.upload_file_button {
|
||||
font-size: 12px;
|
||||
padding: 3px 8px 3px 20px;
|
||||
line-height: 1;
|
||||
}
|
||||
select, .chzn-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
@ -2379,7 +2335,10 @@ img.help_tip {
|
|||
width: auto;
|
||||
margin: 5px 0 0 0;
|
||||
padding: 3px 8px 3px 20px;
|
||||
background: #fefefe url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAQ0lEQVQYV3WPUQoAMAhC1+E6tYdrFBgiW185X7biSAGolpkZfN6GJg1CA7ip0CYo+FzxBTqeE/7J1qGAXsTEAdxQfQHJTymZe4oqiAAAAABJRU5ErkJggg==) no-repeat 8px 5px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAQ0lEQVQYV3WPUQoAMAhC1+E6tYdrFBgiW185X7biSAGolpkZfN6GJg1CA7ip0CYo+FzxBTqeE/7J1qGAXsTEAdxQfQHJTymZe4oqiAAAAABJRU5ErkJggg==) !important;
|
||||
background-color: #FEFEFE !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-position: 8px 7px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2691,20 +2650,6 @@ table.bar_chart {
|
|||
background-image: url(../images/product_types-x2.png) !important;
|
||||
background-size:96px 16px !important;
|
||||
}
|
||||
#woocommerce-product-images {
|
||||
.inside {
|
||||
#product_images_container {
|
||||
ul {
|
||||
li.image, li.add, li.wc-metabox-sortable-placeholder {
|
||||
.loading {
|
||||
background-image: url(../images/ajax-loader@2x.gif);
|
||||
background-size: 16px 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#woocommerce-product-data ul.product_data_tabs li {
|
||||
&.general_options, &.tax_options, &.inventory_options, &.shipping_options, &.linked_product_options, &.attribute_options, &.variation_options, &.advanced_options {
|
||||
a {
|
||||
|
@ -2733,6 +2678,16 @@ table.bar_chart {
|
|||
}
|
||||
}
|
||||
}
|
||||
#woocommerce_dashboard_recent_reviews {
|
||||
.star-rating {
|
||||
background-image: url(../images/admin-star@2x.png);
|
||||
background-size: 10px 20px;
|
||||
span {
|
||||
background-image: url(../images/admin-star@2x.png);
|
||||
background-size: 10px 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@import 'chosen.less';
|
|
@ -922,12 +922,13 @@ p.demo_store {
|
|||
border-top: 1px solid rgba(0,0,0,0.1);
|
||||
padding: 6px 12px;
|
||||
vertical-align: middle;
|
||||
small {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
td.product-quantity {
|
||||
text-align: center;
|
||||
}
|
||||
tfoot td {
|
||||
tfoot td, tfoot th {
|
||||
font-weight:bold;
|
||||
border-top: 1px solid rgba(0,0,0,0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1649,5 +1650,13 @@ p.demo_store {
|
|||
}
|
||||
}
|
||||
}
|
||||
.star-rating {
|
||||
background-image: url(../images/star@2x.png);
|
||||
background-size: 16px 48px;
|
||||
span {
|
||||
background-image: url(../images/star@2x.png);
|
||||
background-size: 16px 48px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 5.3 KiB |
|
@ -1050,22 +1050,20 @@ jQuery( function($){
|
|||
|
||||
// META BOXES
|
||||
|
||||
jQuery('.expand_all').click(function(){
|
||||
jQuery(this).closest('.wc-metaboxes-wrapper').find('.wc-metabox > table').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('.close_all').click(function(){
|
||||
jQuery(this).closest('.wc-metaboxes-wrapper').find('.wc-metabox > table').hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
// Open/close
|
||||
jQuery('.wc-metaboxes-wrapper').on('click', '.wc-metabox h3', function(event){
|
||||
// If the user clicks on some form input inside the h3, like a select list (for variations), the box should not be toggled
|
||||
if ($(event.target).filter(':input, option').length) return;
|
||||
|
||||
jQuery(this).next('.wc-metabox-content').toggle();
|
||||
})
|
||||
.on('click', '.expand_all', function(event){
|
||||
jQuery(this).closest('.wc-metaboxes-wrapper').find('.wc-metabox > table').show();
|
||||
return false;
|
||||
})
|
||||
.on('click', '.close_all', function(event){
|
||||
jQuery(this).closest('.wc-metaboxes-wrapper').find('.wc-metabox > table').hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('.wc-metabox.closed').each(function(){
|
||||
|
@ -1258,7 +1256,7 @@ jQuery( function($){
|
|||
|
||||
var data = {
|
||||
post_id: woocommerce_writepanel_params.post_id,
|
||||
data: $('.woocommerce_attributes').find('input, select').serialize(),
|
||||
data: $('.woocommerce_attributes').find('input, select, textarea').serialize(),
|
||||
action: 'woocommerce_save_attributes',
|
||||
security: woocommerce_writepanel_params.save_attributes_nonce
|
||||
};
|
||||
|
@ -1282,32 +1280,74 @@ jQuery( function($){
|
|||
});
|
||||
|
||||
// Uploading files
|
||||
var file_path_field;
|
||||
var downloadable_file_frame;
|
||||
|
||||
window.send_to_editor_default = window.send_to_editor;
|
||||
jQuery('.upload_file_button').live('click', function( event ){
|
||||
|
||||
jQuery('.upload_file_button').live('click', function(){
|
||||
var $el = $(this);
|
||||
var $file_path_field = $el.parent().find('.file_paths');
|
||||
var file_paths = $file_path_field.val();
|
||||
|
||||
file_path_field = jQuery(this).parent().find('.file_paths');
|
||||
event.preventDefault();
|
||||
|
||||
formfield = jQuery(file_path_field).attr('name');
|
||||
|
||||
window.send_to_editor = window.send_to_download_url;
|
||||
|
||||
tb_show('', 'media-upload.php?type=downloadable_product&from=wc01&TB_iframe=true');
|
||||
return false;
|
||||
});
|
||||
|
||||
window.send_to_download_url = function(html) {
|
||||
|
||||
file_url = jQuery(html).attr('href');
|
||||
if (file_url) {
|
||||
jQuery(file_path_field).val(jQuery(file_path_field).val() ? jQuery(file_path_field).val() + "\n" + file_url : file_url);
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( downloadable_file_frame ) {
|
||||
downloadable_file_frame.open();
|
||||
return;
|
||||
}
|
||||
tb_remove();
|
||||
window.send_to_editor = window.send_to_editor_default;
|
||||
|
||||
}
|
||||
var downloadable_file_states = [
|
||||
// Main states.
|
||||
new wp.media.controller.Library({
|
||||
library: wp.media.query(),
|
||||
multiple: true,
|
||||
title: $el.data('choose'),
|
||||
priority: 20,
|
||||
filterable: 'uploaded',
|
||||
})
|
||||
];
|
||||
|
||||
// Create the media frame.
|
||||
downloadable_file_frame = wp.media.frames.downloadable_file = wp.media({
|
||||
// Set the title of the modal.
|
||||
title: $el.data('choose'),
|
||||
library: {
|
||||
type: ''
|
||||
},
|
||||
button: {
|
||||
text: $el.data('update'),
|
||||
},
|
||||
multiple: true,
|
||||
states: downloadable_file_states,
|
||||
});
|
||||
|
||||
// When an image is selected, run a callback.
|
||||
downloadable_file_frame.on( 'select', function() {
|
||||
|
||||
var selection = downloadable_file_frame.state().get('selection');
|
||||
|
||||
selection.map( function( attachment ) {
|
||||
|
||||
attachment = attachment.toJSON();
|
||||
|
||||
if ( attachment.url )
|
||||
file_paths = file_paths ? file_paths + "\n" + attachment.url : attachment.url
|
||||
|
||||
} );
|
||||
|
||||
$file_path_field.val( file_paths );
|
||||
});
|
||||
|
||||
// Set post to 0 and set our custom type
|
||||
downloadable_file_frame.on( 'ready', function() {
|
||||
downloadable_file_frame.uploader.options.uploader.params = {
|
||||
type: 'downloadable_product'
|
||||
};
|
||||
});
|
||||
|
||||
// Finally, open the modal.
|
||||
downloadable_file_frame.open();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
|
||||
// Block widgets and fragments
|
||||
$('.widget_shopping_cart, .shop_table.cart, .updating, .cart_totals').fadeTo('400', '0.6').block({message: null, overlayCSS: {background: 'transparent url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', opacity: 0.6 } } );
|
||||
$('.widget_shopping_cart, .shop_table.cart, .updating, .cart_totals').fadeTo('400', '0.6').block({message: null, overlayCSS: {background: 'transparent url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } } );
|
||||
|
||||
// Changes button classes
|
||||
if ( $thisbutton.parent().find('.added_to_cart').size() == 0 )
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(e){e(".add_to_cart_button").live("click",function(){var t=e(this);if(t.is(".product_type_simple, .product_type_downloadable, .product_type_virtual")){if(!t.attr("data-product_id"))return!0;t.removeClass("added");t.addClass("loading");var n={action:"woocommerce_add_to_cart",product_id:t.attr("data-product_id"),security:woocommerce_params.add_to_cart_nonce};e("body").trigger("adding_to_cart");e.post(woocommerce_params.ajax_url,n,function(r){var i=window.location.toString();i=i.replace("add-to-cart","added-to-cart");t.removeClass("loading");n=e.parseJSON(r);if(n.error&&n.product_url){window.location=n.product_url;return}fragments=n;fragments&&e.each(fragments,function(t,n){e(t).addClass("updating")});e(".widget_shopping_cart, .shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+woocommerce_params.ajax_loader_url+") no-repeat center",opacity:.6}});t.parent().find(".added_to_cart").size()==0&&t.addClass("added").after(' <a href="'+woocommerce_params.cart_url+'" class="added_to_cart" title="'+woocommerce_params.i18n_view_cart+'">'+woocommerce_params.i18n_view_cart+"</a>");if(e(".widget_shopping_cart").size()>0)e(".widget_shopping_cart:eq(0)").load(i+" .widget_shopping_cart:eq(0) > *",function(){fragments&&e.each(fragments,function(t,n){e(t).replaceWith(n)});e(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock();e("body").trigger("cart_widget_refreshed")});else{fragments&&e.each(fragments,function(t,n){e(t).replaceWith(n)});e(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock()}e(".shop_table.cart").load(i+" .shop_table.cart:eq(0) > *",function(){e("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" id="add1" class="plus" />').prepend('<input type="button" value="-" id="minus1" class="minus" />');e(".shop_table.cart").stop(!0).css("opacity","1").unblock();e("body").trigger("cart_page_refreshed")});e(".cart_totals").load(i+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock()});e("body").trigger("added_to_cart")});return!1}return!0})});
|
||||
jQuery(document).ready(function(e){e(".add_to_cart_button").live("click",function(){var t=e(this);if(t.is(".product_type_simple, .product_type_downloadable, .product_type_virtual")){if(!t.attr("data-product_id"))return!0;t.removeClass("added");t.addClass("loading");var n={action:"woocommerce_add_to_cart",product_id:t.attr("data-product_id"),security:woocommerce_params.add_to_cart_nonce};e("body").trigger("adding_to_cart");e.post(woocommerce_params.ajax_url,n,function(r){var i=window.location.toString();i=i.replace("add-to-cart","added-to-cart");t.removeClass("loading");n=e.parseJSON(r);if(n.error&&n.product_url){window.location=n.product_url;return}fragments=n;fragments&&e.each(fragments,function(t,n){e(t).addClass("updating")});e(".widget_shopping_cart, .shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+woocommerce_params.ajax_loader_url+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}});t.parent().find(".added_to_cart").size()==0&&t.addClass("added").after(' <a href="'+woocommerce_params.cart_url+'" class="added_to_cart" title="'+woocommerce_params.i18n_view_cart+'">'+woocommerce_params.i18n_view_cart+"</a>");if(e(".widget_shopping_cart").size()>0)e(".widget_shopping_cart:eq(0)").load(i+" .widget_shopping_cart:eq(0) > *",function(){fragments&&e.each(fragments,function(t,n){e(t).replaceWith(n)});e(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock();e("body").trigger("cart_widget_refreshed")});else{fragments&&e.each(fragments,function(t,n){e(t).replaceWith(n)});e(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock()}e(".shop_table.cart").load(i+" .shop_table.cart:eq(0) > *",function(){e("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" id="add1" class="plus" />').prepend('<input type="button" value="-" id="minus1" class="minus" />');e(".shop_table.cart").stop(!0).css("opacity","1").unblock();e("body").trigger("cart_page_refreshed")});e(".cart_totals").load(i+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock()});e("body").trigger("added_to_cart")});return!1}return!0})});
|
|
@ -13,7 +13,7 @@ jQuery(document).ready(function($) {
|
|||
|
||||
var method = $(this).val();
|
||||
|
||||
$('div.cart_totals').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', opacity: 0.6}});
|
||||
$('div.cart_totals').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6}});
|
||||
|
||||
var data = {
|
||||
action: 'woocommerce_update_shipping_method',
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(e){e(".shipping-calculator-form").hide();e(".shipping-calculator-button").click(function(){e(".shipping-calculator-form").slideToggle("slow");return!1});e("select#shipping_method, input[name=shipping_method]").live("change",function(){var t=e(this).val();e("div.cart_totals").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.ajax_loader_url+") no-repeat center",opacity:.6}});var n={action:"woocommerce_update_shipping_method",security:woocommerce_params.update_shipping_method_nonce,shipping_method:t};e.post(woocommerce_params.ajax_url,n,function(t){e("div.cart_totals").replaceWith(t);e("body").trigger("updated_shipping_method")})})});
|
||||
jQuery(document).ready(function(e){e(".shipping-calculator-form").hide();e(".shipping-calculator-button").click(function(){e(".shipping-calculator-form").slideToggle("slow");return!1});e("select#shipping_method, input[name=shipping_method]").live("change",function(){var t=e(this).val();e("div.cart_totals").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.ajax_loader_url+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}});var n={action:"woocommerce_update_shipping_method",security:woocommerce_params.update_shipping_method_nonce,shipping_method:t};e.post(woocommerce_params.ajax_url,n,function(t){e("div.cart_totals").replaceWith(t);e("body").trigger("updated_shipping_method")})})});
|
|
@ -37,7 +37,7 @@ jQuery(document).ready(function($) {
|
|||
var s_address_2 = $('input#shipping_address_2').val();
|
||||
}
|
||||
|
||||
$('#order_methods, #order_review').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', opacity: 0.6}});
|
||||
$('#order_methods, #order_review').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6}});
|
||||
|
||||
var data = {
|
||||
action: 'woocommerce_update_order_review',
|
||||
|
@ -161,7 +161,7 @@ jQuery(document).ready(function($) {
|
|||
|
||||
if ( $form.is('.processing') ) return false;
|
||||
|
||||
$form.addClass('processing').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', opacity: 0.6}});
|
||||
$form.addClass('processing').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6}});
|
||||
|
||||
var data = {
|
||||
action: 'woocommerce_apply_coupon',
|
||||
|
@ -237,7 +237,7 @@ jQuery(document).ready(function($) {
|
|||
var form_data = $form.data();
|
||||
|
||||
if ( form_data["blockUI.isBlocked"] != 1 )
|
||||
$form.block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', opacity: 0.6}});
|
||||
$form.block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6}});
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
|
@ -245,7 +245,11 @@ jQuery(document).ready(function($) {
|
|||
data: $form.serialize(),
|
||||
success: function( code ) {
|
||||
try {
|
||||
result = $.parseJSON( code );
|
||||
// Get the valid JSON only
|
||||
var code = code.split("<!--WC_END-->")[0];
|
||||
|
||||
// Parse
|
||||
var result = $.parseJSON( code );
|
||||
|
||||
if (result.result=='success') {
|
||||
|
||||
|
|
|
@ -14,97 +14,13 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
abstract class WC_Product {
|
||||
|
||||
/** @var int The product (post) ID. */
|
||||
var $id;
|
||||
|
||||
/** @var array Array of custom fields (meta) containing product data. */
|
||||
var $product_custom_fields;
|
||||
|
||||
/** @var array Array of product attributes. */
|
||||
var $attributes;
|
||||
public $id;
|
||||
|
||||
/** @var object The actual post object. */
|
||||
var $post;
|
||||
|
||||
/** @var string "Yes" for downloadable products. */
|
||||
var $downloadable;
|
||||
|
||||
/** @var string "Yes" for virtual products. */
|
||||
var $virtual;
|
||||
|
||||
/** @var string The product SKU (stock keeping unit). */
|
||||
var $sku;
|
||||
|
||||
/** @var string The product price. */
|
||||
var $price;
|
||||
|
||||
/** @var string The product's visibility. */
|
||||
var $visibility;
|
||||
|
||||
/** @var string The product's stock level (if applicable). */
|
||||
var $stock;
|
||||
|
||||
/** @var string The product's stock status (instock or outofstock). */
|
||||
var $stock_status;
|
||||
|
||||
/** @var string The product's backorder status. */
|
||||
var $backorders;
|
||||
|
||||
/** @var bool True if the product is stock managed. */
|
||||
var $manage_stock;
|
||||
|
||||
/** @var string The product's sale price. */
|
||||
var $sale_price;
|
||||
|
||||
/** @var string The product's regular non-sale price. */
|
||||
var $regular_price;
|
||||
|
||||
/** @var string The product's weight. */
|
||||
var $weight;
|
||||
|
||||
/** @var string The product's length. */
|
||||
var $length;
|
||||
|
||||
/** @var string The product's width. */
|
||||
var $width;
|
||||
|
||||
/** @var string The product's height. */
|
||||
var $height;
|
||||
|
||||
/** @var string The product's tax status. */
|
||||
var $tax_status;
|
||||
|
||||
/** @var string The product's tax class. */
|
||||
var $tax_class;
|
||||
|
||||
/** @var array Array of product ID's being up-sold. */
|
||||
var $upsell_ids;
|
||||
|
||||
/** @var array Array of product ID's being cross-sold. */
|
||||
var $crosssell_ids;
|
||||
public $post;
|
||||
|
||||
/** @var string The product's type (simple, variable etc). */
|
||||
var $product_type;
|
||||
|
||||
/** @var string Date a sale starts. */
|
||||
var $sale_price_dates_from;
|
||||
|
||||
/** @var string Data a sale ends. */
|
||||
var $sale_price_dates_to;
|
||||
|
||||
/** @var string "Yes" for featured products. */
|
||||
var $featured;
|
||||
|
||||
/** @var string Shipping class slug for the product. */
|
||||
var $shipping_class;
|
||||
|
||||
/** @var int Shipping class ID for the product. */
|
||||
var $shipping_class_id;
|
||||
|
||||
/** @var string Formatted LxWxH. */
|
||||
var $dimensions;
|
||||
|
||||
/** @var string "Yes" if sold individually. */
|
||||
var $sold_individually;
|
||||
public $product_type;
|
||||
|
||||
/**
|
||||
* __construct function.
|
||||
|
@ -112,38 +28,76 @@ abstract class WC_Product {
|
|||
* @access public
|
||||
* @param mixed $product
|
||||
*/
|
||||
function __construct( $product ) {
|
||||
|
||||
public function __construct( $product ) {
|
||||
if ( is_object( $product ) ) {
|
||||
$this->id = absint( $product->ID );
|
||||
$this->id = absint( $product->ID );
|
||||
$this->post = $product;
|
||||
} else {
|
||||
$this->id = absint( $product );
|
||||
$this->id = absint( $product );
|
||||
$this->post = get_post( $this->id );
|
||||
}
|
||||
|
||||
$this->product_custom_fields = get_post_custom( $this->id );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load the data from the custom fields
|
||||
* __isset function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $fields
|
||||
* @param string $data (default: '')
|
||||
* @return void
|
||||
* @param mixed $key
|
||||
* @return bool
|
||||
*/
|
||||
function load_product_data( $fields, $data = '' ) {
|
||||
|
||||
if ( ! $data )
|
||||
$data = $this->product_custom_fields;
|
||||
|
||||
if ( $fields )
|
||||
foreach ( $fields as $key => $default )
|
||||
$this->$key = isset( $data[ '_' . $key ][0] ) && $data[ '_' . $key ][0] !== '' ? $data[ '_' . $key ][0] : $default;
|
||||
public function __isset( $key ) {
|
||||
return metadata_exists( 'post', $this->id, '_' . $key );
|
||||
}
|
||||
|
||||
/**
|
||||
* __get function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get( $key ) {
|
||||
|
||||
// Get values or default if not set
|
||||
if ( in_array( $key, array( 'downloadable', 'virtual', 'backorders', 'manage_stock', 'featured', 'sold_individually' ) ) )
|
||||
$value = ( $value = get_post_meta( $this->id, '_' . $key, true ) ) ? $value : 'no';
|
||||
|
||||
elseif( in_array( $key, array( 'product_attributes', 'crosssell_ids', 'upsell_ids' ) ) )
|
||||
$value = ( $value = get_post_meta( $this->id, '_' . $key, true ) ) ? $value : array();
|
||||
|
||||
elseif ( 'visibility' == $key )
|
||||
$value = ( $value = get_post_meta( $this->id, '_visibility', true ) ) ? $value : 'hidden';
|
||||
|
||||
elseif ( 'stock' == $key )
|
||||
$value = ( $value = get_post_meta( $this->id, '_stock', true ) ) ? $value : 0;
|
||||
|
||||
elseif ( 'stock_status' == $key )
|
||||
$value = ( $value = get_post_meta( $this->id, '_stock_status', true ) ) ? $value : 'instock';
|
||||
|
||||
elseif ( 'tax_status' == $key )
|
||||
$value = ( $value = get_post_meta( $this->id, '_tax_status', true ) ) ? $value : 'taxable';
|
||||
|
||||
else
|
||||
$value = get_post_meta( $this->id, '_' . $key, true );
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_gallery_attachment_ids function.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_gallery_attachment_ids() {
|
||||
if ( ! isset( $this->product_image_gallery ) ) {
|
||||
// Backwards compat
|
||||
$attachment_ids = array_diff( get_posts( 'post_parent=' . $this->id . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids' ), array( get_post_thumbnail_id() ) );
|
||||
$this->product_image_gallery = implode( ',', $attachment_ids );
|
||||
}
|
||||
|
||||
return (array) explode( ',', $this->product_image_gallery );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get SKU (Stock-keeping unit) - product unique ID.
|
||||
|
@ -292,7 +246,7 @@ abstract class WC_Product {
|
|||
*/
|
||||
function get_file_download_path( $download_id ) {
|
||||
|
||||
$file_paths = isset( $this->product_custom_fields['_file_paths'][0] ) ? $this->product_custom_fields['_file_paths'][0] : '';
|
||||
$file_paths = isset( $this->file_paths ) ? $this->file_paths : '';
|
||||
$file_paths = maybe_unserialize( $file_paths );
|
||||
$file_paths = apply_filters( 'woocommerce_file_download_paths', $file_paths, $this->id, null, null );
|
||||
|
||||
|
@ -1123,16 +1077,7 @@ abstract class WC_Product {
|
|||
* @return array
|
||||
*/
|
||||
function get_attributes() {
|
||||
|
||||
if ( ! is_array( $this->attributes ) ) {
|
||||
|
||||
if ( isset( $this->product_custom_fields['_product_attributes'][0] ) )
|
||||
$this->attributes = maybe_unserialize( maybe_unserialize( $this->product_custom_fields['_product_attributes'][0] ));
|
||||
else
|
||||
$this->attributes = array();
|
||||
}
|
||||
|
||||
return (array) $this->attributes;
|
||||
return (array) maybe_unserialize( $this->product_attributes );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ abstract class WC_Session {
|
|||
*/
|
||||
public function __construct() {
|
||||
// When leaving or ending page load, store data
|
||||
add_action( 'shutdown', array( &$this, 'save_data' ), 20 );
|
||||
add_action( 'shutdown', array( $this, 'save_data' ), 20 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,67 +13,67 @@
|
|||
class WC_Cart {
|
||||
|
||||
/** @var array Contains an array of cart items. */
|
||||
var $cart_contents;
|
||||
public $cart_contents;
|
||||
|
||||
/** @var array Contains an array of coupon codes applied to the cart. */
|
||||
var $applied_coupons;
|
||||
public $applied_coupons;
|
||||
|
||||
/** @var array Contains an array of coupon code discounts after they have been applied. */
|
||||
var $coupon_discount_amounts;
|
||||
public $coupon_discount_amounts;
|
||||
|
||||
/** @var float The total cost of the cart items. */
|
||||
var $cart_contents_total;
|
||||
public $cart_contents_total;
|
||||
|
||||
/** @var float The total weight of the cart items. */
|
||||
var $cart_contents_weight;
|
||||
public $cart_contents_weight;
|
||||
|
||||
/** @var float The total count of the cart items. */
|
||||
var $cart_contents_count;
|
||||
public $cart_contents_count;
|
||||
|
||||
/** @var float The total tax for the cart items. */
|
||||
var $cart_contents_tax;
|
||||
public $cart_contents_tax;
|
||||
|
||||
/** @var float Cart grand total. */
|
||||
var $total;
|
||||
public $total;
|
||||
|
||||
/** @var float Cart subtotal. */
|
||||
var $subtotal;
|
||||
public $subtotal;
|
||||
|
||||
/** @var float Cart subtotal without tax. */
|
||||
var $subtotal_ex_tax;
|
||||
public $subtotal_ex_tax;
|
||||
|
||||
/** @var float Total cart tax. */
|
||||
var $tax_total;
|
||||
public $tax_total;
|
||||
|
||||
/** @var array An array of taxes/tax rates for the cart. */
|
||||
var $taxes;
|
||||
public $taxes;
|
||||
|
||||
/** @var array An array of taxes/tax rates for the shipping. */
|
||||
var $shipping_taxes;
|
||||
public $shipping_taxes;
|
||||
|
||||
/** @var float Discounts before tax. */
|
||||
var $discount_cart;
|
||||
public $discount_cart;
|
||||
|
||||
/** @var float Discounts after tax. */
|
||||
var $discount_total;
|
||||
public $discount_total;
|
||||
|
||||
/** @var float Total for additonal fees. */
|
||||
var $fee_total;
|
||||
public $fee_total;
|
||||
|
||||
/** @var float Shipping cost. */
|
||||
var $shipping_total;
|
||||
public $shipping_total;
|
||||
|
||||
/** @var float Shipping tax. */
|
||||
var $shipping_tax_total;
|
||||
public $shipping_tax_total;
|
||||
|
||||
/** @var float Shipping title/label. */
|
||||
var $shipping_label;
|
||||
public $shipping_label;
|
||||
|
||||
/** @var WC_Tax */
|
||||
var $tax;
|
||||
public $tax;
|
||||
|
||||
/** @var array An array of fees. */
|
||||
var $fees;
|
||||
public $fees;
|
||||
|
||||
/**
|
||||
* Constructor for the cart class. Loads options and hooks in the init method.
|
||||
|
@ -81,7 +81,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
public function __construct() {
|
||||
$this->tax = new WC_Tax();
|
||||
$this->prices_include_tax = ( get_option( 'woocommerce_prices_include_tax' ) == 'yes' ) ? true : false;
|
||||
$this->tax_display_cart = get_option( 'woocommerce_tax_display_cart' );
|
||||
|
@ -90,7 +90,7 @@ class WC_Cart {
|
|||
$this->display_totals_ex_tax = $this->tax_display_cart == 'excl' ? true : false;
|
||||
$this->display_cart_ex_tax = $this->tax_display_cart == 'excl' ? true : false;
|
||||
|
||||
add_action( 'init', array( &$this, 'init' ), 5 ); // Get cart on init
|
||||
add_action( 'init', array( $this, 'init' ), 5 ); // Get cart on init
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,12 +100,12 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function init() {
|
||||
public function init() {
|
||||
$this->get_cart_from_session();
|
||||
|
||||
add_action('woocommerce_check_cart_items', array( &$this, 'check_cart_items' ), 1 );
|
||||
add_action('woocommerce_check_cart_items', array( &$this, 'check_cart_coupons' ), 1 );
|
||||
add_action('woocommerce_after_checkout_validation', array( &$this, 'check_customer_coupons' ), 1 );
|
||||
add_action('woocommerce_check_cart_items', array( $this, 'check_cart_items' ), 1 );
|
||||
add_action('woocommerce_check_cart_items', array( $this, 'check_cart_coupons' ), 1 );
|
||||
add_action('woocommerce_after_checkout_validation', array( $this, 'check_customer_coupons' ), 1 );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -118,7 +118,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_cart_from_session() {
|
||||
public function get_cart_from_session() {
|
||||
global $woocommerce;
|
||||
|
||||
// Load the coupons
|
||||
|
@ -191,7 +191,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function set_session() {
|
||||
public function set_session() {
|
||||
global $woocommerce;
|
||||
|
||||
// Re-calc totals
|
||||
|
@ -244,7 +244,7 @@ class WC_Cart {
|
|||
* @param bool $clear_persistent_cart (default: true)
|
||||
* @return void
|
||||
*/
|
||||
function empty_cart( $clear_persistent_cart = true ) {
|
||||
public function empty_cart( $clear_persistent_cart = true ) {
|
||||
global $woocommerce;
|
||||
|
||||
$this->cart_contents = array();
|
||||
|
@ -268,7 +268,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function persistent_cart_update() {
|
||||
public function persistent_cart_update() {
|
||||
global $woocommerce;
|
||||
|
||||
update_user_meta( get_current_user_id(), '_woocommerce_persistent_cart', array(
|
||||
|
@ -283,7 +283,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function persistent_cart_destroy() {
|
||||
public function persistent_cart_destroy() {
|
||||
delete_user_meta( get_current_user_id(), '_woocommerce_persistent_cart' );
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
function get_cart_contents_count() {
|
||||
public function get_cart_contents_count() {
|
||||
return apply_filters( 'woocommerce_cart_contents_count', $this->cart_contents_count );
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function check_cart_items() {
|
||||
public function check_cart_items() {
|
||||
global $woocommerce;
|
||||
|
||||
// Check item stock
|
||||
|
@ -325,7 +325,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function check_cart_coupons() {
|
||||
public function check_cart_coupons() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! empty( $this->applied_coupons ) ) {
|
||||
|
@ -352,7 +352,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_cart_item_quantities() {
|
||||
public function get_cart_item_quantities() {
|
||||
$quantities = array();
|
||||
|
||||
foreach ( $this->get_cart() as $cart_item_key => $values ) {
|
||||
|
@ -391,14 +391,14 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @param array $posted
|
||||
*/
|
||||
function check_customer_coupons( $posted ) {
|
||||
public function check_customer_coupons( $posted ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! empty( $this->applied_coupons ) ) {
|
||||
foreach ( $this->applied_coupons as $key => $code ) {
|
||||
$coupon = new WC_Coupon( $code );
|
||||
|
||||
if ( is_array( $coupon->customer_email ) && sizeof( $coupon->customer_email ) > 0 ) {
|
||||
if ( ! is_wp_error( $coupon->is_valid() ) && is_array( $coupon->customer_email ) && sizeof( $coupon->customer_email ) > 0 ) {
|
||||
|
||||
$coupon->customer_email = array_map( 'sanitize_email', $coupon->customer_email );
|
||||
|
||||
|
@ -429,7 +429,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function check_cart_item_stock() {
|
||||
public function check_cart_item_stock() {
|
||||
global $woocommerce, $wpdb;
|
||||
|
||||
$error = new WP_Error();
|
||||
|
@ -540,7 +540,7 @@ class WC_Cart {
|
|||
* @param bool $flat (default: false)
|
||||
* @return string
|
||||
*/
|
||||
function get_item_data( $cart_item, $flat = false ) {
|
||||
public function get_item_data( $cart_item, $flat = false ) {
|
||||
global $woocommerce;
|
||||
|
||||
$return = '';
|
||||
|
@ -622,7 +622,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return array cross_sells (item ids)
|
||||
*/
|
||||
function get_cross_sells() {
|
||||
public function get_cross_sells() {
|
||||
$cross_sells = array();
|
||||
$in_cart = array();
|
||||
if ( sizeof( $this->cart_contents) > 0 ) {
|
||||
|
@ -642,7 +642,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string url to page
|
||||
*/
|
||||
function get_cart_url() {
|
||||
public function get_cart_url() {
|
||||
$cart_page_id = woocommerce_get_page_id('cart');
|
||||
if ( $cart_page_id ) return apply_filters( 'woocommerce_get_cart_url', get_permalink( $cart_page_id ) );
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string url to page
|
||||
*/
|
||||
function get_checkout_url() {
|
||||
public function get_checkout_url() {
|
||||
$checkout_page_id = woocommerce_get_page_id('checkout');
|
||||
if ( $checkout_page_id ) {
|
||||
if ( is_ssl() )
|
||||
|
@ -667,7 +667,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string url to page
|
||||
*/
|
||||
function get_remove_url( $cart_item_key ) {
|
||||
public function get_remove_url( $cart_item_key ) {
|
||||
global $woocommerce;
|
||||
$cart_page_id = woocommerce_get_page_id('cart');
|
||||
if ($cart_page_id)
|
||||
|
@ -679,7 +679,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return array contents of the cart
|
||||
*/
|
||||
function get_cart() {
|
||||
public function get_cart() {
|
||||
return array_filter( (array) $this->cart_contents );
|
||||
}
|
||||
|
||||
|
@ -688,7 +688,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return array merged taxes
|
||||
*/
|
||||
function get_taxes() {
|
||||
public function get_taxes() {
|
||||
$merged_taxes = array();
|
||||
|
||||
// Merge
|
||||
|
@ -704,7 +704,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return array merged taxes
|
||||
*/
|
||||
function get_formatted_taxes() {
|
||||
public function get_formatted_taxes() {
|
||||
|
||||
$taxes = $this->get_taxes();
|
||||
|
||||
|
@ -727,7 +727,7 @@ class WC_Cart {
|
|||
* @param mixed id of product to find in the cart
|
||||
* @return string cart item key
|
||||
*/
|
||||
function find_product_in_cart( $cart_id = false ) {
|
||||
public function find_product_in_cart( $cart_id = false ) {
|
||||
if ( $cart_id !== false )
|
||||
foreach ( $this->cart_contents as $cart_item_key => $cart_item )
|
||||
if ( $cart_item_key == $cart_id )
|
||||
|
@ -743,7 +743,7 @@ class WC_Cart {
|
|||
* @param array $cart_item_data other cart item data passed which affects this items uniqueness in the cart
|
||||
* @return string cart item key
|
||||
*/
|
||||
function generate_cart_id( $product_id, $variation_id = '', $variation = '', $cart_item_data = array() ) {
|
||||
public function generate_cart_id( $product_id, $variation_id = '', $variation = '', $cart_item_data = array() ) {
|
||||
|
||||
$id_parts = array( $product_id );
|
||||
|
||||
|
@ -779,7 +779,7 @@ class WC_Cart {
|
|||
* @param array $cart_item_data extra cart item data we want to pass into the item
|
||||
* @return bool
|
||||
*/
|
||||
function add_to_cart( $product_id, $quantity = 1, $variation_id = '', $variation = '', $cart_item_data = array() ) {
|
||||
public function add_to_cart( $product_id, $quantity = 1, $variation_id = '', $variation = '', $cart_item_data = array() ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( $quantity <= 0 ) return false;
|
||||
|
@ -892,7 +892,7 @@ class WC_Cart {
|
|||
* @param string cart_item_key contains the id of the cart item
|
||||
* @param string quantity contains the quantity of the item
|
||||
*/
|
||||
function set_quantity( $cart_item_key, $quantity = 1 ) {
|
||||
public function set_quantity( $cart_item_key, $quantity = 1 ) {
|
||||
|
||||
if ( $quantity == 0 || $quantity < 0 ) {
|
||||
do_action( 'woocommerce_before_cart_item_quantity_zero', $cart_item_key );
|
||||
|
@ -933,7 +933,7 @@ class WC_Cart {
|
|||
* @param bool $add_totals (default: false)
|
||||
* @return float price
|
||||
*/
|
||||
function get_discounted_price( $values, $price, $add_totals = false ) {
|
||||
public function get_discounted_price( $values, $price, $add_totals = false ) {
|
||||
|
||||
if ( ! $price ) return $price;
|
||||
|
||||
|
@ -982,7 +982,7 @@ class WC_Cart {
|
|||
$this_item_is_discounted = false;
|
||||
|
||||
// Apply filter
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = true );
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = true, $coupon );
|
||||
|
||||
// Apply the discount
|
||||
if ( $this_item_is_discounted ) {
|
||||
|
@ -1005,7 +1005,7 @@ class WC_Cart {
|
|||
|
||||
} elseif ( $coupon->type == 'percent_product' ) {
|
||||
|
||||
$percent_discount = ( $values['data']->get_price_excluding_tax() / 100 ) * $coupon->amount;
|
||||
$percent_discount = ( $values['data']->get_price() / 100 ) * $coupon->amount;
|
||||
|
||||
if ( $add_totals ) {
|
||||
$this->discount_cart = $this->discount_cart + ( $percent_discount * $values['quantity'] );
|
||||
|
@ -1096,7 +1096,7 @@ class WC_Cart {
|
|||
* @param mixed $values
|
||||
* @param mixed $price
|
||||
*/
|
||||
function apply_product_discounts_after_tax( $values, $price ) {
|
||||
public function apply_product_discounts_after_tax( $values, $price ) {
|
||||
|
||||
if ( ! empty( $this->applied_coupons) ) {
|
||||
foreach ( $this->applied_coupons as $code ) {
|
||||
|
@ -1104,9 +1104,11 @@ class WC_Cart {
|
|||
|
||||
do_action( 'woocommerce_product_discount_after_tax_' . $coupon->type, $coupon, $values, $price );
|
||||
|
||||
if ( ! $coupon->is_valid() ) continue;
|
||||
|
||||
if ( $coupon->type != 'fixed_product' && $coupon->type != 'percent_product' ) continue;
|
||||
|
||||
if ( !$coupon->apply_before_tax() && $coupon->is_valid() ) {
|
||||
if ( ! $coupon->apply_before_tax() ) {
|
||||
|
||||
$product_cats = wp_get_post_terms( $values['product_id'], 'product_cat', array("fields" => "ids") );
|
||||
|
||||
|
@ -1142,7 +1144,7 @@ class WC_Cart {
|
|||
$this_item_is_discounted = false;
|
||||
|
||||
// Apply filter
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = false );
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = false, $coupon );
|
||||
|
||||
// Apply the discount
|
||||
if ( $this_item_is_discounted ) {
|
||||
|
@ -1173,7 +1175,7 @@ class WC_Cart {
|
|||
*
|
||||
* @access public
|
||||
*/
|
||||
function apply_cart_discounts_after_tax() {
|
||||
public function apply_cart_discounts_after_tax() {
|
||||
|
||||
if ( $this->applied_coupons ) {
|
||||
foreach ( $this->applied_coupons as $code ) {
|
||||
|
@ -1181,7 +1183,7 @@ class WC_Cart {
|
|||
|
||||
do_action( 'woocommerce_cart_discount_after_tax_' . $coupon->type, $coupon );
|
||||
|
||||
if ( !$coupon->apply_before_tax() && $coupon->is_valid() ) {
|
||||
if ( ! $coupon->apply_before_tax() && $coupon->is_valid() ) {
|
||||
|
||||
switch ( $coupon->type ) {
|
||||
|
||||
|
@ -1215,7 +1217,7 @@ class WC_Cart {
|
|||
*
|
||||
* @access public
|
||||
*/
|
||||
function calculate_totals() {
|
||||
public function calculate_totals() {
|
||||
global $woocommerce;
|
||||
|
||||
$this->reset();
|
||||
|
@ -1244,30 +1246,31 @@ class WC_Cart {
|
|||
|
||||
// ADJUST BASE if tax rate is different (different region or modified tax class)
|
||||
if ( $tax_rates !== $base_tax_rates ) {
|
||||
$base_taxes = $this->tax->calc_tax( $row_base_price, $base_tax_rates, true, true );
|
||||
$modded_taxes = $this->tax->calc_tax( $row_base_price - array_sum( $base_taxes ), $tax_rates, false );
|
||||
$row_base_price = ( $row_base_price - array_sum( $base_taxes ) ) + array_sum( $modded_taxes );
|
||||
$base_taxes = $this->tax->calc_tax( $row_base_price, $base_tax_rates, true, true );
|
||||
$modded_taxes = $this->tax->calc_tax( $row_base_price - array_sum( $base_taxes ), $tax_rates, false );
|
||||
$row_base_price = ( $row_base_price - array_sum( $base_taxes ) ) + array_sum( $modded_taxes );
|
||||
}
|
||||
|
||||
$taxes = $this->tax->calc_tax( $row_base_price, $tax_rates, true );
|
||||
$tax_amount = $this->tax->get_tax_total( $taxes );
|
||||
$taxes = $this->tax->calc_tax( $row_base_price, $tax_rates, true );
|
||||
$tax_amount = get_option('woocommerce_tax_round_at_subtotal') == 'no' ? $this->tax->get_tax_total( $taxes ) : array_sum( $taxes );
|
||||
|
||||
}
|
||||
|
||||
// Sub total is based on base prices (without discounts)
|
||||
$this->subtotal = $this->subtotal + $row_base_price;
|
||||
$this->subtotal_ex_tax = $this->subtotal_ex_tax + ( $row_base_price - $tax_amount);
|
||||
$this->subtotal = $this->subtotal + $row_base_price;
|
||||
$this->subtotal_ex_tax = $this->subtotal_ex_tax + ( $row_base_price - $tax_amount);
|
||||
|
||||
} else {
|
||||
|
||||
if ( $_product->is_taxable() ) {
|
||||
$tax_rates = $this->tax->get_rates( $_product->get_tax_class() );
|
||||
$taxes = $this->tax->calc_tax( $row_base_price, $tax_rates, false );
|
||||
$tax_amount = $this->tax->get_tax_total( $taxes );
|
||||
$tax_rates = $this->tax->get_rates( $_product->get_tax_class() );
|
||||
$taxes = $this->tax->calc_tax( $row_base_price, $tax_rates, false );
|
||||
$tax_amount = get_option('woocommerce_tax_round_at_subtotal') == 'no' ? $this->tax->get_tax_total( $taxes ) : array_sum( $taxes );
|
||||
}
|
||||
|
||||
// Sub total is based on base prices (without discounts)
|
||||
$this->subtotal = $this->subtotal + $row_base_price + $tax_amount;
|
||||
$this->subtotal_ex_tax = $this->subtotal_ex_tax + $row_base_price;
|
||||
$this->subtotal = $this->subtotal + $row_base_price + $tax_amount;
|
||||
$this->subtotal_ex_tax = $this->subtotal_ex_tax + $row_base_price;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1502,8 +1505,8 @@ class WC_Cart {
|
|||
}
|
||||
|
||||
// Round cart/shipping tax rows
|
||||
$this->taxes = array_map( array( &$this->tax, 'round' ), $this->taxes );
|
||||
$this->shipping_taxes = array_map( array( &$this->tax, 'round' ), $this->shipping_taxes );
|
||||
$this->taxes = array_map( array( $this->tax, 'round' ), $this->taxes );
|
||||
$this->shipping_taxes = array_map( array( $this->tax, 'round' ), $this->shipping_taxes );
|
||||
|
||||
// Allow plugins to hook and alter totals before final total is calculated
|
||||
do_action( 'woocommerce_calculate_totals', $this );
|
||||
|
@ -1524,7 +1527,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
function needs_payment() {
|
||||
public function needs_payment() {
|
||||
$needs_payment = ( $this->total > 0 ) ? true : false;
|
||||
return apply_filters( 'woocommerce_cart_needs_payment', $needs_payment, $this );
|
||||
}
|
||||
|
@ -1539,7 +1542,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function calculate_shipping() {
|
||||
public function calculate_shipping() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( $this->needs_shipping() && $this->show_shipping() ) {
|
||||
|
@ -1569,7 +1572,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return array of cart items
|
||||
*/
|
||||
function get_shipping_packages() {
|
||||
public function get_shipping_packages() {
|
||||
global $woocommerce;
|
||||
|
||||
// Packages array for storing 'carts'
|
||||
|
@ -1595,7 +1598,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return bool whether or not the cart needs shipping
|
||||
*/
|
||||
function needs_shipping() {
|
||||
public function needs_shipping() {
|
||||
if ( get_option('woocommerce_calc_shipping')=='no' ) return false;
|
||||
if ( ! is_array( $this->cart_contents ) ) return false;
|
||||
|
||||
|
@ -1616,7 +1619,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
function show_shipping() {
|
||||
public function show_shipping() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( get_option('woocommerce_calc_shipping')=='no' ) return false;
|
||||
|
@ -1639,7 +1642,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
function ship_to_billing_address_only() {
|
||||
public function ship_to_billing_address_only() {
|
||||
if ( get_option('woocommerce_ship_to_billing_address_only') == 'yes' ) return true; else return false;
|
||||
}
|
||||
|
||||
|
@ -1648,7 +1651,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return mixed price or string for the shipping total
|
||||
*/
|
||||
function get_cart_shipping_total() {
|
||||
public function get_cart_shipping_total() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( isset( $this->shipping_label ) ) {
|
||||
|
@ -1688,7 +1691,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string shipping method title
|
||||
*/
|
||||
function get_cart_shipping_title() {
|
||||
public function get_cart_shipping_title() {
|
||||
if ( isset( $this->shipping_label ) ) {
|
||||
return __( 'via', 'woocommerce' ) . ' ' . $this->shipping_label;
|
||||
}
|
||||
|
@ -1704,7 +1707,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
function has_discount( $code ) {
|
||||
public function has_discount( $code ) {
|
||||
if ( in_array( $code, $this->applied_coupons ) ) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -1715,7 +1718,7 @@ class WC_Cart {
|
|||
* @param string $coupon_code - The code to apply
|
||||
* @return bool True if the coupon is applied, false if it does not exist or cannot be applied
|
||||
*/
|
||||
function add_discount( $coupon_code ) {
|
||||
public function add_discount( $coupon_code ) {
|
||||
global $woocommerce;
|
||||
|
||||
// Coupons are globally disabled
|
||||
|
@ -1726,9 +1729,8 @@ class WC_Cart {
|
|||
if ( $the_coupon->id ) {
|
||||
|
||||
// Check it can be used with cart
|
||||
$return = $the_coupon->is_valid();
|
||||
if ( ! $return || is_wp_error( $return ) ) {
|
||||
$woocommerce->add_error( is_wp_error( $return ) ? $return->get_error_message() : __( 'Invalid coupon.', 'woocommerce' ) );
|
||||
if ( ! $the_coupon->is_valid() ) {
|
||||
$woocommerce->add_error( $the_coupon->get_error_message() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1745,7 +1747,7 @@ class WC_Cart {
|
|||
|
||||
foreach ( $this->applied_coupons as $code ) {
|
||||
$coupon = new WC_Coupon($code);
|
||||
if ( $coupon->individual_use == 'yes' ) {
|
||||
if ( $coupon->is_valid() && $coupon->individual_use == 'yes' ) {
|
||||
$this->applied_coupons = array();
|
||||
}
|
||||
}
|
||||
|
@ -1777,7 +1779,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return array of applied coupons
|
||||
*/
|
||||
function get_applied_coupons() {
|
||||
public function get_applied_coupons() {
|
||||
return (array) $this->applied_coupons;
|
||||
}
|
||||
|
||||
|
@ -1786,14 +1788,14 @@ class WC_Cart {
|
|||
*
|
||||
* @params int type - 0 for all, 1 for before tax, 2 for after tax
|
||||
*/
|
||||
function remove_coupons( $type = 0 ) {
|
||||
public function remove_coupons( $type = 0 ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( 1 == $type ) {
|
||||
if ( $this->applied_coupons ) {
|
||||
foreach ( $this->applied_coupons as $index => $code ) {
|
||||
$coupon = new WC_Coupon( $code );
|
||||
if ( $coupon->apply_before_tax() ) unset( $this->applied_coupons[ $index ] );
|
||||
if ( $coupon->is_valid() && $coupon->apply_before_tax() ) unset( $this->applied_coupons[ $index ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1802,7 +1804,7 @@ class WC_Cart {
|
|||
if ( $this->applied_coupons ) {
|
||||
foreach ( $this->applied_coupons as $index => $code ) {
|
||||
$coupon = new WC_Coupon( $code );
|
||||
if ( ! $coupon->apply_before_tax() ) unset( $this->applied_coupons[ $index ] );
|
||||
if ( $coupon->is_valid() && ! $coupon->apply_before_tax() ) unset( $this->applied_coupons[ $index ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1827,7 +1829,7 @@ class WC_Cart {
|
|||
* @param string $tax_class (default: '')
|
||||
* @return void
|
||||
*/
|
||||
function add_fee( $name, $amount, $taxable = false, $tax_class = '' ) {
|
||||
public function add_fee( $name, $amount, $taxable = false, $tax_class = '' ) {
|
||||
|
||||
if ( empty( $this->fees ) )
|
||||
$this->fees = array();
|
||||
|
@ -1849,7 +1851,7 @@ class WC_Cart {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_fees() {
|
||||
public function get_fees() {
|
||||
return (array) $this->fees;
|
||||
}
|
||||
|
||||
|
@ -1862,7 +1864,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return float
|
||||
*/
|
||||
function get_order_discount_total() {
|
||||
public function get_order_discount_total() {
|
||||
return $this->discount_total;
|
||||
}
|
||||
|
||||
|
@ -1871,7 +1873,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return float
|
||||
*/
|
||||
function get_cart_discount_total() {
|
||||
public function get_cart_discount_total() {
|
||||
return $this->discount_cart;
|
||||
}
|
||||
|
||||
|
@ -1880,7 +1882,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string formatted price
|
||||
*/
|
||||
function get_total() {
|
||||
public function get_total() {
|
||||
return apply_filters( 'woocommerce_cart_total', woocommerce_price( $this->total ) );
|
||||
}
|
||||
|
||||
|
@ -1889,7 +1891,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string formatted price
|
||||
*/
|
||||
function get_total_ex_tax() {
|
||||
public function get_total_ex_tax() {
|
||||
$total = $this->total - $this->tax_total - $this->shipping_tax_total;
|
||||
if ( $total < 0 ) $total = 0;
|
||||
return apply_filters( 'woocommerce_cart_total_ex_tax', woocommerce_price( $total ) );
|
||||
|
@ -1900,7 +1902,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string formatted price
|
||||
*/
|
||||
function get_cart_total() {
|
||||
public function get_cart_total() {
|
||||
if ( ! $this->prices_include_tax ) {
|
||||
$cart_contents_total = woocommerce_price( $this->cart_contents_total );
|
||||
} else {
|
||||
|
@ -1916,7 +1918,7 @@ class WC_Cart {
|
|||
* @params bool whether to include compound taxes
|
||||
* @return string formatted price
|
||||
*/
|
||||
function get_cart_subtotal( $compound = false ) {
|
||||
public function get_cart_subtotal( $compound = false ) {
|
||||
global $woocommerce;
|
||||
|
||||
// If the cart has compound tax, we want to show the subtotal as
|
||||
|
@ -1962,7 +1964,7 @@ class WC_Cart {
|
|||
* @params int quantity
|
||||
* @return string formatted price
|
||||
*/
|
||||
function get_product_subtotal( $_product, $quantity ) {
|
||||
public function get_product_subtotal( $_product, $quantity ) {
|
||||
global $woocommerce;
|
||||
|
||||
$price = $_product->get_price();
|
||||
|
@ -1978,7 +1980,7 @@ class WC_Cart {
|
|||
$row_price = $_product->get_price_excluding_tax( $quantity );
|
||||
$product_subtotal = woocommerce_price( $row_price );
|
||||
|
||||
if ( $this->prices_include_tax )
|
||||
if ( $this->prices_include_tax && $this->tax_total > 0 )
|
||||
$product_subtotal .= ' <small class="tax_label">' . $woocommerce->countries->ex_tax_or_vat() . '</small>';
|
||||
|
||||
} else {
|
||||
|
@ -1986,7 +1988,7 @@ class WC_Cart {
|
|||
$row_price = $_product->get_price_including_tax( $quantity );
|
||||
$product_subtotal = woocommerce_price( $row_price );
|
||||
|
||||
if ( ! $this->prices_include_tax )
|
||||
if ( ! $this->prices_include_tax && $this->tax_total > 0 )
|
||||
$product_subtotal .= ' <small class="tax_label">' . $woocommerce->countries->inc_tax_or_vat() . '</small>';
|
||||
|
||||
}
|
||||
|
@ -2007,7 +2009,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return string formatted price
|
||||
*/
|
||||
function get_cart_tax() {
|
||||
public function get_cart_tax() {
|
||||
$return = false;
|
||||
$cart_total_tax = $this->tax_total + $this->shipping_tax_total;
|
||||
if ( $cart_total_tax > 0 ) $return = woocommerce_price( $cart_total_tax );
|
||||
|
@ -2019,7 +2021,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return float price
|
||||
*/
|
||||
function get_taxes_total( $compound = true ) {
|
||||
public function get_taxes_total( $compound = true ) {
|
||||
$total = 0;
|
||||
foreach ( $this->taxes as $key => $tax ) {
|
||||
if ( ! $compound && $this->tax->is_compound( $key ) ) continue;
|
||||
|
@ -2037,7 +2039,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return mixed formatted price or false if there are none
|
||||
*/
|
||||
function get_discounts_before_tax() {
|
||||
public function get_discounts_before_tax() {
|
||||
if ( $this->discount_cart ) {
|
||||
$discounts_before_tax = woocommerce_price( $this->discount_cart );
|
||||
} else {
|
||||
|
@ -2051,7 +2053,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return mixed formatted price or false if there are none
|
||||
*/
|
||||
function get_discounts_after_tax() {
|
||||
public function get_discounts_after_tax() {
|
||||
if ( $this->discount_total ) {
|
||||
$discounts_after_tax = woocommerce_price( $this->discount_total );
|
||||
} else {
|
||||
|
@ -2065,7 +2067,7 @@ class WC_Cart {
|
|||
*
|
||||
* @return mixed formatted price or false if there are none
|
||||
*/
|
||||
function get_total_discount() {
|
||||
public function get_total_discount() {
|
||||
if ( $this->discount_total || $this->discount_cart ) {
|
||||
$total_discount = woocommerce_price( $this->discount_total + $this->discount_cart );
|
||||
} else {
|
||||
|
|
|
@ -12,19 +12,19 @@
|
|||
class WC_Checkout {
|
||||
|
||||
/** @var array Array of posted form data. */
|
||||
var $posted;
|
||||
public $posted;
|
||||
|
||||
/** @var array Array of fields to display on the checkout. */
|
||||
var $checkout_fields;
|
||||
public $checkout_fields;
|
||||
|
||||
/** @var bool Whether or not the user must create an account to checkout. */
|
||||
var $must_create_account;
|
||||
public $must_create_account;
|
||||
|
||||
/** @var bool Whether or not signups are allowed. */
|
||||
var $enable_signup;
|
||||
public $enable_signup;
|
||||
|
||||
/** @var bool True when the user is creating an account. */
|
||||
var $creating_account;
|
||||
public $creating_account;
|
||||
|
||||
/**
|
||||
* Constructor for the checkout class. Hooks in methods and defines eheckout fields.
|
||||
|
@ -32,12 +32,12 @@ class WC_Checkout {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct () {
|
||||
public function __construct () {
|
||||
global $woocommerce;
|
||||
|
||||
add_action( 'woocommerce_checkout_process', array( &$this,'checkout_process' ) );
|
||||
add_action( 'woocommerce_checkout_billing', array( &$this,'checkout_form_billing' ) );
|
||||
add_action( 'woocommerce_checkout_shipping', array( &$this,'checkout_form_shipping' ) );
|
||||
add_action( 'woocommerce_checkout_process', array( $this,'checkout_process' ) );
|
||||
add_action( 'woocommerce_checkout_billing', array( $this,'checkout_form_billing' ) );
|
||||
add_action( 'woocommerce_checkout_shipping', array( $this,'checkout_form_shipping' ) );
|
||||
|
||||
$this->enable_signup = get_option( 'woocommerce_enable_signup_and_login_from_checkout' ) == 'yes' ? true : false;
|
||||
$this->enable_guest_checkout = get_option( 'woocommerce_enable_guest_checkout' ) == 'yes' ? true : false;
|
||||
|
@ -93,7 +93,7 @@ class WC_Checkout {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkout_process() {
|
||||
public function checkout_process() {
|
||||
// When we process the checkout, lets ensure cart items are rechecked to prevent checkout
|
||||
do_action('woocommerce_check_cart_items');
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ class WC_Checkout {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkout_form_billing() {
|
||||
public function checkout_form_billing() {
|
||||
woocommerce_get_template( 'checkout/form-billing.php', array( 'checkout' => $this ) );
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ class WC_Checkout {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkout_form_shipping() {
|
||||
public function checkout_form_shipping() {
|
||||
woocommerce_get_template( 'checkout/form-shipping.php', array( 'checkout' => $this ) );
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ class WC_Checkout {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function create_order() {
|
||||
public function create_order() {
|
||||
global $woocommerce, $wpdb;
|
||||
|
||||
// Create Order (send cart variable so we can record items and reduce inventory). Only create if this is a new order, not if the payment was rejected last time.
|
||||
|
@ -245,9 +245,9 @@ class WC_Checkout {
|
|||
woocommerce_add_order_item_meta( $item_id, '_product_id', $values['product_id'] );
|
||||
woocommerce_add_order_item_meta( $item_id, '_variation_id', $values['variation_id'] );
|
||||
woocommerce_add_order_item_meta( $item_id, '_line_subtotal', woocommerce_format_decimal( $values['line_subtotal'] ) );
|
||||
woocommerce_add_order_item_meta( $item_id, '_line_subtotal_tax', woocommerce_format_decimal( $values['line_subtotal_tax'] ) );
|
||||
woocommerce_add_order_item_meta( $item_id, '_line_total', woocommerce_format_decimal( $values['line_total'] ) );
|
||||
woocommerce_add_order_item_meta( $item_id, '_line_tax', woocommerce_format_decimal( $values['line_tax'] ) );
|
||||
woocommerce_add_order_item_meta( $item_id, '_line_tax', woocommerce_format_decimal( $values['line_tax'], 4 ) );
|
||||
woocommerce_add_order_item_meta( $item_id, '_line_subtotal_tax', woocommerce_format_decimal( $values['line_subtotal_tax'], 4 ) );
|
||||
|
||||
// Store variation data in meta so admin can view it
|
||||
if ( $values['variation'] && is_array( $values['variation'] ) )
|
||||
|
@ -352,7 +352,7 @@ class WC_Checkout {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function process_checkout() {
|
||||
public function process_checkout() {
|
||||
global $wpdb, $woocommerce;
|
||||
|
||||
$woocommerce->verify_nonce( 'process_checkout' );
|
||||
|
@ -654,7 +654,7 @@ class WC_Checkout {
|
|||
$result = apply_filters('woocommerce_payment_successful_result', $result );
|
||||
|
||||
if ( is_ajax() ) {
|
||||
echo json_encode( $result );
|
||||
echo json_encode( $result ) . '<!--WC_END-->';
|
||||
exit;
|
||||
} else {
|
||||
wp_redirect( $result['redirect'] );
|
||||
|
@ -685,7 +685,7 @@ class WC_Checkout {
|
|||
'result' => 'success',
|
||||
'redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', $return_url, $order)
|
||||
)
|
||||
);
|
||||
) . '<!--WC_END-->';
|
||||
exit;
|
||||
} else {
|
||||
wp_safe_redirect(
|
||||
|
@ -718,7 +718,7 @@ class WC_Checkout {
|
|||
'messages' => $messages,
|
||||
'refresh' => isset( $woocommerce->session->refresh_totals ) ? 'true' : 'false'
|
||||
)
|
||||
);
|
||||
) . '<!--WC_END-->';
|
||||
|
||||
unset( $woocommerce->session->refresh_totals );
|
||||
exit;
|
||||
|
@ -733,7 +733,7 @@ class WC_Checkout {
|
|||
* @param string $input
|
||||
* @return string
|
||||
*/
|
||||
function get_value( $input ) {
|
||||
public function get_value( $input ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! empty( $_POST[ $input ] ) ) {
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
class WC_Countries {
|
||||
|
||||
/** @var array Array of countries */
|
||||
var $countries;
|
||||
public $countries;
|
||||
|
||||
/** @var array Array of states */
|
||||
var $states;
|
||||
public $states;
|
||||
|
||||
/** @var array Array of locales */
|
||||
var $locale;
|
||||
public $locale;
|
||||
|
||||
/** @var array Array of address formats for locales */
|
||||
var $address_formats;
|
||||
public $address_formats;
|
||||
|
||||
/**
|
||||
* Constructor for the counties class - defines all countries and states.
|
||||
|
@ -29,7 +29,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
public function __construct() {
|
||||
|
||||
$this->countries = apply_filters('woocommerce_countries', array(
|
||||
'AF' => __( 'Afghanistan', 'woocommerce' ),
|
||||
|
@ -448,7 +448,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_base_country() {
|
||||
public function get_base_country() {
|
||||
$default = esc_attr( get_option('woocommerce_default_country') );
|
||||
if ( ( $pos = strpos( $default, ':' ) ) === false )
|
||||
return $default;
|
||||
|
@ -462,7 +462,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_base_state() {
|
||||
public function get_base_state() {
|
||||
$default = esc_attr( get_option( 'woocommerce_default_country' ) );
|
||||
if ( ( $pos = strrpos( $default, ':' ) ) === false )
|
||||
return '';
|
||||
|
@ -476,7 +476,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_allowed_countries() {
|
||||
public function get_allowed_countries() {
|
||||
|
||||
asort( $this->countries );
|
||||
|
||||
|
@ -500,7 +500,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_allowed_country_states() {
|
||||
public function get_allowed_country_states() {
|
||||
|
||||
if ( get_option('woocommerce_allowed_countries') !== 'specific' )
|
||||
return $this->states;
|
||||
|
@ -523,7 +523,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_european_union_countries() {
|
||||
public function get_european_union_countries() {
|
||||
return array('AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK');
|
||||
}
|
||||
|
||||
|
@ -534,7 +534,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function shipping_to_prefix() {
|
||||
public function shipping_to_prefix() {
|
||||
global $woocommerce;
|
||||
$return = '';
|
||||
if (in_array($woocommerce->customer->get_shipping_country(), array( 'GB', 'US', 'AE', 'CZ', 'DO', 'NL', 'PH', 'USAF' ))) $return = __( 'to the', 'woocommerce' );
|
||||
|
@ -549,7 +549,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function estimated_for_prefix() {
|
||||
public function estimated_for_prefix() {
|
||||
$return = '';
|
||||
if (in_array($this->get_base_country(), array( 'GB', 'US', 'AE', 'CZ', 'DO', 'NL', 'PH', 'USAF' ))) $return = __( 'the', 'woocommerce' ) . ' ';
|
||||
return apply_filters('woocommerce_countries_estimated_for_prefix', $return, $this->get_base_country());
|
||||
|
@ -562,7 +562,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function tax_or_vat() {
|
||||
public function tax_or_vat() {
|
||||
$return = ( in_array($this->get_base_country(), $this->get_european_union_countries()) ) ? __( 'VAT', 'woocommerce' ) : __( 'Tax', 'woocommerce' );
|
||||
|
||||
return apply_filters( 'woocommerce_countries_tax_or_vat', $return );
|
||||
|
@ -575,7 +575,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function inc_tax_or_vat() {
|
||||
public function inc_tax_or_vat() {
|
||||
$return = ( in_array($this->get_base_country(), $this->get_european_union_countries()) ) ? __( '(incl. VAT)', 'woocommerce' ) : __( '(incl. tax)', 'woocommerce' );
|
||||
|
||||
return apply_filters( 'woocommerce_countries_inc_tax_or_vat', $return );
|
||||
|
@ -588,7 +588,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function ex_tax_or_vat() {
|
||||
public function ex_tax_or_vat() {
|
||||
$return = ( in_array($this->get_base_country(), $this->get_european_union_countries()) ) ? __( '(ex. VAT)', 'woocommerce' ) : __( '(ex. tax)', 'woocommerce' );
|
||||
|
||||
return apply_filters( 'woocommerce_countries_ex_tax_or_vat', $return );
|
||||
|
@ -602,7 +602,7 @@ class WC_Countries {
|
|||
* @param mixed $cc country code
|
||||
* @return array of states
|
||||
*/
|
||||
function get_states( $cc ) {
|
||||
public function get_states( $cc ) {
|
||||
if (isset( $this->states[$cc] )) return $this->states[$cc];
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ class WC_Countries {
|
|||
* @param bool $escape (default: false)
|
||||
* @return void
|
||||
*/
|
||||
function country_dropdown_options( $selected_country = '', $selected_state = '', $escape = false ) {
|
||||
public function country_dropdown_options( $selected_country = '', $selected_state = '', $escape = false ) {
|
||||
|
||||
asort($this->countries);
|
||||
|
||||
|
@ -648,7 +648,7 @@ class WC_Countries {
|
|||
* @param bool $escape (default: false)
|
||||
* @return void
|
||||
*/
|
||||
function country_multiselect_options( $selected_countries = '', $escape = false ) {
|
||||
public function country_multiselect_options( $selected_countries = '', $escape = false ) {
|
||||
|
||||
$countries = $this->get_allowed_countries();
|
||||
|
||||
|
@ -674,7 +674,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_address_formats() {
|
||||
public function get_address_formats() {
|
||||
|
||||
if (!$this->address_formats) :
|
||||
|
||||
|
@ -724,7 +724,7 @@ class WC_Countries {
|
|||
* @param array $args (default: array())
|
||||
* @return string address
|
||||
*/
|
||||
function get_formatted_address( $args = array() ) {
|
||||
public function get_formatted_address( $args = array() ) {
|
||||
|
||||
$args = array_map( 'trim', $args );
|
||||
|
||||
|
@ -792,7 +792,7 @@ class WC_Countries {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_country_locale() {
|
||||
public function get_country_locale() {
|
||||
if ( ! $this->locale ) {
|
||||
|
||||
// Locale information used by the checkout
|
||||
|
@ -1062,7 +1062,7 @@ class WC_Countries {
|
|||
}
|
||||
|
||||
/** Apply locale and get address fields */
|
||||
function get_address_fields( $country, $type = 'billing_' ) {
|
||||
public function get_address_fields( $country, $type = 'billing_' ) {
|
||||
$locale = $this->get_country_locale();
|
||||
|
||||
$fields = array(
|
||||
|
|
|
@ -11,68 +11,71 @@
|
|||
*/
|
||||
class WC_Coupon {
|
||||
|
||||
/** @var string Coupon code. */
|
||||
var $code;
|
||||
/** @public string Coupon code. */
|
||||
public $code;
|
||||
|
||||
/** @var int Coupon ID. */
|
||||
var $id;
|
||||
/** @public int Coupon ID. */
|
||||
public $id;
|
||||
|
||||
/** @var string Type of discount. */
|
||||
var $type;
|
||||
/** @public string Type of discount. */
|
||||
public $type;
|
||||
|
||||
/** @var string Type of discount (alias). */
|
||||
var $discount_type;
|
||||
/** @public string Type of discount (alias). */
|
||||
public $discount_type;
|
||||
|
||||
/** @var string Coupon amount. */
|
||||
var $amount;
|
||||
/** @public string Coupon amount. */
|
||||
public $amount;
|
||||
|
||||
/** @var string "Yes" if for individual use. */
|
||||
var $individual_use;
|
||||
/** @public string "Yes" if for individual use. */
|
||||
public $individual_use;
|
||||
|
||||
/** @var array Array of product IDs. */
|
||||
var $product_ids;
|
||||
/** @public array Array of product IDs. */
|
||||
public $product_ids;
|
||||
|
||||
/** @var int Coupon usage limit. */
|
||||
var $usage_limit;
|
||||
/** @public int Coupon usage limit. */
|
||||
public $usage_limit;
|
||||
|
||||
/** @var int Coupon usage count. */
|
||||
var $usage_count;
|
||||
/** @public int Coupon usage count. */
|
||||
public $usage_count;
|
||||
|
||||
/** @var string Expirey date. */
|
||||
var $expiry_date;
|
||||
/** @public string Expirey date. */
|
||||
public $expiry_date;
|
||||
|
||||
/** @var string "yes" if applied before tax. */
|
||||
var $apply_before_tax;
|
||||
/** @public string "yes" if applied before tax. */
|
||||
public $apply_before_tax;
|
||||
|
||||
/** @var string "yes" if coupon grants free shipping. */
|
||||
var $free_shipping;
|
||||
/** @public string "yes" if coupon grants free shipping. */
|
||||
public $free_shipping;
|
||||
|
||||
/** @var array Array of category ids. */
|
||||
var $product_categories;
|
||||
/** @public array Array of category ids. */
|
||||
public $product_categories;
|
||||
|
||||
/** @var array Array of category ids. */
|
||||
var $exclude_product_categories;
|
||||
/** @public array Array of category ids. */
|
||||
public $exclude_product_categories;
|
||||
|
||||
/** @var string Minimum cart amount. */
|
||||
var $minimum_amount;
|
||||
/** @public string Minimum cart amount. */
|
||||
public $minimum_amount;
|
||||
|
||||
/** @var string Coupon owner's email. */
|
||||
var $customer_email;
|
||||
/** @public string Coupon owner's email. */
|
||||
public $customer_email;
|
||||
|
||||
/** @var array Post meta. */
|
||||
var $coupon_custom_fields;
|
||||
/** @public array Post meta. */
|
||||
public $coupon_custom_fields;
|
||||
|
||||
/** @var string How much the coupon is worth. */
|
||||
var $coupon_amount;
|
||||
/** @public string How much the coupon is worth. */
|
||||
public $coupon_amount;
|
||||
|
||||
/** @public string Error message. */
|
||||
public $error_message;
|
||||
|
||||
/**
|
||||
* Coupon constructor. Loads coupon data.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $code code of the coupon to load
|
||||
* @return bool whether or not the coupon was found
|
||||
* @return void
|
||||
*/
|
||||
function __construct( $code ) {
|
||||
public function __construct( $code ) {
|
||||
global $wpdb;
|
||||
|
||||
$this->code = apply_filters( 'woocommerce_coupon_code', $code );
|
||||
|
@ -98,7 +101,6 @@ class WC_Coupon {
|
|||
$this->minimum_amount = esc_html( $coupon_data['minimum_amount'] );
|
||||
$this->customer_email = esc_html( $coupon_data['customer_email'] );
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -107,15 +109,13 @@ class WC_Coupon {
|
|||
if ( $coupon_id )
|
||||
$coupon = get_post( $coupon_id );
|
||||
else
|
||||
return false;
|
||||
|
||||
$coupon->post_title = apply_filters( 'woocommerce_coupon_code', $coupon->post_title );
|
||||
$coupon->post_title = apply_filters( 'woocommerce_coupon_code', $coupon->post_title );
|
||||
|
||||
if ( empty( $coupon ) || $coupon->post_status !== 'publish' || $this->code !== $coupon->post_title )
|
||||
return false;
|
||||
return;
|
||||
|
||||
$this->id = $coupon->ID;
|
||||
$this->coupon_custom_fields = get_post_custom( $this->id );
|
||||
$this->coupon_custom_fields = get_post_meta( $this->id );
|
||||
|
||||
$load_data = array(
|
||||
'discount_type' => 'fixed_cart',
|
||||
|
@ -148,11 +148,7 @@ class WC_Coupon {
|
|||
$this->product_categories = array_filter( array_map( 'trim', (array) maybe_unserialize( $this->product_categories ) ) );
|
||||
$this->exclude_product_categories = array_filter( array_map( 'trim', (array) maybe_unserialize( $this->exclude_product_categories ) ) );
|
||||
$this->customer_email = array_filter( array_map( 'trim', array_map( 'strtolower', (array) maybe_unserialize( $this->customer_email ) ) ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -162,7 +158,7 @@ class WC_Coupon {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function apply_before_tax() {
|
||||
public function apply_before_tax() {
|
||||
return $this->apply_before_tax == 'yes' ? true : false;
|
||||
}
|
||||
|
||||
|
@ -173,7 +169,7 @@ class WC_Coupon {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function enable_free_shipping() {
|
||||
public function enable_free_shipping() {
|
||||
return $this->free_shipping == 'yes' ? true : false;
|
||||
}
|
||||
|
||||
|
@ -184,7 +180,7 @@ class WC_Coupon {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function inc_usage_count() {
|
||||
public function inc_usage_count() {
|
||||
$this->usage_count++;
|
||||
update_post_meta( $this->id, 'usage_count', $this->usage_count );
|
||||
}
|
||||
|
@ -196,11 +192,21 @@ class WC_Coupon {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function dcr_usage_count() {
|
||||
public function dcr_usage_count() {
|
||||
$this->usage_count--;
|
||||
update_post_meta( $this->id, 'usage_count', $this->usage_count );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the error_message string
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function get_error_message() {
|
||||
return $this->error_message;
|
||||
}
|
||||
|
||||
/**
|
||||
* is_valid function.
|
||||
*
|
||||
|
@ -209,7 +215,7 @@ class WC_Coupon {
|
|||
* @access public
|
||||
* @return bool|WP_Error validity or a WP_Error if not valid
|
||||
*/
|
||||
function is_valid() {
|
||||
public function is_valid() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( $this->id ) {
|
||||
|
@ -322,6 +328,7 @@ class WC_Coupon {
|
|||
$error = __( 'Invalid coupon', 'woocommerce' );
|
||||
}
|
||||
|
||||
return new WP_Error( 'coupon_error', apply_filters( 'woocommerce_coupon_error', $error, $this ) );
|
||||
$this->error_message = apply_filters( 'woocommerce_coupon_error', $error, $this );
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
public function __construct() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( empty( $woocommerce->session->customer ) ) {
|
||||
|
@ -56,7 +56,7 @@ class WC_Customer {
|
|||
}
|
||||
|
||||
// When leaving or ending page load, store data
|
||||
add_action( 'shutdown', array( &$this, 'save_data' ), 10 );
|
||||
add_action( 'shutdown', array( $this, 'save_data' ), 10 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,7 +88,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function save_data() {
|
||||
public function save_data() {
|
||||
global $woocommerce;
|
||||
$woocommerce->session->customer = $this->_data;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function has_calculated_shipping() {
|
||||
public function has_calculated_shipping() {
|
||||
return ( ! empty( $this->_data['calculated_shipping'] ) && $this->_data['calculated_shipping'] ) ? true : false;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function set_to_base() {
|
||||
public function set_to_base() {
|
||||
global $woocommerce;
|
||||
$default = apply_filters( 'woocommerce_customer_default_location', get_option('woocommerce_default_country') );
|
||||
if ( strstr( $default, ':' ) ) {
|
||||
|
@ -132,7 +132,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_to_base() {
|
||||
public function set_shipping_to_base() {
|
||||
global $woocommerce;
|
||||
$default = get_option('woocommerce_default_country');
|
||||
if ( strstr( $default, ':' ) ) {
|
||||
|
@ -154,7 +154,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function is_customer_outside_base() {
|
||||
public function is_customer_outside_base() {
|
||||
list( $country, $state, $postcode, $city ) = $this->get_taxable_address();
|
||||
|
||||
if ( $country ) {
|
||||
|
@ -182,7 +182,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function is_vat_exempt() {
|
||||
public function is_vat_exempt() {
|
||||
return ( isset( $this->_data['is_vat_exempt'] ) && $this->_data['is_vat_exempt'] ) ? true : false;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_state() {
|
||||
public function get_state() {
|
||||
if ( isset( $this->_data['state'] ) ) return $this->_data['state'];
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_country() {
|
||||
public function get_country() {
|
||||
if ( isset( $this->_data['country'] ) ) return $this->_data['country'];
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_postcode() {
|
||||
public function get_postcode() {
|
||||
global $woocommerce;
|
||||
$validation = $woocommerce->validation();
|
||||
if (isset($this->_data['postcode']) && $this->_data['postcode'] !== false) return $validation->format_postcode( $this->_data['postcode'], $this->get_country());
|
||||
|
@ -228,7 +228,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_city() {
|
||||
public function get_city() {
|
||||
if ( isset( $this->_data['city'] ) ) return $this->_data['city'];
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_address() {
|
||||
public function get_address() {
|
||||
if ( isset( $this->_data['address'] ) ) return $this->_data['address'];
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_address_2() {
|
||||
public function get_address_2() {
|
||||
if ( isset( $this->_data['address_2'] ) ) return $this->_data['address_2'];
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_shipping_state() {
|
||||
public function get_shipping_state() {
|
||||
if ( isset( $this->_data['shipping_state'] ) ) return $this->_data['shipping_state'];
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_shipping_country() {
|
||||
public function get_shipping_country() {
|
||||
if ( isset( $this->_data['shipping_country'] ) ) return $this->_data['shipping_country'];
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_shipping_postcode() {
|
||||
public function get_shipping_postcode() {
|
||||
global $woocommerce;
|
||||
$validation = $woocommerce->validation();
|
||||
if (isset($this->_data['shipping_postcode'])) return $validation->format_postcode( $this->_data['shipping_postcode'], $this->get_shipping_country());
|
||||
|
@ -293,7 +293,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_shipping_city() {
|
||||
public function get_shipping_city() {
|
||||
if ( isset( $this->_data['shipping_city'] ) ) return $this->_data['shipping_city'];
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_shipping_address() {
|
||||
public function get_shipping_address() {
|
||||
if ( isset( $this->_data['shipping_address'] ) ) return $this->_data['shipping_address'];
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_shipping_address_2() {
|
||||
public function get_shipping_address_2() {
|
||||
if ( isset( $this->_data['shipping_address_2'] ) ) return $this->_data['shipping_address_2'];
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_taxable_address() {
|
||||
public function get_taxable_address() {
|
||||
$tax_based_on = get_option( 'woocommerce_tax_based_on' );
|
||||
|
||||
if ( $tax_based_on == 'base' ) {
|
||||
|
@ -369,7 +369,7 @@ class WC_Customer {
|
|||
* @param string $city (default: '')
|
||||
* @return void
|
||||
*/
|
||||
function set_location( $country, $state, $postcode = '', $city = '' ) {
|
||||
public function set_location( $country, $state, $postcode = '', $city = '' ) {
|
||||
$this->_data['country'] = $country;
|
||||
$this->_data['state'] = $state;
|
||||
$this->_data['postcode'] = $postcode;
|
||||
|
@ -384,7 +384,7 @@ class WC_Customer {
|
|||
* @param mixed $country
|
||||
* @return void
|
||||
*/
|
||||
function set_country( $country ) {
|
||||
public function set_country( $country ) {
|
||||
$this->_data['country'] = $country;
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ class WC_Customer {
|
|||
* @param mixed $state
|
||||
* @return void
|
||||
*/
|
||||
function set_state( $state ) {
|
||||
public function set_state( $state ) {
|
||||
$this->_data['state'] = $state;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ class WC_Customer {
|
|||
* @param mixed $postcode
|
||||
* @return void
|
||||
*/
|
||||
function set_postcode( $postcode ) {
|
||||
public function set_postcode( $postcode ) {
|
||||
$this->_data['postcode'] = $postcode;
|
||||
}
|
||||
|
||||
|
@ -420,7 +420,7 @@ class WC_Customer {
|
|||
* @param mixed $postcode
|
||||
* @return void
|
||||
*/
|
||||
function set_city( $city ) {
|
||||
public function set_city( $city ) {
|
||||
$this->_data['city'] = $city;
|
||||
}
|
||||
|
||||
|
@ -431,7 +431,7 @@ class WC_Customer {
|
|||
* @param mixed $address
|
||||
* @return void
|
||||
*/
|
||||
function set_address( $address ) {
|
||||
public function set_address( $address ) {
|
||||
$this->_data['address'] = $address;
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,7 @@ class WC_Customer {
|
|||
* @param mixed $address_2
|
||||
* @return void
|
||||
*/
|
||||
function set_address_2( $address_2 ) {
|
||||
public function set_address_2( $address_2 ) {
|
||||
$this->_data['address_2'] = $address_2;
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ class WC_Customer {
|
|||
* @param string $city (default: '')
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_location( $country, $state = '', $postcode = '', $city = '' ) {
|
||||
public function set_shipping_location( $country, $state = '', $postcode = '', $city = '' ) {
|
||||
$this->_data['shipping_country'] = $country;
|
||||
$this->_data['shipping_state'] = $state;
|
||||
$this->_data['shipping_postcode'] = $postcode;
|
||||
|
@ -471,7 +471,7 @@ class WC_Customer {
|
|||
* @param mixed $country
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_country( $country ) {
|
||||
public function set_shipping_country( $country ) {
|
||||
$this->_data['shipping_country'] = $country;
|
||||
}
|
||||
|
||||
|
@ -483,7 +483,7 @@ class WC_Customer {
|
|||
* @param mixed $state
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_state( $state ) {
|
||||
public function set_shipping_state( $state ) {
|
||||
$this->_data['shipping_state'] = $state;
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ class WC_Customer {
|
|||
* @param mixed $postcode
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_postcode( $postcode ) {
|
||||
public function set_shipping_postcode( $postcode ) {
|
||||
$this->_data['shipping_postcode'] = $postcode;
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ class WC_Customer {
|
|||
* @param mixed $postcode
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_city( $city ) {
|
||||
public function set_shipping_city( $city ) {
|
||||
$this->_data['shipping_city'] = $city;
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ class WC_Customer {
|
|||
* @param mixed $address
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_address( $address ) {
|
||||
public function set_shipping_address( $address ) {
|
||||
$this->_data['shipping_address'] = $address;
|
||||
}
|
||||
|
||||
|
@ -529,7 +529,7 @@ class WC_Customer {
|
|||
* @param mixed $address_2
|
||||
* @return void
|
||||
*/
|
||||
function set_shipping_address_2( $address_2 ) {
|
||||
public function set_shipping_address_2( $address_2 ) {
|
||||
$this->_data['shipping_address_2'] = $address_2;
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ class WC_Customer {
|
|||
* @param mixed $is_vat_exempt
|
||||
* @return void
|
||||
*/
|
||||
function set_is_vat_exempt( $is_vat_exempt ) {
|
||||
public function set_is_vat_exempt( $is_vat_exempt ) {
|
||||
$this->_data['is_vat_exempt'] = $is_vat_exempt;
|
||||
}
|
||||
|
||||
|
@ -553,7 +553,7 @@ class WC_Customer {
|
|||
* @param mixed $calculated
|
||||
* @return void
|
||||
*/
|
||||
function calculated_shipping( $calculated = true ) {
|
||||
public function calculated_shipping( $calculated = true ) {
|
||||
$this->_data['calculated_shipping'] = $calculated;
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,7 @@ class WC_Customer {
|
|||
* @access public
|
||||
* @return array Array of downloadable products
|
||||
*/
|
||||
function get_downloadable_products() {
|
||||
public function get_downloadable_products() {
|
||||
global $wpdb, $woocommerce;
|
||||
|
||||
$downloads = array();
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
class WC_Logger {
|
||||
|
||||
/**
|
||||
* @var array Stores open file handles.
|
||||
* @var array Stores open file _handles.
|
||||
* @access private
|
||||
*/
|
||||
private $handles;
|
||||
private $_handles;
|
||||
|
||||
/**
|
||||
* Constructor for the logger.
|
||||
|
@ -21,8 +21,8 @@ class WC_Logger {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
$this->handles = array();
|
||||
public function __construct() {
|
||||
$this->_handles = array();
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,8 +32,8 @@ class WC_Logger {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __destruct() {
|
||||
foreach ( $this->handles as $handle )
|
||||
public function __destruct() {
|
||||
foreach ( $this->_handles as $handle )
|
||||
@fclose( escapeshellarg( $handle ) );
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ class WC_Logger {
|
|||
private function open( $handle ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( isset( $this->handles[ $handle ] ) )
|
||||
if ( isset( $this->_handles[ $handle ] ) )
|
||||
return true;
|
||||
|
||||
if ( $this->handles[ $handle ] = @fopen( $woocommerce->plugin_path() . '/logs/' . $this->file_name( $handle ) . '.txt', 'a' ) )
|
||||
if ( $this->_handles[ $handle ] = @fopen( $woocommerce->plugin_path() . '/logs/' . $this->file_name( $handle ) . '.txt', 'a' ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -69,7 +69,7 @@ class WC_Logger {
|
|||
public function add( $handle, $message ) {
|
||||
if ( $this->open( $handle ) ) {
|
||||
$time = date_i18n( 'm-d-Y @ H:i:s -' ); //Grab Time
|
||||
fwrite( $this->handles[ $handle ], $time . " " . $message . "\n" );
|
||||
fwrite( $this->_handles[ $handle ], $time . " " . $message . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class WC_Logger {
|
|||
public function clear( $handle ) {
|
||||
|
||||
if ( $this->open( $handle ) )
|
||||
ftruncate( $this->handles[ $handle ], 0 );
|
||||
ftruncate( $this->_handles[ $handle ], 0 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,143 +11,143 @@
|
|||
*/
|
||||
class WC_Order {
|
||||
|
||||
/** @var int Order (post) ID */
|
||||
var $id;
|
||||
/** @public int Order (post) ID */
|
||||
public $id;
|
||||
|
||||
/** @var string Order status. */
|
||||
var $status;
|
||||
/** @public string Order status. */
|
||||
public $status;
|
||||
|
||||
/** @var string Order date (placed). */
|
||||
var $order_date;
|
||||
/** @public string Order date (placed). */
|
||||
public $order_date;
|
||||
|
||||
/** @var string Order date (paid). */
|
||||
var $modified_date;
|
||||
/** @public string Order date (paid). */
|
||||
public $modified_date;
|
||||
|
||||
/** @var string Note added by the customer. */
|
||||
var $customer_note;
|
||||
/** @public string Note added by the customer. */
|
||||
public $customer_note;
|
||||
|
||||
/** @var array Order (post) meta/custom fields. */
|
||||
var $order_custom_fields;
|
||||
/** @public array Order (post) meta/custom fields. */
|
||||
public $order_custom_fields;
|
||||
|
||||
/** @var string Order unique key. */
|
||||
var $order_key;
|
||||
/** @public string Order unique key. */
|
||||
public $order_key;
|
||||
|
||||
/** @var string */
|
||||
var $billing_first_name;
|
||||
/** @public string */
|
||||
public $billing_first_name;
|
||||
|
||||
/** @var string */
|
||||
var $billing_last_name;
|
||||
/** @public string */
|
||||
public $billing_last_name;
|
||||
|
||||
/** @var string */
|
||||
var $billing_company;
|
||||
/** @public string */
|
||||
public $billing_company;
|
||||
|
||||
/** @var string */
|
||||
var $billing_address_1;
|
||||
/** @public string */
|
||||
public $billing_address_1;
|
||||
|
||||
/** @var string */
|
||||
var $billing_address_2;
|
||||
/** @public string */
|
||||
public $billing_address_2;
|
||||
|
||||
/** @var string */
|
||||
var $billing_city;
|
||||
/** @public string */
|
||||
public $billing_city;
|
||||
|
||||
/** @var string */
|
||||
var $billing_postcode;
|
||||
/** @public string */
|
||||
public $billing_postcode;
|
||||
|
||||
/** @var string */
|
||||
var $billing_country;
|
||||
/** @public string */
|
||||
public $billing_country;
|
||||
|
||||
/** @var string */
|
||||
var $billing_state;
|
||||
/** @public string */
|
||||
public $billing_state;
|
||||
|
||||
/** @var string */
|
||||
var $billing_email;
|
||||
/** @public string */
|
||||
public $billing_email;
|
||||
|
||||
/** @var string */
|
||||
var $billing_phone;
|
||||
/** @public string */
|
||||
public $billing_phone;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_first_name;
|
||||
/** @public string */
|
||||
public $shipping_first_name;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_last_name;
|
||||
/** @public string */
|
||||
public $shipping_last_name;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_company;
|
||||
/** @public string */
|
||||
public $shipping_company;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_address_1;
|
||||
/** @public string */
|
||||
public $shipping_address_1;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_address_2;
|
||||
/** @public string */
|
||||
public $shipping_address_2;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_city;
|
||||
/** @public string */
|
||||
public $shipping_city;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_postcode;
|
||||
/** @public string */
|
||||
public $shipping_postcode;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_country;
|
||||
/** @public string */
|
||||
public $shipping_country;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_state;
|
||||
/** @public string */
|
||||
public $shipping_state;
|
||||
|
||||
/** @var string Method id of the shipping used */
|
||||
var $shipping_method;
|
||||
/** @public string Method id of the shipping used */
|
||||
public $shipping_method;
|
||||
|
||||
/** @var string Shipping method title */
|
||||
var $shipping_method_title;
|
||||
/** @public string Shipping method title */
|
||||
public $shipping_method_title;
|
||||
|
||||
/** @var string Method id of the payment used */
|
||||
var $payment_method;
|
||||
/** @public string Method id of the payment used */
|
||||
public $payment_method;
|
||||
|
||||
/** @var string Payment method title */
|
||||
var $payment_method_title;
|
||||
/** @public string Payment method title */
|
||||
public $payment_method_title;
|
||||
|
||||
/** @var string After tax discount total */
|
||||
var $order_discount;
|
||||
/** @public string After tax discount total */
|
||||
public $order_discount;
|
||||
|
||||
/** @var string Before tax discount total */
|
||||
var $cart_discount;
|
||||
/** @public string Before tax discount total */
|
||||
public $cart_discount;
|
||||
|
||||
/** @var string Tax for the items total */
|
||||
var $order_tax;
|
||||
/** @public string Tax for the items total */
|
||||
public $order_tax;
|
||||
|
||||
/** @var string Shipping cost */
|
||||
var $order_shipping;
|
||||
/** @public string Shipping cost */
|
||||
public $order_shipping;
|
||||
|
||||
/** @var string Shipping tax */
|
||||
var $order_shipping_tax;
|
||||
/** @public string Shipping tax */
|
||||
public $order_shipping_tax;
|
||||
|
||||
/** @var string Grand total */
|
||||
var $order_total;
|
||||
/** @public string Grand total */
|
||||
public $order_total;
|
||||
|
||||
/** @var array Taxes array (tax rows) */
|
||||
var $taxes;
|
||||
/** @public array Taxes array (tax rows) */
|
||||
public $taxes;
|
||||
|
||||
/** @var int User ID */
|
||||
var $customer_user;
|
||||
/** @public int User ID */
|
||||
public $customer_user;
|
||||
|
||||
/** @var int User ID */
|
||||
var $user_id;
|
||||
/** @public int User ID */
|
||||
public $user_id;
|
||||
|
||||
/** @var string */
|
||||
var $completed_date;
|
||||
/** @public string */
|
||||
public $completed_date;
|
||||
|
||||
/** @var string */
|
||||
var $billing_address;
|
||||
/** @public string */
|
||||
public $billing_address;
|
||||
|
||||
/** @var string */
|
||||
var $formatted_billing_address;
|
||||
/** @public string */
|
||||
public $formatted_billing_address;
|
||||
|
||||
/** @var string */
|
||||
var $shipping_address;
|
||||
/** @public string */
|
||||
public $shipping_address;
|
||||
|
||||
/** @var string */
|
||||
var $formatted_shipping_address;
|
||||
/** @public string */
|
||||
public $formatted_shipping_address;
|
||||
|
||||
/** @var string */
|
||||
var $post_status;
|
||||
/** @public string */
|
||||
public $post_status;
|
||||
|
||||
/**
|
||||
* Get the order if ID is passed, otherwise the order is new and empty.
|
||||
|
@ -156,7 +156,7 @@ class WC_Order {
|
|||
* @param string $id (default: '')
|
||||
* @return void
|
||||
*/
|
||||
function __construct( $id = '' ) {
|
||||
public function __construct( $id = '' ) {
|
||||
$this->prices_include_tax = get_option('woocommerce_prices_include_tax') == 'yes' ? true : false;
|
||||
$this->tax_display_cart = get_option( 'woocommerce_tax_display_cart' );
|
||||
|
||||
|
@ -175,7 +175,7 @@ class WC_Order {
|
|||
* @param int $id (default: 0)
|
||||
* @return bool
|
||||
*/
|
||||
function get_order( $id = 0 ) {
|
||||
public function get_order( $id = 0 ) {
|
||||
if ( ! $id )
|
||||
return false;
|
||||
if ( $result = get_post( $id ) ) {
|
||||
|
@ -193,14 +193,14 @@ class WC_Order {
|
|||
* @param mixed $result
|
||||
* @return void
|
||||
*/
|
||||
function populate( $result ) {
|
||||
public function populate( $result ) {
|
||||
// Standard post data
|
||||
$this->id = $result->ID;
|
||||
$this->order_date = $result->post_date;
|
||||
$this->modified_date = $result->post_modified;
|
||||
$this->customer_note = $result->post_excerpt;
|
||||
$this->post_status = $result->post_status;
|
||||
$this->order_custom_fields = get_post_custom( $this->id );
|
||||
$this->order_custom_fields = get_post_meta( $this->id );
|
||||
|
||||
// Define the data we're going to load: Key => Default value
|
||||
$load_data = apply_filters( 'woocommerce_load_order_data', array(
|
||||
|
@ -264,7 +264,7 @@ class WC_Order {
|
|||
* @param mixed $key
|
||||
* @return bool
|
||||
*/
|
||||
function key_is_valid( $key ) {
|
||||
public function key_is_valid( $key ) {
|
||||
if ( $key == $this->order_key ) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_order_number() {
|
||||
public function get_order_number() {
|
||||
return apply_filters( 'woocommerce_order_number', _x( '#', 'hash before order number', 'woocommerce' ) . $this->id, $this );
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_formatted_billing_address() {
|
||||
public function get_formatted_billing_address() {
|
||||
if ( ! $this->formatted_billing_address ) {
|
||||
global $woocommerce;
|
||||
|
||||
|
@ -316,7 +316,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_billing_address() {
|
||||
public function get_billing_address() {
|
||||
if ( ! $this->billing_address ) {
|
||||
// Formatted Addresses
|
||||
$address = array(
|
||||
|
@ -340,7 +340,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_formatted_shipping_address() {
|
||||
public function get_formatted_shipping_address() {
|
||||
if ( ! $this->formatted_shipping_address ) {
|
||||
if ( $this->shipping_address_1 ) {
|
||||
global $woocommerce;
|
||||
|
@ -371,7 +371,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_shipping_address() {
|
||||
public function get_shipping_address() {
|
||||
if ( ! $this->shipping_address ) {
|
||||
if ( $this->shipping_address_1 ) {
|
||||
// Formatted Addresses
|
||||
|
@ -398,7 +398,7 @@ class WC_Order {
|
|||
* @param string $type Types of line items to get (array or string)
|
||||
* @return void
|
||||
*/
|
||||
function get_items( $type = '' ) {
|
||||
public function get_items( $type = '' ) {
|
||||
global $wpdb, $woocommerce;
|
||||
|
||||
if ( empty( $type ) )
|
||||
|
@ -442,7 +442,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_fees() {
|
||||
public function get_fees() {
|
||||
return $this->get_items( 'fee' );
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_taxes() {
|
||||
public function get_taxes() {
|
||||
return $this->get_items( 'tax' );
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array of meta data
|
||||
*/
|
||||
function has_meta( $order_item_id ) {
|
||||
public function has_meta( $order_item_id ) {
|
||||
global $wpdb;
|
||||
|
||||
return $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value, meta_id, order_item_id
|
||||
|
@ -479,7 +479,7 @@ class WC_Order {
|
|||
* @param bool $single (default: false)
|
||||
* @return void
|
||||
*/
|
||||
function get_item_meta( $order_item_id, $key = '', $single = false ) {
|
||||
public function get_item_meta( $order_item_id, $key = '', $single = false ) {
|
||||
return get_metadata( 'order_item', $order_item_id, $key, $single );
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_total_tax() {
|
||||
public function get_total_tax() {
|
||||
return apply_filters( 'woocommerce_order_amount_total_tax', number_format( (double) $this->order_tax + (double) $this->order_shipping_tax, 2, '.', '' ) );
|
||||
}
|
||||
|
||||
|
@ -503,7 +503,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_cart_discount() {
|
||||
public function get_cart_discount() {
|
||||
return apply_filters( 'woocommerce_order_amount_cart_discount', number_format( (double) $this->cart_discount, 2, '.', '' ) );
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_order_discount() {
|
||||
public function get_order_discount() {
|
||||
return apply_filters( 'woocommerce_order_amount_order_discount', number_format( (double) $this->order_discount, 2, '.', '' ) );
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_total_discount() {
|
||||
public function get_total_discount() {
|
||||
if ( $this->order_discount || $this->cart_discount )
|
||||
return apply_filters( 'woocommerce_order_amount_total_discount', number_format( (double) $this->order_discount + (double) $this->cart_discount, 2, '.', '' ) );
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_shipping() {
|
||||
public function get_shipping() {
|
||||
return apply_filters( 'woocommerce_order_amount_shipping', number_format( (double) $this->order_shipping, 2, '.', '' ) );
|
||||
}
|
||||
|
||||
|
@ -548,7 +548,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_shipping_tax() {
|
||||
public function get_shipping_tax() {
|
||||
return apply_filters( 'woocommerce_order_amount_shipping_tax', number_format( (double) $this->order_shipping_tax, 2, '.', '' ) );
|
||||
}
|
||||
|
||||
|
@ -559,7 +559,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return float
|
||||
*/
|
||||
function get_total() {
|
||||
public function get_total() {
|
||||
return apply_filters( 'woocommerce_order_amount_total', number_format( (double) $this->order_total, 2, '.', '' ) );
|
||||
}
|
||||
|
||||
|
@ -570,7 +570,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_order_total() {
|
||||
public function get_order_total() {
|
||||
return $this->get_total();
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_shipping_method() {
|
||||
public function get_shipping_method() {
|
||||
return apply_filters( 'woocommerce_order_shipping_method', ucwords( $this->shipping_method_title ) );
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,7 @@ class WC_Order {
|
|||
* @param bool $round (default: true)
|
||||
* @return float
|
||||
*/
|
||||
function get_item_subtotal( $item, $inc_tax = false, $round = true ) {
|
||||
public function get_item_subtotal( $item, $inc_tax = false, $round = true ) {
|
||||
if ( $inc_tax )
|
||||
$price = ( $item['line_subtotal'] + $item['line_subtotal_tax'] / $item['qty'] );
|
||||
else
|
||||
|
@ -612,7 +612,7 @@ class WC_Order {
|
|||
* @param bool $round (default: true)
|
||||
* @return float
|
||||
*/
|
||||
function get_line_subtotal( $item, $inc_tax = false, $round = true ) {
|
||||
public function get_line_subtotal( $item, $inc_tax = false, $round = true ) {
|
||||
if ( $inc_tax )
|
||||
$price = $item['line_subtotal'] + $item['line_subtotal_tax'];
|
||||
else
|
||||
|
@ -630,7 +630,7 @@ class WC_Order {
|
|||
* @param bool $round (default: true)
|
||||
* @return float
|
||||
*/
|
||||
function get_item_total( $item, $inc_tax = false, $round = true ) {
|
||||
public function get_item_total( $item, $inc_tax = false, $round = true ) {
|
||||
if ( $inc_tax )
|
||||
$price = ( ( $item['line_total'] + $item['line_tax'] ) / $item['qty'] );
|
||||
else
|
||||
|
@ -647,7 +647,7 @@ class WC_Order {
|
|||
* @param bool $round (default: true)
|
||||
* @return float
|
||||
*/
|
||||
function get_item_tax( $item, $round = true ) {
|
||||
public function get_item_tax( $item, $round = true ) {
|
||||
$price = $item['line_tax'] / $item['qty'];
|
||||
return apply_filters( 'woocommerce_order_amount_item_tax', ($round) ? number_format( $price, 2, '.', '') : $price );
|
||||
}
|
||||
|
@ -661,7 +661,7 @@ class WC_Order {
|
|||
* @param bool $inc_tax (default: false)
|
||||
* @return float
|
||||
*/
|
||||
function get_line_total( $item, $inc_tax = false ) {
|
||||
public function get_line_total( $item, $inc_tax = false ) {
|
||||
if ( $inc_tax )
|
||||
return apply_filters( 'woocommerce_order_amount_line_total', number_format( $item['line_total'] + $item['line_tax'] , 2, '.', '') );
|
||||
else
|
||||
|
@ -676,7 +676,7 @@ class WC_Order {
|
|||
* @param mixed $item
|
||||
* @return float
|
||||
*/
|
||||
function get_line_tax( $item ) {
|
||||
public function get_line_tax( $item ) {
|
||||
return apply_filters( 'woocommerce_order_amount_line_tax', number_format( $item['line_tax'], 2, '.', '') );
|
||||
}
|
||||
|
||||
|
@ -689,12 +689,16 @@ class WC_Order {
|
|||
* @param mixed $item
|
||||
* @return string
|
||||
*/
|
||||
function get_formatted_line_subtotal( $item ) {
|
||||
public function get_formatted_line_subtotal( $item, $tax_display = '' ) {
|
||||
|
||||
if ( ! $tax_display )
|
||||
$tax_display = $this->tax_display_cart;
|
||||
|
||||
$subtotal = 0;
|
||||
|
||||
if (!isset($item['line_subtotal']) || !isset($item['line_subtotal_tax'])) return;
|
||||
|
||||
if ( $this->tax_display_cart == 'excl' ) {
|
||||
if ( $tax_display == 'excl' ) {
|
||||
if ( $this->prices_include_tax ) $ex_tax_label = 1; else $ex_tax_label = 0;
|
||||
$subtotal = woocommerce_price( $this->get_line_subtotal( $item ), array( 'ex_tax_label' => $ex_tax_label ) );
|
||||
} else {
|
||||
|
@ -711,7 +715,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_formatted_order_total() {
|
||||
public function get_formatted_order_total() {
|
||||
|
||||
$formatted_total = woocommerce_price( $this->order_total );
|
||||
|
||||
|
@ -726,9 +730,12 @@ class WC_Order {
|
|||
* @param bool $compound (default: false)
|
||||
* @return string
|
||||
*/
|
||||
function get_subtotal_to_display( $compound = false ) {
|
||||
public function get_subtotal_to_display( $compound = false, $tax_display = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! $tax_display )
|
||||
$tax_display = $this->tax_display_cart;
|
||||
|
||||
$subtotal = 0;
|
||||
|
||||
if ( ! $compound ) {
|
||||
|
@ -739,7 +746,7 @@ class WC_Order {
|
|||
|
||||
$subtotal += $this->get_line_subtotal( $item );
|
||||
|
||||
if ( $this->tax_display_cart == 'incl' ) {
|
||||
if ( $tax_display == 'incl' ) {
|
||||
$subtotal += $item['line_subtotal_tax'];
|
||||
}
|
||||
|
||||
|
@ -747,12 +754,12 @@ class WC_Order {
|
|||
|
||||
$subtotal = woocommerce_price( $subtotal );
|
||||
|
||||
if ( $this->tax_display_cart == 'excl' && $this->prices_include_tax )
|
||||
$subtotal .= ' <small>'.$woocommerce->countries->ex_tax_or_vat().'</small>';
|
||||
if ( $tax_display == 'excl' && $this->prices_include_tax )
|
||||
$subtotal .= ' <small>' . $woocommerce->countries->ex_tax_or_vat() . '</small>';
|
||||
|
||||
} else {
|
||||
|
||||
if ( $this->tax_display_cart == 'incl' )
|
||||
if ( $tax_display == 'incl' )
|
||||
return;
|
||||
|
||||
foreach ( $this->get_items() as $item ) {
|
||||
|
@ -790,14 +797,17 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_shipping_to_display() {
|
||||
public function get_shipping_to_display( $tax_display = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! $tax_display )
|
||||
$tax_display = $this->tax_display_cart;
|
||||
|
||||
if ( $this->order_shipping > 0 ) {
|
||||
|
||||
$tax_text = '';
|
||||
|
||||
if ( $this->tax_display_cart == 'excl' ) {
|
||||
if ( $tax_display == 'excl' ) {
|
||||
|
||||
// Show shipping excluding tax
|
||||
$shipping = woocommerce_price( $this->order_shipping );
|
||||
|
@ -833,7 +843,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string.
|
||||
*/
|
||||
function get_cart_discount_to_display() {
|
||||
public function get_cart_discount_to_display() {
|
||||
return apply_filters( 'woocommerce_order_cart_discount_to_display', woocommerce_price( $this->get_cart_discount() ), $this );
|
||||
}
|
||||
|
||||
|
@ -844,7 +854,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_order_discount_to_display() {
|
||||
public function get_order_discount_to_display() {
|
||||
return apply_filters( 'woocommerce_order_discount_to_display', woocommerce_price( $this->get_order_discount() ), $this );
|
||||
}
|
||||
|
||||
|
@ -856,7 +866,7 @@ class WC_Order {
|
|||
* @param mixed $item
|
||||
* @return WC_Product
|
||||
*/
|
||||
function get_product_from_item( $item ) {
|
||||
public function get_product_from_item( $item ) {
|
||||
$_product = get_product( $item['variation_id'] ? $item['variation_id'] : $item['product_id'] );
|
||||
|
||||
return $_product;
|
||||
|
@ -870,9 +880,12 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_order_item_totals() {
|
||||
public function get_order_item_totals( $tax_display = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! $tax_display )
|
||||
$tax_display = $this->tax_display_cart;
|
||||
|
||||
$total_rows = array();
|
||||
|
||||
if ( $subtotal = $this->get_subtotal_to_display() )
|
||||
|
@ -896,7 +909,7 @@ class WC_Order {
|
|||
if ( $fees = $this->get_fees() )
|
||||
foreach( $fees as $id => $fee ) {
|
||||
|
||||
if ( $this->tax_display_cart == 'excl' ) {
|
||||
if ( $tax_display == 'excl' ) {
|
||||
|
||||
$total_rows[ 'fee_' . $id ] = array(
|
||||
'label' => $fee['name'],
|
||||
|
@ -914,7 +927,7 @@ class WC_Order {
|
|||
}
|
||||
|
||||
// Tax for tax exclusive prices
|
||||
if ( $this->tax_display_cart == 'excl' ) {
|
||||
if ( $tax_display == 'excl' ) {
|
||||
if ( sizeof( $this->get_taxes() ) > 0 ) {
|
||||
|
||||
$has_compound_tax = false;
|
||||
|
@ -970,7 +983,7 @@ class WC_Order {
|
|||
);
|
||||
|
||||
// Tax for inclusive prices
|
||||
if ( $this->tax_display_cart == 'incl' ) {
|
||||
if ( $tax_display == 'incl' ) {
|
||||
|
||||
$tax_string_array = array();
|
||||
|
||||
|
@ -1006,7 +1019,7 @@ class WC_Order {
|
|||
* @param bool plain text
|
||||
* @return string
|
||||
*/
|
||||
function email_order_items_table( $show_download_links = false, $show_sku = false, $show_purchase_note = false, $show_image = false, $image_size = array( 32, 32 ), $plain_text = false ) {
|
||||
public function email_order_items_table( $show_download_links = false, $show_sku = false, $show_purchase_note = false, $show_image = false, $image_size = array( 32, 32 ), $plain_text = false ) {
|
||||
|
||||
ob_start();
|
||||
|
||||
|
@ -1033,7 +1046,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function is_download_permitted() {
|
||||
public function is_download_permitted() {
|
||||
return apply_filters( 'woocommerce_order_is_download_permitted', $this->status == 'completed' || ( get_option( 'woocommerce_downloads_grant_access_after_payment' ) == 'yes' && $this->status == 'processing' ), $this );
|
||||
}
|
||||
|
||||
|
@ -1043,7 +1056,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function has_downloadable_item() {
|
||||
public function has_downloadable_item() {
|
||||
$has_downloadable_item = false;
|
||||
|
||||
foreach($this->get_items() as $item) :
|
||||
|
@ -1066,7 +1079,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_checkout_payment_url() {
|
||||
public function get_checkout_payment_url() {
|
||||
|
||||
$payment_page = get_permalink(woocommerce_get_page_id('pay'));
|
||||
|
||||
|
@ -1082,7 +1095,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_cancel_order_url() {
|
||||
public function get_cancel_order_url() {
|
||||
global $woocommerce;
|
||||
return apply_filters('woocommerce_get_cancel_order_url', $woocommerce->nonce_url( 'cancel_order', add_query_arg('cancel_order', 'true', add_query_arg('order', $this->order_key, add_query_arg('order_id', $this->id, trailingslashit( home_url() ))))));
|
||||
}
|
||||
|
@ -1097,7 +1110,7 @@ class WC_Order {
|
|||
* @param array $item the item
|
||||
* @return array available downloadable file urls
|
||||
*/
|
||||
function get_downloadable_file_urls( $product_id, $variation_id, $item ) {
|
||||
public function get_downloadable_file_urls( $product_id, $variation_id, $item ) {
|
||||
global $wpdb;
|
||||
|
||||
$download_file = $variation_id > 0 ? $variation_id : $product_id;
|
||||
|
@ -1131,7 +1144,7 @@ class WC_Order {
|
|||
* @param int $is_customer_note (default: 0) Is this a note for the customer?
|
||||
* @return id Comment ID
|
||||
*/
|
||||
function add_order_note( $note, $is_customer_note = 0 ) {
|
||||
public function add_order_note( $note, $is_customer_note = 0 ) {
|
||||
|
||||
$is_customer_note = intval( $is_customer_note );
|
||||
|
||||
|
@ -1168,7 +1181,7 @@ class WC_Order {
|
|||
* @param string $note (default: '') Optional note to add
|
||||
* @return void
|
||||
*/
|
||||
function update_status( $new_status_slug, $note = '' ) {
|
||||
public function update_status( $new_status_slug, $note = '' ) {
|
||||
|
||||
if ( $note )
|
||||
$note .= ' ';
|
||||
|
@ -1222,7 +1235,7 @@ class WC_Order {
|
|||
* @param string $note (default: '') Optional note to add
|
||||
* @return void
|
||||
*/
|
||||
function cancel_order( $note = '' ) {
|
||||
public function cancel_order( $note = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
unset( $woocommerce->session->order_awaiting_payment );
|
||||
|
@ -1243,7 +1256,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function payment_complete() {
|
||||
public function payment_complete() {
|
||||
global $woocommerce;
|
||||
|
||||
unset( $woocommerce->session->order_awaiting_payment );
|
||||
|
@ -1299,7 +1312,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function record_product_sales() {
|
||||
public function record_product_sales() {
|
||||
|
||||
if ( get_post_meta( $this->id, '_recorded_sales', true ) == 'yes' )
|
||||
return;
|
||||
|
@ -1325,7 +1338,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_used_coupons() {
|
||||
public function get_used_coupons() {
|
||||
|
||||
$codes = array();
|
||||
$coupons = $this->get_items( 'coupon' );
|
||||
|
@ -1344,7 +1357,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function increase_coupon_usage_counts() {
|
||||
public function increase_coupon_usage_counts() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( get_post_meta( $this->id, '_recorded_coupon_usage_counts', true ) == 'yes' )
|
||||
|
@ -1370,7 +1383,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function decrease_coupon_usage_counts() {
|
||||
public function decrease_coupon_usage_counts() {
|
||||
global $woocommerce;
|
||||
|
||||
if ( get_post_meta( $this->id, '_recorded_coupon_usage_counts', true ) != 'yes' )
|
||||
|
@ -1396,7 +1409,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function reduce_order_stock() {
|
||||
public function reduce_order_stock() {
|
||||
|
||||
if ( get_option('woocommerce_manage_stock') == 'yes' && sizeof( $this->get_items() ) > 0 ) {
|
||||
|
||||
|
@ -1439,7 +1452,7 @@ class WC_Order {
|
|||
* @param int $qty_ordered
|
||||
* @return void
|
||||
*/
|
||||
function send_stock_notifications( $product, $new_stock, $qty_ordered ) {
|
||||
public function send_stock_notifications( $product, $new_stock, $qty_ordered ) {
|
||||
|
||||
// Backorders
|
||||
if ( $new_stock < 0 )
|
||||
|
@ -1466,7 +1479,7 @@ class WC_Order {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_customer_order_notes() {
|
||||
public function get_customer_order_notes() {
|
||||
|
||||
$notes = array();
|
||||
|
||||
|
@ -1508,7 +1521,7 @@ class WC_Order {
|
|||
*/
|
||||
class WC_Order_Item_Meta {
|
||||
|
||||
var $meta;
|
||||
public $meta;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -1517,7 +1530,7 @@ class WC_Order_Item_Meta {
|
|||
* @param string $item_meta (default: '')
|
||||
* @return void
|
||||
*/
|
||||
function __construct( $item_meta = array() ) {
|
||||
public function __construct( $item_meta = array() ) {
|
||||
$this->meta = $item_meta;
|
||||
}
|
||||
|
||||
|
@ -1530,7 +1543,7 @@ class WC_Order_Item_Meta {
|
|||
* @param string $hideprefix (default: _)
|
||||
* @return void
|
||||
*/
|
||||
function display( $flat = false, $return = false, $hideprefix = '_' ) {
|
||||
public function display( $flat = false, $return = false, $hideprefix = '_' ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( ! empty( $this->meta ) ) {
|
||||
|
|
|
@ -13,38 +13,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
class WC_Product_External extends WC_Product_Simple {
|
||||
|
||||
/** @var string URL to external product. */
|
||||
var $product_url;
|
||||
|
||||
/** @var string Text for the buy/link button. */
|
||||
var $button_text;
|
||||
|
||||
/**
|
||||
* __construct function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $product
|
||||
* @param array $args Contains arguments to set up this product
|
||||
*/
|
||||
function __construct( $product, $args ) {
|
||||
|
||||
parent::__construct( $product, $args );
|
||||
|
||||
public function __construct( $product ) {
|
||||
$this->product_type = 'external';
|
||||
$this->downloadable = 'no';
|
||||
$this->virtual = 'no';
|
||||
$this->stock = '';
|
||||
$this->stock_status = 'instock';
|
||||
$this->manage_stock = 'no';
|
||||
$this->weight = '';
|
||||
$this->length = '';
|
||||
$this->width = '';
|
||||
$this->height = '';
|
||||
|
||||
$this->load_product_data( array(
|
||||
'product_url' => '',
|
||||
'button_text' => 'no'
|
||||
) );
|
||||
parent::__construct( $product );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +30,7 @@ class WC_Product_External extends WC_Product_Simple {
|
|||
* @access public
|
||||
* @return cool
|
||||
*/
|
||||
function is_purchasable() {
|
||||
public function is_purchasable() {
|
||||
return apply_filters( 'woocommerce_is_purchasable', false, $this );
|
||||
}
|
||||
|
||||
|
@ -63,7 +40,7 @@ class WC_Product_External extends WC_Product_Simple {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_product_url() {
|
||||
public function get_product_url() {
|
||||
return $this->product_url;
|
||||
}
|
||||
|
||||
|
@ -73,7 +50,7 @@ class WC_Product_External extends WC_Product_Simple {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_button_text() {
|
||||
public function get_button_text() {
|
||||
return $this->button_text ? $this->button_text : __( 'Buy product', 'woocommerce' );
|
||||
}
|
||||
}
|
|
@ -13,46 +13,21 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
class WC_Product_Grouped extends WC_Product {
|
||||
|
||||
/** @var array Array of child products/posts/variations. */
|
||||
var $children;
|
||||
/** @public array Array of child products/posts/variations. */
|
||||
public $children;
|
||||
|
||||
/** @var string The product's total stock, including that of its children. */
|
||||
var $total_stock;
|
||||
/** @public string The product's total stock, including that of its children. */
|
||||
public $total_stock;
|
||||
|
||||
/**
|
||||
* __construct function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $product
|
||||
* @param array $args Contains arguments to set up this product
|
||||
*/
|
||||
function __construct( $product, $args ) {
|
||||
|
||||
parent::__construct( $product );
|
||||
|
||||
public function __construct( $product ) {
|
||||
$this->product_type = 'grouped';
|
||||
$this->product_custom_fields = get_post_custom( $this->id );
|
||||
$this->downloadable = 'no';
|
||||
$this->virtual = 'no';
|
||||
$this->stock = '';
|
||||
$this->stock_status = 'instock';
|
||||
$this->manage_stock = 'no';
|
||||
$this->weight = '';
|
||||
$this->length = '';
|
||||
$this->width = '';
|
||||
$this->height = '';
|
||||
|
||||
// Load data from custom fields
|
||||
$this->load_product_data( array(
|
||||
'sku' => '',
|
||||
'price' => '',
|
||||
'visibility' => 'hidden',
|
||||
'sale_price' => '',
|
||||
'regular_price' => '',
|
||||
'upsell_ids' => array(),
|
||||
'crosssell_ids' => array(),
|
||||
'featured' => 'no'
|
||||
) );
|
||||
parent::__construct( $product );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,9 +38,9 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
function get_total_stock() {
|
||||
public function get_total_stock() {
|
||||
|
||||
if ( is_null( $this->total_stock ) ) {
|
||||
if ( empty( $this->total_stock ) ) {
|
||||
|
||||
$transient_name = 'wc_product_total_stock_' . $this->id;
|
||||
|
||||
|
@ -95,7 +70,7 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_children() {
|
||||
public function get_children() {
|
||||
|
||||
if ( ! is_array( $this->children ) ) {
|
||||
|
||||
|
@ -123,7 +98,7 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @param mixed $child_id
|
||||
* @return object WC_Product or WC_Product_variation
|
||||
*/
|
||||
function get_child( $child_id ) {
|
||||
public function get_child( $child_id ) {
|
||||
return get_product( $child_id );
|
||||
}
|
||||
|
||||
|
@ -134,7 +109,7 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function has_child() {
|
||||
public function has_child() {
|
||||
return sizeof( $this->get_children() ) ? true : false;
|
||||
}
|
||||
|
||||
|
@ -145,7 +120,7 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function is_on_sale() {
|
||||
public function is_on_sale() {
|
||||
if ( $this->has_child() ) {
|
||||
|
||||
foreach ( $this->get_children() as $child_id ) {
|
||||
|
@ -170,7 +145,7 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @access public
|
||||
* @return cool
|
||||
*/
|
||||
function is_purchasable() {
|
||||
public function is_purchasable() {
|
||||
return apply_filters( 'woocommerce_is_purchasable', false, $this );
|
||||
}
|
||||
|
||||
|
@ -182,7 +157,7 @@ class WC_Product_Grouped extends WC_Product {
|
|||
* @param string $price (default: '')
|
||||
* @return string
|
||||
*/
|
||||
function get_price_html( $price = '' ) {
|
||||
public function get_price_html( $price = '' ) {
|
||||
|
||||
$child_prices = array();
|
||||
|
||||
|
|
|
@ -18,40 +18,10 @@ class WC_Product_Simple extends WC_Product {
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $product
|
||||
* @param array $args Contains arguments to set up this product
|
||||
*/
|
||||
function __construct( $product, $args ) {
|
||||
|
||||
parent::__construct( $product );
|
||||
|
||||
public function __construct( $product ) {
|
||||
$this->product_type = 'simple';
|
||||
|
||||
// Load data from custom fields
|
||||
$this->load_product_data( array(
|
||||
'sku' => '',
|
||||
'downloadable' => 'no',
|
||||
'virtual' => 'no',
|
||||
'price' => '',
|
||||
'visibility' => 'hidden',
|
||||
'stock' => 0,
|
||||
'stock_status' => 'instock',
|
||||
'backorders' => 'no',
|
||||
'manage_stock' => 'no',
|
||||
'sale_price' => '',
|
||||
'regular_price' => '',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
'tax_status' => 'taxable',
|
||||
'tax_class' => '',
|
||||
'upsell_ids' => array(),
|
||||
'crosssell_ids' => array(),
|
||||
'sale_price_dates_from' => '',
|
||||
'sale_price_dates_to' => '',
|
||||
'featured' => 'no',
|
||||
'sold_individually' => 'no'
|
||||
) );
|
||||
parent::__construct( $product );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,7 +30,7 @@ class WC_Product_Simple extends WC_Product {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_title() {
|
||||
public function get_title() {
|
||||
|
||||
$title = $this->post->post_title;
|
||||
|
||||
|
@ -71,14 +41,13 @@ class WC_Product_Simple extends WC_Product {
|
|||
return apply_filters( 'woocommerce_product_title', apply_filters( 'the_title', $title, $this->id ), $this );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sync grouped products with the childs lowest price (so they can be sorted by price accurately).
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function grouped_product_sync() {
|
||||
public function grouped_product_sync() {
|
||||
global $wpdb, $woocommerce;
|
||||
|
||||
if ( ! $this->get_parent() ) return;
|
||||
|
|
|
@ -13,72 +13,21 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
class WC_Product_Variable extends WC_Product {
|
||||
|
||||
/** @var array Array of child products/posts/variations. */
|
||||
var $children;
|
||||
/** @public array Array of child products/posts/variations. */
|
||||
public $children;
|
||||
|
||||
/** @var string The product's total stock, including that of its children. */
|
||||
var $total_stock;
|
||||
|
||||
/** @var string Used for variation prices. */
|
||||
var $min_variation_price;
|
||||
|
||||
/** @var string Used for variation prices. */
|
||||
var $max_variation_price;
|
||||
|
||||
/** @var string Used for variation prices. */
|
||||
var $min_variation_regular_price;
|
||||
|
||||
/** @var string Used for variation prices. */
|
||||
var $max_variation_regular_price;
|
||||
|
||||
/** @var string Used for variation prices. */
|
||||
var $min_variation_sale_price;
|
||||
|
||||
/** @var string Used for variation prices. */
|
||||
var $max_variation_sale_price;
|
||||
/** @public string The product's total stock, including that of its children. */
|
||||
public $total_stock;
|
||||
|
||||
/**
|
||||
* __construct function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $product
|
||||
* @param array $args Contains arguments to set up this product
|
||||
*/
|
||||
function __construct( $product, $args ) {
|
||||
|
||||
parent::__construct( $product );
|
||||
|
||||
public function __construct( $product ) {
|
||||
$this->product_type = 'variable';
|
||||
$this->product_custom_fields = get_post_custom( $this->id );
|
||||
|
||||
// Load data from custom fields
|
||||
$this->load_product_data( array(
|
||||
'sku' => '',
|
||||
'price' => '',
|
||||
'sale_price' => '',
|
||||
'regular_price' => '',
|
||||
'visibility' => 'hidden',
|
||||
'stock' => 0,
|
||||
'stock_status' => 'instock',
|
||||
'backorders' => 'no',
|
||||
'manage_stock' => 'no',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
'tax_status' => 'taxable',
|
||||
'tax_class' => '',
|
||||
'upsell_ids' => array(),
|
||||
'crosssell_ids' => array(),
|
||||
'featured' => 'no',
|
||||
'min_variation_price' => '',
|
||||
'max_variation_price' => '',
|
||||
'min_variation_regular_price' => '',
|
||||
'max_variation_regular_price' => '',
|
||||
'min_variation_sale_price' => '',
|
||||
'max_variation_sale_price' => '',
|
||||
'sold_individually' => 'no'
|
||||
) );
|
||||
parent::__construct( $product );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,9 +38,9 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
function get_total_stock() {
|
||||
public function get_total_stock() {
|
||||
|
||||
if ( is_null( $this->total_stock ) ) {
|
||||
if ( empty( $this->total_stock ) ) {
|
||||
|
||||
$transient_name = 'wc_product_total_stock_' . $this->id;
|
||||
|
||||
|
@ -121,7 +70,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @param int $by (default: 1) Amount to reduce by.
|
||||
* @return int Stock
|
||||
*/
|
||||
function reduce_stock( $by = 1 ) {
|
||||
public function reduce_stock( $by = 1 ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( $this->managing_stock() ) {
|
||||
|
@ -147,7 +96,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @param int $by (default: 1) Amount to increase by
|
||||
* @return int Stock
|
||||
*/
|
||||
function increase_stock( $by = 1 ) {
|
||||
public function increase_stock( $by = 1 ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ($this->managing_stock()) :
|
||||
|
@ -172,7 +121,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_children() {
|
||||
public function get_children() {
|
||||
|
||||
if ( ! is_array( $this->children ) ) {
|
||||
|
||||
|
@ -201,11 +150,10 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @param mixed $child_id
|
||||
* @return object WC_Product or WC_Product_variation
|
||||
*/
|
||||
function get_child( $child_id ) {
|
||||
public function get_child( $child_id ) {
|
||||
return get_product( $child_id, array(
|
||||
'parent_id' => $this->id,
|
||||
'parent' => $this,
|
||||
'meta' => $this->product_custom_fields
|
||||
'parent' => $this
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -216,7 +164,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function has_child() {
|
||||
public function has_child() {
|
||||
return sizeof( $this->get_children() ) ? true : false;
|
||||
}
|
||||
|
||||
|
@ -227,7 +175,8 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function is_on_sale() {
|
||||
public function is_on_sale() {
|
||||
|
||||
if ( $this->has_child() ) {
|
||||
|
||||
foreach ( $this->get_children() as $child_id ) {
|
||||
|
@ -252,10 +201,10 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @param string $price (default: '')
|
||||
* @return string
|
||||
*/
|
||||
function get_price_html( $price = '' ) {
|
||||
public function get_price_html( $price = '' ) {
|
||||
|
||||
// Ensure variation prices are synced with variations
|
||||
if ( $this->min_variation_price === '' || $this->min_variation_regular_price === '' ) {
|
||||
if ( $this->min_variation_price === '' || $this->min_variation_regular_price === '' || $this->price === '' ) {
|
||||
$this->variable_product_sync();
|
||||
$this->price = $this->min_variation_price;
|
||||
}
|
||||
|
@ -319,7 +268,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return array of attributes and their available values
|
||||
*/
|
||||
function get_variation_attributes() {
|
||||
public function get_variation_attributes() {
|
||||
|
||||
$variation_attributes = array();
|
||||
|
||||
|
@ -387,9 +336,9 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_variation_default_attributes() {
|
||||
public function get_variation_default_attributes() {
|
||||
|
||||
$default = isset( $this->product_custom_fields['_default_attributes'][0] ) ? $this->product_custom_fields['_default_attributes'][0] : '';
|
||||
$default = isset( $this->default_attributes ) ? $this->default_attributes : '';
|
||||
|
||||
return apply_filters( 'woocommerce_product_default_attributes', (array) maybe_unserialize( $default ), $this );
|
||||
}
|
||||
|
@ -400,7 +349,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_available_variations() {
|
||||
public function get_available_variations() {
|
||||
|
||||
$available_variations = array();
|
||||
|
||||
|
@ -463,7 +412,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function variable_product_sync() {
|
||||
public function variable_product_sync() {
|
||||
global $woocommerce;
|
||||
|
||||
$children = get_posts( array(
|
||||
|
@ -476,7 +425,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
|
||||
$this->min_variation_price = $this->min_variation_regular_price = $this->min_variation_sale_price = $this->max_variation_price = $this->max_variation_regular_price = $this->max_variation_sale_price = '';
|
||||
|
||||
if ($children) {
|
||||
if ( $children ) {
|
||||
foreach ( $children as $child ) {
|
||||
|
||||
$child_price = get_post_meta( $child, '_price', true );
|
||||
|
@ -503,16 +452,16 @@ class WC_Product_Variable extends WC_Product {
|
|||
$this->min_variation_price = $this->min_variation_sale_price === '' || $this->min_variation_regular_price < $this->min_variation_sale_price ? $this->min_variation_regular_price : $this->min_variation_sale_price;
|
||||
|
||||
$this->max_variation_price = $this->max_variation_sale_price === '' || $this->max_variation_regular_price > $this->max_variation_sale_price ? $this->max_variation_regular_price : $this->max_variation_sale_price;
|
||||
|
||||
update_post_meta( $this->id, '_price', $this->min_variation_price );
|
||||
update_post_meta( $this->id, '_min_variation_price', $this->min_variation_price );
|
||||
update_post_meta( $this->id, '_max_variation_price', $this->max_variation_price );
|
||||
update_post_meta( $this->id, '_min_variation_regular_price', $this->min_variation_regular_price );
|
||||
update_post_meta( $this->id, '_max_variation_regular_price', $this->max_variation_regular_price );
|
||||
update_post_meta( $this->id, '_min_variation_sale_price', $this->min_variation_sale_price );
|
||||
update_post_meta( $this->id, '_max_variation_sale_price', $this->max_variation_sale_price );
|
||||
|
||||
$woocommerce->clear_product_transients( $this->id );
|
||||
}
|
||||
|
||||
update_post_meta( $this->id, '_price', $this->min_variation_price );
|
||||
update_post_meta( $this->id, '_min_variation_price', $this->min_variation_price );
|
||||
update_post_meta( $this->id, '_max_variation_price', $this->max_variation_price );
|
||||
update_post_meta( $this->id, '_min_variation_regular_price', $this->min_variation_regular_price );
|
||||
update_post_meta( $this->id, '_max_variation_regular_price', $this->max_variation_regular_price );
|
||||
update_post_meta( $this->id, '_min_variation_sale_price', $this->min_variation_sale_price );
|
||||
update_post_meta( $this->id, '_max_variation_sale_price', $this->max_variation_sale_price );
|
||||
|
||||
$woocommerce->clear_product_transients( $this->id );
|
||||
}
|
||||
}
|
|
@ -14,53 +14,50 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
class WC_Product_Variation extends WC_Product {
|
||||
|
||||
/** @var array Stores variation data (attributes) for the current variation. */
|
||||
var $variation_data;
|
||||
/** @public int ID of the variable product. */
|
||||
public $variation_id;
|
||||
|
||||
/** @var int ID of the variable product. */
|
||||
var $variation_id;
|
||||
/** @public object Parent Variable product object. */
|
||||
public $parent;
|
||||
|
||||
/** @var bool True if the variation has a length. */
|
||||
var $variation_has_length;
|
||||
/** @public array Stores variation data (attributes) for the current variation. */
|
||||
public $variation_data = array();
|
||||
|
||||
/** @var bool True if the variation has a width. */
|
||||
var $variation_has_width;
|
||||
/** @public bool True if the variation has a length. */
|
||||
public $variation_has_length = false;
|
||||
|
||||
/** @var bool True if the variation has a height. */
|
||||
var $variation_has_height;
|
||||
/** @public bool True if the variation has a width. */
|
||||
public $variation_has_width = false;
|
||||
|
||||
/** @var bool True if the variation has a weight. */
|
||||
var $variation_has_weight;
|
||||
/** @public bool True if the variation has a height. */
|
||||
public $variation_has_height = false;
|
||||
|
||||
/** @var bool True if the variation has a price. */
|
||||
var $variation_has_price;
|
||||
/** @public bool True if the variation has a weight. */
|
||||
public $variation_has_weight = false;
|
||||
|
||||
/** @var bool True if the variation has a regular price. */
|
||||
var $variation_has_regular_price;
|
||||
/** @public bool True if the variation has a price. */
|
||||
public $variation_has_price = false;
|
||||
|
||||
/** @var bool True if the variation has a sale price. */
|
||||
var $variation_has_sale_price;
|
||||
/** @public bool True if the variation has a regular price. */
|
||||
public $variation_has_regular_price = false;
|
||||
|
||||
/** @var bool True if the variation has stock and is managing stock. */
|
||||
var $variation_has_stock;
|
||||
/** @public bool True if the variation has a sale price. */
|
||||
public $variation_has_sale_price = false;
|
||||
|
||||
/** @var bool True if the variation has a sku. */
|
||||
var $variation_has_sku;
|
||||
/** @public bool True if the variation has stock and is managing stock. */
|
||||
public $variation_has_stock = false;
|
||||
|
||||
/** @var string Stores the shipping class of the variation. */
|
||||
var $variation_shipping_class;
|
||||
/** @public bool True if the variation has a sku. */
|
||||
public $variation_has_sku = false;
|
||||
|
||||
/** @var int Stores the shipping class ID of the variation. */
|
||||
var $variation_shipping_class_id;
|
||||
/** @public string Stores the shipping class of the variation. */
|
||||
public $variation_shipping_class = false;
|
||||
|
||||
/** @var bool True if the variation has a tax class. */
|
||||
var $variation_has_tax_class;
|
||||
/** @public int Stores the shipping class ID of the variation. */
|
||||
public $variation_shipping_class_id = false;
|
||||
|
||||
/** @var array Array of custom fields (meta) containing product data. */
|
||||
var $parent_custom_fields;
|
||||
|
||||
/** @var object Parent Variable product object. */
|
||||
var $parent;
|
||||
/** @public bool True if the variation has a tax class. */
|
||||
public $variation_has_tax_class = false;
|
||||
|
||||
/**
|
||||
* Loads all product data from custom fields
|
||||
|
@ -70,7 +67,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @param array $args Array of the arguments containing parent product data
|
||||
* @return void
|
||||
*/
|
||||
function __construct( $variation, $args = array() ) {
|
||||
public function __construct( $variation, $args = array() ) {
|
||||
|
||||
$this->product_type = 'variable';
|
||||
|
||||
|
@ -84,50 +81,23 @@ class WC_Product_Variation extends WC_Product {
|
|||
$this->id = ! empty( $args['parent_id'] ) ? intval( $args['parent_id'] ) : wp_get_post_parent_id( $this->variation_id );
|
||||
|
||||
// The post doesn't have a parent id, therefore its invalid.
|
||||
if ( empty( $this->id ) ) return false;
|
||||
if ( empty( $this->id ) )
|
||||
return false;
|
||||
|
||||
// Get post data
|
||||
$this->parent = ! empty( $args['parent'] ) ? $args['parent'] : get_product( $this->id );
|
||||
$this->post = $this->parent->post;
|
||||
|
||||
// Get custom fields
|
||||
$this->product_custom_fields = get_post_custom( $this->variation_id );
|
||||
$this->parent_custom_fields = ! empty( $args['meta'] ) ? $args['meta'] : get_post_custom( $this->id );
|
||||
|
||||
$this->load_product_data( array(
|
||||
'sku' => '',
|
||||
'price' => 0,
|
||||
'visibility' => 'hidden',
|
||||
'stock' => 0,
|
||||
'stock_status' => 'instock',
|
||||
'backorders' => 'no',
|
||||
'manage_stock' => 'no',
|
||||
'sale_price' => '',
|
||||
'regular_price' => '',
|
||||
'weight' => '',
|
||||
'length' => '',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
'tax_status' => 'taxable',
|
||||
'tax_class' => '',
|
||||
'upsell_ids' => array(),
|
||||
'crosssell_ids' => array()
|
||||
), $this->parent_custom_fields );
|
||||
$this->product_custom_fields = get_post_meta( $this->variation_id );
|
||||
|
||||
// Get the variation attributes from meta
|
||||
$this->variation_data = array();
|
||||
|
||||
foreach ( $this->product_custom_fields as $name => $value ) {
|
||||
|
||||
if ( ! strstr( $name, 'attribute_' ) ) continue;
|
||||
if ( ! strstr( $name, 'attribute_' ) )
|
||||
continue;
|
||||
|
||||
$this->variation_data[ $name ] = $value[0];
|
||||
}
|
||||
|
||||
// Now get variation meta and override the parent variable product
|
||||
$this->variation_has_sku = $this->variation_has_stock = $this->variation_has_weight = $this->variation_has_length = $this->variation_has_width = $this->variation_has_height = $this->variation_has_price = $this->variation_has_regular_price = $this->variation_has_sale_price = false;
|
||||
|
||||
/* Override parent data with variation */
|
||||
// Now get variation meta to override the parent variable product
|
||||
if ( ! empty( $this->product_custom_fields['_sku'][0] ) ) {
|
||||
$this->variation_has_sku = true;
|
||||
$this->sku = $this->product_custom_fields['_sku'][0];
|
||||
|
@ -219,7 +189,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function is_visible() {
|
||||
public function is_visible() {
|
||||
|
||||
$visible = true;
|
||||
|
||||
|
@ -237,7 +207,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function parent_is_visible() {
|
||||
public function parent_is_visible() {
|
||||
return parent::is_visible();
|
||||
}
|
||||
|
||||
|
@ -246,7 +216,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
function get_variation_id() {
|
||||
public function get_variation_id() {
|
||||
return absint( $this->variation_id );
|
||||
}
|
||||
|
||||
|
@ -255,7 +225,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
*
|
||||
* @return array of attributes and their values for this variation
|
||||
*/
|
||||
function get_variation_attributes() {
|
||||
public function get_variation_attributes() {
|
||||
return $this->variation_data;
|
||||
}
|
||||
|
||||
|
@ -264,7 +234,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
*
|
||||
* @return string containing the formatted price
|
||||
*/
|
||||
function get_price_html() {
|
||||
public function get_price_html() {
|
||||
if ( $this->variation_has_price ) {
|
||||
$price = '';
|
||||
|
||||
|
@ -292,7 +262,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @param string $size (default: 'shop_thumbnail')
|
||||
* @return string
|
||||
*/
|
||||
function get_image( $size = 'shop_thumbnail', $attr = array() ) {
|
||||
public function get_image( $size = 'shop_thumbnail', $attr = array() ) {
|
||||
global $woocommerce;
|
||||
|
||||
$image = '';
|
||||
|
@ -318,7 +288,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @param int $by (default: 1) Amount to reduce by
|
||||
* @return int stock level
|
||||
*/
|
||||
function reduce_stock( $by = 1 ) {
|
||||
public function reduce_stock( $by = 1 ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ( $this->variation_has_stock ) {
|
||||
|
@ -356,7 +326,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @param int $by (default: 1) Amount to increase by
|
||||
* @return int stock level
|
||||
*/
|
||||
function increase_stock( $by = 1 ) {
|
||||
public function increase_stock( $by = 1 ) {
|
||||
global $woocommerce;
|
||||
|
||||
if ($this->variation_has_stock) :
|
||||
|
@ -385,7 +355,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function get_shipping_class() {
|
||||
public function get_shipping_class() {
|
||||
if ( ! $this->variation_shipping_class ) {
|
||||
$classes = get_the_terms( $this->variation_id, 'product_shipping_class' );
|
||||
|
||||
|
@ -406,7 +376,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
function get_shipping_class_id() {
|
||||
public function get_shipping_class_id() {
|
||||
if ( ! $this->variation_shipping_class_id ) {
|
||||
|
||||
$classes = get_the_terms( $this->variation_id, 'product_shipping_class' );
|
||||
|
@ -427,7 +397,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* @param string $download_id file identifier
|
||||
* @return array
|
||||
*/
|
||||
function get_file_download_path( $download_id ) {
|
||||
public function get_file_download_path( $download_id ) {
|
||||
|
||||
$file_path = '';
|
||||
$file_paths = apply_filters( 'woocommerce_file_download_paths', get_post_meta( $this->variation_id, '_file_paths', true ), $this->variation_id, null, null );
|
||||
|
|
|
@ -9,23 +9,23 @@
|
|||
*/
|
||||
class WC_Query {
|
||||
|
||||
/** @var array Unfiltered product ids (before layered nav etc) */
|
||||
var $unfiltered_product_ids = array();
|
||||
/** @public array Unfiltered product ids (before layered nav etc) */
|
||||
public $unfiltered_product_ids = array();
|
||||
|
||||
/** @var array Filtered product ids (after layered nav) */
|
||||
var $filtered_product_ids = array();
|
||||
/** @public array Filtered product ids (after layered nav) */
|
||||
public $filtered_product_ids = array();
|
||||
|
||||
/** @var array Product IDs that match the layered nav + price filter */
|
||||
var $post__in = array();
|
||||
/** @public array Product IDs that match the layered nav + price filter */
|
||||
public $post__in = array();
|
||||
|
||||
/** @var array The meta query for the page */
|
||||
var $meta_query = '';
|
||||
/** @public array The meta query for the page */
|
||||
public $meta_query = '';
|
||||
|
||||
/** @var array Post IDs matching layered nav only */
|
||||
var $layered_nav_post__in = array();
|
||||
/** @public array Post IDs matching layered nav only */
|
||||
public $layered_nav_post__in = array();
|
||||
|
||||
/** @var array Stores post IDs matching layered nav, so price filter can find max price in view */
|
||||
var $layered_nav_product_ids = array();
|
||||
/** @public array Stores post IDs matching layered nav, so price filter can find max price in view */
|
||||
public $layered_nav_product_ids = array();
|
||||
|
||||
/**
|
||||
* Constructor for the query class. Hooks in methods.
|
||||
|
@ -33,10 +33,10 @@ class WC_Query {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
add_filter( 'pre_get_posts', array( &$this, 'pre_get_posts') );
|
||||
add_filter( 'the_posts', array( &$this, 'the_posts'), 11, 2 );
|
||||
add_filter( 'wp', array( &$this, 'remove_product_query') );
|
||||
public function __construct() {
|
||||
add_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
|
||||
add_filter( 'the_posts', array( $this, 'the_posts' ), 11, 2 );
|
||||
add_filter( 'wp', array( $this, 'remove_product_query' ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ class WC_Query {
|
|||
* @param mixed $q query object
|
||||
* @return void
|
||||
*/
|
||||
function pre_get_posts( $q ) {
|
||||
public function pre_get_posts( $q ) {
|
||||
global $woocommerce;
|
||||
|
||||
// We only want to affect the main query
|
||||
|
@ -84,14 +84,14 @@ class WC_Query {
|
|||
|
||||
// Fix WP SEO
|
||||
if ( function_exists( 'wpseo_get_value' ) ) {
|
||||
add_filter( 'wpseo_metadesc', array( &$this, 'wpseo_metadesc' ) );
|
||||
add_filter( 'wpseo_metakey', array( &$this, 'wpseo_metakey' ) );
|
||||
add_filter( 'wpseo_metadesc', array( $this, 'wpseo_metadesc' ) );
|
||||
add_filter( 'wpseo_metakey', array( $this, 'wpseo_metakey' ) );
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// Only apply to product categories, the product post archive, the shop page, product tags, and product attribute taxonomies
|
||||
if ( ! $q->is_post_type_archive( 'product' ) && ! $q->is_tax( array_merge( array('product_cat', 'product_tag'), $woocommerce->get_attribute_taxonomy_names() ) ) )
|
||||
if ( ! $q->is_post_type_archive( 'product' ) && ! $q->is_tax( get_object_taxonomies( 'product' ) ) )
|
||||
return;
|
||||
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ class WC_Query {
|
|||
$this->product_query( $q );
|
||||
|
||||
// We're on a shop page so queue the woocommerce_get_products_in_view function
|
||||
add_action( 'wp', array( &$this, 'get_products_in_view' ), 2);
|
||||
add_action( 'wp', array( $this, 'get_products_in_view' ), 2);
|
||||
|
||||
// And remove the pre_get_posts hook
|
||||
$this->remove_product_query();
|
||||
|
@ -113,7 +113,7 @@ class WC_Query {
|
|||
* @param mixed $meta
|
||||
* @return void
|
||||
*/
|
||||
function wpseo_metadesc() {
|
||||
public function wpseo_metadesc() {
|
||||
return wpseo_get_value( 'metadesc', woocommerce_get_page_id('shop') );
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ class WC_Query {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function wpseo_metakey() {
|
||||
public function wpseo_metakey() {
|
||||
return wpseo_get_value( 'metakey', woocommerce_get_page_id('shop') );
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ class WC_Query {
|
|||
* @param bool $query (default: false)
|
||||
* @return void
|
||||
*/
|
||||
function the_posts( $posts, $query = false ) {
|
||||
public function the_posts( $posts, $query = false ) {
|
||||
global $woocommerce;
|
||||
|
||||
// Abort if theres no query
|
||||
|
@ -157,7 +157,7 @@ class WC_Query {
|
|||
return $posts;
|
||||
|
||||
// Abort if we're not on a post type archive/product taxonomy
|
||||
if ( ! $query->is_post_type_archive( 'product' ) && ! $query->is_tax( array_merge( array('product_cat', 'product_tag'), $woocommerce->get_attribute_taxonomy_names() ) ) )
|
||||
if ( ! $query->is_post_type_archive( 'product' ) && ! $query->is_tax( get_object_taxonomies( 'product' ) ) )
|
||||
return $posts;
|
||||
|
||||
$filtered_posts = array();
|
||||
|
@ -194,7 +194,7 @@ class WC_Query {
|
|||
* @param mixed $q
|
||||
* @return void
|
||||
*/
|
||||
function product_query( $q ) {
|
||||
public function product_query( $q ) {
|
||||
|
||||
// Meta query
|
||||
$meta_query = (array) $q->get( 'meta_query' );
|
||||
|
@ -237,8 +237,8 @@ class WC_Query {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function remove_product_query() {
|
||||
remove_filter( 'pre_get_posts', array( &$this, 'pre_get_posts') );
|
||||
public function remove_product_query() {
|
||||
remove_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -248,7 +248,7 @@ class WC_Query {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function get_products_in_view() {
|
||||
public function get_products_in_view() {
|
||||
global $wp_the_query;
|
||||
|
||||
$unfiltered_product_ids = array();
|
||||
|
@ -308,47 +308,44 @@ class WC_Query {
|
|||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_catalog_ordering_args() {
|
||||
public function get_catalog_ordering_args( $orderby = '', $order = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
$current_order = ( isset( $woocommerce->session->orderby ) ) ? $woocommerce->session->orderby : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );
|
||||
|
||||
switch ( $current_order ) {
|
||||
case 'date' :
|
||||
$orderby = 'date';
|
||||
$order = 'desc';
|
||||
$meta_key = '';
|
||||
break;
|
||||
case 'price' :
|
||||
$orderby = 'meta_value_num';
|
||||
$order = 'asc';
|
||||
$meta_key = '_price';
|
||||
break;
|
||||
case 'high_price' :
|
||||
$orderby = 'meta_value_num';
|
||||
$order = 'desc';
|
||||
$meta_key = '_price';
|
||||
break;
|
||||
case 'title' :
|
||||
$orderby = 'title';
|
||||
$order = 'asc';
|
||||
$meta_key = '';
|
||||
break;
|
||||
default :
|
||||
$orderby = 'menu_order title';
|
||||
$order = 'asc';
|
||||
$meta_key = '';
|
||||
break;
|
||||
}
|
||||
// Get ordering from session unless defined
|
||||
if ( ! $orderby )
|
||||
$orderby = isset( $woocommerce->session->orderby ) ? $woocommerce->session->orderby : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );
|
||||
|
||||
$args = array();
|
||||
|
||||
$args['orderby'] = $orderby;
|
||||
$args['order'] = $order;
|
||||
if ($meta_key)
|
||||
$args['meta_key'] = $meta_key;
|
||||
switch ( $orderby ) {
|
||||
case 'date' :
|
||||
$args['orderby'] = 'date';
|
||||
$args['order'] = $order ? $order : 'desc';
|
||||
$args['meta_key'] = '';
|
||||
break;
|
||||
case 'price' :
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['order'] = $order ? $order : 'asc';
|
||||
$args['meta_key'] = '_price';
|
||||
break;
|
||||
case 'high_price' :
|
||||
$args['orderby'] = 'meta_value_num';
|
||||
$args['order'] = $order ? $order : 'desc';
|
||||
$args['meta_key'] = '_price';
|
||||
break;
|
||||
case 'title' :
|
||||
$args['orderby'] = 'title';
|
||||
$args['order'] = $order ? $order : 'asc';
|
||||
$args['meta_key'] = '';
|
||||
break;
|
||||
default :
|
||||
$args['orderby'] = 'menu_order title';
|
||||
$args['order'] = $order ? $order : 'asc';
|
||||
$args['meta_key'] = '';
|
||||
break;
|
||||
}
|
||||
|
||||
return apply_filters('woocommerce_get_catalog_ordering_args', $args );
|
||||
return apply_filters( 'woocommerce_get_catalog_ordering_args', $args );
|
||||
}
|
||||
|
||||
|
||||
|
@ -359,7 +356,7 @@ class WC_Query {
|
|||
* @param string $compare (default: 'IN')
|
||||
* @return array
|
||||
*/
|
||||
function visibility_meta_query( $compare = 'IN' ) {
|
||||
public function visibility_meta_query( $compare = 'IN' ) {
|
||||
if ( is_search() ) $in = array( 'visible', 'search' ); else $in = array( 'visible', 'catalog' );
|
||||
|
||||
$meta_query = array(
|
||||
|
@ -379,7 +376,7 @@ class WC_Query {
|
|||
* @param string $status (default: 'instock')
|
||||
* @return array
|
||||
*/
|
||||
function stock_status_meta_query( $status = 'instock' ) {
|
||||
public function stock_status_meta_query( $status = 'instock' ) {
|
||||
$meta_query = array();
|
||||
if ( get_option( 'woocommerce_hide_out_of_stock_items' ) == 'yes' ) {
|
||||
$meta_query = array(
|
||||
|
|
|
@ -10,19 +10,19 @@
|
|||
class WC_Settings_API {
|
||||
|
||||
/** @var string The plugin ID. Used for option names. */
|
||||
var $plugin_id = 'woocommerce_';
|
||||
public $plugin_id = 'woocommerce_';
|
||||
|
||||
/** @var array Array of setting values. */
|
||||
var $settings = array();
|
||||
public $settings = array();
|
||||
|
||||
/** @var array Array of form option fields. */
|
||||
var $form_fields = array();
|
||||
public $form_fields = array();
|
||||
|
||||
/** @var array Array of validation errors. */
|
||||
var $errors = array();
|
||||
public $errors = array();
|
||||
|
||||
/** @var array Sanitized fields after validation. */
|
||||
var $sanitized_fields = array();
|
||||
public $sanitized_fields = array();
|
||||
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ class WC_Settings_API {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function admin_options() { ?>
|
||||
public function admin_options() { ?>
|
||||
<h3><?php echo ( ! empty( $this->method_title ) ) ? $this->method_title : __( 'Settings','woocommerce' ) ; ?></h3>
|
||||
|
||||
<?php echo ( ! empty( $this->method_description ) ) ? wpautop( $this->method_description ) : ''; ?>
|
||||
|
@ -55,8 +55,8 @@ class WC_Settings_API {
|
|||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function init_form_fields() {
|
||||
return __( 'This function needs to be overridden by your payment gateway class.', 'woocommerce' );
|
||||
public function init_form_fields() {
|
||||
return __( 'This public function needs to be overridden by your payment gateway class.', 'woocommerce' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ class WC_Settings_API {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function display_errors() {}
|
||||
public function display_errors() {}
|
||||
|
||||
/**
|
||||
* Initialise Gateway Settings
|
||||
|
@ -100,7 +100,7 @@ class WC_Settings_API {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function init_settings() {
|
||||
public function init_settings() {
|
||||
|
||||
// Load form_field settings
|
||||
if ( $this->form_fields ) {
|
||||
|
@ -122,7 +122,7 @@ class WC_Settings_API {
|
|||
}
|
||||
|
||||
// Set and decode escaped values
|
||||
$this->settings = array_map( array( &$this, 'format_settings' ), $form_field_settings );
|
||||
$this->settings = array_map( array( $this, 'format_settings' ), $form_field_settings );
|
||||
}
|
||||
|
||||
if ( isset( $this->settings['enabled'] ) && ( $this->settings['enabled'] == 'yes' ) )
|
||||
|
@ -138,7 +138,7 @@ class WC_Settings_API {
|
|||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
function format_settings( $value ) {
|
||||
public function format_settings( $value ) {
|
||||
return ( is_array( $value ) ) ? $value : html_entity_decode( $value );
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ class WC_Settings_API {
|
|||
* @access public
|
||||
* @return string the html for the settings
|
||||
*/
|
||||
function generate_settings_html ( $form_fields = false ) {
|
||||
public function generate_settings_html ( $form_fields = false ) {
|
||||
|
||||
if ( ! $form_fields )
|
||||
$form_fields = $this->form_fields;
|
||||
|
@ -184,7 +184,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function generate_text_html( $key, $data ) {
|
||||
public function generate_text_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -226,7 +226,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function generate_password_html( $key, $data ) {
|
||||
public function generate_password_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -266,7 +266,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function generate_textarea_html( $key, $data ) {
|
||||
public function generate_textarea_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -307,7 +307,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function generate_checkbox_html( $key, $data ) {
|
||||
public function generate_checkbox_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -346,7 +346,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function generate_select_html( $key, $data ) {
|
||||
public function generate_select_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -392,7 +392,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function generate_multiselect_html( $key, $data ) {
|
||||
public function generate_multiselect_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -440,7 +440,7 @@ class WC_Settings_API {
|
|||
* @since 1.6.2
|
||||
* @return string
|
||||
*/
|
||||
function generate_title_html( $key, $data ) {
|
||||
public function generate_title_html( $key, $data ) {
|
||||
$html = '';
|
||||
|
||||
$data['title'] = isset( $data['title'] ) ? $data['title'] : '';
|
||||
|
@ -466,7 +466,7 @@ class WC_Settings_API {
|
|||
* @param bool $form_fields (default: false)
|
||||
* @return void
|
||||
*/
|
||||
function validate_settings_fields( $form_fields = false ) {
|
||||
public function validate_settings_fields( $form_fields = false ) {
|
||||
|
||||
if ( ! $form_fields )
|
||||
$form_fields = $this->form_fields;
|
||||
|
@ -498,7 +498,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function validate_checkbox_field( $key ) {
|
||||
public function validate_checkbox_field( $key ) {
|
||||
$status = 'no';
|
||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) && ( 1 == $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||
$status = 'yes';
|
||||
|
@ -517,7 +517,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function validate_text_field( $key ) {
|
||||
public function validate_text_field( $key ) {
|
||||
$text = ( isset( $this->settings[ $key ] ) ) ? $this->settings[ $key ] : '';
|
||||
|
||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||
|
@ -538,7 +538,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function validate_password_field( $key ) {
|
||||
public function validate_password_field( $key ) {
|
||||
$text = (isset($this->settings[$key])) ? $this->settings[$key] : '';
|
||||
|
||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||
|
@ -559,7 +559,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function validate_textarea_field( $key ) {
|
||||
public function validate_textarea_field( $key ) {
|
||||
$text = ( isset( $this->settings[ $key ] ) ) ? $this->settings[ $key ] : '';
|
||||
|
||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||
|
@ -580,7 +580,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function validate_select_field( $key ) {
|
||||
public function validate_select_field( $key ) {
|
||||
$value = ( isset( $this->settings[ $key ] ) ) ? $this->settings[ $key ] : '';
|
||||
|
||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||
|
@ -600,7 +600,7 @@ class WC_Settings_API {
|
|||
* @since 1.0.0
|
||||
* @return string
|
||||
*/
|
||||
function validate_multiselect_field( $key ) {
|
||||
public function validate_multiselect_field( $key ) {
|
||||
$value = ( isset( $this->settings[ $key ] ) ) ? $this->settings[ $key ] : '';
|
||||
|
||||
if ( isset( $_POST[ $this->plugin_id . $this->id . '_' . $key ] ) ) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
class WC_Tax {
|
||||
|
||||
/** @var array */
|
||||
var $matched_rates;
|
||||
public $matched_rates;
|
||||
|
||||
/**
|
||||
* __construct function.
|
||||
|
@ -18,7 +18,7 @@ class WC_Tax {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
public function __construct() {
|
||||
$this->dp = (int) get_option( 'woocommerce_price_num_decimals' );
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ class WC_Tax {
|
|||
* @param string $args (default: '')
|
||||
* @return array
|
||||
*/
|
||||
function find_rates( $args = '' ) {
|
||||
public function find_rates( $args = '' ) {
|
||||
global $wpdb;
|
||||
|
||||
$defaults = array(
|
||||
|
@ -117,7 +117,7 @@ class WC_Tax {
|
|||
* @param object Tax Class
|
||||
* @return array
|
||||
*/
|
||||
function get_rates( $tax_class = '' ) {
|
||||
public function get_rates( $tax_class = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
$tax_class = sanitize_title( $tax_class );
|
||||
|
@ -138,8 +138,9 @@ class WC_Tax {
|
|||
} else {
|
||||
|
||||
// Prices which include tax should always use the base rate if we don't know where the user is located
|
||||
// Prices exlcuding tax however should just not add any taxes, as they will be added during checkout
|
||||
$matched_tax_rates = $woocommerce->cart->prices_include_tax
|
||||
// Prices excluding tax however should just not add any taxes, as they will be added during checkout.
|
||||
// The woocommerce_default_customer_address option (when set to base) is also used here.
|
||||
$matched_tax_rates = $woocommerce->cart->prices_include_tax || get_option( 'woocommerce_default_customer_address' ) == 'base'
|
||||
? $this->get_shop_base_rate( $tax_class )
|
||||
: array();
|
||||
|
||||
|
@ -155,7 +156,7 @@ class WC_Tax {
|
|||
* @param string Tax Class
|
||||
* @return array
|
||||
*/
|
||||
function get_shop_base_rate( $tax_class = '' ) {
|
||||
public function get_shop_base_rate( $tax_class = '' ) {
|
||||
global $woocommerce;
|
||||
|
||||
$country = $woocommerce->countries->get_base_country();
|
||||
|
@ -174,7 +175,7 @@ class WC_Tax {
|
|||
* @param string Tax Class
|
||||
* @return mixed
|
||||
*/
|
||||
function get_shipping_tax_rates( $tax_class = null ) {
|
||||
public function get_shipping_tax_rates( $tax_class = null ) {
|
||||
global $woocommerce;
|
||||
|
||||
// See if we have an explicitly set shipping tax class
|
||||
|
@ -190,7 +191,7 @@ class WC_Tax {
|
|||
|
||||
// Prices which include tax should always use the base rate if we don't know where the user is located
|
||||
// Prices exlcuding tax however should just not add any taxes, as they will be added during checkout
|
||||
if ( $woocommerce->cart->prices_include_tax ) {
|
||||
if ( $woocommerce->cart->prices_include_tax || get_option( 'woocommerce_default_customer_address' ) == 'base' ) {
|
||||
$country = $woocommerce->countries->get_base_country();
|
||||
$state = $woocommerce->countries->get_base_state();
|
||||
$postcode = '';
|
||||
|
@ -319,7 +320,7 @@ class WC_Tax {
|
|||
* @param bool passed price includes tax
|
||||
* @return array array of rates/amounts
|
||||
*/
|
||||
function calc_tax( $price, $rates, $price_includes_tax = true, $supress_rounding = false ) {
|
||||
public function calc_tax( $price, $rates, $price_includes_tax = true, $supress_rounding = false ) {
|
||||
|
||||
$price = $price * 100; // To avoid float rounding errors, work with integers (pence)
|
||||
|
||||
|
@ -444,7 +445,7 @@ class WC_Tax {
|
|||
* @param int Taxation Rate
|
||||
* @return int
|
||||
*/
|
||||
function calc_shipping_tax( $price, $rates ) {
|
||||
public function calc_shipping_tax( $price, $rates ) {
|
||||
|
||||
// Taxes array
|
||||
$taxes = array();
|
||||
|
@ -484,7 +485,7 @@ class WC_Tax {
|
|||
* @param int key
|
||||
* @return bool
|
||||
*/
|
||||
function is_compound( $key ) {
|
||||
public function is_compound( $key ) {
|
||||
global $wpdb;
|
||||
return $wpdb->get_var( $wpdb->prepare( "SELECT tax_rate_compound FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %s", $key ) ) ? true : false;
|
||||
}
|
||||
|
@ -495,7 +496,7 @@ class WC_Tax {
|
|||
* @param int key
|
||||
* @return string
|
||||
*/
|
||||
function get_rate_label( $key ) {
|
||||
public function get_rate_label( $key ) {
|
||||
global $wpdb;
|
||||
return apply_filters( 'woocommerce_rate_label', $wpdb->get_var( $wpdb->prepare( "SELECT tax_rate_name FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %s", $key ) ), $key, $this );
|
||||
}
|
||||
|
@ -507,7 +508,7 @@ class WC_Tax {
|
|||
* @param mixed $key
|
||||
* @return void
|
||||
*/
|
||||
function get_rate_code( $key ) {
|
||||
public function get_rate_code( $key ) {
|
||||
global $wpdb;
|
||||
|
||||
$rate = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %s", $key ) );
|
||||
|
@ -528,8 +529,8 @@ class WC_Tax {
|
|||
* @param array
|
||||
* @return float
|
||||
*/
|
||||
function get_tax_total( $taxes ) {
|
||||
return array_sum( array_map( array(&$this, 'round'), $taxes ) );
|
||||
public function get_tax_total( $taxes ) {
|
||||
return array_sum( array_map( array( $this, 'round' ), $taxes ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -537,13 +538,13 @@ class WC_Tax {
|
|||
*
|
||||
* Filter example: to return rounding to .5 cents you'd use:
|
||||
*
|
||||
* function euro_5cent_rounding( $in ) {
|
||||
* public function euro_5cent_rounding( $in ) {
|
||||
* return round( $in / 5, 2 ) * 5;
|
||||
* }
|
||||
* add_filter( 'woocommerce_tax_round', 'euro_5cent_rounding' );
|
||||
*
|
||||
*/
|
||||
function round( $in ) {
|
||||
public function round( $in ) {
|
||||
return apply_filters( 'woocommerce_tax_round', round( $in, $this->dp ), $in );
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class WC_Validation {
|
|||
* @param string email address
|
||||
* @return bool
|
||||
*/
|
||||
function is_email( $email ) {
|
||||
public function is_email( $email ) {
|
||||
return is_email( $email );
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ class WC_Validation {
|
|||
* @param string phone number
|
||||
* @return bool
|
||||
*/
|
||||
function is_phone( $phone ) {
|
||||
public function is_phone( $phone ) {
|
||||
if ( strlen( trim( preg_replace( '/[\s\#0-9_\-\+\(\)]/', '', $phone ) ) ) > 0 )
|
||||
return false;
|
||||
|
||||
|
@ -41,7 +41,7 @@ class WC_Validation {
|
|||
* @param string country
|
||||
* @return bool
|
||||
*/
|
||||
function is_postcode( $postcode, $country ) {
|
||||
public function is_postcode( $postcode, $country ) {
|
||||
if ( strlen( trim( preg_replace( '/[\s\-A-Za-z0-9]/', '', $postcode ) ) ) > 0 )
|
||||
return false;
|
||||
|
||||
|
@ -67,7 +67,7 @@ class WC_Validation {
|
|||
* @param mixed $toCheck A postcode
|
||||
* @return bool
|
||||
*/
|
||||
function is_GB_postcode( $toCheck ) {
|
||||
public function is_GB_postcode( $toCheck ) {
|
||||
|
||||
// Permitted letters depend upon their position in the postcode.
|
||||
$alpha1 = "[abcdefghijklmnoprstuwyz]"; // Character 1
|
||||
|
@ -128,7 +128,7 @@ class WC_Validation {
|
|||
* @param string country
|
||||
* @return string formatted postcode
|
||||
*/
|
||||
function format_postcode( $postcode, $country ) {
|
||||
public function format_postcode( $postcode, $country ) {
|
||||
$postcode = strtoupper(trim($postcode));
|
||||
$postcode = trim(preg_replace('/[\s]/', '', $postcode));
|
||||
|
||||
|
@ -146,7 +146,7 @@ class WC_Validation {
|
|||
* @param mixed $tel
|
||||
* @return string
|
||||
*/
|
||||
function format_phone( $tel ) {
|
||||
public function format_phone( $tel ) {
|
||||
$tel = str_replace( '.', '-', $tel );
|
||||
return $tel;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
|
|||
$this->template_plain = 'emails/plain/customer-completed-order.php';
|
||||
|
||||
// Triggers for this email
|
||||
add_action( 'woocommerce_order_status_completed_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_completed_notification', array( $this, 'trigger' ) );
|
||||
|
||||
// Call parent constuctor
|
||||
parent::__construct();
|
||||
|
|
|
@ -36,7 +36,7 @@ class WC_Email_Customer_Note extends WC_Email {
|
|||
$this->heading = __( 'A note has been added to your order', 'woocommerce');
|
||||
|
||||
// Triggers
|
||||
add_action( 'woocommerce_new_customer_note_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_new_customer_note_notification', array( $this, 'trigger' ) );
|
||||
|
||||
// Call parent constuctor
|
||||
parent::__construct();
|
||||
|
|
|
@ -31,8 +31,8 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
|
|||
$this->template_plain = 'emails/plain/customer-processing-order.php';
|
||||
|
||||
// Triggers for this email
|
||||
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this, 'trigger' ) );
|
||||
|
||||
// Call parent constuctor
|
||||
parent::__construct();
|
||||
|
|
|
@ -31,12 +31,12 @@ class WC_Email_New_Order extends WC_Email {
|
|||
$this->template_plain = 'emails/plain/admin-new-order.php';
|
||||
|
||||
// Triggers for this email
|
||||
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_completed_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_failed_to_processing_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_failed_to_completed_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_failed_to_on-hold_notification', array( &$this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_failed_to_processing_notification', array( $this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_failed_to_completed_notification', array( $this, 'trigger' ) );
|
||||
add_action( 'woocommerce_order_status_failed_to_on-hold_notification', array( $this, 'trigger' ) );
|
||||
|
||||
// Call parent constuctor
|
||||
parent::__construct();
|
||||
|
|
|
@ -134,7 +134,7 @@ class WC_Email extends WC_Settings_API {
|
|||
$this->init_settings();
|
||||
|
||||
// Save settings hook
|
||||
add_action( 'woocommerce_update_options_email_' . $this->id, array( &$this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_update_options_email_' . $this->id, array( $this, 'process_admin_options' ) );
|
||||
|
||||
// Settings
|
||||
$this->template_base = $woocommerce->plugin_path() . '/templates/';
|
||||
|
@ -148,7 +148,7 @@ class WC_Email extends WC_Settings_API {
|
|||
$this->replace = array( $this->get_blogname() );
|
||||
|
||||
// For multipart messages
|
||||
add_filter( 'phpmailer_init', array( &$this, 'handle_multipart' ) );
|
||||
add_filter( 'phpmailer_init', array( $this, 'handle_multipart' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -393,15 +393,15 @@ class WC_Email extends WC_Settings_API {
|
|||
* @return void
|
||||
*/
|
||||
function send( $to, $subject, $message, $headers, $attachments ) {
|
||||
add_filter( 'wp_mail_from', array( &$this, 'get_from_address' ) );
|
||||
add_filter( 'wp_mail_from_name', array( &$this, 'get_from_name' ) );
|
||||
add_filter( 'wp_mail_content_type', array( &$this, 'get_content_type' ) );
|
||||
add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
||||
add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
||||
add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
||||
|
||||
wp_mail( $to, $subject, $message, $headers, $attachments );
|
||||
|
||||
remove_filter( 'wp_mail_from', array( &$this, 'get_from_address' ) );
|
||||
remove_filter( 'wp_mail_from_name', array( &$this, 'get_from_name' ) );
|
||||
remove_filter( 'wp_mail_content_type', array( &$this, 'get_content_type' ) );
|
||||
remove_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
||||
remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
||||
remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -64,14 +64,14 @@ class WC_Emails {
|
|||
$this->emails = apply_filters( 'woocommerce_email_classes', $this->emails );
|
||||
|
||||
// Email Header, Footer and content hooks
|
||||
add_action( 'woocommerce_email_header', array( &$this, 'email_header' ) );
|
||||
add_action( 'woocommerce_email_footer', array( &$this, 'email_footer' ) );
|
||||
add_action( 'woocommerce_email_order_meta', array( &$this, 'order_meta' ), 10, 3 );
|
||||
add_action( 'woocommerce_email_header', array( $this, 'email_header' ) );
|
||||
add_action( 'woocommerce_email_footer', array( $this, 'email_footer' ) );
|
||||
add_action( 'woocommerce_email_order_meta', array( $this, 'order_meta' ), 10, 3 );
|
||||
|
||||
// Hooks for sending emails during store events
|
||||
add_action( 'woocommerce_low_stock_notification', array( &$this, 'low_stock' ) );
|
||||
add_action( 'woocommerce_no_stock_notification', array( &$this, 'no_stock' ) );
|
||||
add_action( 'woocommerce_product_on_backorder_notification', array( &$this, 'backorder' ));
|
||||
add_action( 'woocommerce_low_stock_notification', array( $this, 'low_stock' ) );
|
||||
add_action( 'woocommerce_no_stock_notification', array( $this, 'no_stock' ) );
|
||||
add_action( 'woocommerce_product_on_backorder_notification', array( $this, 'backorder' ));
|
||||
|
||||
// Let 3rd parties unhook the above via this hook
|
||||
do_action( 'woocommerce_email', $this );
|
||||
|
@ -186,17 +186,17 @@ class WC_Emails {
|
|||
$this->_content_type = $content_type;
|
||||
|
||||
// Filters for the email
|
||||
add_filter( 'wp_mail_from', array( &$this, 'get_from_address' ) );
|
||||
add_filter( 'wp_mail_from_name', array( &$this, 'get_from_name' ) );
|
||||
add_filter( 'wp_mail_content_type', array( &$this, 'get_content_type' ) );
|
||||
add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
||||
add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
||||
add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
||||
|
||||
// Send
|
||||
wp_mail( $to, $subject, $message, $headers, $attachments );
|
||||
|
||||
// Unhook filters
|
||||
remove_filter( 'wp_mail_from', array( &$this, 'get_from_address' ) );
|
||||
remove_filter( 'wp_mail_from_name', array( &$this, 'get_from_name' ) );
|
||||
remove_filter( 'wp_mail_content_type', array( &$this, 'get_content_type' ) );
|
||||
remove_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
||||
remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
||||
remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,11 +43,11 @@ class WC_BACS extends WC_Payment_Gateway {
|
|||
$this->bic = $this->settings['bic'];
|
||||
|
||||
// Actions
|
||||
add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
|
||||
add_action('woocommerce_thankyou_bacs', array(&$this, 'thankyou_page'));
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_thankyou_bacs', array( $this, 'thankyou_page' ) );
|
||||
|
||||
// Customer Emails
|
||||
add_action('woocommerce_email_before_order_table', array(&$this, 'email_instructions'), 10, 2);
|
||||
add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 2 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,11 +38,11 @@ class WC_Cheque extends WC_Payment_Gateway {
|
|||
$this->description = $this->settings['description'];
|
||||
|
||||
// Actions
|
||||
add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
|
||||
add_action('woocommerce_thankyou_cheque', array(&$this, 'thankyou_page'));
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_thankyou_cheque', array( $this, 'thankyou_page' ) );
|
||||
|
||||
// Customer Emails
|
||||
add_action('woocommerce_email_before_order_table', array(&$this, 'email_instructions'), 10, 2);
|
||||
add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 2 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class WC_Payment_Gateways {
|
|||
|
||||
ksort($this->payment_gateways);
|
||||
|
||||
add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ class WC_COD extends WC_Payment_Gateway {
|
|||
$this->instructions = $this->settings['instructions'];
|
||||
$this->enable_for_methods = empty( $this->settings['enable_for_methods'] ) ? array() : $this->settings['enable_for_methods'];
|
||||
|
||||
add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
|
||||
add_action('woocommerce_thankyou_cod', array(&$this, 'thankyou'));
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_thankyou_cod', array( $this, 'thankyou' ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,15 +47,15 @@ class WC_Mijireh_Checkout extends WC_Payment_Gateway {
|
|||
$this->install_slurp_page();
|
||||
|
||||
// Hooks
|
||||
add_action( 'add_meta_boxes', array( &$this, 'add_page_slurp_meta' ) );
|
||||
add_action( 'wp_ajax_page_slurp', array( &$this, 'page_slurp' ) );
|
||||
add_action( 'add_meta_boxes', array( $this, 'add_page_slurp_meta' ) );
|
||||
add_action( 'wp_ajax_page_slurp', array( $this, 'page_slurp' ) );
|
||||
}
|
||||
|
||||
// Save options
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( &$this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
|
||||
|
||||
// Payment listener/API hook
|
||||
add_action( 'woocommerce_api_wc_mijireh_checkout', array( &$this, 'mijireh_notification' ) );
|
||||
add_action( 'woocommerce_api_wc_mijireh_checkout', array( $this, 'mijireh_notification' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -340,7 +340,7 @@ class WC_Mijireh_Checkout extends WC_Payment_Gateway {
|
|||
add_meta_box(
|
||||
'slurp_meta_box', // $id
|
||||
'Mijireh Page Slurp', // $title
|
||||
array( &$this, 'draw_page_slurp_meta_box' ), // $callback
|
||||
array( $this, 'draw_page_slurp_meta_box' ), // $callback
|
||||
'page', // $page
|
||||
'normal', // $context
|
||||
'high' // $priority
|
||||
|
|
|
@ -56,12 +56,12 @@ class WC_Paypal extends WC_Payment_Gateway {
|
|||
if ($this->debug=='yes') $this->log = $woocommerce->logger();
|
||||
|
||||
// Actions
|
||||
add_action( 'valid-paypal-standard-ipn-request', array( &$this, 'successful_request' ) );
|
||||
add_action( 'woocommerce_receipt_paypal', array( &$this, 'receipt_page' ) );
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( &$this, 'process_admin_options' ) );
|
||||
add_action( 'valid-paypal-standard-ipn-request', array( $this, 'successful_request' ) );
|
||||
add_action( 'woocommerce_receipt_paypal', array( $this, 'receipt_page' ) );
|
||||
add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) );
|
||||
|
||||
// Payment listener/API hook
|
||||
add_action( 'woocommerce_api_wc_paypal', array( &$this, 'check_ipn_response' ) );
|
||||
add_action( 'woocommerce_api_wc_paypal', array( $this, 'check_ipn_response' ) );
|
||||
|
||||
if ( !$this->is_valid_for_use() ) $this->enabled = false;
|
||||
}
|
||||
|
|
|
@ -39,15 +39,15 @@ class WC_Google_Analytics extends WC_Integration {
|
|||
$this->ga_event_tracking_enabled = $this->settings['ga_event_tracking_enabled'];
|
||||
|
||||
// Actions
|
||||
add_action( 'woocommerce_update_options_integration_google_analytics', array( &$this, 'process_admin_options') );
|
||||
add_action( 'woocommerce_update_options_integration_google_analytics', array( $this, 'process_admin_options') );
|
||||
|
||||
// Tracking code
|
||||
add_action( 'wp_footer', array( &$this, 'google_tracking_code' ) );
|
||||
add_action( 'woocommerce_thankyou', array( &$this, 'ecommerce_tracking_code' ) );
|
||||
add_action( 'wp_footer', array( $this, 'google_tracking_code' ) );
|
||||
add_action( 'woocommerce_thankyou', array( $this, 'ecommerce_tracking_code' ) );
|
||||
|
||||
// Event tracking code
|
||||
add_action( 'woocommerce_after_add_to_cart_button', array( &$this, 'add_to_cart' ) );
|
||||
add_action( 'woocommerce_after_shop_loop', array( &$this, 'loop_add_to_cart' ) );
|
||||
add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_to_cart' ) );
|
||||
add_action( 'woocommerce_after_shop_loop', array( $this, 'loop_add_to_cart' ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,7 +154,7 @@ class WC_Google_Analytics extends WC_Integration {
|
|||
if ( ! $tracking_id ) return;
|
||||
|
||||
// Doing eCommerce tracking so unhook standard tracking from the footer
|
||||
remove_action( 'wp_footer', array( &$this, 'google_tracking_code' ) );
|
||||
remove_action( 'wp_footer', array( $this, 'google_tracking_code' ) );
|
||||
|
||||
// Get the order and output tracking code
|
||||
$order = new WC_Order( $order_id );
|
||||
|
|
|
@ -36,10 +36,10 @@ class WC_ShareDaddy extends WC_Integration {
|
|||
$this->enabled = $this->settings['enabled'];
|
||||
|
||||
// Actions
|
||||
add_action( 'woocommerce_update_options_integration_sharedaddy', array( &$this, 'process_admin_options') );
|
||||
add_action( 'woocommerce_update_options_integration_sharedaddy', array( $this, 'process_admin_options' ) );
|
||||
|
||||
// Share widget
|
||||
add_action( 'woocommerce_share', array( &$this, 'sharedaddy_code') );
|
||||
add_action( 'woocommerce_share', array( $this, 'sharedaddy_code' ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,10 +47,10 @@ class WC_ShareThis extends WC_Integration {
|
|||
if ( ! $this->sharethis_code ) $this->settings['sharethis_code'] = $this->sharethis_code = $this->default_code;
|
||||
|
||||
// Actions
|
||||
add_action( 'woocommerce_update_options_integration_sharethis', array( &$this, 'process_admin_options') );
|
||||
add_action( 'woocommerce_update_options_integration_sharethis', array( $this, 'process_admin_options' ) );
|
||||
|
||||
// Share widget
|
||||
add_action( 'woocommerce_share', array( &$this, 'sharethis_code') );
|
||||
add_action( 'woocommerce_share', array( $this, 'sharethis_code' ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ class WC_Flat_Rate extends WC_Shipping_Method {
|
|||
$this->admin_page_heading = __( 'Flat Rates', 'woocommerce' );
|
||||
$this->admin_page_description = __( 'Flat rates let you define a standard rate per item, or per order.', 'woocommerce' );
|
||||
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( &$this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( &$this, 'process_flat_rates' ) );
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_flat_rates' ) );
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class WC_Free_Shipping extends WC_Shipping_Method {
|
|||
}
|
||||
|
||||
// Actions
|
||||
add_action('woocommerce_update_options_shipping_'.$this->id, array(&$this, 'process_admin_options'));
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -187,7 +187,7 @@ class WC_Free_Shipping extends WC_Shipping_Method {
|
|||
foreach ($woocommerce->cart->applied_coupons as $code) {
|
||||
$coupon = new WC_Coupon( $code );
|
||||
|
||||
if ( $coupon->enable_free_shipping() )
|
||||
if ( $coupon->is_valid() && $coupon->enable_free_shipping() )
|
||||
$has_coupon = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ class WC_International_Delivery extends WC_Flat_Rate {
|
|||
$this->admin_page_heading = __( 'International Delivery', 'woocommerce' );
|
||||
$this->admin_page_description = __( 'International delivery based on flat rate shipping.', 'woocommerce' );
|
||||
|
||||
add_action('woocommerce_update_options_shipping_'.$this->id, array(&$this, 'process_admin_options'));
|
||||
add_action('woocommerce_update_options_shipping_'.$this->id, array(&$this, 'process_flat_rates'));
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_flat_rates' ) );
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class WC_Local_Delivery extends WC_Shipping_Method {
|
|||
$this->availability = empty( $this->settings['availability'] ) ? '' : $this->settings['availability'];
|
||||
$this->countries = empty( $this->settings['countries'] ) ? '' : $this->settings['countries'];
|
||||
|
||||
add_action('woocommerce_update_options_shipping_'.$this->id, array(&$this, 'process_admin_options'));
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,9 +47,9 @@ class WC_Local_Pickup extends WC_Shipping_Method {
|
|||
$this->countries = $this->settings['countries'];
|
||||
|
||||
// Actions
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( &$this, 'process_admin_options' ) );
|
||||
add_filter( 'woocommerce_customer_taxable_address', array( &$this, 'taxable_address' ) );
|
||||
add_action( 'woocommerce_shipping_method_chosen', array( &$this, 'method_chosen' ) );
|
||||
add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
|
||||
add_filter( 'woocommerce_customer_taxable_address', array( $this, 'taxable_address' ) );
|
||||
add_action( 'woocommerce_shipping_method_chosen', array( $this, 'method_chosen' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -208,7 +208,7 @@ class WC_Shipping_Method extends WC_Settings_API {
|
|||
* @access public
|
||||
* @param mixed $fee
|
||||
* @param mixed $total
|
||||
* @return void
|
||||
* @return float
|
||||
*/
|
||||
function get_fee( $fee, $total ) {
|
||||
if ( strstr( $fee, '%' ) ) :
|
||||
|
@ -280,4 +280,4 @@ class WC_Shipping_Rate {
|
|||
$taxes = array_sum( $this->taxes );
|
||||
return $taxes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class WC_Shipping {
|
|||
|
||||
$this->enabled = ( get_option('woocommerce_calc_shipping') == 'no' ) ? false : true;
|
||||
|
||||
add_action( 'woocommerce_update_options_shipping', array( &$this, 'process_admin_options' ) );
|
||||
add_action( 'woocommerce_update_options_shipping', array( $this, 'process_admin_options' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,73 +1,45 @@
|
|||
"post_title","post_name","ID","post_excerpt","post_content","post_status","menu_order","post_date","post_parent","comment_status","sku","downloadable","virtual","visibility","stock","stock_status","backorders","manage_stock","regular_price","sale_price","weight","length","width","height","tax_status","tax_class","upsell_ids","crosssell_ids","featured","sale_price_dates_from","sale_price_dates_to","file_path","file_paths","download_limit","download_expiry","product_url","button_text","meta:_yoast_wpseo_focuskw","meta:_yoast_wpseo_title","meta:_yoast_wpseo_metadesc","meta:_yoast_wpseo_metakeywords","images","tax:product_type","tax:product_cat","tax:product_tag","tax:product_shipping_class","meta:total_sales"
|
||||
"Bodum Brazil Coffee Press 8 Cup","bodum-brazil-coffee-press-8-cup","1279","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
post_title,post_name,post_excerpt,post_content,post_status,menu_order,post_date,post_parent,comment_status,sku,downloadable,virtual,visibility,stock,stock_status,backorders,manage_stock,regular_price,sale_price,weight,length,width,height,tax_status,tax_class,upsell_ids,crosssell_ids,featured,sale_price_dates_from,sale_price_dates_to,file_path,file_paths,download_limit,download_expiry,product_url,button_text,meta:_yoast_wpseo_focuskw,meta:_yoast_wpseo_title,meta:_yoast_wpseo_metadesc,meta:_yoast_wpseo_metakeywords,images,tax:product_type,tax:product_cat,tax:product_tag,tax:product_shipping_class,meta:total_sales
Bodum Brazil Coffee Press 8 Cup,bodum-brazil-coffee-press-8-cup,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/bodum.htm"">Bodum range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:33:21","0","open","","no","no","visible","","instock","no","no","43","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-4.jpg","simple","Coffee & Tea|Coffee Plungers","","","0"
|
||||
"Dualit Food XL1500 Processor","dualit-food-xl1500-processor","1280","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/bodum.htm"">Bodum range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:33,0,open,W027,no,no,visible,,instock,no,no,43,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Bodum-Coffee-Press-4.jpg,simple,Coffee & Tea|Coffee Plungers,,,0
Dualit Food XL1500 Processor,dualit-food-xl1500-processor,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/food-processors.htm"">Food Processors</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:33:40","0","open","","no","no","visible","","instock","no","no","560","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Dualit-Food-Processor-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Dualit-Food-Processor-2.png","simple","Appliances|Food Processors","","","0"
|
||||
"Eva Solo My Teapot","eva-solo-my-teapot","1281","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/food-processors.htm"">Food Processors</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:33,0,open,W026,no,no,visible,,instock,no,no,560,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Dualit-Food-Processor-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Dualit-Food-Processor-2.png,simple,Appliances|Food Processors,,,0
Eva Solo My Teapot,eva-solo-my-teapot,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/tea-makers.htm"">Tea Makers</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:33:51","0","open","","no","no","visible","","instock","no","no","","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Eva-Solo-Teapot-1.jpg","variable","Coffee & Tea|Teamakers","","","0"
|
||||
"Kenwood kMix Manual Espresso Machine","kenwood-kmix-manual-espresso-machine","1282","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/tea-makers.htm"">Tea Makers</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:33,0,open,W025,no,no,visible,,instock,no,no,,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Eva-Solo-Teapot-1.jpg,variable,Coffee & Tea|Teamakers,,,0
Kenwood kMix Manual Espresso Machine,kenwood-kmix-manual-espresso-machine,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/coffee-machines-and-espresso-machines.htm"">Coffee and Espresso Machines</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:34:04","0","open","","no","no","visible","","instock","no","no","","","","","","","taxable","","1285","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Espresso-Machine-4.jpg","variable","Coffee & Tea|Manual Espresso Machines","","","0"
|
||||
"Kenwood kMix Two Slice Toaster","kenwood-kmix-two-slice-toaster","1283","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/coffee-machines-and-espresso-machines.htm"">Coffee and Espresso Machines</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:34,0,open,W024,no,no,visible,,instock,no,no,,,,,,,taxable,,1285,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Espresso-Machine-4.jpg,variable,Coffee & Tea|Manual Espresso Machines,,,0
Kenwood kMix Two Slice Toaster,kenwood-kmix-two-slice-toaster,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kenwood.htm"">Kenwood range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:34:16","0","open","","no","no","visible","","instock","no","no","","","","","","","taxable","","","","yes","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-6.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-11.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-21.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-31.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-41.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-51.jpg","variable","Appliances|Toasters","","","0"
|
||||
"Kitchen Craft Home Made Glass Terrine Jars","kitchen-craft-home-made-glass-terrine-jars","1284","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kenwood.htm"">Kenwood range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:34,0,open,W023,no,no,visible,,instock,no,no,,,,,,,taxable,,,,yes,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-6.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-11.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-21.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-31.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-41.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-51.jpg,variable,Appliances|Toasters,,,0
Kitchen Craft Home Made Glass Terrine Jars,kitchen-craft-home-made-glass-terrine-jars,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchen-craft.htm"">Kitchen Craft range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:34:36","0","open","","no","no","visible","","instock","no","no","","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-4.jpg","variable","Canning & Preserving|Tools","","","0"
|
||||
"KitchenAid Artisan Espresso Machine","kitchenaid-artisan-espresso-machine","1285","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchen-craft.htm"">Kitchen Craft range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:34,0,open,W022,no,no,visible,,instock,no,no,,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Kitchen-Craft-Jar-4.jpg,variable,Canning & Preserving|Tools,,,0
KitchenAid Artisan Espresso Machine,kitchenaid-artisan-espresso-machine,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchenaid.htm"">KitchenAid range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:34:50","0","open","","no","no","visible","","instock","no","no","1140","","","","","","taxable","","","","yes","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-4.jpg","simple","Coffee & Tea|Manual Espresso Machines","","","0"
|
||||
"KitchenAid Artisan Stand Mixer","kitchenaid-artisan-stand-mixer","1286","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchenaid-mixers.htm?id=654&name=KitchenAid-Artisan-Stand-Mixer"">KitchenAid Stand Mixer</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:36:22","0","open","","no","no","visible","","instock","no","no","39","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-5.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-6.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-7.jpg","simple","Appliances|Mixers & Attachments","","","0"
|
||||
"KitchenAid Waffle Maker","kitchenaid-waffle-maker","1287","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchenaid.htm"">KitchenAid range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:34,0,open,W021,no,no,visible,,instock,no,no,1140,,,,,,taxable,,,,yes,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Espresso-Machine-4.jpg,simple,Coffee & Tea|Manual Espresso Machines,,,0
KitchenAid Artisan Stand Mixer,kitchenaid-artisan-stand-mixer,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchen-appliances.htm"">Kitchen Appliances</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:37:05","0","open","","no","no","visible","","instock","no","no","515","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Waffle-Maker-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Waffle-Maker-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Waffle-Maker-3.jpg","simple","Appliances|Speciality","","","0"
|
||||
"Krups IceCream Maker","krups-icecream-maker","1288","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchenaid-mixers.htm?id=654&name=KitchenAid-Artisan-Stand-Mixer"">KitchenAid Stand Mixer</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:36,0,open,W020,no,no,visible,,instock,no,no,39,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-5.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-6.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Stand-Mixer-7.jpg,simple,Appliances|Mixers & Attachments,,,0
KitchenAid Waffle Maker,kitchenaid-waffle-maker,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/krups.htm?id=2942&name=Krups-Ice-Cream-Maker"">Krups Ice Cream Maker</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:37:37","0","open","","no","no","visible","","instock","no","no","85","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Krups-Ice-Cream-Maker-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Krups-Ice-Cream-Maker-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Krups-Ice-Cream-Maker-3.jpg","simple","Appliances|Speciality","","","0"
|
||||
"Le Creuset 26cm Round Cocotte","le-creuset-26cm-round-cocotte","1289","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/kitchen-appliances.htm"">Kitchen Appliances</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:37,0,open,W019,no,no,visible,,instock,no,no,515,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Waffle-Maker-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Waffle-Maker-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/KitchenAid-Waffle-Maker-3.jpg,simple,Appliances|Speciality,,,0
Krups IceCream Maker,krups-icecream-maker,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/cookware.htm"">Cookware</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:38:32","0","open","","no","no","visible","","instock","no","no","229","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-4.jpg","simple","Casseroles & Cocottes|Cookware","","","0"
|
||||
"Le Creuset Traditional Stovetop Kettle","le-creuset-traditional-stovetop-kettle","1296","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/krups.htm?id=2942&name=Krups-Ice-Cream-Maker"">Krups Ice Cream Maker</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:37,0,open,W018,no,no,visible,,instock,no,no,85,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Krups-Ice-Cream-Maker-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Krups-Ice-Cream-Maker-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Krups-Ice-Cream-Maker-3.jpg,simple,Appliances|Speciality,,,0
Le Creuset 26cm Round Cocotte,le-creuset-26cm-round-cocotte,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/le-creuset.htm"">Le Creuset Range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:39:13","0","open","","no","no","visible","","instock","no","no","80","","","","","","taxable","","1325","","yes","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-5.jpg","simple","Cookware|Stovetop Kettles","","","0"
|
||||
"Le Creuset Toughened Non Stick Shallow Frying Pan","le-creuset-toughened-non-stick-shallow-frying-pan","1297","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/cookware.htm"">Cookware</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:38,0,open,W017,no,no,visible,,instock,no,no,229,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Cocotte-4.jpg,simple,Casseroles & Cocottes|Cookware,,,0
Le Creuset Traditional Stovetop Kettle,le-creuset-traditional-stovetop-kettle,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/frying-pans-and-saute-pans.htm"">Frying Pans</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:40:13","0","open","","no","no","visible","","instock","no","no","52","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-4.jpg","simple","Cookware|Frying Pans & Saute Pans","","","0"
|
||||
"Master Class Biscuit and Icing Set","master-class-biscuit-and-icing-set","1298","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/le-creuset.htm"">Le Creuset Range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:39,0,open,W016,no,no,visible,,instock,no,no,80,,,,,,taxable,,1325,,yes,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Kettle-5.jpg,simple,Cookware|Stovetop Kettles,,,0
Le Creuset Toughened Non Stick Shallow Frying Pan,le-creuset-toughened-non-stick-shallow-frying-pan,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/bakeware.htm"">Bakeware</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:41:30","0","open","","no","no","visible","","instock","no","no","51","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-5.jpg","simple","Bakeware|Cake Decorating Tools & Sets","","","0"
|
||||
"Wusthof Ikon 9 Piece Knife Block Set","wusthof-ikon-9-piece-knife-block-set","1299","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/frying-pans-and-saute-pans.htm"">Frying Pans</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:40,0,open,W015,no,no,visible,,instock,no,no,52,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Le-Creuset-Frying-Pan-4.jpg,simple,Cookware|Frying Pans & Saute Pans,,,0
Master Class Biscuit and Icing Set,master-class-biscuit-and-icing-set,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/wusthof.htm"">Wusthof range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:53:43","0","open","","no","no","visible","","instock","no","no","1150","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-5.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-6.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-7.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-8.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-9.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-10.jpg","simple","Knife Sets|Knives","","","0"
|
||||
"Zoku TrioQuick Pop Maker","zoku-trioquick-pop-maker","1300","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/bakeware.htm"">Bakeware</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:41,0,open,W014,no,no,visible,,instock,no,no,51,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Master-Class-Icing-Set-5.jpg,simple,Bakeware|Cake Decorating Tools & Sets,,,0
Wusthof Ikon 9 Piece Knife Block Set,wusthof-ikon-9-piece-knife-block-set,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/zoku.htm"">Zoku range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:54:26","0","open","","no","no","visible","","instock","no","no","29","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-4.jpg","simple","Kids|Kids Gadgets","","","0"
|
||||
"Pink Salt","pink-salt","1301","","","publish","0","2012-12-10 15:34:48","1326","open","","no","no","hidden","","instock","no","no","3","","","","","","taxable","","","","no","","","","","","","","","","","","","","simple","","","","0"
|
||||
"Smoked Salt","smoked-salt","1302","","","publish","0","2012-12-10 15:35:24","1326","open","","no","no","hidden","","instock","no","no","3","","","","","","taxable","","","","no","","","","","","","","","","","","","","simple","","","","0"
|
||||
"One-for-all","one-for-all","1303","","","publish","0","2012-12-10 15:35:46","1326","open","","no","no","hidden","","instock","no","no","3","","","","","","taxable","","","","no","","","","","","","","","","","","","","simple","","","","0"
|
||||
"Rainbow Salt","rainbow-salt","1304","","","publish","0","2012-12-10 15:36:16","1326","open","","no","no","hidden","","instock","no","no","3","","","","","","taxable","","","","no","","","","","","","","","","","","","","simple","","","","0"
|
||||
"Sea Salt","sea-salt","1305","","","publish","0","2012-12-10 15:36:36","1326","open","","no","no","hidden","","instock","no","no","3","","","","","","taxable","","","","no","","","","","","","","","","","","","","simple","","","","0"
|
||||
"Spicy Chilli","spicy-chilli","1306","","","publish","0","2012-12-10 15:36:53","1326","open","","no","no","hidden","","instock","no","no","3","","","","","","taxable","","","","no","","","","","","","","","","","","","","simple","","","","0"
|
||||
"Morphy Richards Colour Accents Pyramid Cordless Kettle 1.5-litres","morphy-richards-colour-accents-pyramid-cordless-kettle-1-5-litres","1325","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/wusthof.htm"">Wusthof range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:53,0,open,W008,no,no,visible,,instock,no,no,1150,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-5.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-6.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-7.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-8.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-9.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Wusthof-Knife-Set-10.jpg,simple,Knife Sets|Knives,,,0
Zoku TrioQuick Pop Maker,zoku-trioquick-pop-maker,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/morphy-richards.htm"">Morphy Richards</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:42:12","0","open","","no","no","visible","","instock","no","no","115","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-4.jpg","simple","Appliances|Electric Kettles","","","0"
|
||||
"NoMU Salt Pepper and Spice Grinders","nomu-salt-pepper-and-spice-grinders","1326","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/zoku.htm"">Zoku range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:54,0,open,W007,no,no,visible,,instock,no,no,29,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Zoku-Quick-Pop-Maker-4.jpg,simple,Kids|Kids Gadgets,,,0
Pink Salt,pink-salt,,,publish,0,10/12/2012 15:34,1326,open,W006,no,no,hidden,,instock,no,no,3,,,,,,taxable,,,,no,,,,,,,,,,,,,,simple,,,,0
Smoked Salt,smoked-salt,,,publish,0,10/12/2012 15:35,1326,open,W005,no,no,hidden,,instock,no,no,3,,,,,,taxable,,,,no,,,,,,,,,,,,,,simple,,,,0
One-for-all,one-for-all,,,publish,0,10/12/2012 15:35,1326,open,W004,no,no,hidden,,instock,no,no,3,,,,,,taxable,,,,no,,,,,,,,,,,,,,simple,,,,0
Rainbow Salt,rainbow-salt,,,publish,0,10/12/2012 15:36,1326,open,W003,no,no,hidden,,instock,no,no,3,,,,,,taxable,,,,no,,,,,,,,,,,,,,simple,,,,0
Sea Salt,sea-salt,,,publish,0,10/12/2012 15:36,1326,open,W002,no,no,hidden,,instock,no,no,3,,,,,,taxable,,,,no,,,,,,,,,,,,,,simple,,,,0
Spicy Chilli,spicy-chilli,,,publish,0,10/12/2012 15:36,1326,open,W001,no,no,hidden,,instock,no,no,3,,,,,,taxable,,,,no,,,,,,,,,,,,,,simple,,,,0
Morphy Richards Colour Accents Pyramid Cordless Kettle 1.5-litres,morphy-richards-colour-accents-pyramid-cordless-kettle-1-5-litres,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/nomu.htm"">Nomu</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:43:49","0","open","","no","no","visible","","instock","no","no","","","","","","","taxable","","","","yes","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-5.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-6.jpg","grouped","Food|Spices, Seasoning & Rubs","","","0"
|
||||
"Oscar Juicer DA1000","oscar-juicer-da1000","1327","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/morphy-richards.htm"">Morphy Richards</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:42,0,open,W013,no,no,visible,,instock,no,no,115,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Morphy-Richards-Kettle-4.jpg,simple,Appliances|Electric Kettles,,,0
NoMU Salt Pepper and Spice Grinders,nomu-salt-pepper-and-spice-grinders,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/oscar.htm?id=5699&name=Oscar-Juicer-DA1000"">Oscar Juicer DA 1000</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:45:27","0","open","","no","no","visible","","instock","no","no","495","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-4.jpg","simple","Appliances|Blenders & Juicers","","","0"
|
||||
"Sodastream Penguin","sodastream-penguin","1328","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/nomu.htm"">Nomu</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:43,0,open,,no,no,visible,,instock,no,no,,,,,,,taxable,,,,yes,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-5.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Nomu-Grinders-6.jpg,grouped,"Food|Spices, Seasoning & Rubs",,,0
Oscar Juicer DA1000,oscar-juicer-da1000,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/sodastream.htm"">Sodastream</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:45:47","0","open","","no","no","visible","","instock","no","no","189","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Sodastream-Penguin-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Sodastream-Penguin-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Sodastream-Penguin-3.jpg","simple","Appliances|Speciality","","","0"
|
||||
"Vinturi Deluxe Aerator Set","vinturi-deluxe-aerator-set","1329","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/oscar.htm?id=5699&name=Oscar-Juicer-DA1000"">Oscar Juicer DA 1000</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:45,0,open,W012,no,no,visible,,instock,no,no,495,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Oscar-Juicer-4.jpg,simple,Appliances|Blenders & Juicers,,,0
Sodastream Penguin,sodastream-penguin,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/vinturi.htm"">Vinturi</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:46:59","0","open","","no","no","visible","","instock","no","no","100","80","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Vinturi-Aerator-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Vinturi-Aerator-2.jpg","simple","Bar & Wine|Wine Tools & Aerators","","","0"
|
||||
"Weber One Touch Gold Premium Charcoal Grill-57cm","weber-one-touch-gold-premium-charcoal-grill-57cm","1330","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/sodastream.htm"">Sodastream</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:45,0,open,W011,no,no,visible,,instock,no,no,189,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Sodastream-Penguin-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Sodastream-Penguin-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Sodastream-Penguin-3.jpg,simple,Appliances|Speciality,,,0
Vinturi Deluxe Aerator Set,vinturi-deluxe-aerator-set,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/weber.htm"">Weber range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>","publish","0","2012-12-10 14:48:37","0","open","","no","no","visible","","instock","no","no","225","","","","","","taxable","","","","no","","","","","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-5.jpg","simple","Braais & Ovens|Outdoor","","","0"
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/vinturi.htm"">Vinturi</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:46,0,open,W010,no,no,visible,,instock,no,no,100,80,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Vinturi-Aerator-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Vinturi-Aerator-2.jpg,simple,Bar & Wine|Wine Tools & Aerators,,,0
Weber One Touch Gold Premium Charcoal Grill-57cm,weber-one-touch-gold-premium-charcoal-grill-57cm,"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
|
||||
|
||||
Image courtesy of Yuppiechef: <a href=""http://www.yuppiechef.co.za/weber.htm"">Weber range</a>","<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>",publish,0,10/12/2012 14:48,0,open,W009,no,no,visible,,instock,no,no,225,,,,,,taxable,,,,no,,,,,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-1.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-2.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-3.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-4.jpg|http://demo2.woothemes.com/superstore/files/2012/12/Weber-Braai-5.jpg,simple,Braais & Ovens|Outdoor,,,0
|
|
|
@ -16,7 +16,7 @@
|
|||
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
|
||||
<!-- contained in this file into your site. -->
|
||||
|
||||
<!-- generator="WordPress/3.4.2" created="2012-12-11 10:38" -->
|
||||
<!-- generator="WordPress/3.4.2" created="2012-12-17 21:39" -->
|
||||
<rss version="2.0"
|
||||
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
|
@ -29,7 +29,7 @@
|
|||
<title>Superstore</title>
|
||||
<link>http://demo2.woothemes.com/superstore</link>
|
||||
<description>Just another WooThemes Demo site</description>
|
||||
<pubDate>Tue, 11 Dec 2012 10:38:33 +0000</pubDate>
|
||||
<pubDate>Mon, 17 Dec 2012 21:39:45 +0000</pubDate>
|
||||
<language>en-US</language>
|
||||
<wp:wxr_version>1.2</wp:wxr_version>
|
||||
<wp:base_site_url>http://demo2.woothemes.com/</wp:base_site_url>
|
||||
|
@ -2970,7 +2970,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/bodum.htm">Bo
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W027]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -3830,7 +3830,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/food-processo
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W026]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_height</wp:meta_key>
|
||||
|
@ -3999,7 +3999,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/tea-makers.ht
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W025]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -4190,7 +4190,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/coffee-machin
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W024]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -4427,7 +4427,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/kenwood.htm">
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W023]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -4623,7 +4623,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/kitchen-craft
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W022]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -4788,7 +4788,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/kitchenaid.ht
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W021]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -4877,7 +4877,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/kitchenaid-mi
|
|||
<category domain="product_type" nicename="simple"><![CDATA[simple]]></category>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_edit_last</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[4]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[3]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_visibility</wp:meta_key>
|
||||
|
@ -4941,7 +4941,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/kitchenaid-mi
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W020]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5106,7 +5106,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/kitchen-appli
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W019]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5271,7 +5271,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/krups.htm?id=
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W018]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5402,7 +5402,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/cookware.htm"
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W017]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5533,7 +5533,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/le-creuset.ht
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W016]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5668,7 +5668,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/frying-pans-a
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W015]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5799,7 +5799,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/bakeware.htm"
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W014]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -5930,7 +5930,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/wusthof.htm">
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W008]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -6061,7 +6061,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/morphy-richar
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W013]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -6425,7 +6425,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/oscar.htm?id=
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W012]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -6590,7 +6590,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/sodastream.ht
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W011]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -6823,7 +6823,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/vinturi.htm">
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W010]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -6954,7 +6954,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/weber.htm">We
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W009]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -7085,7 +7085,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W007]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -7246,7 +7246,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W006]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -7369,7 +7369,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W005]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -7492,7 +7492,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W004]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_product_attributes</wp:meta_key>
|
||||
|
@ -7583,7 +7583,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W003]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_height</wp:meta_key>
|
||||
|
@ -7766,7 +7766,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W002]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_height</wp:meta_key>
|
||||
|
@ -7829,7 +7829,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W001]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_height</wp:meta_key>
|
||||
|
@ -7919,7 +7919,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
<wp:is_sticky>0</wp:is_sticky>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W028]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_price</wp:meta_key>
|
||||
|
@ -7997,7 +7997,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
<wp:is_sticky>0</wp:is_sticky>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W029]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_price</wp:meta_key>
|
||||
|
@ -8079,7 +8079,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W030]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_price</wp:meta_key>
|
||||
|
@ -8201,7 +8201,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W035]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8271,7 +8271,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W031]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_file_path</wp:meta_key>
|
||||
|
@ -8357,7 +8357,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W032]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8435,7 +8435,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W033]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8513,7 +8513,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W034]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8591,7 +8591,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W036]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8669,7 +8669,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W037]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8747,7 +8747,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W038]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
@ -8825,7 +8825,7 @@ Image courtesy of Yuppiechef: <a href="http://www.yuppiechef.co.za/zoku.htm">Zok
|
|||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>_sku</wp:meta_key>
|
||||
<wp:meta_value><![CDATA[]]></wp:meta_value>
|
||||
<wp:meta_value><![CDATA[W039]]></wp:meta_value>
|
||||
</wp:postmeta>
|
||||
<wp:postmeta>
|
||||
<wp:meta_key>attribute_pa_color</wp:meta_key>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
"Parent","post_parent","ID","post_status","sku","downloadable","virtual","stock","price","sale_price","weight","length","width","height","file_path","file_paths","download_limit","images","tax:product_shipping_class","meta:attribute_pa_capacity","meta:attribute_pa_color"
|
||||
"Kitchen Craft Home Made Glass Terrine Jars","1284","1319","publish","","no","no","","6","","","","","","","","","","","125ml",""
|
||||
"Kenwood kMix Two Slice Toaster","1283","1323","publish","","no","no","","100","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-1.jpg","","","blue"
|
||||
"Kenwood kMix Manual Espresso Machine","1282","1334","publish","","no","no","","250","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Espresso-Machine-2.jpg","","","black"
|
||||
"Eva Solo My Teapot","1281","1336","publish","","no","no","","75","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Eva-Solo-Teapot-2.jpg","","","black"
|
||||
"Kitchen Craft Home Made Glass Terrine Jars","1284","1320","publish","","no","no","","10","","","","","","","","","","","200ml",""
|
||||
"Kenwood kMix Two Slice Toaster","1283","1331","publish","","no","no","","100","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-4.jpg","","","orange"
|
||||
"Kenwood kMix Manual Espresso Machine","1282","1335","publish","","no","no","","250","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Espresso-Machine-3.jpg","","","red"
|
||||
"Eva Solo My Teapot","1281","1337","publish","","no","no","","75","","","","","","","","","","","","white"
|
||||
"Kitchen Craft Home Made Glass Terrine Jars","1284","1321","publish","","no","no","","15","","","","","","","","","","","350ml",""
|
||||
"Kenwood kMix Two Slice Toaster","1283","1332","publish","","no","no","","100","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-2.jpg","","","red"
|
||||
"Kenwood kMix Two Slice Toaster","1283","1333","publish","","no","no","","100","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-3.jpg","","","yellow"
|
||||
"Kenwood kMix Two Slice Toaster","1283","1322","publish","","no","no","","100","","","","","","","","","http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-5.jpg","","","black"
|
||||
Parent,parent_sku,post_status,sku,downloadable,virtual,stock,price,sale_price,weight,length,width,height,file_path,file_paths,download_limit,images,tax:product_shipping_class,meta:attribute_pa_capacity,meta:attribute_pa_color
|
||||
Kitchen Craft Home Made Glass Terrine Jars,W022,publish,W028,no,no,,6,,,,,,,,,,,125ml,
|
||||
Kenwood kMix Two Slice Toaster,W023,publish,W031,no,no,,100,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-1.jpg,,,blue
|
||||
Kenwood kMix Manual Espresso Machine,W024,publish,W036,no,no,,250,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Espresso-Machine-2.jpg,,,black
|
||||
Eva Solo My Teapot,W025,publish,W038,no,no,,75,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Eva-Solo-Teapot-2.jpg,,,black
|
||||
Kitchen Craft Home Made Glass Terrine Jars,W022,publish,W029,no,no,,10,,,,,,,,,,,200ml,
|
||||
Kenwood kMix Two Slice Toaster,W023,publish,W032,no,no,,100,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-4.jpg,,,orange
|
||||
Kenwood kMix Manual Espresso Machine,W024,publish,W037,no,no,,250,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Espresso-Machine-3.jpg,,,red
|
||||
Eva Solo My Teapot,W025,publish,W039,no,no,,75,,,,,,,,,,,,white
|
||||
Kitchen Craft Home Made Glass Terrine Jars,W022,publish,W030,no,no,,15,,,,,,,,,,,350ml,
|
||||
Kenwood kMix Two Slice Toaster,W023,publish,W033,no,no,,100,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-2.jpg,,,red
|
||||
Kenwood kMix Two Slice Toaster,W023,publish,W034,no,no,,100,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-3.jpg,,,yellow
|
||||
Kenwood kMix Two Slice Toaster,W023,publish,W035,no,no,,100,,,,,,,,,http://demo2.woothemes.com/superstore/files/2012/12/Kenwood-Toaster-5.jpg,,,black
|
|
19
readme.txt
|
@ -2,9 +2,9 @@
|
|||
Contributors: woothemes, mikejolley, jameskoster, CoenJacobs
|
||||
Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, affiliate, store, sales, sell, shop, shopping, cart, checkout, configurable, variable, widgets, reports, download, downloadable, digital, inventory, stock, reports, shipping, tax
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@woothemes.com&item_name=Donation+for+WooCommerce
|
||||
Requires at least: 3.3
|
||||
Tested up to: 3.4.2
|
||||
Stable tag: 1.6.5.2
|
||||
Requires at least: 3.5
|
||||
Tested up to: 3.5
|
||||
Stable tag: 1.6.6
|
||||
License: GPLv3
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
@ -151,7 +151,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
== Changelog ==
|
||||
|
||||
= 2.0.0 =
|
||||
* Feature - Securi audited and secured.
|
||||
* Feature - Sucuri audited and secured.
|
||||
* Feature - Added sales by category report.
|
||||
* Feature - Added sales by coupon report (kudos Max Rice).
|
||||
* Feature - Multiple downloadable files per product/variation (kudos Justin Stern).
|
||||
|
@ -179,7 +179,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Feature - Added the option to sell products individually (only allow 1 in the cart).
|
||||
* Feature - New shop page/category archive display settings, and the ability to change display per-category.
|
||||
* Feature - Allow shipping tax classes to be defined independent of items. https://github.com/woothemes/woocommerce/issues/1625
|
||||
* Feature - Redone order item storage making them easier (and faster) to access for reporting, and querying purchases. Huge performance gains for reports. Order items are no longer serialised - they are stored in there own table with meta. Existing data can be be updated on upgrade.
|
||||
* Feature - Redone order item storage making them easier (and faster) to access for reporting, and querying purchases. Huge performance gains for reports. Order items are no longer serialised - they are stored in their own table with meta. Existing data can be be updated on upgrade.
|
||||
* Feature - Update weights/dimensions for variations if they differ.
|
||||
* Feature - is_order_received_page() courtesy of Lee Willis.
|
||||
* Feature - Inline saving of attributes to make creating variable products easier.
|
||||
|
@ -250,10 +250,17 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Localization - Korean translate by Woo Jin Koh.
|
||||
* Localization - Bulgarian update by Hristo Pandjarov.
|
||||
* Localization - Spanish update by bolorino.
|
||||
* Localization - Finnish translation by Arhi Paivarinta.
|
||||
|
||||
* Removed all deprecated classes and functions except for 1.6.x template files and functions
|
||||
* Many other refactors, minor fixes and tweaks!
|
||||
|
||||
= 1.6.6 - 13/12/2012 =
|
||||
* Fix - Styling issues for the post date selectors in admin.
|
||||
* Fix - Variation attribute saving issue (cache related).
|
||||
* Fixed jQuery issues, now using WordPress core jQuery UI library
|
||||
* Tweak - Checkout JSON responses to avoid garbage code breaking requests.
|
||||
|
||||
= 1.6.5.2 - 12/09/2012 =
|
||||
* Tweak - Extra validation for PayPal IPN.
|
||||
|
||||
|
@ -1156,7 +1163,7 @@ There are many improvements in this major release - see the changelog for full d
|
|||
|
||||
The biggest change is that we're redone order item storage making them easier (and faster) to access for reporting and querying purchases; there are huge performance gains for reports.
|
||||
|
||||
Order items are no longer serialised data and store in meta - they are stored in there own table with their own meta. Existing data can be be updated upon upgrade (you will be prompted). You should backup before upgrading.
|
||||
Order items are no longer serialised data and store in meta - they are stored in there own table with their own meta. Existing data can be updated upon upgrade (you will be prompted). You should backup before upgrading.
|
||||
|
||||
= 1.6.2 =
|
||||
1.6 introduced some template changes, for loops in particular. See the changelog for details and ensure theme compatibility before upgrading.
|
||||
|
|
|
@ -50,12 +50,13 @@ function woocommerce_product_category( $atts ){
|
|||
'per_page' => '12',
|
||||
'columns' => '4',
|
||||
'orderby' => 'title',
|
||||
'order' => 'asc',
|
||||
'order' => 'desc',
|
||||
'category' => ''
|
||||
), $atts ) );
|
||||
|
||||
if ( ! $category ) return;
|
||||
|
||||
// Default ordering args
|
||||
$ordering_args = $woocommerce->query->get_catalog_ordering_args( $orderby, $order );
|
||||
|
||||
$args = array(
|
||||
|
@ -127,7 +128,8 @@ function woocommerce_product_categories( $atts ) {
|
|||
'orderby' => 'name',
|
||||
'order' => 'ASC',
|
||||
'columns' => '4',
|
||||
'hide_empty' => 1
|
||||
'hide_empty' => 1,
|
||||
'parent' => ''
|
||||
), $atts ) );
|
||||
|
||||
if ( isset( $atts[ 'ids' ] ) ) {
|
||||
|
@ -144,7 +146,8 @@ function woocommerce_product_categories( $atts ) {
|
|||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'hide_empty' => $hide_empty,
|
||||
'include' => $ids
|
||||
'include' => $ids,
|
||||
'parent' => $parent
|
||||
);
|
||||
|
||||
$product_categories = get_terms( 'product_cat', $args );
|
||||
|
@ -382,22 +385,22 @@ function woocommerce_product( $atts ) {
|
|||
* @return string
|
||||
*/
|
||||
function woocommerce_product_add_to_cart( $atts ) {
|
||||
if (empty($atts)) return;
|
||||
|
||||
global $wpdb, $woocommerce;
|
||||
|
||||
if (!isset($atts['style'])) $atts['style'] = 'border:4px solid #ccc; padding: 12px;';
|
||||
if ( empty( $atts ) ) return;
|
||||
|
||||
if ($atts['id']) :
|
||||
if ( ! isset( $atts['style'] ) ) $atts['style'] = 'border:4px solid #ccc; padding: 12px;';
|
||||
|
||||
if ( isset( $atts['id'] ) ) {
|
||||
$product_data = get_post( $atts['id'] );
|
||||
elseif ($atts['sku']) :
|
||||
$product_id = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $atts['sku']));
|
||||
} elseif ( isset( $atts['sku'] ) ) {
|
||||
$product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $atts['sku'] ) );
|
||||
$product_data = get_post( $product_id );
|
||||
else :
|
||||
} else {
|
||||
return;
|
||||
endif;
|
||||
}
|
||||
|
||||
if ($product_data->post_type=='product') {
|
||||
if ( 'product' == $product_data->post_type ) {
|
||||
|
||||
$product = $woocommerce->setup_product_data( $product_data );
|
||||
|
||||
|
@ -413,7 +416,7 @@ function woocommerce_product_add_to_cart( $atts ) {
|
|||
|
||||
return ob_get_clean();
|
||||
|
||||
} elseif ($product_data->post_type=='product_variation') {
|
||||
} elseif ( 'product_variation' == $product_data->post_type ) {
|
||||
|
||||
$product = get_product( $product_data->post_parent );
|
||||
|
||||
|
@ -458,21 +461,21 @@ function woocommerce_product_add_to_cart( $atts ) {
|
|||
* @param array $atts
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_product_add_to_cart_url( $atts ){
|
||||
if (empty($atts)) return;
|
||||
|
||||
function woocommerce_product_add_to_cart_url( $atts ) {
|
||||
global $wpdb;
|
||||
|
||||
if ($atts['id']) :
|
||||
$product_data = get_post( $atts['id'] );
|
||||
elseif ($atts['sku']) :
|
||||
$product_id = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $atts['sku']));
|
||||
$product_data = get_post( $product_id );
|
||||
else :
|
||||
return;
|
||||
endif;
|
||||
if ( empty( $atts ) ) return;
|
||||
|
||||
if ($product_data->post_type!=='product') return;
|
||||
if ( isset( $atts['id'] ) ) {
|
||||
$product_data = get_post( $atts['id'] );
|
||||
} elseif ( isset( $atts['sku'] ) ) {
|
||||
$product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $atts['sku'] ) );
|
||||
$product_data = get_post( $product_id );
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'product' !== $product_data->post_type ) return;
|
||||
|
||||
$_product = get_product( $product_data );
|
||||
|
||||
|
@ -763,9 +766,9 @@ function woocommerce_featured_products( $atts ) {
|
|||
* @return string
|
||||
*/
|
||||
function woocommerce_product_page_shortcode( $atts ) {
|
||||
if (empty($atts)) return;
|
||||
if ( empty( $atts ) ) return;
|
||||
|
||||
if (!$atts['id'] && !$atts['sku']) return;
|
||||
if ( ! isset( $atts['id'] ) && ! isset( $atts['sku'] ) ) return;
|
||||
|
||||
$args = array(
|
||||
'posts_per_page' => 1,
|
||||
|
@ -775,15 +778,15 @@ function woocommerce_product_page_shortcode( $atts ) {
|
|||
'no_found_rows' => 1
|
||||
);
|
||||
|
||||
if(isset($atts['sku'])){
|
||||
if ( isset( $atts['sku'] ) ) {
|
||||
$args['meta_query'][] = array(
|
||||
'key' => '_sku',
|
||||
'value' => $atts['sku'],
|
||||
'key' => '_sku',
|
||||
'value' => $atts['sku'],
|
||||
'compare' => '='
|
||||
);
|
||||
}
|
||||
|
||||
if(isset($atts['id'])){
|
||||
if ( isset( $atts['id'] ) ) {
|
||||
$args['p'] = $atts['id'];
|
||||
}
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ if ( $available_methods ) {
|
|||
if ( $woocommerce->cart->tax_display_cart == 'excl' ) {
|
||||
$method->full_label .= ': ' . woocommerce_price( $method->cost );
|
||||
if ( $method->get_shipping_tax() > 0 && $woocommerce->cart->prices_include_tax ) {
|
||||
$method->full_label .= ' '.$woocommerce->countries->ex_tax_or_vat();
|
||||
$method->full_label .= ' <small>' . $woocommerce->countries->ex_tax_or_vat() . '</small>';
|
||||
}
|
||||
} else {
|
||||
$method->full_label .= ': ' . woocommerce_price( $method->cost + $method->get_shipping_tax() );
|
||||
if ( $method->get_shipping_tax() > 0 && ! $woocommerce->cart->prices_include_tax ) {
|
||||
$method->full_label .= ' '.$woocommerce->countries->inc_tax_or_vat();
|
||||
$method->full_label .= ' <small>' . $woocommerce->countries->inc_tax_or_vat() . '</small>';
|
||||
}
|
||||
}
|
||||
} elseif ( $method->id !== 'free_shipping' ) {
|
||||
|
|
|
@ -19,21 +19,19 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php _e( 'Qty', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php _e( 'Totals', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
|
||||
<tr class="cart-subtotal">
|
||||
<th colspan="2"><strong><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></strong></th>
|
||||
<th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
|
||||
<td><?php echo $woocommerce->cart->get_cart_subtotal(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if ( $woocommerce->cart->get_discounts_before_tax() ) : ?>
|
||||
|
||||
<tr class="discount">
|
||||
<th colspan="2"><?php _e( 'Cart Discount', 'woocommerce' ); ?></th>
|
||||
<th><?php _e( 'Cart Discount', 'woocommerce' ); ?></th>
|
||||
<td>-<?php echo $woocommerce->cart->get_discounts_before_tax(); ?></td>
|
||||
</tr>
|
||||
|
||||
|
@ -44,7 +42,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
<?php do_action('woocommerce_review_order_before_shipping'); ?>
|
||||
|
||||
<tr class="shipping">
|
||||
<th colspan="2"><?php _e( 'Shipping', 'woocommerce' ); ?></th>
|
||||
<th><?php _e( 'Shipping', 'woocommerce' ); ?></th>
|
||||
<td><?php woocommerce_get_template( 'cart/shipping-methods.php', array( 'available_methods' => $available_methods ) ); ?></td>
|
||||
</tr>
|
||||
|
||||
|
@ -55,7 +53,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
<?php foreach ( $woocommerce->cart->get_fees() as $fee ) : ?>
|
||||
|
||||
<tr class="fee fee-<?php echo $fee->id ?>">
|
||||
<th colspan="2"><?php echo $fee->name ?></th>
|
||||
<th><?php echo $fee->name ?></th>
|
||||
<td><?php
|
||||
if ( $woocommerce->cart->tax_display_cart == 'excl' )
|
||||
echo woocommerce_price( $fee->amount );
|
||||
|
@ -83,7 +81,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
}
|
||||
?>
|
||||
<tr class="tax-rate tax-rate-<?php echo $key; ?>">
|
||||
<th colspan="2"><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
|
||||
<th><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
|
||||
<td><?php echo $tax; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -92,8 +90,8 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
if ( $has_compound_tax ) {
|
||||
?>
|
||||
<tr class="order-subtotal">
|
||||
<th colspan="2"><strong><?php _e( 'Subtotal', 'woocommerce' ); ?></strong></th>
|
||||
<td><strong><?php echo $woocommerce->cart->get_cart_subtotal( true ); ?></strong></td>
|
||||
<th><?php _e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
<td><?php echo $woocommerce->cart->get_cart_subtotal( true ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -103,7 +101,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
continue;
|
||||
?>
|
||||
<tr class="tax-rate tax-rate-<?php echo $key; ?>">
|
||||
<th colspan="2"><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
|
||||
<th><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
|
||||
<td><?php echo $tax; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -112,7 +110,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
} elseif ( $woocommerce->cart->get_cart_tax() ) {
|
||||
?>
|
||||
<tr class="tax">
|
||||
<th colspan="2" colspan="2"><?php _e( 'Tax', 'woocommerce' ); ?></th>
|
||||
<th><?php _e( 'Tax', 'woocommerce' ); ?></th>
|
||||
<td><?php echo $woocommerce->cart->get_cart_tax(); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -123,16 +121,16 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
<?php if ($woocommerce->cart->get_discounts_after_tax()) : ?>
|
||||
|
||||
<tr class="discount">
|
||||
<th colspan="2"><?php _e( 'Order Discount', 'woocommerce' ); ?></th>
|
||||
<th><?php _e( 'Order Discount', 'woocommerce' ); ?></th>
|
||||
<td>-<?php echo $woocommerce->cart->get_discounts_after_tax(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action('woocommerce_before_order_total'); ?>
|
||||
<?php do_action( 'woocommerce_before_order_total' ); ?>
|
||||
|
||||
<tr class="total">
|
||||
<th colspan="2"><strong><?php _e( 'Order Total', 'woocommerce' ); ?></strong></th>
|
||||
<th><strong><?php _e( 'Order Total', 'woocommerce' ); ?></strong></th>
|
||||
<td>
|
||||
<strong><?php echo $woocommerce->cart->get_total(); ?></strong>
|
||||
<?php
|
||||
|
@ -157,8 +155,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_action('woocommerce_after_order_total'); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_order_total' ); ?>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
|
@ -167,9 +164,8 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
$_product = $values['data'];
|
||||
if ($_product->exists() && $values['quantity']>0) :
|
||||
echo '
|
||||
<tr class = "' . esc_attr( apply_filters('woocommerce_checkout_table_item_class', 'checkout_table_item', $values, $item_id ) ) . '">
|
||||
<td class="product-name">'.$_product->get_title().$woocommerce->cart->get_item_data( $values ).'</td>
|
||||
<td class="product-quantity">'.$values['quantity'].'</td>
|
||||
<tr class="' . esc_attr( apply_filters('woocommerce_checkout_table_item_class', 'checkout_table_item', $values, $item_id ) ) . '">
|
||||
<td class="product-name">' . $_product->get_title().$woocommerce->cart->get_item_data( $values ) . ' <strong class="product-quantity">× ' . $values['quantity'] . '</strong></td>
|
||||
<td class="product-total">' . apply_filters( 'woocommerce_checkout_item_subtotal', $woocommerce->cart->get_product_subtotal( $_product, $values['quantity'] ), $values, $item_id ) . '</td>
|
||||
</tr>';
|
||||
endif;
|
||||
|
@ -253,4 +249,4 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,8 +18,7 @@ $order = new WC_Order( $order_id );
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php _e( 'Qty', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php _e( 'Totals', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
|
@ -27,7 +26,7 @@ $order = new WC_Order( $order_id );
|
|||
if ( $totals = $order->get_order_item_totals() ) foreach ( $totals as $total ) :
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><?php echo $total['label']; ?></th>
|
||||
<th scope="row"><?php echo $total['label']; ?></th>
|
||||
<td><?php echo $total['value']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
@ -46,7 +45,7 @@ $order = new WC_Order( $order_id );
|
|||
<tr class = "' . esc_attr( apply_filters('woocommerce_order_table_item_class', 'order_table_item', $item, $order ) ) . '">
|
||||
<td class="product-name">';
|
||||
|
||||
echo '<a href="'.get_permalink( $item['product_id'] ).'">' . $item['name'] . '</a>';
|
||||
echo '<a href="'.get_permalink( $item['product_id'] ).'">' . $item['name'] . '</a> <strong class="product-quantity">× ' . $item['qty'] . '</strong>';
|
||||
|
||||
$item_meta = new WC_Order_Item_Meta( $item['item_meta'] );
|
||||
$item_meta->display();
|
||||
|
@ -60,7 +59,7 @@ $order = new WC_Order( $order_id );
|
|||
|
||||
endif;
|
||||
|
||||
echo '</td><td class="product-quantity">'.$item['qty'].'</td><td class="product-total">' . $order->get_formatted_line_subtotal($item) . '</td></tr>';
|
||||
echo '</td><td class="product-total">' . $order->get_formatted_line_subtotal( $item ) . '</td></tr>';
|
||||
|
||||
// Show any purchase notes
|
||||
if ($order->status=='completed' || $order->status=='processing') :
|
||||
|
|
|
@ -83,7 +83,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
$title_reply = __( 'Be the first to review', 'woocommerce' ).' “'.$post->post_title.'”';
|
||||
|
||||
echo '<p>'.__( 'There are no reviews yet, would you like to <a href="#review_form" class="inline show_review_form">submit yours</a>?', 'woocommerce' ).'</p>';
|
||||
echo '<p class="noreviews">'.__( 'There are no reviews yet, would you like to <a href="#review_form" class="inline show_review_form">submit yours</a>?', 'woocommerce' ).'</p>';
|
||||
|
||||
endif;
|
||||
|
||||
|
|
|
@ -9,28 +9,18 @@
|
|||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $post, $woocommerce;
|
||||
global $post, $product, $woocommerce;
|
||||
?>
|
||||
<div class="thumbnails"><?php
|
||||
$attachments = get_posts( array(
|
||||
'post_type' => 'attachment',
|
||||
'numberposts' => -1,
|
||||
'post_status' => null,
|
||||
'post_parent' => $post->ID,
|
||||
'post__not_in' => array( get_post_thumbnail_id() ),
|
||||
'post_mime_type'=> 'image',
|
||||
'orderby' => 'menu_order',
|
||||
'order' => 'ASC'
|
||||
) );
|
||||
if ($attachments) {
|
||||
|
||||
$attachment_ids = $product->get_gallery_attachment_ids();
|
||||
|
||||
if ( $attachment_ids ) {
|
||||
|
||||
$loop = 0;
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
|
||||
|
||||
foreach ( $attachments as $key => $attachment ) {
|
||||
|
||||
if ( get_post_meta( $attachment->ID, '_woocommerce_exclude_image', true ) == 1 )
|
||||
continue;
|
||||
foreach ( $attachment_ids as $id ) {
|
||||
|
||||
$classes = array( 'zoom' );
|
||||
|
||||
|
@ -40,10 +30,14 @@ global $post, $woocommerce;
|
|||
if ( ( $loop + 1 ) % $columns == 0 )
|
||||
$classes[] = 'last';
|
||||
|
||||
printf( '<a href="%s" title="%s" rel="thumbnails" class="%s">%s</a>', wp_get_attachment_url( $attachment->ID ), esc_attr( $attachment->post_title ), implode(' ', $classes), wp_get_attachment_image( $attachment->ID, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) ) );
|
||||
$attachment_url = wp_get_attachment_url( $id );
|
||||
|
||||
if ( ! $attachment_url )
|
||||
continue;
|
||||
|
||||
printf( '<a href="%s" title="%s" rel="thumbnails" class="%s">%s</a>', esc_attr( $attachment_url ), esc_attr( get_the_title( $id ) ), implode( ' ', $classes ), wp_get_attachment_image( $id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) ) );
|
||||
|
||||
$loop++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
global $post;
|
||||
$rating = esc_attr( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) );
|
||||
?>
|
||||
<li itemprop="reviews" itemscope itemtype="http://schema.org/Review" <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
||||
<div id="comment-<?php comment_ID(); ?>" class="comment_container">
|
||||
|
@ -22,7 +23,7 @@ global $post;
|
|||
|
||||
<?php if ( get_option('woocommerce_enable_review_rating') == 'yes' ) : ?>
|
||||
|
||||
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="star-rating" title="<?php echo esc_attr( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); ?>">
|
||||
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="star-rating" title="<?php echo sprintf(__( 'Rated %s out of 5', 'woocommerce' ), $rating) ?>">
|
||||
<span style="width:<?php echo intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ) * 16; ?>px"><span itemprop="ratingValue"><?php echo intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); ?></span> <?php _e( 'out of 5', 'woocommerce' ); ?></span>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@ class WooCommerce_Widget_Best_Sellers extends WP_Widget {
|
|||
/* Create the widget. */
|
||||
$this->WP_Widget('best_sellers', $this->woo_widget_name, $widget_ops);
|
||||
|
||||
add_action( 'save_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'deleted_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'switch_theme', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ class WooCommerce_Widget_Featured_Products extends WP_Widget {
|
|||
/* Create the widget. */
|
||||
$this->WP_Widget('featured-products', $this->woo_widget_name, $widget_ops);
|
||||
|
||||
add_action( 'save_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'deleted_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'switch_theme', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class WooCommerce_Widget_Layered_Nav extends WP_Widget {
|
|||
|
||||
$taxonomy_filter = str_replace( 'pa_', '', $taxonomy );
|
||||
|
||||
$found = true;
|
||||
$found = false;
|
||||
|
||||
echo '<select id="dropdown_layered_nav_' . $taxonomy_filter . '">';
|
||||
|
||||
|
@ -390,7 +390,7 @@ function woocommerce_layered_nav_init( ) {
|
|||
|
||||
$_chosen_attributes = $_attributes_array = array();
|
||||
|
||||
$attribute_taxonomies = $woocommerce->attribute_taxonomies;
|
||||
$attribute_taxonomies = $woocommerce->get_attribute_taxonomies();
|
||||
if ( $attribute_taxonomies ) {
|
||||
foreach ( $attribute_taxonomies as $tax ) {
|
||||
|
||||
|
|
|
@ -87,18 +87,18 @@ class WooCommerce_Widget_Layered_Nav_Filters extends WP_Widget {
|
|||
if ( sizeof( $new_filter ) > 0 )
|
||||
$link = add_query_arg( 'filter_' . $taxonomy_filter, implode( ',', $new_filter ), $link );
|
||||
|
||||
echo '<li><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . $link . '">' . $term->name . '</a></li>';
|
||||
echo '<li class="chosen"><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . $link . '">' . $term->name . '</a></li>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( $post_min ) {
|
||||
$link = remove_query_arg( 'min_price' );
|
||||
echo '<li><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . $link . '">' . __( 'Min', 'woocommerce' ) . ' ' . woocommerce_price( $post_min ) . '</a></li>';
|
||||
echo '<li class="chosen"><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . $link . '">' . __( 'Min', 'woocommerce' ) . ' ' . woocommerce_price( $post_min ) . '</a></li>';
|
||||
}
|
||||
|
||||
if ( $post_max ) {
|
||||
$link = remove_query_arg( 'max_price' );
|
||||
echo '<li><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . $link . '">' . __( 'Max', 'woocommerce' ) . ' ' . woocommerce_price( $post_max ) . '</a></li>';
|
||||
echo '<li class="chosen"><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . $link . '">' . __( 'Max', 'woocommerce' ) . ' ' . woocommerce_price( $post_max ) . '</a></li>';
|
||||
}
|
||||
|
||||
echo "</ul>";
|
||||
|
|
|
@ -65,7 +65,10 @@ class WooCommerce_Widget_Login extends WP_Widget {
|
|||
|
||||
$user = get_user_by('id', get_current_user_id());
|
||||
|
||||
if ( $logged_in_title ) echo $before_title . sprintf( $logged_in_title, ucwords($user->display_name) ) . $after_title;
|
||||
$logged_in_title = apply_filters( 'woocomerce_login_widget_logged_in_title', sprintf( $logged_in_title, ucwords( $user->display_name ) ) );
|
||||
|
||||
if ( $logged_in_title )
|
||||
echo $before_title . $logged_in_title . $after_title;
|
||||
|
||||
do_action('woocommerce_login_widget_logged_in_before_links');
|
||||
|
||||
|
@ -91,7 +94,10 @@ class WooCommerce_Widget_Login extends WP_Widget {
|
|||
|
||||
} else {
|
||||
|
||||
if ( $logged_out_title ) echo $before_title . $logged_out_title . $after_title;
|
||||
$logged_out_title = apply_filters( 'woocomerce_login_widget_logged_out_title', $logged_out_title );
|
||||
|
||||
if ( $logged_out_title )
|
||||
echo $before_title . $logged_out_title . $after_title;
|
||||
|
||||
do_action('woocommerce_login_widget_logged_out_before_form');
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@ class WooCommerce_Widget_On_Sale extends WP_Widget {
|
|||
/* Create the widget. */
|
||||
$this->WP_Widget('onsale', $this->woo_widget_name, $widget_ops);
|
||||
|
||||
add_action( 'save_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'deleted_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'switch_theme', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,9 +38,9 @@ class WooCommerce_Widget_Recent_Products extends WP_Widget {
|
|||
/* Create the widget. */
|
||||
$this->WP_Widget('recent_products', $this->woo_widget_name, $widget_ops);
|
||||
|
||||
add_action( 'save_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'deleted_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'switch_theme', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,9 +38,9 @@ class WooCommerce_Widget_Recent_Reviews extends WP_Widget {
|
|||
/* Create the widget. */
|
||||
$this->WP_Widget('recent_reviews', $this->woo_widget_name, $widget_ops);
|
||||
|
||||
add_action( 'save_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'deleted_post', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'switch_theme', array(&$this, 'flush_widget_cache') );
|
||||
add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
|
||||
add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|