Contributors: TheWebist
Tags: comments, spam
Requires at least: 5.5
Tested up to: 6.2
Stable tag: 3.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
WooCommerce extension that adds a "Course" product type with "Class" CPTs.
To show the registration form for a class, the following conditions must be met in your setup:
- Your Elementor WooCommerce Product template must use the "Product Content" widget to display the course description.
- You must add
product-content
as the ID for the "Product Content" widget.
- Run
grunt makepot
to generatelanguages/andalu_woo_courses.pot
. - Copy
languages/andalu_woo_courses.pot
with your desired language extension (e.g.languages/andalu_woo_courses-es_ES.po
). - Update the translations in the file you copied in #2 (use PoEdit if you prefer a GUI).
- Run
grunt po2mo
to build.mo
files inlanguages/
.
Note: The first time I ran grunt po2mo
, I got the error Can not create sync-exec directory
. To fix, I had to edit node_modules\grunt-po2mo\tasks\po2mo.js
as follows:
- Line 11 Original:
var exec = require('sync-exec');
- Line 11 Revised:
var exec = require('child_process').execSync;
Many of the functions in lib/fns/shortcodes.php
use the render_template()
function to render their HTML. That function utilizes handlebars templates stored inside lib/templates/
. For details on how render_template()
works, please see the DocBlock for that function inside lib/fns/handlebars.php
.
- Adding "Class Full Message" option. Allows admins to create an Elementor template that replaces the output shown when a class is full.
[class_dates_from_url]
shortcode for displaying the dates of acourse_class
when on a page that has thecourse_class->post_name
as the last parameter.- Gravity Forms merge tag for
{class_dates}
.
- Adding new Certification ACF Repeater Field to "Additional Class Details" meta box.
- Lowercasing remote repository URL.
- Renaming plugin to "B2T Courses for WooCommerce".
- Updating address labels for Class Registration.
- Updating links to
/course-calendar/
to point to/services/public-class-schedule/
.
- Updating text above Class Registration form to include link back to the Public Class Schedule.
- Restoring use of
__()
in add to cart message. - Removing
esc_html()
for added to cart message.
- Adding link back to Public Class Schedule without using
__()
in add to cart message.
- BUGFIX: Correcting variable spelling (
$add_text
changed to$added_text
).
- BUGFIX: Properly escaping link in cart message.
- BUGFIX: Rewriting
Andalu_Woo_Courses_Single::add_to_cart_message()
to correctly work with thewc_add_to_cart_message_html
filter.
- BUGFIX: Checking for product_type = 'course'.
- BUGFIX: Declaring
Andalu_Woo_Courses_Order::reduce_order_seats()
as astatic
method for PHP 8.0 compatiblity.
- Updating filter hook used by
Andalu_Woo_Courses_Single::add_to_cart_message()
to utilizewc_add_to_cart_message_html
. - Adding link to "Public Class Schedule" in the WooCommerce Message shown after adding a class registration to the cart.
- Vertically centering "Register" buttons in Public Class Calendar.
- Changing "Time/Duration" to "Course Length" label in Public Class Calendar.
- Adding "Dates" and "Location" to Course Info for class registration form.
- Updating class pricing on class registration form to display parent course pricing when no class pricing is set.
- Updating
add_cart_item()
to expire a product in 30 minutes instead of 15.
- Filtering
woocommerce_cart_item_quantity
to show "1" for the quantity value for class registrations in the WC Shopping Cart.
- Adding
.registration-form
to<body>
on class registration form views.
- Updating styling/layout for Course Calendar display.
- BUGFIX: Checking for object before using
method_exists()
.
- Fixing required after optional param.
- Updating functions so that required parameters don't follow optional parameters.
- Updating styling for class registration form.
- Updating Course Calendar "Register" buttons to have
border-radius: 0
.
- Updating Course Calendar colors to match B2T Training branding.
- Hiding "Language" column in Course Calendar.
- Removing
the_content
filter from Location description because it was outputing the wrong content. - Setting Class Calendar height to
auto
when showing a Location description.
- Setting
$class_price
whilst adding class to the WooCommerce Cart. - Updating Course Info display to show Course price when
$class_price
is $0.00. - Setting
ANDALU_DEV_ENV
and not expiring the cart whilst in dev env.
- BUGFIX: Reverting Course Order hook from
woocommerce_new_order_item
back towoocommerce_add_order_item_meta
because the newer hook does not add the class data to the order.
- BUGFIX: Verifying
$class_price
is not empty inget_class_pricing()
. Otherwise, class
- Adding per class pricing option.
- Saving Public Class Shortcode query in a WordPress transient.
- Restoring a space in the gettext string for "No Public Classes" so that the Spanish translation will show.
- Adding documentation for
render_template()
insidelib/fns/handlebars.php
.
- Updating Handlebars
cost
variable to output HTML and reference the properties of the parent.
- Adding Price label to public classes.
- Adding
.confirmed
to Class Calendar rows.
- Translate View cart to ver carrito. Only ES version.
- Adding
show_if_simple
toAndalu_Woo_Courses_Admin::data_tabs()
so that the "General" tab will show for WooCommerce simple products.
- Recompiling Spanish translations to get the "Currently, we don't have any classes..." message into
languages/andalu_woo_courses-es_ES.mo
.
- Checking to see if
$product
instance has anhas_classes
method inside the[elementor_public_classes]
shortcode.
- ES translation error.
- Translate Inscribirse por Inscribir. Only ES version.
- Translate Register and Request Info. Only ES version.
- Translate CIF/NIF to DNI/NIF. Only ES version.
- Add slash end url 'Inscribir' button. Only ES version.
- Add woocommerce addon after the form.
- Updating zebra striping for Class Calendar rows.
- Removing
msgstr
from translation string. - Adding "Certificación" to ES translation.
- ES translations for
[elementor_public_classes]
and[course_details]
.
- BUGFIX:
[public_class_calendar]
was showing classes without checking the parent course'spost_status
. Fixed code to check forpublish
status.
- Translation strings for dates in
[public_class_calendar]
and[elementor_public_classes]
. - Translation strings for class registration form.
- Removing "Metro Area" from
templates/single-product/course-info.php
.
- BUGFIX: Checking for existence of product class methods when getting multilingual prices.
- Adding "Idioma", "Sub Categorías" and "Certificaciones" to Spanish translation.
- Restoring "Inglés" and "Español" to Spanish translation.
- Spanish translations.
- Adding additional Spanish text strings.
- Bugfix: Checking for float in
get_class_pricing()
.
- Left aligning "Price" column in Class Calendar.
- Adding line wrap for class duration listing in
[elementor_public_classes]
. - Ensuring CSS loads for
[elementor_public_classes]
when editing in Elementor.
- Adding "Confirmed" check to mobile listing on Course Calendar.
- Adding "Confirmed" check for confirmed classes.
- Adding "Duration" field for Course Class.
- Adding Netmind Blue border around "Register" buttons in Course Calendar.
- Moving Course widget CSS from Instant CSS plugin to
lib/scss/_widgets.scss
.
- Updating styling for Course sidebar buttons.
- Adding translation strings for the Public Classes (i.e.
elementor_public_classes
) widget.
- Adding "Print Friendly" button to Course Details.
- Removed "Course Language" field in Course editor.
- Refactored SCSS:
- Renamed
class-calendar.scss
towoo-courses.scss
. - Added
course.css
to build forwoo-courses.scss
.
- Renamed
- Moved inline styles inside
lib/templates/course_details.hbs
intolib/scss/_course.scss
.
- Refactoring translation setup.
- Including
build/languages/
in repo.
- Adding
show_in_rest
to Certification taxonomy so it will show in Gutenbery and the Quick Edit screen for posts.
- Removing unused fields in Course editor (i.e. PDUs, Intended Audience, Prerequisites, PMI Endorsement, IIBA Endorsement, Course Outlines).
- Adding "CIF/NIF" field for student registrations when the local is set to
es_ES
.
- Updating Course Calendar "Register" button :hover styling.
- Adding Location filters for the Class Calendar.
- Multilingual CSS for the Class Calendar.
- Updating Class Calendar CSS so rows will display properly when TranslatePress is activated.
- BUGFIX: Checking for array to prevent error message in class edit metabox.
- Moving
/assets/
to/lib/
- Adjusting date display format for classes.
- Adding class lanuage setting.
- Showing "General" tab for Course type products.
- Adding "Calendar Display" setting for classes.
- Initial translation setup.
- Adding
border-radius
to Class Calendar "Register" buttons.
- Checking for
$_REQUEST
variables before performing operations with them.
- Updated for WooCommerce 3.0+ compatibility
- Initial release