Created
May 19, 2022 17:09
-
-
Save braddalton/e3862b9f783f805c8cbb6090dba066d7 to your computer and use it in GitHub Desktop.
PHP code to add content before your single product on the single product page https://wpsites.net/?p=109784
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
add_action( 'woocommerce_single_product_summary', 'hook_before_product', 2 ); | |
function hook_before_product() { | |
echo '<p class="before-product">' . get_post_meta( get_the_ID(), 'before_product', true ) . '</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment