如何获得送货设置

时间:2015-07-02 12:09:55

标签: woocommerce settings

我没有收到送货设置。使用:

echo get_option( 'woocommerce_flat_rate_enabled' );

但它会返回Null

1 个答案:

答案 0 :(得分:0)

您可以通过;

获取设置

$settings = get_option( 'woocommerce_flat_rate_settings' );

将返回一组值。

array (
  'enabled' => 'yes',
  'title' => 'Flat Rate',
  'availability' => 'all',
  'countries' => '',
  'tax_status' => 'taxable',
  'cost_per_order' => '',
  'additional_costs' => '',
  'type' => 'order',
  'additional_costs_table' => false,
  'minimum_fee' => '',
  'addons' => '',
  'options' => '',
  'cost' => '',
  'fee' => '',
)

其他运输方式也是如此;

$settings = get_option( 'woocommerce_free_shipping_settings
woocommerce_local_delivery_settings
woocommerce_international_delivery_settings