alkateb
Forum Replies Created
-
Forum: Plugins
In reply to: [Food Store - Online Food Delivery & Pickup] Cannot translate addonsMy mistake, I reviewed WPML settings and I found that by default this taxonomy is set to “Not translatable”
Forum: Plugins
In reply to: [Wallet for WooCommerce] current balance meta not updatingI switched to using
get_wallet_balance
and I already notice performance penaltiesI also have this issue, which is happening with orders I’m creating programatically:
https://drive.google.com/file/d/1DZak4W7gMBJbUz4-nKGtREhnG1niCpsj/view?usp=sharing
This product has a price of $0.1, and in TRY it should be around 0.74, as you can see! Rate is set to null, and the price charged was 0.1, which is not what the order currency is!
I’m using this code to place this order automatically:
$WOOCS->set_currency('TRY'); $address = array( 'first_name' => 'My name', 'last_name' => 'My last name', 'email' => '[email protected]', ); $order = wc_create_order(); $order->add_product(get_product($product_id)); $order->set_address( $address, 'billing' ); $payment_gateways = WC()->payment_gateways->payment_gateways(); $order->set_payment_method($payment_gateways['wallet']); $order->calculate_totals(); woo_wallet()->wallet->debit(826, $order->get_total(), 'For order #' . $order->id, $order->id); $order->set_customer_id(826); $order->update_status("wc-completed", $id, TRUE);
I’m using Terawallet, as mentioned above in the post, and no, this system does not support multiple currencies and it surely isn’t an issue with the payment system, because I’m not facing this issue with all the orders.
To make my question clearer, if I want to force a user to use a specific currency, am I completely covered when using set_currency, with the two hooks I’m using above?
wp_head AND woocommerce_checkout_create_order? Do these hooks cover all possible scenarios? I’m feeling there are instances?
Also, in some orders, the USD value for the product is used, while the order currency meta is set as TRY!
Forum: Plugins
In reply to: [Wallet for WooCommerce] Negative and miscalculated balance MAJOR ISSUEThanks, I just did
Thanks for the reply, I don’t understand why you’re pointing to the get_rate() function, I understand this gets rates from aggregator, I could in fact change the function to include my own code, and set it as the desired aggregator, but this function is not extendable as far as I can see, so this will be overwritten when the plugin is updated.
But after reading rate_auto_update, I can see the way the currency rate is updated is the same way I’m using above
update_option('woocs', $currencies)
so I guess I’m doing it right after allThanks for your time
This does not seem to update it in the database though, this is updating it in real time, I don’t want to call this every time the WordPress is loaded, I want to store it in the database, this will only be called on the next scheduled rate update. Or am I missing something?
Forum: Plugins
In reply to: [WooCommerce] Woocommerce API customer cannot list resourcesAm I the only one trying to do this?
Anyone?