toolbeltscharlie
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Validate coupon against multiple products in cartPlease close this ticket.
WC_Discounts::validate_coupon_product_ids
confirms it’s an ANY not ALL.I’ll share code I used to resolve my issue in case it’s helpful to anyone.
I was able to utilize the hook okay but I ended up with (slightly tweaked) duplicate code.
add_filter( 'woocommerce_coupon_is_valid', function ($valid, \WC_Coupon $coupon) { if ( count( $coupon->get_product_ids() ) > 0 ) { $valid_products = []; $cart_items = ( new \WC_Discounts(WC()->cart) )->get_items_to_validate(); $restricting_product_ids = $coupon->get_product_ids(); foreach ( $cart_items as $item ) { if ( $item->product && ( in_array( $item->product->get_id(), $restricting_product_ids, true ) || in_array( $item->product->get_parent_id(), $restricting_product_ids, true ) ) ) { //count w/ de-duper $valid_products[$item->product->get_parent_id()] = true; } } $valid = count($valid_products) === count($restricting_product_ids); return $valid; } return $valid; }, 10, 2);
- This reply was modified 2 years, 1 month ago by toolbeltscharlie.
- This reply was modified 2 years, 1 month ago by toolbeltscharlie.
- This reply was modified 2 years, 1 month ago by toolbeltscharlie.
Forum: Plugins
In reply to: [WooCommerce] Validate coupon against multiple products in cartThank you! Yes, I am using the core inbuilt coupon feature, no additional plugins involved here.
From your docs concerning the product restriction setting: “Products that the coupon will be applied to, or that need to be in the cart in order for the fixed or percentage discount to be applied.”
I want the coupon to validate ONLY if Items A AND B are BOTH present in the cart. Not EITHER/OR! This seems like the logical way it should work but I wanted to check.
Thank you!
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Error processing checkout. Please try again.@tylerw23 Nice job getting a hold of them. I’m confused though. This is a trial version?? It doesn’t mention that on the landing page or change log. Also, they said they’re going to fix in next couple of weeks? So why are they suggesting Angelleye integration??
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Error every time you place an order.@niklasinpsyde can you comment on this issue?
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Error every time you place an order.Same problem here. And nothing gets logged to the enabled log file.
Feeling pretty unconfident with this 1.5-star rated plugin so I’m concerned that I’d debug this then face another major headache.
Definitely expect way more from a Woo-authored plugin.
Forum: Plugins
In reply to: [WC Search Orders By Product] Plugin hides orders with status ‘trash’This is disappointing that plugin author is not addressing this problem or any others in plugin’s support forum. Definitely deleting this plugin. I have same issue reported here.
- This reply was modified 2 years, 10 months ago by toolbeltscharlie.
Sorry please disregard
Forum: Plugins
In reply to: [Afterpay Gateway for WooCommerce] Single product page text customizationsGreat job with the update Afterpay team.
- This reply was modified 2 years, 10 months ago by toolbeltscharlie.
Forum: Plugins
In reply to: [Afterpay Gateway for WooCommerce] Single product page text customizationsHi @afterpayit.
Ok I understand a little better now that you mentioned “or 4 payments as low as $x.xx with Afterpay” as opposed to your original reply when you mentioned, more concisely, “as low as $xx”… while you were referring to the messaging “available for orders between $1 – $2,000”… so that was super confusing.
So it sounds like, even if you had a solution to share you wouldn’t because of compliance-related issues, which i understand. There’s certainly nothing I can do but wait til January. There are all of 2 hooks in the entire plugin, the Afterpay blocks are basically cordoned off behind web components and worst of all, no mention of this in the change logs.
On a personal note, Happy Holidays and stay safe!
Forum: Plugins
In reply to: [Afterpay Gateway for WooCommerce] Single product page text customizationshi @afterpayit thanks for your reply. Sorry but that does not remotely come close to addressing my inquiry. If you can make a good faith effort to help me resolve this issue I would greatly appreciate it.
Forum: Plugins
In reply to: [Afterpay Gateway for WooCommerce] Single product page text customizationsHi thanks @afterpayit. Would you be able to address my original inquiry? Please see above. I would like to include the text “Make 4 payments [OF_OR_FROM] [AMOUNT] with Afterpay.” on product pages.
- This reply was modified 2 years, 11 months ago by toolbeltscharlie.
Forum: Plugins
In reply to: [Afterpay Gateway for WooCommerce] Single product page text customizationsHello? Is anyone monitoring this support forum?