-
%s',
get_permalink( wc_get_page_id( 'shop' ) ),
sprintf( __( '%d of any product(s)', 'advanced-dynamic-pricing-for-woocommerce' ), $dependency['qty'] )
);
continue;
}
$items = array();
foreach ( $dependency['values'] as $i => $value ) {
$name = $dependency['titles'][ $i ];
$link = $dependency['links'][ $i ];
if ( ! empty( $link ) ) {
$items[] = "{$name}";
} else {
$items[] = "'{$name}'";
}
}
$items = implode( ', ', $items );
if ( 'products' === $dependency['type'] ) {
if ( 'in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) from list: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
} elseif ( 'not_in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) not from list: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
}
} elseif ( 'product_categories' === $dependency['type'] ) {
if ( 'in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) from categories: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
} elseif ( 'not_in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) not from categories: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
}
} elseif ( 'product_tags' === $dependency['type'] ) {
if ( 'in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) with tags from list: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
} elseif ( 'not_in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) with tags not from list: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
}
} elseif ( 'product_attributes' === $dependency['type'] ) {
if ( 'in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) with attributes from list: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
} elseif ( 'not_in_list' === $dependency['method'] ) {
echo sprintf(
__( '%d product(s) with attributes not from list: %s', 'advanced-dynamic-pricing-for-woocommerce' ),
$dependency['qty'],
$items
);
}
}
?>