dashboard
repositories
filestore
activity
search
login
jakevan
/
jvb
summary
reflog
commits
tree
docs
forks
compare
blame
|
history
|
raw
=MAJOR OVERHAUL. Likely should have made a new branch ages ago. Key changes...
Jake Vanderwerf
2026-03-03
772462eeca3002a1d52508aeba485aab2b4742ad
[jakevan/jvb.git]
/
inc
/
managers
/
SEO
/
render
/
Thing
/
Intangible
/
Enumeration
/
ItemAvailability.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
namespace JVBase\managers\SEO\render\Thing\Intangible\Enumeration;
if (!defined('ABSPATH')) {
exit;
}
class ItemAvailability extends Enumeration {
protected string $availability;
protected array $options = ['BackOrder', 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', 'MadeToOrder', 'OnlineOnly', 'OutOfStock','PreOrder', 'PreSale', 'Reserved', 'SoldOut'];
public function setAvailability(string $availability): void {
if (!in_array($availability, $this->options)) {
error_log('[ItemAvailability] Invalid availability: '.$availability);
return;
}
$this->availability = $availability;
}
public function getAvailability(): string {
return $this->availability;
}
}