Product_Data implements Registerable, Service

Handles the lead time settings on the Edit Product screen, in the Product Data metabox.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
Service
Marker interface to denote a service.

Table of Contents

add_field()  : mixed
Add the lead time field to Product Data.
add_field_to_variations()  : mixed
Add the lead time field to product variations.
register()  : void
Register hooks and filters.
save_field()  : mixed
Save the lead time field.
save_variation_fields()  : mixed
Save the variation lead time fields.
get_variation_json()  : array<string|int, mixed>
Get the json configuration of the per stock data of a product.

Methods

add_field()

Add the lead time field to Product Data.

public add_field() : mixed
Return values
mixed

add_field_to_variations()

Add the lead time field to product variations.

public add_field_to_variations(mixed $loop, mixed $variation_data, mixed $variation) : mixed
Parameters
$loop : mixed
$variation_data : mixed
$variation : mixed
Return values
mixed

register()

Register hooks and filters.

public register() : void
Return values
void

save_field()

Save the lead time field.

public save_field(mixed $post_id) : mixed
Parameters
$post_id : mixed
Return values
mixed

save_variation_fields()

Save the variation lead time fields.

public save_variation_fields(mixed $variation_id, mixed $i) : mixed
Parameters
$variation_id : mixed
$i : mixed
Return values
mixed

get_variation_json()

Get the json configuration of the per stock data of a product.

private get_variation_json([bool $post_id = false ]) : array<string|int, mixed>
Parameters
$post_id : bool = false
Return values
array<string|int, mixed>

Search results