seo tweaks - branch update

This commit is contained in:
opportus 2016-08-18 10:39:55 +02:00
commit 92513c6ad1
10 changed files with 9 additions and 15 deletions

View File

@ -255,6 +255,7 @@ module.exports = function( grunt ) {
]); ]);
grunt.registerTask( 'css', [ grunt.registerTask( 'css', [
'stylelint',
'sass', 'sass',
'cssmin' 'cssmin'
]); ]);

View File

@ -10,7 +10,7 @@ extensions: [php]
# directories and files matching this file mask will not be parsed # directories and files matching this file mask will not be parsed
exclude: exclude:
- includes/libraries/ - includes/libraries/
- includes/api/ - includes/api/legacy/
- i18n/ - i18n/
- node_modules/ - node_modules/
- wc-apidocs/ - wc-apidocs/

View File

@ -175,7 +175,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array( array(
'title' => __( 'Product Images', 'woocommerce' ), 'title' => __( 'Product Images', 'woocommerce' ),
'type' => 'title', 'type' => 'title',
'desc' => sprintf( __( 'These settings affect the display and dimensions of images in your catalog - the display on the front-end will still be affected by CSS styles. After changing these settings you may need to <a href="%s">regenerate your thumbnails</a>.', 'woocommerce' ), 'https://wordpress.org/extend/plugins/regenerate-thumbnails/' ), 'desc' => sprintf( __( 'These settings affect the display and dimensions of images in your catalog - the display on the front-end will still be affected by CSS styles. After changing these settings you may need to <a target="_blank" href="%s">regenerate your thumbnails</a>.', 'woocommerce' ), 'https://wordpress.org/extend/plugins/regenerate-thumbnails/' ),
'id' => 'image_options' 'id' => 'image_options'
), ),

View File

