From 114cbdd450ae5121eb11a3350157e2dab3255541 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 9 Feb 2016 23:26:22 +0000 Subject: [PATCH] Autoload tweaks --- includes/admin/settings/class-wc-settings-checkout.php | 3 +-- includes/admin/settings/class-wc-settings-products.php | 6 ++---- includes/class-wc-product-factory.php | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/includes/admin/settings/class-wc-settings-checkout.php b/includes/admin/settings/class-wc-settings-checkout.php index 45347c303b7..1570cc46ad5 100644 --- a/includes/admin/settings/class-wc-settings-checkout.php +++ b/includes/admin/settings/class-wc-settings-checkout.php @@ -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( diff --git a/includes/admin/settings/class-wc-settings-products.php b/includes/admin/settings/class-wc-settings-products.php index c965a261c5d..62e1597b191 100644 --- a/includes/admin/settings/class-wc-settings-products.php +++ b/includes/admin/settings/class-wc-settings-products.php @@ -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( diff --git a/includes/class-wc-product-factory.php b/includes/class-wc-product-factory.php index 8a2241e8772..d4f067ab772 100644 --- a/includes/class-wc-product-factory.php +++ b/includes/class-wc-product-factory.php @@ -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 ) {