Call WooCommerce Product
-
Hi!
I am trying to write a PHP Snippet with the following code in it:
global $product;
$sku = $product->get_sku();Now, it seems I can’t activate that and it says to me:
Snippet not activated, the following error was encountered: Call to a member function get_sku() on null
Now, I got it working and activated at some point… and then it stopped. Ideas?
I want to add this snippet in a UX Block that I then call in UX Builder… other workarounds?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Call WooCommerce Product’ is closed to new replies.