@ -300,7 +300,7 @@ class WC_REST_Order_Refunds_Controller extends WC_REST_Posts_Controller {
$order = wc_get_order( $order_data ); $order = wc_get_order( $order_data );
if ( isset( $payment_gateways[ $order->get_payment_method() ] ) && $payment_gateways[ $order->get_payment_method() ]->supports( 'refunds' ) ) { if ( isset( $payment_gateways[ $order->get_payment_method() ] ) && $payment_gateways[ $order->get_payment_method() ]->supports( 'refunds' ) ) {
$result = $payment_gateways[ $order->get_payment_method() ]->process_refund( $order_id, $refund->get_refund_amount(), $refund->get_refund_reason() ); $result = $payment_gateways[ $order->get_payment_method() ]->process_refund( $order->id, $refund->get_refund_amount(), $refund->get_refund_reason() );
if ( is_wp_error( $result ) ) { if ( is_wp_error( $result ) ) {
return $result; return $result;

View File

@ -434,6 +434,7 @@ class WC_Countries {
'NZ' => "{name}\n{company}\n{address_1}\n{address_2}\n{city} {postcode}\n{country}", 'NZ' => "{name}\n{company}\n{address_1}\n{address_2}\n{city} {postcode}\n{country}",
'NO' => $postcode_before_city, 'NO' => $postcode_before_city,
'PL' => $postcode_before_city, 'PL' => $postcode_before_city,
'PT' => $postcode_before_city,
'SK' => $postcode_before_city, 'SK' => $postcode_before_city,
'SI' => $postcode_before_city, 'SI' => $postcode_before_city,
'ES' => "{name}\n{company}\n{address_1}\n{address_2}\n{postcode} {city}\n{state}\n{country}", 'ES' => "{name}\n{company}\n{address_1}\n{address_2}\n{postcode} {city}\n{state}\n{country}",

View File

@ -991,10 +991,10 @@ class WC_Customer extends WC_Legacy_Customer {
update_user_meta( $this->get_id(), 'last_update', $this->get_date_modified() ); update_user_meta( $this->get_id(), 'last_update', $this->get_date_modified() );
update_user_meta( $this->get_id(), 'first_name', $this->get_first_name() ); update_user_meta( $this->get_id(), 'first_name', $this->get_first_name() );
update_user_meta( $this->get_id(), 'last_name', $this->get_last_name() ); update_user_meta( $this->get_id(), 'last_name', $this->get_last_name() );
$this->set_date_modified( time() );
wp_update_user( array( 'ID' => $this->get_id(), 'role' => $this->get_role() ) ); wp_update_user( array( 'ID' => $this->get_id(), 'role' => $this->get_role() ) );
$wp_user = new WP_User( $this->get_id() ); $wp_user = new WP_User( $this->get_id() );
$this->set_date_created( strtotime( $wp_user->user_registered ) ); $this->set_date_created( strtotime( $wp_user->user_registered ) );
$this->set_date_modified( get_user_meta( $this->get_id(), 'last_update', true ) );
$this->read_meta_data(); $this->read_meta_data();
} }
} }
@ -1074,11 +1074,10 @@ class WC_Customer extends WC_Legacy_Customer {
update_user_meta( $this->get_id(), 'shipping_state', $this->get_shipping_state() ); update_user_meta( $this->get_id(), 'shipping_state', $this->get_shipping_state() );
update_user_meta( $this->get_id(), 'shipping_country', $this->get_shipping_country() ); update_user_meta( $this->get_id(), 'shipping_country', $this->get_shipping_country() );
update_user_meta( $this->get_id(), 'paying_customer', $this->get_is_paying_customer() ); update_user_meta( $this->get_id(), 'paying_customer', $this->get_is_paying_customer() );
$this->set_date_modified( time() );
update_user_meta( $this->get_id(), 'last_update', $this->get_date_modified() );
update_user_meta( $this->get_id(), 'first_name', $this->get_first_name() ); update_user_meta( $this->get_id(), 'first_name', $this->get_first_name() );
update_user_meta( $this->get_id(), 'last_name', $this->get_last_name() ); update_user_meta( $this->get_id(), 'last_name', $this->get_last_name() );
wp_update_user( array( 'ID' => $this->get_id(), 'role' => $this->get_role() ) ); wp_update_user( array( 'ID' => $this->get_id(), 'role' => $this->get_role() ) );
$this->set_date_modified( get_user_meta( $this->get_id(), 'last_update', true ) );
$this->save_meta_data(); $this->save_meta_data();
} }

View File

@ -663,14 +663,12 @@ function wc_format_postcode( $postcode, $country ) {
$postcode = trim( substr_replace( $postcode, ' ', -3, 0 ) ); $postcode = trim( substr_replace( $postcode, ' ', -3, 0 ) );
break; break;
case 'BR' : case 'BR' :
case 'PL' :
$postcode = trim( substr_replace( $postcode, '-', -3, 0 ) ); $postcode = trim( substr_replace( $postcode, '-', -3, 0 ) );
break; break;
case 'JP' : case 'JP' :
$postcode = trim( substr_replace( $postcode, '-', 3, 0 ) ); $postcode = trim( substr_replace( $postcode, '-', 3, 0 ) );
break; break;
case 'PL' :
$postcode = trim( substr_replace( $postcode, '-', -3, 0 ) );
break;
case 'PT' : case 'PT' :
$postcode = trim( substr_replace( $postcode, '-', 4, 0 ) ); $postcode = trim( substr_replace( $postcode, '-', 4, 0 ) );
break; break;

View File

@ -453,7 +453,7 @@ function wc_get_customer_available_downloads( $customer_id ) {
home_url( '/' ) home_url( '/' )
), ),
'download_id' => $result->download_id, 'download_id' => $result->download_id,
'product_id' => $product_id, 'product_id' => $_product->id,
'download_name' => $download_name, 'download_name' => $download_name,
'order_id' => $order->get_id(), 'order_id' => $order->get_id(),
'order_key' => $order->get_order_key(), 'order_key' => $order->get_order_key(),

View File

@ -88,7 +88,6 @@ And, finally, consider joining or spearheading a WooCommerce Meetup locally, mor
= Minimum Requirements = = Minimum Requirements =
* WordPress 3.8 or greater
* PHP version 5.2.4 or greater (PHP 5.6 or greater is recommended) * PHP version 5.2.4 or greater (PHP 5.6 or greater is recommended)
* MySQL version 5.0 or greater (MySQL 5.6 or greater is recommended) * MySQL version 5.0 or greater (MySQL 5.6 or greater is recommended)
* Some payment gateways require fsockopen support (for IPN access) * Some payment gateways require fsockopen support (for IPN access)

View File

@ -80,10 +80,6 @@ class WC_Tests_CustomerCRUD extends WC_Unit_Test_Case {
$customer_id = $customer->get_id(); $customer_id = $customer->get_id();
$this->assertNotEquals( 0, $customer->get_id() ); $this->assertNotEquals( 0, $customer->get_id() );
$customer->delete(); $customer->delete();
$user_object = get_user_by( 'id', $customer_id );
$this->assertFalse( $user_object );
$customer->read( $customer_id ); $customer->read( $customer_id );
$this->assertEquals( 0, $customer->get_id() ); $this->assertEquals( 0, $customer->get_id() );
} }