Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter stndrdsnz

    (@stndrdsnz)

    Yes, it is something we’re still trying to get resolved. I also missed the request for an example above so I’ll provide that now too.

    Our use case is a rental system. Let’s say that we have a $100 item and we rent it for $5 per day. I’d like to authorize a payment of $100 to cover the replacement cost of the item. Should they keep the item 4 days and return it, we would only bill them $20 when we complete the transaction. Should they not return the item, we would bill them the full $100.

    Thread Starter stndrdsnz

    (@stndrdsnz)

    Thanks, I’ve submitted a bug report linked back to this ticket. The bug report can be viewed here: https://github.com/Yoast/wordpress-seo/issues/16170

    Thread Starter stndrdsnz

    (@stndrdsnz)

    Well, I figured out how to work around it, but I also know how to solve it. This can be implemented in a custom plugin, or a theme. Ideally though, this would be incorporated into the Easy WP SMTP plugin.

    I’m going to apologize if the code below doesn’t work, I just threw it together here, but didn’t actually test it out. It should be pretty close to what you’ll need to patch the plugin.

    add_filter('wp_mail_from_name', swpsmtp_replace_from_name);
    if ( ! function_exists('swpsmtp_replace_from_name' ) ) {
        public function swpsmtp_replace_from_name($original_email_from){
            $swpsmtp_options = get_option( 'swpsmtp_options' );
            if($original_email_from == 'WordPress'){
                return $swpsmtp_options[ 'from_name_field' ];
            } else {
                return $original_email_from;
            }
        }
    }

    Note: If incorporating this fix into the plugin, there are some other options that will need to be checked too, however, as a patch, this will replace the From Name if it matches the string “WordPress”. As a part of a solution for the plugin, you’d want to integrate this logic into the swpsmtp_init_smtp method, or rework that method to utilize the WordPress wp_mail hooks.

    David

    • This reply was modified 6 years, 3 months ago by stndrdsnz.
    • This reply was modified 6 years, 3 months ago by stndrdsnz.
    stndrdsnz

    (@stndrdsnz)

    Seeing the following error as well:

    Parse error: syntax error, unexpected ‘.’, expecting ‘,’ or ‘;’ in /wp-content/plugins/woocommerce-product-sort-and-display/admin/admin-ui.php on line 37

    I see your comment above about php versions, I’ll look into this, in the mean time, I wanted to point out that WordPress, has a recommendation of php 7.2 or greater, but has a note that WordPress also works on PHP 5.2.4+.

    WordPress Requirements

    Similarly, the requirements listed for this plugin say PHP 5.5 or greater.

    Plugin Requirements

Viewing 4 replies - 1 through 4 (of 4 total)