Fixes from .14
This commit is contained in:
parent
bfc2b52d10
commit
14e27bb073
|
@ -186,7 +186,8 @@ abstract class WC_Settings_API {
|
|||
|
||||
$html = '';
|
||||
foreach ( $form_fields as $k => $v ) {
|
||||
if ( ! isset( $v['type'] ) || ( $v['type'] == '' ) ) { $v['type'] == 'text'; } // Default to "text" field type.
|
||||
if ( ! isset( $v['type'] ) || ( $v['type'] == '' ) )
|
||||
$v['type'] = 'text'; // Default to "text" field type.
|
||||
|
||||
if ( method_exists( $this, 'generate_' . $v['type'] . '_html' ) ) {
|
||||
$html .= $this->{'generate_' . $v['type'] . '_html'}( $k, $v );
|
||||
|
@ -645,7 +646,7 @@ abstract class WC_Settings_API {
|
|||
|
||||
foreach ( $form_fields as $k => $v ) {
|
||||
if ( empty( $v['type'] ) )
|
||||
$v['type'] == 'text'; // Default to "text" field type.
|
||||
$v['type'] = 'text'; // Default to "text" field type.
|
||||
|
||||
if ( method_exists( $this, 'validate_' . $v['type'] . '_field' ) ) {
|
||||
$field = $this->{'validate_' . $v['type'] . '_field'}( $k );
|
||||
|
|
|
@ -271,7 +271,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
$image = get_the_post_thumbnail( $this->variation_id, $size, $attr );
|
||||
} elseif ( has_post_thumbnail( $this->id ) ) {
|
||||
$image = get_the_post_thumbnail( $this->id, $size, $attr );
|
||||
} elseif ( $parent_id = wp_get_post_parent_id( $this->id ) && has_post_thumbnail( $parent_id ) ) {
|
||||
} elseif ( ( $parent_id = wp_get_post_parent_id( $this->id ) ) && has_post_thumbnail( $parent_id ) ) {
|
||||
$image = get_the_post_thumbnail( $parent_id, $size , $attr);
|
||||
} else {
|
||||
$image = woocommerce_placeholder_img( $size );
|
||||
|
|
|
@ -560,7 +560,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
|
|||
|
||||
// Remove row
|
||||
jQuery('#<?php echo $this->id; ?>_flat_rates').on( 'click', 'a.remove', function(){
|
||||
var answer = confirm("<?php _e( 'Delete the selected rates?', 'woocommerce' ); ?>")
|
||||
var answer = confirm("<?php _e( 'Delete the selected rates?', 'woocommerce' ); ?>");
|
||||
if (answer) {
|
||||
jQuery('#<?php echo $this->id; ?>_flat_rates table tbody tr th.check-column input:checked').each(function(i, el){
|
||||
jQuery(el).closest('tr').remove();
|
||||
|
|
|
@ -82,7 +82,9 @@ class WC_Widget_Recent_Reviews extends WC_Widget {
|
|||
|
||||
echo $rating_html;
|
||||
|
||||
printf( '<span class="reviewer">' . _x( 'by %1$s', 'by comment author', 'woocommerce' ), get_comment_author() ) . '</span></li>';
|
||||
printf( '<span class="reviewer">' . _x( 'by %1$s', 'by comment author', 'woocommerce' ) . '</span>', get_comment_author() );
|
||||
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
|
Loading…
Reference in New Issue