[英]WooCommerce Box Office - How to Check if Product is a Ticket PHP
Ticket Box is Checked IMAGE 票务箱已检查图像
The Box Office plugin adds this 'ticket' checkbox functionality to make a product a ticket. Box Office插件添加了此“票证”复选框功能,以使产品成为票证。 How do I check if the product is a ticket?
如何检查产品是否为票证? I'm thinking it would go somewhat like
$product->is_ticket()
我在想它会有点像
$product->is_ticket()
Context - My website has removed the quantity field for all products. 上下文-我的网站已删除所有产品的数量字段。 I want to enable the quantity field for only ticket products and have an if statement like
if($product->is_ticket()) {do this}
我只想为机票产品启用数量字段,并具有if语句,如
if($product->is_ticket()) {do this}
我只是在数据库中查找并使用get post meta函数来查看是否==“是”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.