• Resolved cemlstrut

    (@cemlstrut)


    Hello devs,

    I am having some issues with wordpress smtp on my site using php 8. We really need to be able to upgrade to php 8 for our payments to work securely (bank mandated) but WordPress SMTP does not seem to work with php 8, but only for tranzactionals in woocommerce.

    So basically every email that uses wp_mail() works just fine using wordpress smtp, but woocommerce transactional do not and throw this error:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Pelago\Emogrifier::handleXpathQueryWarnings(), 4 passed and exactly 5 expected in /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php:1783 Stack trace: #0 [internal function]: Pelago\Emogrifier->handleXpathQueryWarnings(2, 'DOMXPath::query...', '/home/staging/...', 1112) #1 /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php(1112): DOMXPath->query('//td//[class=re...') #2 /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php(1044): Pelago\Emogrifier->existsMatchForCssSelector('td [class=resiz...') #3 [internal function]: Pelago\Emogrifier->existsMatchForSelectorInCssRule(Array) #4 /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php(1002): array_filter(Array, Array) #5 /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php(517): Pelago\Emogrifier->copyUninlinableCssToStyleNode(Array, '') #6 /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php(366): Pelago\Emogrifier->process() #7 /home/staging/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(570): Pelago\Emogrifier->emogrify() #8 /home/staging/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(652): WC_Email->style_inline('\n<!DOCTYPE html...') #9 /home/staging/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-new-order.php(110): WC_Email->send('orders@staging...', '[STAGING SITE]: ...', '\n<!DOCTYPE html...', 'Content-Type: t...', Array) #10 /home/staging/public_html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(115): WC_Email_New_Order->trigger(20582, Object(Automattic\WooCommerce\Admin\Overrides\Order), true) #11 /home/staging/public_html/wp-includes/class-wp-hook.php(307): WC_Meta_Box_Order_Actions::save(20582, Object(WP_Post)) #12 /home/staging/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #13 /home/staging/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #14 /home/staging/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(222): do_action('woocommerce_pro...', 20582, Object(WP_Post)) #15 /home/staging/public_html/wp-includes/class-wp-hook.php(309): WC_Admin_Meta_Boxes->save_meta_boxes(20582, Object(WP_Post)) #16 /home/staging/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #17 /home/staging/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #18 /home/staging/public_html/wp-includes/post.php(4686): do_action('save_post', 20582, Object(WP_Post), true) #19 /home/staging/public_html/wp-includes/post.php(4788): wp_insert_post(Array, false, true) #20 /home/staging/public_html/wp-admin/includes/post.php(426): wp_update_post(Array) #21 /home/staging/public_html/wp-admin/post.php(227): edit_post() #22 {main} thrown in /home/staging/public_html/wp-content/plugins/woocommerce/vendor/pelago/emogrifier/src/Emogrifier.php on line 1783

    Could you please take into consideration addressing this issue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Darshana

    (@darshanaw)

    Hi @cemlstrut,

    Thanks for reaching out! As I have checked with our developers, the WP Mail SMTP plugin is not mentioned on the debug stack trace that you have shared. This issue could be related to WooCommerce, WooCoomerce addon, or a conflict with another 3rd party plugin.

    Could you please report it to the WooCommerce support and see how it goes. Your issue could be similar to this.

    I hope this helps. Thanks!

    sgoetz

    (@sgoetz)

    Hi @darshanaw,

    Can you confirm that WP Mail SMTP is compatible with PHP 8?

    I’m in a similar boat to @cemlstrut, that I will likely be required to update to PHP 8 soon, and I’m trying to take stock of plugin compatibility before I upgrade by test server.

    Thanks!
    Stephanie

    • This reply was modified 3 years ago by sgoetz.
    Plugin Support Darshana

    (@darshanaw)

    Hi @sgoetz,

    As we have tested, the WP Mail SMTP plugin is compatible with the PHP v8.x.

    You may see PHP notices in your log related to the Action Scheduler library as mentioned here, which you can safely ignore.

    I hope this helps. Thanks!

    sgoetz

    (@sgoetz)

    Hi @darshanaw ,

    Thank you for the confirmation!

    Cheers,
    Stephanie

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP 8 Question’ is closed to new replies.