Merge pull request #1 from woothemes/master

Updated WooComerce
This commit is contained in:
Shiva Poudel 2014-08-22 03:39:40 +05:45
commit 0143114dd9
6 changed files with 60 additions and 55 deletions

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WooCommerce 2.2.0-bleeding Admin\n"
"Report-Msgid-Bugs-To: https://github.com/woothemes/woocommerce/issues\n"
"POT-Creation-Date: 2014-08-19 13:27:09+00:00\n"
"POT-Creation-Date: 2014-08-21 16:05:27+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WooCommerce 2.2.0-bleeding Frontend\n"
"Report-Msgid-Bugs-To: https://github.com/woothemes/woocommerce/issues\n"
"POT-Creation-Date: 2014-08-19 13:27:09+00:00\n"
"POT-Creation-Date: 2014-08-21 16:05:26+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -4063,7 +4063,7 @@ msgstr ""
#: includes/gateways/cheque/class-wc-gateway-cheque.php:52
#: includes/gateways/mijireh/class-wc-gateway-mijireh.php:124
#: includes/gateways/paypal/class-wc-gateway-paypal.php:121
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:169
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:170
#: includes/shipping/flat-rate/class-wc-shipping-flat-rate.php:75
#: includes/shipping/free-shipping/class-wc-shipping-free-shipping.php:64
#: includes/shipping/international-delivery/class-wc-shipping-international-delivery.php:49
@ -4260,7 +4260,7 @@ msgid "Order item stock reduced successfully."
msgstr ""
#: includes/abstracts/abstract-wc-payment-gateway.php:275
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:258
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:259
msgid "Card Number"
msgstr ""
@ -6140,7 +6140,7 @@ msgstr ""
#: includes/gateways/cod/class-wc-gateway-cod.php:66
#: includes/gateways/mijireh/class-wc-gateway-mijireh.php:137
#: includes/gateways/paypal/class-wc-gateway-paypal.php:127
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:176
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:177
#: includes/shipping/local-delivery/class-wc-shipping-local-delivery.php:103
#: includes/shipping/local-pickup/class-wc-shipping-local-pickup.php:81
#: includes/widgets/class-wc-widget-cart.php:30
@ -6161,7 +6161,7 @@ msgstr ""
#: includes/gateways/cheque/class-wc-gateway-cheque.php:60
#: includes/gateways/mijireh/class-wc-gateway-mijireh.php:139
#: includes/gateways/paypal/class-wc-gateway-paypal.php:129
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:178
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:179
#: includes/shipping/flat-rate/class-wc-shipping-flat-rate.php:83
#: includes/shipping/free-shipping/class-wc-shipping-free-shipping.php:72
#: includes/shipping/international-delivery/class-wc-shipping-international-delivery.php:57
@ -6179,7 +6179,7 @@ msgstr ""
#: includes/gateways/cod/class-wc-gateway-cod.php:73
#: includes/gateways/mijireh/class-wc-gateway-mijireh.php:144
#: includes/gateways/paypal/class-wc-gateway-paypal.php:134
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:183
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:184
#: includes/wc-template-functions.php:1004
msgid "Description"
msgstr ""
@ -6375,7 +6375,7 @@ msgstr ""
#: includes/gateways/mijireh/class-wc-gateway-mijireh.php:147
#: includes/gateways/paypal/class-wc-gateway-paypal.php:137
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:185
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:186
msgid "This controls the description which the user sees during checkout."
msgstr ""
@ -6688,16 +6688,16 @@ msgid ""
"tokens and the Simplify Commerce SDK. Requires SSL when sandbox is disabled."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:85
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:86
msgid "Simplify Commerce by Mastercard"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:90
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:91
msgid "Getting started"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:91
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:97
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:92
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:98
msgid ""
"Simplify Commerce is your merchant account and payment gateway all rolled "
"into one. Choose Simplify Commerce as your WooCommerce payment gateway to "
@ -6705,25 +6705,25 @@ msgid ""
"backed by MasterCard."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:93
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:94
msgid "Sign up for Simplify Commerce"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:93
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:94
msgid "Learn more"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:130
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:131
msgid ""
"Simplify Commerce Error: Simplify commerce requires PHP 5.3 and above. You "
"are using version %s."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:135
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:136
msgid "Simplify Commerce Error: Please enter your public and private keys"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:140
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:141
msgid ""
"Simplify Commerce is enabled, but the <a href=\"%s\">force SSL option</a> "
"is disabled; your checkout may not be secure! Please enable SSL and ensure "
@ -6731,101 +6731,101 @@ msgid ""
"in sandbox mode."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:170
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:171
msgid "Enable Simplify Commerce"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:179
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:180
msgid "Credit card"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:190
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:191
msgid "Sandbox"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:191
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:192
msgid "Enable Sandbox Mode"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:193
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:194
msgid ""
"Place the payment gateway in sandbox mode using sandbox API keys (real "
"payments will not be taken)."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:197
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:198
msgid "Sandbox Public Key"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:199
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:206
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:213
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:220
msgid "Get your API keys from your Simplfy account: Settings > API Keys."
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:200
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:207
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:214
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:221
msgid "Get your API keys from your Simplify account: Settings > API Keys."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:204
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:205
msgid "Sandbox Private Key"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:211
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:212
msgid "Public Key"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:218
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:219
msgid "Private Key"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:234
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:235
msgid "TEST MODE ENABLED. Use a test card: %s"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:259
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:260
msgid "Expiry Month"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:260
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:261
msgid "Expiry Year"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:261
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:262
msgid "is invalid"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:275
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:276
#: includes/gateways/simplify-commerce/class-wc-subscription-gateway-simplify-commerce.php:43
msgid ""
"Please make sure your card details have been entered correctly and that "
"your browser supports JavaScript."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:278
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:279
#: includes/gateways/simplify-commerce/class-wc-subscription-gateway-simplify-commerce.php:46
msgid ""
"Developers: Please make sure that you're including jQuery and there are no "
"JavaScript errors on the page."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:287
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:288
msgid "%s - Order %s"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:303
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:304
#: includes/gateways/simplify-commerce/class-wc-subscription-gateway-simplify-commerce.php:154
msgid "Simplify payment approved (ID: %s, Auth Code: %s)"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:314
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:315
#: includes/gateways/simplify-commerce/class-wc-subscription-gateway-simplify-commerce.php:158
msgid "Simplify payment declined"
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:316
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:317
#: includes/gateways/simplify-commerce/class-wc-subscription-gateway-simplify-commerce.php:160
msgid "Payment was declined - please try another card."
msgstr ""
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:358
#: includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php:359
msgid "Refund was declined."
msgstr ""

