rousseauxy
Forum Replies Created
-
Gezien dat er een update was die volgens mij dit issue zou moeten oplossen, maar krijg echter nog steeds een fout:
PHP Fatal error: Uncaught Error: Call to a member function get_method_id() on bool in /var/www/vhosts/finecharmingnails.be/httpdocs/wp-content/plugins/wc-myparcel-belgium/includes/admin/class-wcmypabe-admin.php:303 Stack trace: #0 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-content/plugins/wc-myparcel-belgium/includes/admin/class-wcmypabe-admin.php(511): WCMYPABE_Admin::hasLocalPickup() #1 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-includes/class-wp-hook.php(308): WCMYPABE_Admin->showOrderActions() #2 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #3 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php(1045): do_action() #5 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-content/plugins/woocommerce/includes/admin/list-tables/class-wc-admin-list-table-orders.php(204): Automattic\WooCommerce\Internal\Admin\Orders\ListTable->render_wc_actions_column() #6 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-content/plugins/woocommerce/includes/admin/list-tables/abstract-class-wc-admin-list-table.php(261): WC_Admin_List_Table_Orders->render_wc_actions_column() #7 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-includes/class-wp-hook.php(308): WC_Admin_List_Table->render_columns() #8 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #9 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #10 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-posts-list-table.php(1363): do_action() #11 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-list-table.php(1532): WP_Posts_List_Table->column_default() #12 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-posts-list-table.php(1397): WP_List_Table->single_row_columns() #13 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-posts-list-table.php(807): WP_Posts_List_Table->single_row() #14 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-posts-list-table.php(783): WP_Posts_List_Table->_display_rows() #15 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-list-table.php(1444): WP_Posts_List_Table->display_rows() #16 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/includes/class-wp-list-table.php(1371): WP_List_Table->display_rows_or_placeholder() #17 /var/www/vhosts/finecharmingnails.be/httpdocs/wp-admin/edit.php(487): WP_List_Table->display() #18 {main} thrown in /var/www/vhosts/finecharmingnails.be/httpdocs/wp-content/plugins/wc-myparcel-belgium/includes/admin/class-wcmypabe-admin.php on line 303
Even een kleine quick and dirty oplossing uit m’n mouw geschud zodat m’n klant verder kan zonder issues ??
public static function hasLocalPickup(WC_Order $order): bool { $shippingMethods = $order->get_shipping_methods(); if(!$shippingMethods){ $shippingMethodId = "local_pickup"; }else{ $shippingMethodId = reset($shippingMethods)->get_method_id(); } return WCMPBE_Shipping_Methods::LOCAL_PICKUP === $shippingMethodId; }
you still can, this issue only pops up when you use the advanced feature here so that mailpoet sends all your emails, and having both mailpoet and fluentsmtp handle these gives an obvious conflict. Disable the option below and you can use both, mailpoet for your newsletters, fluentsmtp for the rest
https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails
Any update on this issue yet?
You can ignore my last reply ??
Made a small mistake, got it working perfectly with following codeadd_action( 'rtb_send_notification_after', function( $notification ) { $event = $notification->event; // eg - new_submission, or pending_to_confirmed $booking = $notification->booking; $booking_date = date_i18n( 'l j F Y' , strtotime( $booking->date ) ); $booking_time = date_i18n( get_option( 'time_format' ), strtotime( $booking->date ) ); $reservatie = 'Reservatie ' . $booking_date . ' om ' . $booking_time . ' voor ' . $booking->party . ' personen van ' . $booking->name .' (' . $booking->phone . ')'; $url = 'https://maker.ifttt.com/trigger/<trigger>/with/key/<key>'; $url .= '?value1=' . $reservatie; if($booking->message!=""){ $url .= '&value2=Bericht: ' . $booking->message; } if($notification->event == 'new_submission' && $notification->target == 'admin'){ wp_remote_get($url); } } );
That works wonders!
It does however trigger the webhook twice, probably because it sends two emails/notifications.
Is there another hook that would only trigger this once? Already tried changing the event from submission to pending but didn’t do much.Thanks for the clarification, sadly enough I’m sending with gsuite, so the SMTP option isn’t the best way. So I will have to find another solution.
Mind sharing the translation file somewhere? ??