Autoload tweaks
This commit is contained in:
parent
854bc5d744
commit
114cbdd450
|
@ -78,8 +78,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'start',
|
'checkboxgroup' => 'start',
|
||||||
'desc_tip' => __( 'Coupons can be applied from the cart and checkout pages.', 'woocommerce' ),
|
'desc_tip' => __( 'Coupons can be applied from the cart and checkout pages.', 'woocommerce' )
|
||||||
'autoload' => false,
|
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -323,8 +323,7 @@ class WC_Settings_Products extends WC_Settings_Page {
|
||||||
'min' => 0,
|
'min' => 0,
|
||||||
'step' => 1
|
'step' => 1
|
||||||
),
|
),
|
||||||
'default' => '0',
|
'default' => '0'
|
||||||
'autoload' => false
|
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
|
@ -473,8 +472,7 @@ class WC_Settings_Products extends WC_Settings_Page {
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'start',
|
'checkboxgroup' => 'start',
|
||||||
'show_if_checked' => 'option',
|
'show_if_checked' => 'option'
|
||||||
'autoload' => false
|
|
||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -63,7 +63,7 @@ class WC_Product_Factory {
|
||||||
if ( isset( $args['product_type'] ) ) {
|
if ( isset( $args['product_type'] ) ) {
|
||||||
$product_type = $args['product_type'];
|
$product_type = $args['product_type'];
|
||||||
} else {
|
} 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';
|
$product_type = ! empty( $terms ) ? sanitize_title( current( $terms )->name ) : 'simple';
|
||||||
}
|
}
|
||||||
} elseif( 'product_variation' === $post_type ) {
|
} elseif( 'product_variation' === $post_type ) {
|
||||||
|
|
Loading…
Reference in New Issue