Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created May 19, 2022 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/a8dc702b2526627bf85be6c809b386ee to your computer and use it in GitHub Desktop.
Save braddalton/a8dc702b2526627bf85be6c809b386ee to your computer and use it in GitHub Desktop.
PHP code to add content after your single product on the single product page
add_action( 'woocommerce_product_meta_end', 'hook_after_product', 22 );
function hook_after_product() {
echo '<p class="after-product">' . get_post_meta( get_the_ID(), 'after_product', true ) . '</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment