rental prices
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user