coding standards fixes
This commit is contained in:
parent
1a416875f8
commit
454b97080a
|
@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) ); ?>
|
||||
<input type="hidden" name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" value="<?php echo esc_attr( $method->id ); ?>" class="shipping_method" />
|
||||
|
||||
<?php elseif ( get_option('woocommerce_shipping_method_format') == 'select' ) : ?>
|
||||
<?php elseif ( get_option( 'woocommerce_shipping_method_format' ) === 'select' ) : ?>
|
||||
|
||||
<select name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" class="shipping_method">
|
||||
<?php foreach ( $available_methods as $method ) : ?>
|
||||
|
|
|
@ -50,7 +50,7 @@ global $woocommerce;
|
|||
|
||||
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) == 'yes' ) ) : ?>
|
||||
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) === 'yes' ) ) : ?>
|
||||
|
||||
<?php if ( ! WC()->cart->needs_shipping() || WC()->cart->ship_to_billing_address_only() ) : ?>
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( WC()->cart->tax_display_cart == 'excl' ) : ?>
|
||||
<?php if ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ) : ?>
|
||||
<?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
|
||||
<?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
|
||||
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
|
||||
<tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
|
||||
<th><?php echo esc_html( $tax->label ); ?></th>
|
||||
|
|
|
@ -12,7 +12,7 @@ echo $email_heading . "\n\n";
|
|||
|
||||
echo sprintf( __( "Thanks for creating an account on %s. Your username is <strong>%s</strong>.", 'woocommerce' ), $blogname, $user_login ) . "\n\n";
|
||||
|
||||
if ( get_option( 'woocommerce_registration_generate_password' ) == 'yes' && $password_generated )
|
||||
if ( get_option( 'woocommerce_registration_generate_password' ) === 'yes' && $password_generated )
|
||||
echo sprintf( __( "Your password is <strong>%s</strong>.", 'woocommerce' ), $user_pass ) . "\n\n";
|
||||
|
||||
echo sprintf( __( 'You can access your account area to view your orders and change your password here: %s.', 'woocommerce' ), get_permalink( wc_get_page_id( 'myaccount' ) ) ) . "\n\n";
|
||||
|
|
|
@ -26,7 +26,7 @@ if ( 1 == $wp_query->found_posts || ! woocommerce_products_will_display() )
|
|||
'price-desc' => __( 'Sort by price: high to low', 'woocommerce' )
|
||||
) );
|
||||
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) == 'no' )
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' )
|
||||
unset( $catalog_orderby['rating'] );
|
||||
|
||||
foreach ( $catalog_orderby as $id => $name )
|
||||
|
|
|
@ -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;
|
||||
?>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ global $woocommerce;
|
|||
|
||||
$customer_id = get_current_user_id();
|
||||
|
||||
if ( get_option('woocommerce_ship_to_billing_address_only') == 'no' && get_option('woocommerce_calc_shipping') !== 'no' ) {
|
||||
if ( get_option( 'woocommerce_ship_to_billing_address_only' ) === 'no' && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) {
|
||||
$page_title = apply_filters( 'woocommerce_my_account_my_address_title', __( 'My Addresses', 'woocommerce' ) );
|
||||
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
|
||||
'billing' => __( 'Billing Address', 'woocommerce' ),
|
||||
|
|
|
@ -17,7 +17,7 @@ if ( ! comments_open() )
|
|||
<div id="reviews">
|
||||
<div id="comments">
|
||||
<h2><?php
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) == 'yes' && ( $count = $product->get_rating_count() ) )
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' && ( $count = $product->get_rating_count() ) )
|
||||
printf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), $count, get_the_title() );
|
||||
else
|
||||
_e( 'Reviews', 'woocommerce' );
|
||||
|
@ -43,7 +43,7 @@ if ( ! comments_open() )
|
|||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) == 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->id ) ) : ?>
|
||||
<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->id ) ) : ?>
|
||||
|
||||
<div id="review_form_wrapper">
|
||||
<div id="review_form">
|
||||
|
@ -66,7 +66,7 @@ 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'] = '<p class="comment-form-rating"><label for="rating">' . __( 'Your Rating', 'woocommerce' ) .'</label><select name="rating" id="rating">
|
||||
<option value="">' . __( 'Rate…', 'woocommerce' ) . '</option>
|
||||
<option value="5">' . __( 'Perfect', 'woocommerce' ) . '</option>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -38,7 +38,7 @@ $rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
|
|||
<p class="meta">
|
||||
<strong itemprop="author"><?php comment_author(); ?></strong> <?php
|
||||
|
||||
if ( get_option('woocommerce_review_rating_verification_label') == 'yes' )
|
||||
if ( get_option( 'woocommerce_review_rating_verification_label' ) === 'yes' )
|
||||
if ( wc_customer_bought_product( $comment->comment_author_email, $comment->user_id, $comment->comment_post_ID ) )
|
||||
echo '<em class="verified">(' . __( 'verified owner', 'woocommerce' ) . ')</em> ';
|
||||
|
||||
|
|
|
@ -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' ) ) {
|
||||
|
|
Loading…
Reference in New Issue