Content of the page


All posts by realmag777

Update v.2.2.9/v.1.2.9

heap of small fixes added in currencies new field as ‘interes’ which allows to add some your interest to the currencies rates added possibility to set currencies as Public or as Private. In private mode currency not published in switchers and user cannot set it by link through ‘?currency=XXX’ new in-built module Statistic: enable it… read more

Using REST API with woocommerce currency switcher

From plugin version 2.2.9/1.2.9 appeared possibility to use in-built REST request to get site currencies data: wp-json/woocs/v3/currency Also WOOCS allows using its API create any custom REST requests, as an example below which allows to get all shop products prices in all its currencies (wp-json/woocs/v3/products/gbp): add_action(‘rest_api_init’, function () { //Example: wp-json/woocs/v3/products/eur/ register_rest_route(‘woocs/v3’, ‘/products/(?P<currency>.+)’, array( ‘methods’… read more

WooCommerce Composite Products

Plugin: in file wp-content\plugins\woocommerce-composite-products\includes\class-wc-cp-display.php add next code: $suffix=”; in file wp-content\plugins\woocommerce-composite-products\assets\js\frontend\add-to-cart-composite.js add next code: if (typeof woocs_current_currency != ‘undefined’ && typeof woocs_current_currency[‘rate’] != ‘undefined’) { price_data.base_price = price_data.base_price * woocs_current_currency[‘rate’]; price_data.base_regular_price = price_data.base_regular_price * woocs_current_currency[‘rate’]; composite_totals.price = composite_totals.price * woocs_current_currency[‘rate’]; composite_totals.regular_price = composite_totals.regular_price * woocs_current_currency[‘rate’]; }

Flexible Product Fields Pro (by

Plugin: in file \wp-content\plugins\flexible-product-fields\classes\fpf-product-fields.php add next code: if (class_exists(‘WOOCS’)) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $price = $WOOCS->woocs_exchange_value(floatval($price)); } } in file \wp-content\plugins\flexible-product-fields\classes\fpf-cart.php add next code: $cost = $cart_item[‘data’]->get_price() + $extra_cost; if (class_exists(‘WOOCS’)) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $currencies = $WOOCS->get_currencies(); $conversion_rate = $currencies[$WOOCS->current_currency][‘rate’]; $cost = $cost / $conversion_rate; } } $cart_item[‘data’]->set_price($cost); Please … read more

Finale Lite – Sales Countdown Timer & Discount for WooCommerce (by XLPlugins)

Plugin: in file  wp-content\plugins\finale-woocommerce-sales-countdown-timer-discount\includes\wcct-cart.php add next code: if (class_exists(‘WOOCS’)) { global $WOOCS; $currrent = $WOOCS->current_currency; if ($currrent != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $rate = $currencies[$currrent][‘rate’]; $price = $price / ($rate); } }

Wholesale Suite

Plugin: in file \wp-content\plugins\woocommerce-wholesale-prices\includes\class-wwp-wholesale-prices.php add next code: if (class_exists(‘WOOCS’)) { global $WOOCS; $currrent = $WOOCS->current_currency; if ($currrent != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $rate = $currencies[$currrent][‘rate’]; $wholesale_price = $wholesale_price / ($rate); } } if (class_exists(‘WOOCS’)) { global $WOOCS; $wholesale_price = $WOOCS->woocs_exchange_value($wholesale_price); }  


Plugin: in functions.php of your current wp theme add next code: add_action(‘woocommerce_order_status_completed’, ‘woocs_payment_complete’, 1); add_action(‘woocommerce_payment_complete’, ‘woocs_payment_complete’); function so_payment_complete($order_id) { if (class_exists(‘WOOCS’)) { global $WOOCS; $WOOCS->recalculate_order($order_id); } } add_filter(‘wp_head’, function() { if (is_page(‘dashboard’)) { if (class_exists(‘WOOCS’)) { global $WOOCS; $WOOCS->reset_currency(); } } });    

WooCommerce Points and Rewards (by WooCommerce)

Plugin: in file \plugins\woocommerce-points-and-rewards\includes\class-wc-points-rewards-manager.php add next code: if (class_exists(‘WOOCS’)) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $currrent = $WOOCS->current_currency; if ($currrent != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $rate = $currencies[$currrent][‘rate’]; $amount = $amount / ($rate); } } } if (class_exists(‘WOOCS’)) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $currrent = $WOOCS->current_currency; if ($currrent != $WOOCS->default_currency) { $currencies… read more

How remove or hide special WOOCS data in orders

WOOCS keeps special meta data of orders in data base which can be in different currencies. So after plugin removing this data can be visible. But different cases happens, and this valuable data can be uninstall wrongly, so code below doesn included in uninstall.php. You can remove data completely, but we recommend hide this data…. read more