I have Wordpress Multisite installed with WooCommerce network activated. I want to add an action to a hook in ONE of the sites that has WooCommerce installed, instead of all of them.
For example, I only want this action that adds specific meta data to the order to occur on one of the sites with WooCommerce installed.
add_action('woocommerce_checkout_update_order_meta', 'new_meta_values'), 2);
function new_meta_values($order_id) {
$order = new WC_Order($order_id);
$items = $order->get_items();
foreach($items as $k => $v){
$item_id = $k;
woocommerce_add_order_item_meta( $item_id, '_seminar_members_', $data);
}
}
Is this possible?