Content of the page


All posts by realmag777

How to adapt woocommerce reports by date for currency switcher

WooCommerce Currency Switcher cant by default work with WooCommerce reports as there is no hooks there, and its not possible to plug-in there. But after some investigations of woocommerce code I found 1 way how to adapt reports for orders with different currencies (works only for Reports->Orders->”Sales by date”): open file wp-content\plugins\woocommerce\includes\admin\reports\class-wc-admin-report.php find there public… read more

Accepted PayPal currencies

Read actual info here: If the currency is omitted of the list, the default currency will be U.S. Dollars – so be care with adding currencies into woocommerce store as acceptable by PayPal – on PayPal checkout page if currency is not acceptable amount will be the same but in USD!! Example: Customer decided to activate… read more

Switch currency with language change

WPML: open functions.php of your current wp theme drop there next PHP code:

See WPML docs about languages codes Polylang: open functions.php of your current wp theme drop there next PHP code: See Polylang docs about languages codes    

How to force any currency on the checkout page

Sometimes its necessary force on checkout page any currency by logic of business. open functions.php of the current wp theme and drop there next script:

Change ‘USD’ to any currency you need … Notice: works only when “Is multiple allowed” option is enabled (Yes).  

How to to display the text “Call for Price” when the price is 0 or blank

Next code will do the job:


How to get GEO IP data about the user on the site

Use the next WooCommerce code:

You can then do: print_r($pd) and see all info which are provided by WooCommerce GEO IP functionality Or you can simply get country code by: (GEO IP should be enabled in WOOCS)

For example:

Use Alpha-2 code for countries: Read also:  

How to round prices to 500

open index.php of the plugin find public function raw_woocommerce_price($price) on the same end of this function replace:


  Also you can try to use this hook: