Issue with Free Trial Week and Payment Method Error in WooCommerce Subscription

[ad_1]

Hello,

I am using the plugin with WooCommerce Subscription. For some subscriptions, I have set the first week to be free (0 cost). This generates the following error: “You passed an empty string for ‘payment_method’. We assume empty values are an attempt to unset a parameter; however, ‘payment_method’ cannot be unset. You should remove ‘payment_method’ from your request or supply a non-empty value.”

This happens because, at the time of payment, if the user does not enter card details or enters fake information, the system generates the error but still creates the order in the backend, which immediately fails.

For now, I have temporarily resolved the issue by enabling the old checkout via the “legacy experience” function. With the old checkout, the system does not proceed until the correct credit card information is provided.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer