Plugin Updates

This commit is contained in:
Tony Volpe
2024-04-02 20:23:21 +00:00
parent 96800520e8
commit 94170ec2c4
1514 changed files with 133309 additions and 105985 deletions

View File

@@ -34,8 +34,16 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Course' ) ) {
$schema['description'] = ! empty( $data['description'] ) ? wp_strip_all_tags( (string) $data['description'] ) : null;
$schema['offers']['@type'] = 'Offer';
$schema['offers']['category'] = ! empty( $data['offer-category'] ) ? wp_strip_all_tags( (string) $data['offer-category'] ) : null;
if (isset($data['offers']) && !empty($data['offers'])) {
foreach ($data['offers'] as $offer_key => $offer_value) {
if (!empty($offer_value['category']) || !empty($offer_value['priceCurrency']) || !empty($offer_value['price'])) {
$schema['offers'][$offer_key]['@type'] = 'Offer';
$schema['offers'][$offer_key]['category'] = !empty($offer_value['offer-category']) ? wp_strip_all_tags((string)$offer_value['offer-category']) : null;
$schema['offers'][$offer_key]['priceCurrency'] = !empty($offer_value['priceCurrency']) ? wp_strip_all_tags((string)$offer_value['priceCurrency']) : null;
$schema['offers'][$offer_key]['price'] = !empty($offer_value['price']) ? wp_strip_all_tags((string)$offer_value['price']) : null;
}
}
}
if ( isset( $data['course-instance'] ) && ! empty( $data['course-instance'] ) ) {