Untitled
webwizards
plain_text
3 months ago
569 B
11
Indexable
function get_b2bking_group_price($user_id, $product_id){
$groupid = get_user_meta($user_id, 'b2bking_customergroup', true);
$product_price = get_post_meta($product_id,'b2bking_regular_product_price_group_'.$groupid, true);
if (empty($product_price)){
$product_price = get_post_meta($product_id,'_regular_price', true);
}
if( $product->is_on_sale() ) {
$product_price = get_post_meta($product_id,'b2bking_sale_product_price_group_'.$groupid, true);
if (empty($product_price)){
$product_price = get_post_meta($product_id,'_sale_price', true);
}
}
}Editor is loading...
Leave a Comment