Skip to content

Instantly share code, notes, and snippets.

@MarkKevin08
Created January 11, 2024 12:55
Show Gist options
  • Save MarkKevin08/df71ff196a3082c023873bbf8f5b141f to your computer and use it in GitHub Desktop.
Save MarkKevin08/df71ff196a3082c023873bbf8f5b141f to your computer and use it in GitHub Desktop.
XT Quick View - Use dynamic product ID - Extend shortcode
function xt_qv_shortcode_extension() {
global $product;
$id = $product->get_id();
return do_shortcode( '[xt_wooqv_trigger id="' . $id . '"]');
}
add_shortcode( 'my_new_shortcode', 'xt_qv_shortcode_extension' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment