elastikolab
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] I can’t make changes to the Menu in WordPressDisabling “Cache WP-Admin” in “Object cache” solve the issue on my site
I’m facing the issue too, i found a mistake in YcdGeneral.js (plugins/countdown-builder/assets/js/YcdGeneral.js) at the end of row 204 ( if (typeof YcdCountdownProFunctionality.checkProWooConditions != ‘function’) ) is missed a “{“
Adding the “{” solve the issueForum: Plugins
In reply to: [WooCommerce] Selling physical products with downloadable instructionsi just have 2 downloadable products and both have the same issue.
NB
Also have some Virtual/Downloadable products and work fine.I’m trying to paste the report here but nothing happen. You can see here: https://pastebin.com/sPBHqeBn
Thank youDone!
add_filter('woocommerce_available_payment_gateways', 'conditionally_disable_cod_payment_method', 10, 1); function conditionally_disable_cod_payment_method($available_gateways) { // Not in backend (admin) if (is_admin()) return $available_gateways; // Loop through cart items foreach (WC()->cart->get_cart() as $cart_item) { // If customization exist if (!empty($cart_item['wapf'])) { unset($available_gateways['cod']); break; // As "COD" is removed we stop the loop } } return $available_gateways; }I’m trying this code:
add_filter('woocommerce_available_payment_gateways', 'conditionally_disable_cod_payment_method', 10, 1); function conditionally_disable_cod_payment_method($available_gateways) { // Not in backend (admin) if (is_admin()) return $available_gateways; // Loop through cart items foreach (WC()->cart->get_cart() as $cart_item) { if (!empty($values['wapf'])) { unset($available_gateways['cod']); break; // As "COD" is removed we stop the loop } } return $available_gateways; }but didn’t work, i think the problem is in the condition “if (!empty($values[‘wapf’]))”. Can you suggest the value to check?
THXHi Maarten,
thank you for quick reply. I’m aware of that plugin but i’m looking for something more specific:
the COD must be disabled only if a product is customized (wich isn’t mandatory) and i think isn’t possible with “Conditional Payments”.
THX