View File

@ -624,7 +624,7 @@ class WC_AJAX {
'instock' => __( 'In stock', 'woocommerce' ),
'outofstock' => __( 'Out of stock', 'woocommerce' )
);
// Get parent data
$parent_data = array(
'id' => $post_id,
@ -1684,9 +1684,14 @@ class WC_AJAX {
global $wpdb;
$term = wc_clean( stripslashes( $_GET['term'] ) );
if ( method_exists( $wpdb, 'esc_like' ) ) {
$term = $wpdb->esc_like( $term );
} else {
$term = like_escape( $term );
}
$query->query_from .= " INNER JOIN {$wpdb->usermeta} AS user_name ON {$wpdb->users}.ID = user_name.user_id AND ( user_name.meta_key = 'first_name' OR user_name.meta_key = 'last_name' ) ";
$query->query_where .= $wpdb->prepare( " OR user_name.meta_value LIKE %s ", '%' . like_escape( $term ) . '%' );
$query->query_where .= $wpdb->prepare( " OR user_name.meta_value LIKE %s ", '%' . $term . '%' );
}
/**

View File

@ -571,7 +571,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
public function process_refund( $order_id, $amount = null, $reason = '' ) {
$order = wc_get_order( $order_id );
if ( ! $order || ! $order->get_transaction_id() || ! $this->api_username || ! $this->api_password || ! $this->api_password ) {
if ( ! $order || ! $order->get_transaction_id() || ! $this->api_username || ! $this->api_password || ! $this->api_signature ) {
return false;
}

View File

@ -1,4 +1,4 @@
/*global simplfy_commerce_params, wc_checkout_params, SimplifyCommerce */
/*global Simplify_commerce_params, wc_checkout_params, SimplifyCommerce */
(function ( $ ) {
// Form handler
@ -25,7 +25,7 @@
card = card.replace( /\s/g, '' );
SimplifyCommerce.generateToken({
key: simplfy_commerce_params.key,
key: Simplify_commerce_params.key,
card: {
number: card,
cvc: cvc,
@ -42,7 +42,7 @@
return true;
}
// Handle simplfy response
// Handle Simplify response
function simplifyResponseHandler( data ) {
var $form = $( 'form.checkout, form#order_review' ),
ccForm = $( '#simplify_commerce-cc-form' );
@ -60,7 +60,7 @@
errorList = '';
for ( var i = 0; i < fieldErrorsLength; i++ ) {
errorList += '<li>' + simplfy_commerce_params[ fieldErrors[i].field ] + ' ' + simplfy_commerce_params.is_invalid + ' - ' + fieldErrors[i].message + '.</li>';
errorList += '<li>' + Simplify_commerce_params[ fieldErrors[i].field ] + ' ' + Simplify_commerce_params.is_invalid + ' - ' + fieldErrors[i].message + '.</li>';
}
ccForm.prepend( '<ul class="woocommerce-error">' + errorList + '</ul>' );

View File

@ -184,7 +184,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
'title' => __( 'Description', 'woocommerce' ),
'type' => 'text',
'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce' ),
'default' => 'Pay with your credit card via Simplfy Commerce by Mastercard.',
'default' => 'Pay with your credit card via Simplify Commerce by Mastercard.',
'desc_tip' => true
),
'sandbox' => array(
@ -197,28 +197,28 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
'sandbox_public_key' => array(
'title' => __( 'Sandbox Public Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplfy account: Settings > API Keys.', 'woocommerce' ),
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
'desc_tip' => true
),
'sandbox_private_key' => array(
'title' => __( 'Sandbox Private Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplfy account: Settings > API Keys.', 'woocommerce' ),
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
'desc_tip' => true
),
'public_key' => array(
'title' => __( 'Public Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplfy account: Settings > API Keys.', 'woocommerce' ),
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
'desc_tip' => true
),
'private_key' => array(
'title' => __( 'Private Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplfy account: Settings > API Keys.', 'woocommerce' ),
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
'desc_tip' => true
),
@ -254,7 +254,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
wp_enqueue_script( 'simplify-commerce', 'https://www.simplify.com/commerce/v1/simplify.js', array( 'jquery' ), WC_VERSION, true );
wp_enqueue_script( 'wc-simplify-commerce', WC()->plugin_url() . '/includes/gateways/simplify-commerce/assets/js/simplify-commerce.js', array( 'simplify-commerce', 'wc-credit-card-form' ), WC_VERSION, true );
wp_localize_script( 'wc-simplify-commerce', 'simplfy_commerce_params', array(
wp_localize_script( 'wc-simplify-commerce', 'Simplify_commerce_params', array(
'key' => $this->public_key,
'card.number' => __( 'Card Number', 'woocommerce' ),
'card.expMonth' => __( 'Expiry Month', 'woocommerce' ),