digamber89 / woo-preview-emails

WooCommerce Extension that allows you to Preview E-mails in the admin area
12 stars 7 forks source link

Error previewing new receipt email #23

Open reholmes27 opened 1 year ago

reholmes27 commented 1 year ago

When trying to send a new receipt email I get the following error:

An error of type E_ERROR was caused in line 102 of the file /sites/mistersmithco/public_html/wp-content/plugins/woocommerce-payments/includes/emails/class-wc-payments-email-ipp-receipt.php. Error message: Uncaught TypeError: WC_Payments_Email_IPP_Receipt::trigger(): Argument #1 ($order) must be of type WC_Order, int given, called in .../public_html/wp-content/plugins/woo-preview-emails/includes/Main.php on line 296 and defined in .../public_html/wp-content/plugins/woocommerce-payments/includes/emails/class-wc-payments-email-ipp-receipt.php:102 Stack trace:

0 .../public_html/wp-content/plugins/woo-preview-emails/includes/Main.php(296): WC_Payments_Email_IPP_Receipt->trigger()

1 .../public_html/wp-includes/class-wp-hook.php(308): Codemanas\WooPreviewEmails\Main->email_preview_output()

2 .../public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()

3 .../public_html/wp-includes/plugin.php(517): WP_Hook->do_action()

4 .../public_html/wp-admin/admin.php(175): do_action()

5 {main}

thrown

WordPress version 6.2 Active theme: Astra Child Current plugin: WooCommerce Payments (version 5.8.1) PHP version 8.1.18

cossssmin commented 1 month ago

Same issue here with a fresh install of WordPress 6.6.2, WooCommerce 9.3.1 and the default Twenty Twenty Four theme.