Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › B2B Price problem › Reply To: B2B Price problem
Hi,
Thank you!
“We have the snippet above to get price programatically..”
Do you have a link to that snippet? If there is a function or anything we could use, it may help. The results are not a shop page indeed, so I am guessing they are running hooks on the shop page related hooks.
The plugin uses the regular WooCommerce functions. In short the price is requested as:
$p = wc_get_product( $id );
$price = $p->get_price();
$price = wc_price($price);
I believe there is a hook within the get_price() (via the get_prop() inherited method) as well as the wc_price() function.
If they don’t have any custom code to get the price via the product ID, then maybe a hook to apply on these core WooCommerce hooks? That could also work. Please let me know 🙂