@@ -51,7 +51,7 @@ if ( ! comments_open() )
$commenter = wp_get_current_commenter();
$comment_form = array(
- 'title_reply' => have_comments() ? __( 'Add a review', 'woocommerce' ) : __( 'Be the first to review', 'woocommerce' ).' “' . get_the_title() . '”',
+ 'title_reply' => have_comments() ? __( 'Add a review', 'woocommerce' ) : __( 'Be the first to review', 'woocommerce' ) . ' “' . get_the_title() . '”',
'title_reply_to' => __( 'Leave a Reply to %s', 'woocommerce' ),
'comment_notes_before' => '',
'comment_notes_after' => '',
@@ -66,14 +66,14 @@ if ( ! comments_open() )
'comment_field' => ''
);
- if ( get_option('woocommerce_enable_review_rating') == 'yes' ) {
+ if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' ) {
$comment_form['comment_field'] = '';
}
diff --git a/templates/single-product/rating.php b/templates/single-product/rating.php
index 3a08b216908..85fb73a0e47 100644
--- a/templates/single-product/rating.php
+++ b/templates/single-product/rating.php
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $product;
-if ( get_option( 'woocommerce_enable_review_rating' ) == 'no' )
+if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' )
return;
$count = $product->get_rating_count();
diff --git a/templates/single-product/related.php b/templates/single-product/related.php
index 2170cb076ba..b0a3199af46 100644
--- a/templates/single-product/related.php
+++ b/templates/single-product/related.php
@@ -15,7 +15,7 @@ $related = $product->get_related( $posts_per_page );
if ( sizeof( $related ) == 0 ) return;
-$args = apply_filters('woocommerce_related_products_args', array(
+$args = apply_filters( 'woocommerce_related_products_args', array(
'post_type' => 'product',
'ignore_sticky_posts' => 1,
'no_found_rows' => 1,
@@ -27,7 +27,7 @@ $args = apply_filters('woocommerce_related_products_args', array(
$products = new WP_Query( $args );
-$woocommerce_loop['columns'] = $columns;
+$woocommerce_loop['columns'] = $columns;
if ( $products->have_posts() ) : ?>
diff --git a/templates/single-product/review.php b/templates/single-product/review.php
index 7d97f150681..510d8011c61 100644
--- a/templates/single-product/review.php
+++ b/templates/single-product/review.php
@@ -38,7 +38,7 @@ $rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
comment_author_email, $comment->user_id, $comment->comment_post_ID ) )
echo '(' . __( 'verified owner', 'woocommerce' ) . ') ';
diff --git a/templates/single-product/tabs/description.php b/templates/single-product/tabs/description.php
index e94cd9c2f76..26e7a129cb2 100644
--- a/templates/single-product/tabs/description.php
+++ b/templates/single-product/tabs/description.php
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $woocommerce, $post;
-$heading = esc_html( apply_filters('woocommerce_product_description_heading', __( 'Product Description', 'woocommerce' ) ) );
+$heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Product Description', 'woocommerce' ) ) );
?>
diff --git a/uninstall.php b/uninstall.php
index 4c42dfba2b8..8f6f2c00f2d 100644
--- a/uninstall.php
+++ b/uninstall.php
@@ -21,14 +21,14 @@ $installer = include( 'includes/class-wc-install.php' );
$installer->remove_roles();
// Pages
-wp_delete_post( get_option('woocommerce_shop_page_id'), true );
-wp_delete_post( get_option('woocommerce_cart_page_id'), true );
-wp_delete_post( get_option('woocommerce_checkout_page_id'), true );
-wp_delete_post( get_option('woocommerce_myaccount_page_id'), true );
-wp_delete_post( get_option('woocommerce_edit_address_page_id'), true );
-wp_delete_post( get_option('woocommerce_view_order_page_id'), true );
-wp_delete_post( get_option('woocommerce_change_password_page_id'), true );
-wp_delete_post( get_option('woocommerce_logout_page_id'), true );
+wp_delete_post( get_option( 'woocommerce_shop_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_cart_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_checkout_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_myaccount_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_edit_address_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_view_order_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_change_password_page_id' ), true );
+wp_delete_post( get_option( 'woocommerce_logout_page_id' ), true );
// mijireh checkout page
if ( $mijireh_page = get_page_by_path( 'mijireh-secure-checkout' ) )
diff --git a/woocommerce.php b/woocommerce.php
index 8a99132d510..d96c5501c56 100644
--- a/woocommerce.php
+++ b/woocommerce.php
@@ -265,7 +265,7 @@ final class WooCommerce {
// 1 = PHP_ROUND_HALF_UP, 2 = PHP_ROUND_HALF_DOWN
if ( ! defined( 'WC_TAX_ROUNDING_MODE' ) ) {
- define( 'WC_TAX_ROUNDING_MODE', get_option( 'woocommerce_prices_include_tax' ) == 'yes' ? 2 : 1 );
+ define( 'WC_TAX_ROUNDING_MODE', get_option( 'woocommerce_prices_include_tax' ) === 'yes' ? 2 : 1 );
}
if ( ! defined( 'WC_DELIMITER' ) ) {
@@ -287,11 +287,11 @@ final class WooCommerce {
include_once( 'includes/admin/class-wc-admin.php' );
}
- if ( defined('DOING_AJAX') ) {
+ if ( defined( 'DOING_AJAX' ) ) {
$this->ajax_includes();
}
- if ( ! is_admin() || defined('DOING_AJAX') ) {
+ if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
$this->frontend_includes();
}
@@ -385,7 +385,7 @@ final class WooCommerce {
$this->integrations = new WC_Integrations(); // Integrations class
// Classes/actions loaded for the frontend and for ajax requests
- if ( ! is_admin() || defined('DOING_AJAX') ) {
+ if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
// Session class, handles session data for customers - can be overwritten if custom handler is needed
$session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' );