Merge branch 'master' into integrate-cart-sessions-class

This commit is contained in:
Mike Jolley 2017-08-18 16:37:25 +01:00
commit 313a797f23
3 changed files with 13 additions and 10 deletions

View File

@ -101,7 +101,10 @@ if ( wc_tax_enabled() ) {
</table>
</div>
<div class="wc-order-data-row wc-order-item-bulk-edit" style="display:none;">
<button type="button" class="button bulk-delete-items"><?php _e( 'Delete selected row(s)', 'woocommerce' ); ?></button>
<?php if ( $order->is_editable() ) : ?>
<button type="button" class="button bulk-delete-items"><?php _e( 'Delete selected row(s)', 'woocommerce' ); ?></button>
<?php endif; ?>
<button type="button" class="button bulk-decrease-stock"><?php _e( 'Reduce stock', 'woocommerce' ); ?></button>
<button type="button" class="button bulk-increase-stock"><?php _e( 'Increase stock', 'woocommerce' ); ?></button>
<?php do_action( 'woocommerce_admin_order_item_bulk_actions', $order ); ?>

View File

@ -367,7 +367,7 @@ class WC_AJAX {
do_action( 'woocommerce_ajax_added_to_cart', $product_id );
if ( get_option( 'woocommerce_cart_redirect_after_add' ) == 'yes' ) {
if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
wc_add_to_cart_message( array( $product_id => $quantity ), true );
}

View File

@ -73,21 +73,21 @@ class WC_Autoloader {
$file = $this->get_file_name_from_class( $class );
$path = '';
if ( strpos( $class, 'wc_addons_gateway_' ) === 0 ) {
if ( 0 === strpos( $class, 'wc_addons_gateway_' ) ) {
$path = $this->include_path . 'gateways/' . substr( str_replace( '_', '-', $class ), 18 ) . '/';
} elseif ( strpos( $class, 'wc_gateway_' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_gateway_' ) ) {
$path = $this->include_path . 'gateways/' . substr( str_replace( '_', '-', $class ), 11 ) . '/';
} elseif ( strpos( $class, 'wc_shipping_' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_shipping_' ) ) {
$path = $this->include_path . 'shipping/' . substr( str_replace( '_', '-', $class ), 12 ) . '/';
} elseif ( strpos( $class, 'wc_shortcode_' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_shortcode_' ) ) {
$path = $this->include_path . 'shortcodes/';
} elseif ( strpos( $class, 'wc_meta_box' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_meta_box' ) ) {
$path = $this->include_path . 'admin/meta-boxes/';
} elseif ( strpos( $class, 'wc_admin' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_admin' ) ) {
$path = $this->include_path . 'admin/';
} elseif ( strpos( $class, 'wc_payment_token_' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_payment_token_' ) ) {
$path = $this->include_path . 'payment-tokens/';
} elseif ( strpos( $class, 'wc_log_handler_' ) === 0 ) {
} elseif ( 0 === strpos( $class, 'wc_log_handler_' ) ) {
$path = $this->include_path . 'log-handlers/';
}