Deprecated: get_product is deprecated since version 3.0!
-
Can you please look into this for me?
global $product; $product = wc_get_product(get_the_ID()); if ( $product->is_type( 'simple' ) ) { echo get_woocommerce_currency_symbol(); echo "<a href='".$product->add_to_cart_url()."'><button id='simple_add_to_cart'>add to cart</button></a>";
I’m using wc_get_product, right? I can’t seem to get this error off.
Yes, debug option is on.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Deprecated: get_product is deprecated since version 3.0!’ is closed to new replies.