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',
|
||||
'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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue