Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

Hide cash on delievery for orders over certain amount of money in woocommerce

You can use the woocommerce_available_payment_gateways hook to edit woocommerce gateways.

'woocommerce_available_payment_gateways' ,
'change_payment_gateway', 20, 1);

 * remove cod gateway if cart total > 100
 * @param $gateways
 * @return mixed
function change_payment_gateway( $gateways ){
    // Compare cart subtotal (without shipment
    if( WC()->cart->subtotal > 100 ){
         // then unset the 'cod' key (cod is the
unique id of COD Gateway)
         unset( $gateways['cod'] );
    return $gateways;

Categories : PHP

Related to : Hide cash on delievery for orders over certain amount of money in woocommerce
Better way to Format Input Money editText
Try DecimalFormat class myFormatter = new DecimalFormat("###,###.###"); editText.setText(myFormatter.format(value)); For more info about format patterns you could visit

Categories : Android
Verified by Visa on orders over $100
I don't think you have to create another payment method for this. Since I didn't see your code. So I can tell the logic only. Just disable minimum order. So we can place all order using this payment method. And add simple logic in your code that verify the order by VISA only if order is greater than $100 or as per you want. Like, <?php $quote = Mage::getModel('checkout/session')->getQuote(

Categories : Magento
No money deducted from Recurring Payment Profile on Sandbox
From your sandbox transaction history, is this transaction marked as 'Created' or 'Completed'? If it is 'Created', which means the recurring did not occur. The reason might be that your starting date is not good. Try to set your starting date like 1 hour after the creation time

Categories : Paypal
SQL how to show list of people with no orders
Does this work? select c.NCLI, c.NOM from CLIENT c where c.LOCALITE = 'Namur' and c.NCLI NOT IN (select NCLI from COMMANDE)

Categories : Misc
using subqueries on example (find all orders from the customer with condition)
try SELECT custid, orderid FROM sales.orders WHERE custid = (SELECT TOP 1 custid FROM sales.orders GROUP BY custid ORDER BY Count(*) DESC)

Categories : SQL
Recently Add
Cartesian product of associative array showing key and value - PHP
Datamapper orm save and update not working
find methods in COM object
PHP Keyword search not working with multiple words
Set a total based on items ordered, two types, and sometimes one type will not be ordered.
FB request to join a group, going around their official SDK
Using Google charts with php data?
OAuth2 integration with ExactOnline
libvirt-php receives the error: unable to connect to server Permission denied
How to echo results by sets of 2?
Why does PHP's sprintf not round 5s reliably?
php replace affects on replaced string
PHP Find and replace multiple similar entries
Replace PHP date output with pre-made images
How to install Laravel 4 packages on Windows
Using updateOrCreate for multiple data insert in Laravel
Storing products in a MYSQL database and then search and filter them?
Create order with PrestaShop's API
how to get latest messages from all users
Yii CMultiFileUpload Restrict Image width
Combine array by key factor
Semicolon after if condition in PHP - code still works
Get date using day of the week
soap web service with symfony
Seasonal Reservation system Day/month
is it possible to join a single table it self?
Attempting to compare two arrays PHP
Sticky Select Option
Eventbrite duplicate event entry
Pagination Not Working on custom post type in Wordpress
© Copyright 2017 Publishing Limited. All rights reserved.