From fb8b1eedbb96be23c4207faf1011cf8f1b03e7bc Mon Sep 17 00:00:00 2001 From: Will G Date: Sat, 29 Apr 2017 15:47:05 -0400 Subject: [PATCH] Fix deprecated product accessor for WC 3.0 Uses new CRUD method --- woocommerce/loop/add-to-cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woocommerce/loop/add-to-cart.php b/woocommerce/loop/add-to-cart.php index f8b12e1..4b1dc60 100644 --- a/woocommerce/loop/add-to-cart.php +++ b/woocommerce/loop/add-to-cart.php @@ -26,7 +26,7 @@ echo apply_filters( 'woocommerce_loop_add_to_cart_link', sprintf( '%s', esc_url( $product->add_to_cart_url() ), esc_attr( isset( $quantity ) ? $quantity : 1 ), - esc_attr( $product->id ), + esc_attr( $product->get_id() ), esc_attr( $product->get_sku() ), esc_html( $product->add_to_cart_text() ) ),