i am working on simple feature: quantity change -> total price update on a single page. Solution provided here:
Works almost as i want except it doesnt work for variation products with a woocs plugin(currency switcher) installed altogether. I was trying to find out how woocs plugin get's price and only found this lines of code:
$customer_price_format = get_option('woocs_customer_price_format', '__PRICE__');
Digging into that part and searching for woocs_customer_price_format gave me no positive results. Why would i need this price ? Because getting price with $product->get_price() - gets wrong price from price variations.
Only solution (actually its bad) i found is to regexp price from a field that woocs plugin is setting on product page. But that's a problem for me, because i don't know how to run code AFTER woocs plugin loaded.
Tried do_action('wp_loaded|plugins_loaded|after_cart_etc_all_hooks'), but for some time div with woocs plugin classname is undefined.
Is there an action to fire after all plugins loaded in woocommerce ?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744765828a4592453.html
评论列表(0条)