Content of the page


Allows to manipulate with currencies before showing their drop-downs on the front, example: add_filter(‘woocs_currency_manipulation_before_show’, function($currencies) { $any_conditions = true; if ($any_conditions) { unset($currencies[‘RUB’]); unset($currencies[‘GBP’]); } return $currencies; }); Structure of the data in variable $currencies in the example above is: Array ( [USD] => Array ( [name] => USD [rate] => 1 [symbol] => $… read more


Hook for fixed prices. Need for compatibility with other plugins, for example:    


Allows to cut from cart and checkout page ‘format of price’ provided by ‘Custom price format’ plugin option. By default return TRUE, but its possible return FALSE add_action( ‘woocs_cut_cart_price_format’, function(){ return FALSE; });    


Allows to change WOOCS form method from POST to GET add_action( ‘woocs_form_method’, function(){ return ‘get’; }); From 2.2.0/1.20  


Works in index.php -> public function woocommerce_variation_prices -> can be used for any manipulations with variable prices, for example rounding of them. Add next code in functions.php of your current wp theme: Example: add_filter(‘woocs_woocommerce_variation_prices’, function($price) { return round($price * 2, 0) / 2; });      


The hook is applied in file wp-content\plugins\woocommerce-currency-switcher\views\shortcodes\woocs.php for the text manipulation in the switchers drop-down. Example: add_filter(‘woocs_currname_in_option’, function($currency_name){ //return “Hello ” . $currency_name . ‘!!’; return “”; }); Use it by your own logic. Customer request: How can i make sure that there is only a currency symbol in the dropdown without editing the plugin files,… read more


This hook allows to manipulate by currency on the checkout page if in tab Advanced enabled “Checkout by GeoIP rules” option. If “Checkout by GeoIP rules” is enabled and country not described in GEO-IP rules checkout will be done with currency selected by user. Using this hook its possible to change this situation: add_action(‘woocs_force_pay_bygeoip_rules’, function($country,… read more


Use this hook to manipulate by price values, for example rounding price by your own logic. Examples: – rounding price to the nearest 50 cents add_filter(‘woocs_raw_woocommerce_price’, function($price) { return round($price * 2, 0) / 2; }); – How to round prices to 500 add_filter(‘woocs_raw_woocommerce_price’, function($price) { if (($price <= 1000)) { $price = round($price /… read more


Use this hook when you activated ‘Show approx. amount’ option in the plugin settings and you want to change default text on the cart/checkout page generated by this feature ‘(Approx. %s)’ to smth another. Example: add_filter(‘woocs_get_approximate_amount_text’, ‘my_woocs_get_approximate_amount_text’, 999, 2); function my_woocs_get_approximate_amount_text($text, $wc_price) { return sprintf(__(‘(My Approx. %s)’), $wc_price); } $text (string) $wc_price (string) ‘Show approx. amount’  -… read more


Use this hook if you want to add any additional information text after a product price on the shop/category page. Example: add_filter(‘woocs_price_html_tail’, function($price_html) { return $price_html . “<strong>Hello World!</strong>”; }); Combine it with CSS (in style.css) code if necessary: .woocs_price_html_tail{ display: none; } body.single-product .woocs_price_html_tail{ display: block; } body.single-product .related .woocs_price_html_tail{ display: none; }