Aşağıdaki kodu buldum ama bu kod, direk bütün içerikleri etkiliyor. Bana içerik bazlı işlem lazım.
add_action('woocommerce_checkout_process', function () {
$limit = 5;
$recentOrdersForIP = wc_get_orders(array(
'date_created' => '>=' . (time() - 86400), // 1 day in seconds. Edit as you require.
'customer_ip_address' => WC_Geolocation::get_ip_address(),
'paginate' => true // adds a total field to the results
));
if($recentOrdersForIP->total > $limit ) {
wc_add_notice('Sorry, there have been too many orders placed in a short period of time. Please return later.', 'error');
}
}, 10, 0);