diff --git a/templates/checkout/form-coupon.php b/templates/checkout/form-coupon.php index 5055b2db3139d..5ebd5a6e6f5ab 100644 --- a/templates/checkout/form-coupon.php +++ b/templates/checkout/form-coupon.php @@ -11,8 +11,9 @@ global $woocommerce; -if ( ! WC()->cart->coupons_enabled() ) +if ( ! WC()->cart->coupons_enabled() ) { return; +} $info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) ); $info_message .= ' ' . __( 'Click here to enter your code', 'woocommerce' ) . ''; diff --git a/templates/checkout/form-login.php b/templates/checkout/form-login.php index beb821c121871..70ce61521b853 100644 --- a/templates/checkout/form-login.php +++ b/templates/checkout/form-login.php @@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -if ( is_user_logged_in() || 'no' == get_option( 'woocommerce_enable_checkout_login_reminder' ) ) return; +if ( is_user_logged_in() || 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ) return; $info_message = apply_filters( 'woocommerce_checkout_login_message', __( 'Returning customer?', 'woocommerce' ) ); $info_message .= ' ' . __( 'Click here to login', 'woocommerce' ) . ''; diff --git a/templates/checkout/form-pay.php b/templates/checkout/form-pay.php index 4ea5bb9520492..d739fd27286b2 100644 --- a/templates/checkout/form-pay.php +++ b/templates/checkout/form-pay.php @@ -35,7 +35,7 @@ get_items() )>0 ) : + if ( sizeof( $order->get_items() ) > 0 ) : foreach ( $order->get_items() as $item ) : echo ' diff --git a/templates/checkout/form-shipping.php b/templates/checkout/form-shipping.php index dfafc12daf338..2ad68b372e974 100644 --- a/templates/checkout/form-shipping.php +++ b/templates/checkout/form-shipping.php @@ -15,7 +15,7 @@ -status=='pending' ) : ?> +status === 'pending' ) : ?>

get_checkout_payment_url() ) . '">' . __( 'pay', 'woocommerce' ) . '' ); ?>

diff --git a/templates/emails/email-addresses.php b/templates/emails/email-addresses.php index 1f13928823e83..39fda0a0e250b 100644 --- a/templates/emails/email-addresses.php +++ b/templates/emails/email-addresses.php @@ -21,7 +21,7 @@ - get_formatted_shipping_address() ) ) : ?> + get_formatted_shipping_address() ) ) : ?> diff --git a/templates/loop/pagination.php b/templates/loop/pagination.php index 7e1b324f16529..e0e89bde5b4f1 100644 --- a/templates/loop/pagination.php +++ b/templates/loop/pagination.php @@ -17,15 +17,15 @@ \ No newline at end of file diff --git a/templates/myaccount/form-edit-address.php b/templates/myaccount/form-edit-address.php index 8e62dedeb5312..6ad20a7eb3fe6 100644 --- a/templates/myaccount/form-edit-address.php +++ b/templates/myaccount/form-edit-address.php @@ -11,7 +11,7 @@ global $woocommerce, $current_user; -$page_title = ( $load_address == 'billing' ) ? __( 'Billing Address', 'woocommerce' ) : __( 'Shipping Address', 'woocommerce' ); +$page_title = ( $load_address === 'billing' ) ? __( 'Billing Address', 'woocommerce' ) : __( 'Shipping Address', 'woocommerce' ); get_currentuserinfo(); ?> diff --git a/templates/myaccount/my-address.php b/templates/myaccount/my-address.php index 46f2a7a865abc..eb16a83893733 100644 --- a/templates/myaccount/my-address.php +++ b/templates/myaccount/my-address.php @@ -47,15 +47,15 @@
get_user_meta( $customer_id, $name . '_first_name', true ), - 'last_name' => get_user_meta( $customer_id, $name . '_last_name', true ), - 'company' => get_user_meta( $customer_id, $name . '_company', true ), - 'address_1' => get_user_meta( $customer_id, $name . '_address_1', true ), - 'address_2' => get_user_meta( $customer_id, $name . '_address_2', true ), - 'city' => get_user_meta( $customer_id, $name . '_city', true ), - 'state' => get_user_meta( $customer_id, $name . '_state', true ), - 'postcode' => get_user_meta( $customer_id, $name . '_postcode', true ), - 'country' => get_user_meta( $customer_id, $name . '_country', true ) + 'first_name' => get_user_meta( $customer_id, $name . '_first_name', true ), + 'last_name' => get_user_meta( $customer_id, $name . '_last_name', true ), + 'company' => get_user_meta( $customer_id, $name . '_company', true ), + 'address_1' => get_user_meta( $customer_id, $name . '_address_1', true ), + 'address_2' => get_user_meta( $customer_id, $name . '_address_2', true ), + 'city' => get_user_meta( $customer_id, $name . '_city', true ), + 'state' => get_user_meta( $customer_id, $name . '_state', true ), + 'postcode' => get_user_meta( $customer_id, $name . '_postcode', true ), + 'country' => get_user_meta( $customer_id, $name . '_country', true ) ), $customer_id, $name ); $formatted_address = WC()->countries->get_formatted_address( $address ); diff --git a/templates/single-product-reviews.php b/templates/single-product-reviews.php index dc9ae0ab277b4..823eae6e0cb48 100644 --- a/templates/single-product-reviews.php +++ b/templates/single-product-reviews.php @@ -18,7 +18,7 @@

