我正试图想出一个解决方案,以限制规定的产品类别可以运送到。这是我到目前为止想出的。
function get_prod_cat () {
global $woocommerce;
$specialfeecat = 34; // category id for the special fee
$items = $woocommerce->cart->get_cart();
foreach ($items as $item ) {
$product = $item['data'];
$terms = get
WooCommerce提供了关于如何更改产品页面上显示的相关产品数量的。有没有办法改变它们之间的联系?目前看来,它们是按类别分类的。是否有一种基于单一属性显示相关产品的方法?
过滤器如下:
<?php
/**
* WooCommerce Extra Feature
* --------------------------
*
* Change number of related products on product page
* Set your own value for 'posts_per_page'
*
*/
function woo_relat