Created
May 18, 2024 11:11
-
-
Save tdmrhn/b863f349a2ced15f844400071bfb3933 to your computer and use it in GitHub Desktop.
Woo Get Product description from ACF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product_id = get_field('your_acf_field_name'); | |
if ($product_id) { | |
$product = wc_get_product($product_id); | |
if ($product) { | |
$product_description = $product->get_description(); | |
echo $product_description; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment