最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Meta Key array building with multiple input values from fields

programmeradmin1浏览0评论

I'm trying to build a custom form using UserFrontend on wordpress and I need to copy an array from one of the known meta keys from WooCommerce. Only thing is I'm not sure how to approach this issue as each field only returns one value. What I really need is to for the user to enter in a date range and translate into part of an array for this meta key value.

I've tried creating custom field groups but they don't show up in UserFrontend

this is the field that can be access in the admin backend:

this is what I need it too look like...

_wc_booking_availability (this is the meta key)

This is the returned value:

array (
  0 => 
  array (
    0 => 
    array (
      'type' => 'custom',
      'bookable' => 'yes',
      'priority' => 10,
      'from' => '2019-05-13', //this was set using a date picker
      'to' => '2019-05-27',
    ),
  ),
)
发布评论

评论列表(0)

  1. 暂无评论