Changeset 2946879
- Timestamp:
- 08/03/2023 03:08:24 AM (3 years ago)
- Location:
- woo-commerce-addon-for-wp-courseware
- Files:
-
- 13 added
- 3 edited
-
tags/1.4.8 (added)
-
tags/1.4.8/includes (added)
-
tags/1.4.8/includes/class-wpcw-wc-addon.php (added)
-
tags/1.4.8/includes/class-wpcw-wc-admin.php (added)
-
tags/1.4.8/includes/class-wpcw-wc-members.php (added)
-
tags/1.4.8/includes/class-wpcw-wc-membership.php (added)
-
tags/1.4.8/includes/class-wpcw-wc-menu-courses.php (added)
-
tags/1.4.8/includes/deprecated.php (added)
-
tags/1.4.8/includes/functions.php (added)
-
tags/1.4.8/languages (added)
-
tags/1.4.8/languages/wpcw-wc-addon.pot (added)
-
tags/1.4.8/readme.txt (added)
-
tags/1.4.8/wp-courseware-woo-commerce.php (added)
-
trunk/includes/class-wpcw-wc-membership.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wp-courseware-woo-commerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-commerce-addon-for-wp-courseware/trunk/includes/class-wpcw-wc-membership.php
r2633713 r2946879 328 328 329 329 $courseIDList = array(); 330 330 $enrollment_dates = array(); 331 331 // Might not have any levels to process. 332 332 if ( $levelList && count( $levelList ) > 0 ) { … … 340 340 // the $courseIDToKeep that's the valuable bit. 341 341 $courseIDList[ $courseIDToKeep ] = $levelID; 342 } 343 } 344 } 342 if ( true === apply_filters( 'wpcw_wc_addon_enroll_current_date', false ) ) { 343 $enrollment_dates[ $courseIDToKeep ] = current_time( 'timestamp' ); 344 } 345 } 346 } 347 } 348 wpcw_log($enrollment_dates); 345 349 } 346 347 350 // By this point, $courseIDList may or may not contain a list of courses. 348 WPCW_courses_syncUserAccess( $userID, array_keys( $courseIDList ), $mode ); 351 WPCW_courses_syncUserAccess( $userID, array_keys( $courseIDList ), $mode, $enrollment_dates ); 352 //WPCW_courses_syncUserAccess( $userID, array_keys( $courseIDList ), $mode ); 349 353 } 350 354 … … 611 615 * @return bool $access True if the user can access the course, false otherwise. 612 616 */ 613 public function wc_check_wpcw_course_access( $access, $course_id, $user_id ) {617 public function wc_check_wpcw_course_access( $access, $course_id, $user_id, $ignore = false ) { 614 618 global $wpdb, $wpcwdb; 619 620 $post = get_post($course_id); 621 $fe = new WPCW_UnitFrontend( $post ); 622 $is_admin_or_teacher = $fe->check_is_admin_or_teacher(); 623 624 if ( $is_admin_or_teacher === true ) { 625 return true; 626 } 627 628 $ignore = apply_filters( 'wc_subscriptions_ignore_wpcw_course_access', ( $ignore ? true : false ) ); 629 630 if ( $ignore ){ 631 return $access; 632 } 615 633 616 634 // Get orders for $user_id -
woo-commerce-addon-for-wp-courseware/trunk/readme.txt
r2831298 r2946879 4 4 Tags: learning management system, selling online courses 5 5 Requires at least: 4.8 6 Tested up to: 6. 1.17 Stable tag: 1.4. 76 Tested up to: 6.2.2 7 Stable tag: 1.4.8 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 This plugin adds integration between WooCommerce and WP Courseware which allows you to associate course (s)to digital products for automatic enrollment.11 This plugin adds integration between WooCommerce and WP Courseware which allows you to associate courses to digital products for automatic enrollment. 12 12 13 13 == Description == 14 [Fly Plugins](https://flyplugins.com) presents [WooCommerce](https://wordpress.org/plugins/woocommerce/) for [WP Courseware](https://flyplugins.com/wp-courseware).14 [Fly Plugins](https://flyplugins.com) presents [WooCommerce](https://wordpress.org/plugins/woocommerce/) for WP Courseware a simple, yet powerful [WordPress LMS](https://flyplugins.com/wp-courseware) plugin. 15 15 16 16 = Would you like to sell an online course with WooCommerce? = 17 The WooCommerce Addon for WP Courseware will add full integration with WP Courseware. Simply assign WP Courseware course (s) to a WooCommerce product. When a student purchases the product, they will automatically be enrolled into the associated course(s).17 The WooCommerce Addon for WP Courseware will add full integration with WP Courseware. Simply assign WP Courseware courses to a WooCommerce product. When a student purchases the product, they will automatically be enrolled into the associated courses. 18 18 19 19 With this addon, you will be able to create a fully automated [Learning Management System](https://flyplugins.com/wp-courseware) and sell online courses. … … 23 23 24 24 = Basic Configuration Steps = 25 = Basic Configuration Steps = 26 1. Create a course with WP Courseware and add module(s), unit(s), and quiz(zes) 25 1. Create a course with WP Courseware and add modules, units, and quizzes 27 26 2. Create a product and set a price 28 27 3. Associate one or more WP Courseware courses with the product 29 4. New student pays for the product, and WP Courseware enrolls them to the appropriate course (s)based on the purchased product28 4. New student pays for the product, and WP Courseware enrolls them to the appropriate courses based on the purchased product 30 29 31 30 = Check out Fly Plugins = … … 75 74 76 75 == Changelog == 76 77 = 1.4.8 = 78 * Tweak: Added wc_subscriptions_ignore_wpcw_course_access filter to prevent checking each subscription for active status 79 * Tweak: Added wpcw_wc_addon_enroll_current_date filter to force re-purchase enrollments to be updated with current date. 77 80 78 81 = 1.4.7 = -
woo-commerce-addon-for-wp-courseware/trunk/wp-courseware-woo-commerce.php
r2633713 r2946879 2 2 /** 3 3 * Plugin Name: Woo Commmerce Addon for WP Courseware 4 * Version: 1.4. 74 * Version: 1.4.8 5 5 * Plugin URI: http://flyplugins.com 6 6 * Description: The official extension for WP Courseware to add integration for WooCommmerce. … … 12 12 * 13 13 * @package WPCW_WC_Addon 14 * @since 1.4. 514 * @since 1.4.8 15 15 */ 16 16 … … 19 19 20 20 // Constants. 21 define( 'WPCW_WC_ADDON_VERSION', '1.4. 6' );21 define( 'WPCW_WC_ADDON_VERSION', '1.4.8' ); 22 22 23 23 /**
Note: See TracChangeset
for help on using the changeset viewer.