Fix deprecated product accessor for WC 3.0

Uses new CRUD method
This commit is contained in:
Will G 2017-04-29 15:47:05 -04:00 committed by GitHub
parent 229627ca8b
commit fb8b1eedbb
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ echo apply_filters( 'woocommerce_loop_add_to_cart_link',
sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="add_to_cart_button ajax_add_to_cart btn btn-outline-primary btn-block">%s</a>', sprintf( '<a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="add_to_cart_button ajax_add_to_cart btn btn-outline-primary btn-block">%s</a>',
esc_url( $product->add_to_cart_url() ), esc_url( $product->add_to_cart_url() ),
esc_attr( isset( $quantity ) ? $quantity : 1 ), esc_attr( isset( $quantity ) ? $quantity : 1 ),
esc_attr( $product->id ), esc_attr( $product->get_id() ),
esc_attr( $product->get_sku() ), esc_attr( $product->get_sku() ),
esc_html( $product->add_to_cart_text() ) esc_html( $product->add_to_cart_text() )
), ),