Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@
- 5.1.4 - 2025-11-10
* Randomly mark visits as NovaAct agent also
* Added new command to send fake AI Bot Requests
- 5.1.5 - 2025-11-24
Comment thread
michalkleiner marked this conversation as resolved.
* Generate string order IDs occasionally
10 changes: 5 additions & 5 deletions Generator/VisitsFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ public function generate($time = false, $idSite = 1, $limit = 1000)
if ($this->faker->boolean(50)) {
$tracker->doTrackEcommerceCartUpdate(50);
} else {
$orderId = $this->faker->randomNumber(5);
// randomNumber() can produce 0, which is an invalid order number.
if (0 === $orderId) {
$orderId = 1;
}
do {
$randomNumber = (string) $this->faker->randomNumber(5);
$orderId = $this->faker->boolean(50) ? ($this->faker->word() . '-' . $randomNumber) : $randomNumber;
} while ('0' === $orderId);

$subtotal = $price * $quantity;
$tax = $subtotal * 0.19;
$shipping = $subtotal * 0.05;
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "VisitorGenerator",
"version": "5.1.4",
"version": "5.1.5",
"description": "Developer tool that lets you generate fake visits. Useful if you are working with plugins or themes or if you use the Matomo API.",
"keywords": ["development", "tools"],
"license": "GPL v3+",
Expand Down