在WooCommerce产品页面中,我试图将当前产品添加为新的用户元数据。我做得对吗?
那么如何在购物车页面中检索这个产品元数据呢?
// save for later
public function save_for_later(){
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
global $woocommerce;
// get user details
global $current_user;
get_currentuserinf
有什么方法可以从自定义产品字段中添加内容到“已完成的”WooCommerce电子邮件中?
我将此代码添加到我的functions.php中,以便将我的自定义字段保存到产品元信息中。
//1.1 Display Activation Instructions field in admin
add_action('woocommerce_product_options_inventory_product_data', 'woocommerce_product_act_fields');
function woocommerce_product_act_fields(