WooCommerce插件可以像其他WordPress插件一样卸载。不过,默认情况下,WooCommerce数据会保留。
如果还需要删除所有WooCommerce数据,包括产品、订单数据、优惠券等,则需要在停用和删除WooCommerce插件之前修改wp-config.php文件。
要从WordPress网站中完全删除所有WooCommerce数据,打开wp-config.php,向下滚动到文件底部,然后在/ Add any custom values between this line and the "stop editing" line. /和/ That's all, stop editing! Happy publishing. /之间添加以下常量:
/* Add any custom values between this line and the "stop editing" line. */
define( 'WC_REMOVE_ALL_DATA', true );
/* That's all, stop editing! Happy publishing. */
然后,一旦保存,当停用并删除WooCommerce时,其所有数据都会从WordPress网站数据库中删除。