This hook is for shortcode [woocs_price] and allows to manipulate by the price displayed by the shortcode on the fly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | //[woocs_price] from v.2.3.3/1.3.3 public function woocs_price_shortcode($args) { $price = ""; $product_o = null; if (empty($args)) { $args = array(); } if (!isset($args['id']) AND is_product()) { global $product; $product_o = $product; } elseif ($args['id']) { $product_o = wc_get_product($args['id']); } if (is_object($product_o) AND method_exists($product_o, 'get_price_html')) { $price = $product_o->get_price_html(); } return apply_filters('woocs_price_shortcode', $price, $product_o); } |
From v.2.3.3/1.3.3
