我使用的是基于Add a custom multi-select field to admin product options settings in Woocommerce生成的代码 // Display a multiselect field in "Linked Products" section
add_action( 'woocommerce_product_options_related', 'display_handles_product_field' );
function display_handles_product_fie
此功能允许我显示演示Url在单一产品页面前购物车按钮。但是我想用一个短代码在其他地方显示它。请帮我-
以下是代码:
/**
* Show a Live Demo button on a single product page
*/
function isa_before_add_to_cart_form() {
global $product;
$url = get_post_meta( $product->get_id(), '_isa_wc_product_demo_url', true );
if ( $url ) {
ech