Woocommerce 3.6.1 updates
This commit is contained in:
parent
89f250974d
commit
1fe315cfa2
|
@ -11,9 +11,8 @@
|
|||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -36,7 +35,7 @@ if ( is_user_logged_in() ) {
|
|||
<input type="text" class="input-text form-control" name="username" id="username" autocomplete="username" />
|
||||
</p>
|
||||
<p class="form-row form-row-last">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input class="input-text form-control" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
@ -44,12 +43,13 @@ if ( is_user_logged_in() ) {
|
|||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>"><?php esc_html_e( 'Login', 'understrap' ); ?></button>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ) ?>" />
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'understrap' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ) ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>"><?php esc_html_e( 'Login', 'understrap' ); ?></button>
|
||||
|
||||
</p>
|
||||
<p class="lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'understrap' ); ?></a>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.4.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -25,10 +25,10 @@ if ( $max_value && $min_value === $max_value ) {
|
|||
<?php
|
||||
} else {
|
||||
/* translators: %s: Quantity. */
|
||||
$labelledby = ! empty( $args['product_name'] ) ? sprintf( __( '%s quantity', 'understrap' ), strip_tags( $args['product_name'] ) ) : '';
|
||||
$label = ! empty( $args['product_name'] ) ? sprintf( __( '%s quantity', 'understrap' ), wp_strip_all_tags( $args['product_name'] ) ) : __( 'Quantity', 'understrap' );
|
||||
?>
|
||||
<div class="quantity">
|
||||
<label class="sr-only" for="<?php echo esc_attr( $input_id ); ?>"><?php esc_html_e( 'Quantity', 'understrap' ); ?></label>
|
||||
<label class="sr-only" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $label ); ?></label>
|
||||
<input
|
||||
type="number"
|
||||
id="<?php echo esc_attr( $input_id ); ?>"
|
||||
|
@ -40,9 +40,7 @@ if ( $max_value && $min_value === $max_value ) {
|
|||
value="<?php echo esc_attr( $input_value ); ?>"
|
||||
title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'understrap' ); ?>"
|
||||
size="4"
|
||||
pattern="<?php echo esc_attr( $pattern ); ?>"
|
||||
inputmode="<?php echo esc_attr( $inputmode ); ?>"
|
||||
aria-labelledby="<?php echo esc_attr( $labelledby ); ?>" />
|
||||
inputmode="<?php echo esc_attr( $inputmode ); ?>" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -22,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
?>
|
||||
<form class="woocommerce-ordering" method="get">
|
||||
<select name="orderby" class="orderby custom-select">
|
||||
<select name="orderby" class="orderby custom-select" aria-label="<?php esc_attr_e( 'Shop order', 'understrap' ); ?>">
|
||||
<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
|
||||
<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.4.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -35,9 +35,6 @@ do_action( 'woocommerce_before_edit_account_address_form' ); ?>
|
|||
<div class="woocommerce-address-fields__field-wrapper">
|
||||
<?php
|
||||
foreach ( $address as $key => $field ) {
|
||||
if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) {
|
||||
$field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] );
|
||||
}
|
||||
woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.5.1
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_enable_myaccount_registration' ) === 'yes' ) : ?>
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
<div class="u-columns col2-set row" id="customer_login">
|
||||
|
||||
|
@ -47,11 +47,12 @@ do_action( 'woocommerce_before_customer_login_form' ); ?>
|
|||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Log in', 'understrap' ); ?>"><?php esc_html_e( 'Log in', 'understrap' ); ?></button>
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'understrap' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Log in', 'understrap' ); ?>"><?php esc_html_e( 'Log in', 'understrap' ); ?></button>
|
||||
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'understrap' ); ?></a>
|
||||
|
@ -61,7 +62,8 @@ do_action( 'woocommerce_before_customer_login_form' ); ?>
|
|||
|
||||
</form>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_enable_myaccount_registration' ) === 'yes' ) : ?>
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -94,6 +96,10 @@ do_action( 'woocommerce_before_customer_login_form' ); ?>
|
|||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" autocomplete="new-password" />
|
||||
</p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'A password will be sent to your email address.', 'understrap' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form' ); ?>
|
||||
|
|
|
@ -11,18 +11,17 @@
|
|||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.1.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
if ( 'no' === get_option( 'woocommerce_enable_review_rating' ) ) {
|
||||
if ( ! wc_review_ratings_enabled() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -33,8 +32,12 @@ $average = $product->get_average_rating();
|
|||
if ( $rating_count > 0 ) : ?>
|
||||
|
||||
<div class="woocommerce-product-rating">
|
||||
<?php echo wc_get_rating_html( $average, $rating_count ); ?>
|
||||
<?php if ( comments_open() ) : ?><a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'understrap' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a><?php endif ?>
|
||||
<?php echo wc_get_rating_html( $average, $rating_count ); // WPCS: XSS ok. ?>
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php //phpcs:disable ?>
|
||||
<a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'understrap' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a>
|
||||
<?php // phpcs:enable ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
Reference in New Issue