Plugin Directory

Changeset 2946879


Ignore:
Timestamp:
08/03/2023 03:08:24 AM (3 years ago)
Author:
flyplugins
Message:

1.4.8 Release

Location:
woo-commerce-addon-for-wp-courseware
Files:
13 added
3 edited

Legend:

Unmodified
Added
Removed
  • woo-commerce-addon-for-wp-courseware/trunk/includes/class-wpcw-wc-membership.php

    r2633713 r2946879  
    328328
    329329            $courseIDList = array();
    330 
     330            $enrollment_dates = array();
    331331            // Might not have any levels to process.
    332332            if ( $levelList && count( $levelList ) > 0 ) {
     
    340340                            // the $courseIDToKeep that's the valuable bit.
    341341                            $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);
    345349            }
    346 
    347350            // 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 );
    349353        }
    350354
     
    611615         * @return bool $access True if the user can access the course, false otherwise.
    612616         */
    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 ) {
    614618            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            }
    615633
    616634            // Get orders for $user_id
  • woo-commerce-addon-for-wp-courseware/trunk/readme.txt

    r2831298 r2946879  
    44Tags: learning management system, selling online courses
    55Requires at least: 4.8
    6 Tested up to: 6.1.1
    7 Stable tag: 1.4.7
     6Tested up to: 6.2.2
     7Stable tag: 1.4.8
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 This plugin adds integration between WooCommerce and WP Courseware which allows you to associate course(s) to digital products for automatic enrollment.
     11This plugin adds integration between WooCommerce and WP Courseware which allows you to associate courses to digital products for automatic enrollment.
    1212
    1313== 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.
    1515
    1616= 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).
     17The 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.
    1818
    1919With this addon, you will be able to create a fully automated [Learning Management System](https://flyplugins.com/wp-courseware) and sell online courses.
     
    2323
    2424= Basic Configuration Steps =
    25 = Basic Configuration Steps =
    26 1. Create a course with WP Courseware and add module(s), unit(s), and quiz(zes)
     251. Create a course with WP Courseware and add modules, units, and quizzes
    27262. Create a product and set a price
    28273. 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 product
     284. New student pays for the product, and WP Courseware enrolls them to the appropriate courses based on the purchased product
    3029
    3130= Check out Fly Plugins =
     
    7574
    7675== 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.
    7780
    7881= 1.4.7 =
  • woo-commerce-addon-for-wp-courseware/trunk/wp-courseware-woo-commerce.php

    r2633713 r2946879  
    22/**
    33 * Plugin Name: Woo Commmerce Addon for WP Courseware
    4  * Version:     1.4.7
     4 * Version:     1.4.8
    55 * Plugin URI:  http://flyplugins.com
    66 * Description: The official extension for WP Courseware to add integration for WooCommmerce.
     
    1212 *
    1313 * @package WPCW_WC_Addon
    14  * @since 1.4.5
     14 * @since 1.4.8
    1515 */
    1616
     
    1919
    2020// Constants.
    21 define( 'WPCW_WC_ADDON_VERSION', '1.4.6' );
     21define( 'WPCW_WC_ADDON_VERSION', '1.4.8' );
    2222
    2323/**
Note: See TracChangeset for help on using the changeset viewer.