rental prices

This commit is contained in:
2025-10-07 16:28:31 -07:00
parent 29791dc340
commit b0af806657

View File

@@ -32,14 +32,22 @@ class WooCommerceBeforeAddToCartButtonAction extends RadAction
foreach ($attributes as $attribute) {
$name = $attribute->get_name();
if (!is_array($attribute->get_options())) {
continue;
}
if (count($attribute->get_options()) < 1) {
continue;
}
if ($name === "Rental Rate (Daily)") {
$rentalRates["daily"] = $attribute->get_options();
$rentalRates["daily"] = $attribute->get_options()[0];
}
if ($name === "Rental Rate (Weekly)") {
$rentalRates["weekly"] = $attribute->get_options();
$rentalRates["weekly"] = $attribute->get_options()[0];
}
if ($name === "Rental Rate (Monthly)") {
$rentalRates["monthly"] = $attribute->get_options();
$rentalRates["monthly"] = $attribute->get_options()[0];
}
}
print_r($rentalRates);