samina04
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Coupons Minimum/Maximum SpendOkay, so is this safe to use –
add_filter(‘woocommerce_coupon_is_valid’, ‘custom_check_cart_amount_for_coupon’, 10, 2);
function custom_check_cart_amount_for_coupon($valid, $coupon) {
if (!$valid) {
return $valid; /
}
$min_spend = $coupon->get_minimum_amount();
$max_spend = $coupon->get_maximum_amount();
$cart_total = WC()->cart->get_subtotal();
if (!empty($min_spend) && $cart_total < $min_spend) {
wc_add_notice(sprintf(__('The minimum spend for this coupon is %s.', 'woocommerce'), wc_price($min_spend)), 'error');
return false;
}
if (!empty($max_spend) && $cart_total > $max_spend) {
wc_add_notice(sprintf(__('The maximum spend for this coupon is %s.', 'woocommerce'), wc_price($max_spend)), 'error');
return false;
}
return $valid;}
Forum: Themes and Templates
In reply to: [GeneratePress] Elements disappearing when using ajaxHi,
i am using Gp premium plugin and i have “elements” activated. I am using after_shop_loop_item_title hook – https://ibb.co/k5J8dd0 , and i have set the conditions to “entire site”
to display them here in the shop – https://imgbb.com/JRrzjp6Forum: Plugins
In reply to: [WooCommerce] postmeta cleanupHello, thank you for the response.
So i can just delete them without doing anything to wc? I am going to use an sql query to delete the meta data.
My products will be a lot more so these meta data will grow a lot. I am determine do delete anything that i am not using, in order everything to be optimized as much as possible.
What issues i can expect after deleting this data? Is it possible this data to not be written at all, since my products are changing at daily basis? If i delete the meta data, will there be problem with updating wc?
Forum: Plugins
In reply to: [WooCommerce] Mini cartHello,
which line in mini-cart.php i have to edit in order to not hide the mini cart on cart/checkout pages ?
Forum: Plugins
In reply to: [WooCommerce] Mini cartHi,
thank you for the response. I have tried the first method but it doesn’t work! I iam using generatepress theme, and i couldnt find any mini cart template, the only template i can see is yours in woocommerce/templates/cart/mini-cart.php
Is there any tabs plugin that i can use, without installing another builder ?
I am using Gutenberg, with Advanced Tabs Gutenberg Block
Hello,
i had a lot of messing around to do, but it finally works. If i put the changed file in my-child-theme/woo-product-slider-and-carousel-with-category/assets/js/wcpscwc-public.js, wouldnt it work even after an update ?
Hello,
i have done that, as you can see in the screenshot, but it still shows only one column on mobile!