Problem: If you're using WooCommerce with WPML, WooCommerce Multilingual & Multicurrency, and encountering an issue where a vendor tries to purchase a membership product with a custom price set in ILS currency, and the subscription with Stripe is not created due to a SQL syntax error caused by the WCML (multicurrency), this might be relevant to you:
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3 for query SELECT post_id, meta_key, meta_value FROM wp_postmeta
WHERE meta_key IN ('_price', '_regular_price', '_sale_price', '_price_ILS', '_regular_price_ILS', '_sale_price_ILS')
AND post_id IN () made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Stripe_UPE_Payment_Gateway->process_payment, WC_Stripe_UPE_Payment_Gateway->process_payment_with_deferred_intent, WC_Stripe_UPE_Payment_Gateway->process_payment_with_payment_method, WC_Stripe_Payment_Gateway->process_response, WC_Order->payment_complete, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_processing'), WP_Hook->do_action, WP_Hook->apply_filters, wc_update_total_sales_counts, do_action('woocommerce_recorded_sales'), WP_Hook->do_action, WP_Hook->apply_filters, WCML_Synchronize_Product_Data->sync_product_total_sales, WC_Data_Store->__call, WC_Product_Data_Store_CPT->update_product_sales, WC_Data_Store_WP->update_lookup_table, WC_Product_Data_Store_CPT->get_data_for_lookup_table, get_post_meta, get_metadata, get_metadata_raw, apply_filters('get_post_metadata'), WP_Hook->apply_filters, WCML_Multi_Currency_Prices->product_price_filter, WPMLFP{closure}, call_user_func_array, WPMLFPLogic::WPMLFP{closure}, WCML_Multi_Currency_Prices->{closure}, WCML_Custom_Prices->get_product_custom_prices
Solution: We recommend taking a full backup of your website and database first. Then, in the file
This change should resolve the SQL error and allow the Stripe subscription to be created correctly.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.