grofftech/custom-types
最新稳定版本:1.0.6
Composer 安装命令:
composer require grofftech/custom-types
包简介
A WordPress plugin for adding custom types
关键字:
README 文档
README
Helps facilitate code required for custom types in WordPress
WooCommerce
Custom Product
There are actions and filters to hook into that allow for the creation of a custom product in WooCommerce, including adding the type, and creating and saving custom fields
Actions
ct_create_product_class - Include the class file that extends WC_Product
ct_add_product_custom_fields - Add custom fields for the product
ct_save_product_custom_fields - Save data for the product custom fields
ct_add_product_custom_fields_for_shipping - Add custom fields to the shipping tab. Saving data for these fields would happen in the ct_save_product_custom_fields action
Filters
ct_get_product_class - Gets the class name from the ct_create_product_class action. Two filter callback arguments required, $class and $product_type. Hook filters the $class argument.
ct_add_product_selection - Adds the product to be able to be selected. One filter callback argument required, $types.
ct_update_product_tabs - Updates the tabs when the product is selected. One filter callback argument required, $tabs
Custom Shipping
Filters
ct_add_custom_shipping_method - Adds a custom shipping method. One filter callback argument required, $methods
ct_update_custom_shipping_method_label - Updates the display label for the custom shipping method added. Two filter callback arguments required, $label and $method. Hook filters the $label argument.
统计信息
- 总下载量: 45
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-07-27