Forum Replies Created

Viewing 15 replies - 1 through 15 (of 26 total)
  • @matt-h-1 I appreciate the response. Thankfully, I had made a partial and complete backup of the sites before the change, so we only had a handful that couldn’t be recovered. In our case, we did modify the plugin to allow us to restrict custom-by-customer ability to add addresses, and for us to approve addresses before they are allowed to use them to checkout. So, I’m figuring that had a bearing on it the issues we faced. The upgrade created entries in the new format, but for some reason just made them mostly blank (would transfer one line). I’m going to do some further testing and will reach out with my results.

    We lost thousands of addresses when it upgraded. Might I suggest a process in cases like this, that doesn’t delete the old rows? It should be an option that allows you to remove those once you confirm your addresses have converted. In my case, on all three sites, it attempted to convert the addresses, but it failed – but it deleted all the old rows in the usermeta table. Thankfully I have just-in-time backups.

    • This reply was modified 1 year, 7 months ago by dwdonline.
    • This reply was modified 1 year, 7 months ago by dwdonline.

    This is a very serious issue. It removed the addresses on three sites where I use this plugin.

    Thread Starter dwdonline

    (@dwdonline)

    I have noticed that if I turn off the “rewrite media URL’s” in the latest release this query goes away. That’s the behavior I was looking for, so that resolves it for me.

    Thread Starter dwdonline

    (@dwdonline)

    Oh, I found the problem. I needed to change the setting in the Plugin settings. All good now!

    Does the plugin say it works with Wasabi? Have you reached out to them in the support? It seems to work well for what it says the plugin is made for – Amazon S3 and Digital Ocean Spaces. Seems a bit unfair to give a bad rating for something the plugin isn’t claimed to do, and when you’ve not even asked in the support threads.

    Thread Starter dwdonline

    (@dwdonline)

    It does seem to be better, but we are still getting a lot of queries to the database. It seems ACOOFM_ITEM->get() is running this for every imgage on the frontend:

    SELECT *
    FROM wp_acoofm_items
    WHERE source_id = 90439
    LIMIT 1

    Thread Starter dwdonline

    (@dwdonline)

    I’m seeing these types of queries run anytime a page on the frontend of the site is loaded:
    SELECT * FROM wp_acoofm_items WHERE source_id = 11613 LIMIT 1

    The site is https://eivape.com. Other than this issue, the plugin works great and we are looking forward to the pro version.

    Thread Starter dwdonline

    (@dwdonline)

    Hello,

    I’ve disabled all extensions except WooCommerce and Fluid Checkout. Tried with just the default Storefront theme as well as the Twenty-Twenty-Two theme.

    “Billing address same as the shipping address checked by default” is NOT checked.

    If checking out as a guest, it doesn’t default to “Same as shipping address.” However, if the customer is logged in, it seems to be checking that. Is this saving in a cookie maybe? It seems to be accounts that have previously checked that box.

    I would like to be able to disabled that function, and if they have clicked it before, for it to be removed.

    Philip

    • This reply was modified 2 years, 10 months ago by dwdonline.
    Thread Starter dwdonline

    (@dwdonline)

    Ok, after a bit more work, I’ve solved this and figured I would share it with others looking for the same solution. This code will hide other payment methods if their balance is higher than the available credit, and then show the payment methods again if their balance is lower than the cart total. I had to take into account the shipping, fees, taxes, and subtotal.

    if(!function_exists('dwd_woo_wallet_woocommerce_available_payment_gateways')){
        function dwd_woo_wallet_woocommerce_available_payment_gateways($availableGateways){
    		$customerWallet = woo_wallet()->wallet->get_wallet_balance('', 'edit');
    		$customerCartTotal = WC()->cart->subtotal;
    
    		$chosenMethods = WC()->session->get( 'chosen_shipping_methods' );
    		$chosenPaymentMethod = WC()->session->get( 'chosen_payment_method' );
    		$chosenShipping = $chosenMethods[0];
    
    		$shippingCost = number_format(WC()->cart->shipping_total, 2, '.', '');
    		$shippingCost = (float)$shippingCost;
    		
    		$cartFees = WC()->cart->get_fees();
    		
    		foreach ($cartFees as $cartFee => $feekKey) {
    			foreach ($feekKey as $feekKey => $feeData) {
    				if ($feekKey == 'total') {
    					if ($feeData > 0) {
    						$totalFee= $feeData;
    					}
    				}
    			}
    		}
    		
    		$cartTaxes = WC()->cart->get_taxes_total();
    					
    		if(!is_admin() && !is_wallet_rechargeable_cart() && (($customerCartTotal + $shippingCost + $totalFee + $cartTaxes) <= $customerWallet)){
    			foreach ($availableGateways as $id => $gateway){
    				if('wallet' != $id){
    					unset($availableGateways[$id]);
    				}
    			}
    		}
    
            return $availableGateways;
        }
    }
    add_filter('woocommerce_available_payment_gateways', 'dwd_woo_wallet_woocommerce_available_payment_gateways');
    Thread Starter dwdonline

    (@dwdonline)

    In the alternative, if we could hide all payment methods except check if they select the local pickup as the shipping.

    Thread Starter dwdonline

    (@dwdonline)

    @subratamal – I have the option checked to force them to use the wallet if their balance is less. But, I want customers to have to use the wallet if they have more funds in the wallet than the order total. Is there a way to do this?

    Thread Starter dwdonline

    (@dwdonline)

    I came up with the following code, but I still have an issue. It works, but if the customer selects a shipping method that costs more – and makes the order total more than the credit, it doesn’t work. I need to be able to make this code run again if the shipping amount is more.

    if(!function_exists('woocommerce_available_payment_gateways_callback')){
        function woocommerce_available_payment_gateways_callback($_available_gateways){
    		$customer_wallet = woo_wallet()->wallet->get_wallet_balance('', 'edit');
    		$customer_cart_total = WC()->cart->total;
            if(!is_admin() && !is_wallet_rechargeable_cart() && ($customer_cart_total <= $customer_wallet)){
                foreach ($_available_gateways as $id => $gateway){
                    if('wallet' != $id){
                        unset($_available_gateways[$id]);
                    }
                }
            }
            return $_available_gateways;
        }
    }
    add_filter('woocommerce_available_payment_gateways', 'woocommerce_available_payment_gateways_callback');
    
    Thread Starter dwdonline

    (@dwdonline)

    That fixed the layout on the 2.0.5

Viewing 15 replies - 1 through 15 (of 26 total)