WooCommerce 中每种运输方式的设置存储在哪里?
Where are stored the settings of each shipping method in WooCommerce?
我有两个独立的电子商务平台。
- 驱动所有订单和调度的大型旧系统。
- 由 WordPress / WooCommerce 提供支持的在线商店。
到目前为止,我们已经成功地自动化了许多简单的事情,比如从 WP 中提取订单,并将更新的库存水平推送给它。
但是,我无法理解的一件事是,当我创建 free_shipping 方法并设置最低支出时。它存储在数据库中的什么位置?
您可以问问自己: Wordpress 插件在哪里存储它们的设置?
The answer is simply the wp_options
table.
如果您的 "Free shipping" 送货方式 ID 是 free_shipping:10
您可以使用:
$free_shipping = get_option( 'woocommerce_free_shipping_10_settings' );
$min_amount = $free_shipping['min_amount'];
检索数据数组,其中woocommerce_free_shipping_10_settings
是option_name
。
以下 SQL 搜索查询将检索所有 "Free shipping" 方法设置:
SELECT * FROM `wp_options` WHERE `option_name` LIKE 'woocommerce_free_shipping%'
我有两个独立的电子商务平台。
- 驱动所有订单和调度的大型旧系统。
- 由 WordPress / WooCommerce 提供支持的在线商店。
到目前为止,我们已经成功地自动化了许多简单的事情,比如从 WP 中提取订单,并将更新的库存水平推送给它。
但是,我无法理解的一件事是,当我创建 free_shipping 方法并设置最低支出时。它存储在数据库中的什么位置?
您可以问问自己: Wordpress 插件在哪里存储它们的设置?
The answer is simply the
wp_options
table.
如果您的 "Free shipping" 送货方式 ID 是 free_shipping:10
您可以使用:
$free_shipping = get_option( 'woocommerce_free_shipping_10_settings' );
$min_amount = $free_shipping['min_amount'];
检索数据数组,其中woocommerce_free_shipping_10_settings
是option_name
。
以下 SQL 搜索查询将检索所有 "Free shipping" 方法设置:
SELECT * FROM `wp_options` WHERE `option_name` LIKE 'woocommerce_free_shipping%'