N
N
Nikolai2021-02-15 20:52:12
WooCommerce
Nikolai, 2021-02-15 20:52:12

How to automatically add many attributes in Woocommerce?

Hello.

There is an attribute of the product - Permissible weight. It can be incredibly different. For example, one product has from 1241 kg to 3985 kg, and the other from 845 kg to 5483 kg.

And for this attribute, of course, you need to make a filter, like the price: from and to.
Adding each value from the range is another job. Is there any way to automate the process? Add, for example, the initial value, the final value, and everything in the middle will be added automatically?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
spike__x, 2017-09-29
@spike__x

$link = "http://vk.com/?utm_content={gbid}%3A{ad_id}&utm_term=term&utm_campaign=campaign&utm_medium=cpc&utm_source=yandex-direct-{source_type}#1";
preg_match('~^(http:\/\/vk.com/).*?(#\d)$~i', '$link', $m);
echo $m[1];
echo $m[2];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question