Autoload tweaks

This commit is contained in:
Mike Jolley 2016-02-09 23:26:22 +00:00
parent 854bc5d744
commit 114cbdd450
3 changed files with 4 additions and 7 deletions

View File

@ -78,8 +78,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
'desc_tip' => __( 'Coupons can be applied from the cart and checkout pages.', 'woocommerce' ),
'autoload' => false,
'desc_tip' => __( 'Coupons can be applied from the cart and checkout pages.', 'woocommerce' )
),
array(

View File

@ -323,8 +323,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'min' => 0,
'step' => 1
),
'default' => '0',
'autoload' => false
'default' => '0'
),
array(
@ -473,8 +472,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
'show_if_checked' => 'option',
'autoload' => false
'show_if_checked' => 'option'
),
array(

View File

@ -63,7 +63,7 @@ class WC_Product_Factory {
if ( isset( $args['product_type'] ) ) {
$product_type = $args['product_type'];
} else {
$terms = get_the_terms( $product_id, 'product_type' );
$terms = get_the_terms( $the_product, 'product_type' );
$product_type = ! empty( $terms ) ? sanitize_title( current( $terms )->name ) : 'simple';
}
} elseif( 'product_variation' === $post_type ) {