Plugins 添加到插件';s选项

Plugins 添加到插件';s选项,plugins,woocommerce,options,Plugins,Woocommerce,Options,在存款插件(woo commerce deposits)中添加减少产品库存的选项有点困难。目前,标准的选择是:“存款”或“全额付款”——我还想添加“存款或全额付款”,这样,如果接受存款或全额付款,股票将减少 非常感谢您的帮助 更新功能#1: 更新功能#2: 我想这就是我跌倒的地方: 原始“保存所有设置”功能: $reduce_stock = isset($_POST['wc_deposits_reduce_stock']) ? ($_POST['wc_deposits_reduce_stoc

在存款插件(woo commerce deposits)中添加减少产品库存的选项有点困难。目前,标准的选择是:“存款”或“全额付款”——我还想添加“存款或全额付款”,这样,如果接受存款或全额付款,股票将减少

非常感谢您的帮助

更新功能#1:

更新功能#2:

我想这就是我跌倒的地方:

原始“保存所有设置”功能:

$reduce_stock = isset($_POST['wc_deposits_reduce_stock']) ?
  ($_POST['wc_deposits_reduce_stock'] === 'deposit' ? 'deposit' : 'full') : 'full';
我不知道如何添加附加选项,这不起作用!:

$reduce_stock = isset($_POST['wc_deposits_reduce_stock']) ?
  ($_POST['wc_deposits_reduce_stock'] === 'deposit' ? 'deposit' : 'full' ? 'both' : 'full' ) : 'full';

我只是想说-我已经开始工作了-只是管理员选项页面中的选项表现得很奇怪-它默认为我的新选项-(这对我来说很好!),但是如果需要的话,最好知道如何让它正常工作。干杯只是想说-我已经开始工作了-只是管理员选项页面中的选项表现得很奇怪-它默认为我的新选项-(这对我来说太棒了!),但是如果需要,最好知道如何让它正常工作。干杯
$reduce_stock = isset($_POST['wc_deposits_reduce_stock']) ?
  ($_POST['wc_deposits_reduce_stock'] === 'deposit' ? 'deposit' : 'full') : 'full';
$reduce_stock = isset($_POST['wc_deposits_reduce_stock']) ?
  ($_POST['wc_deposits_reduce_stock'] === 'deposit' ? 'deposit' : 'full' ? 'both' : 'full' ) : 'full';