get_rating_count() ) ) - printf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), $count, get_the_title() ); + printf( _n( '%s review for %s', '%s reviews for %s', $count, 'woocommerce' ), $count, get_the_title() ); else _e( 'Reviews', 'woocommerce' ); ?>

@@ -32,9 +32,9 @@ 1 && get_option( 'page_comments' ) ) : echo ''; endif; ?> diff --git a/templates/single-product/add-to-cart/variable.php b/templates/single-product/add-to-cart/variable.php index 1e354a7cd7ef8..1227aa523e149 100644 --- a/templates/single-product/add-to-cart/variable.php +++ b/templates/single-product/add-to-cart/variable.php @@ -69,7 +69,7 @@ } ?> ' . __( 'Clear selection', 'woocommerce' ) . ''; ?> diff --git a/templates/single-product/product-image.php b/templates/single-product/product-image.php index 10880a0bdf399..8a5790c181c29 100644 --- a/templates/single-product/product-image.php +++ b/templates/single-product/product-image.php @@ -17,12 +17,13 @@ ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( + $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) ); + $image_link = wp_get_attachment_url( get_post_thumbnail_id() ); + $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( 'title' => $image_title ) ); - $attachment_count = count( $product->get_gallery_attachment_ids() ); + + $attachment_count = count( $product->get_gallery_attachment_ids() ); if ( $attachment_count > 0 ) { $gallery = '[product-gallery]'; diff --git a/templates/single-product/related.php b/templates/single-product/related.php index b0a3199af4687..e6a1d3316f49e 100644 --- a/templates/single-product/related.php +++ b/templates/single-product/related.php @@ -16,13 +16,13 @@ if ( sizeof( $related ) == 0 ) return; $args = apply_filters( 'woocommerce_related_products_args', array( - 'post_type' => 'product', - 'ignore_sticky_posts' => 1, - 'no_found_rows' => 1, - 'posts_per_page' => $posts_per_page, - 'orderby' => $orderby, - 'post__in' => $related, - 'post__not_in' => array( $product->id ) + 'post_type' => 'product', + 'ignore_sticky_posts' => 1, + 'no_found_rows' => 1, + 'posts_per_page' => $posts_per_page, + 'orderby' => $orderby, + 'post__in' => $related, + 'post__not_in' => array( $product->id ) ) ); $products = new WP_Query( $args );