Eric Mueller
Forum Replies Created
-
Forum: Plugins
In reply to: [Refer A Friend for WooCommerce by WPGens] Coupon is never sent-deleted-
- This reply was modified 5 years, 9 months ago by Eric Mueller.
Forum: Plugins
In reply to: [WooCommerce] Supporting free shipping with custom shipping methodHi Hannah, thanks. It ended up being pretty easy — I used code like this in my functions.php
// do we have a coupon that gives free shipping? global $woocommerce; $all_applied_coupons = $woocommerce->cart->get_applied_coupons(); if ( $all_applied_coupons ) { foreach ( $all_applied_coupons as $coupon_code ) { $this_coupon = new WC_Coupon( $coupon_code ); if ( $this_coupon->get_free_shipping() ) { $freeshipping ++; } } }
Thanks,
EricForum: Plugins
In reply to: [Email Template Designer - WP HTML Mail] Bug with apostrophie in site nameAnd I found my hook ??
Here is my fix, for anyone else looking:
// decode HTML entities in from address on email - so you can have subject line with apostrophie add_action( 'wp_mail', function ( $email ) { $email['subject'] = html_entity_decode( $email['subject'], ENT_QUOTES ); return $email; }, 13 ); // priority 13 is after style_mail() function; we want to clean up after that
I think this is still a bug that should be addressed, tho.
Thanks for a great plugin and for a hook I could use to work around this minor issue.
E
- This reply was modified 6 years, 1 month ago by Eric Mueller.
Forum: Plugins
In reply to: [Email Template Designer - WP HTML Mail] Bug with apostrophie in site nameI found the issue. You decode HTML entities on line 373 of wp-html-mail/includes/class-haet-mail.php, but you don’t add the ENT_QUOTES flag.
By default, html_entity_decode() does NOT decode single quotes. By adding this flag, it fixes the problem.
// Field values in Ninja Forms and of course also in other plugins are encoded and otherwise not suitable for subjects $email['subject'] = html_entity_decode( $email['subject'], ENT_QUOTES );
However… there’s no add_action() on this, so I can’t hook in to fix it on my client site yet. Still digging around in the code to figure out where I can hook ??
Forum: Plugins
In reply to: [Email Template Designer - WP HTML Mail] Bug with apostrophie in site nameForum: Plugins
In reply to: [Email Template Designer - WP HTML Mail] Bug with apostrophie in site nameBTW I changed the subject line to include “Password reset for Eric’s site” and it looks like the apostrophie in the subject line is getting encoded too. This is a big problem on mobile since many iOS (and presumably Android) mail clients display the subject at the top of the message in bold. So it’s not subtle when the hashtag, ampersand etc all show up there. Yay computers, lol
Forum: Plugins
In reply to: [Email Template Designer - WP HTML Mail] TranslationHi Hannes, is there a way to edit the header/footer for other languages?
Thanks,
EricForum: Plugins
In reply to: [Animated Gif Resize] It's working, but munging the imageBTW for what it’s worth, I read up quite a bit about resizing GIFs and apparently it’s very difficult to resize an animated GIF without dramatically exploding the filesize (apparently 4x-6x is not unusual).
I’m rethinking my strategy for how my site will use animated GIFs because of this.
More info: https://www.imagemagick.org/Usage/anim_mods/#resize
Forum: Plugins
In reply to: [Animated Gif Resize] It's working, but munging the imageThank you!
Forum: Plugins
In reply to: [Brilliant Web-to-Lead for Salesforce] Spinning wheel on SubmissionGlad it worked out! ??
Forum: Plugins
In reply to: [Restrict User Access - Ultimate Membership & Content Protection] API?FWIW I also need a very simple way in PHP to determine if I should show some page functionality based on the user’s role. I can’t use a shortcode for this– it’s part of my PHP template code.
Forum: Plugins
In reply to: [Brilliant Web-to-Lead for Salesforce] Spinning wheel on SubmissionI was able to fix this by turning off support for CF7 CSS.
Forum: Plugins
In reply to: [Brilliant Web-to-Lead for Salesforce] Spinning wheel on SubmissionHi Don– I’m running into exactly the same problem. The plugin was working but today I was testing some things and noticed that when I click submit, I see the spinner and then nothing happens. Perhaps it’s a change on SalesForce’s end? Anyhow hopefully someone will have the answer for us soon. If I figure out anything I’ll post it here.
best
EricForum: Fixing WordPress
In reply to: Does WordPress store page views in database?Thank you all. E
Forum: Hacks
In reply to: Removing newlines and tabs from nav-menuWhoo hoo, I figured it out ??
function afv_kill_whitespace($menu, $args) { return str_replace( array("\n", "\t"), '', $menu); } add_filter( 'wp_nav_menu', 'afv_kill_whitespace', 10, 2 );