WOOCS - WooCommerce Currency Switcher

woocs_price_shortcode

This hook is for shortcode [woocs_price] and allows to manipulate by the price displayed by the shortcode on the fly.

    //[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