Changeset 1748006
- Timestamp:
- 10/17/2017 02:36:13 PM (8 years ago)
- File:
-
- 1 edited
-
woo-ea/tags/1.0.2/earnbox-for-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-ea/tags/1.0.2/earnbox-for-woocommerce.php
r1747812 r1748006 534 534 535 535 function wc_earnbox_email_instructions( $order, $sent_to_admin ) { 536 $earnboxSettings = WC_Admin_Settings::get_option( 'woocommerce_earnbox_settings' ); 537 $earnbox_enabled = $earnboxSettings['enabled']; 538 if ($earnbox_enabled == "no") return; 536 539 537 540 // If EarnBox coupon was used, don't generate cashback. 538 541 foreach( $order->get_used_coupons() as $coupon) { 539 if ($coupon == "earnbox discount") { 542 $coupon_used = strrpos($coupon, "earnbox discount"); 543 if ($coupon_used == 0 || $coupon_used != false) { 540 544 return false; 541 545 } … … 543 547 544 548 if ( ! $sent_to_admin && $order->get_status() == 'completed' && $order->get_payment_method() != "earnbox" && $order->get_payment_method() != "cod" ) { 549 error_log("Generate cashback", 0); 545 550 echo "<h3>Claim Your Cashback:</h3>"; 546 $earnboxSettings = WC_Admin_Settings::get_option( 'woocommerce_earnbox_settings' ); 551 547 552 array_shift($earnboxSettings); 548 553 $secret = $earnboxSettings['secret'];
Note: See TracChangeset
for help on using the changeset viewer.