Plugin Directory

Changeset 1587341


Ignore:
Timestamp:
02/02/2017 01:50:02 PM (9 years ago)
Author:
irenem
Message:

Quick fix for lower PHP version.

Location:
coursepress
Files:
1029 added
6 edited

Legend:

Unmodified
Added
Removed
  • coursepress/trunk/2.0/coursepress.php

    r1582451 r1587341  
    22/**
    33 * Plugin Name: CoursePress
    4  * Version:     2.0.3
     4 * Version:     2.0.3.1
    55 * Description: CoursePress turns WordPress into a powerful online learning platform. Set up online courses by creating learning units with quiz elements, video, audio etc. You can also assess student work, sell your courses and much much more.
    66 * Author:      WPMU DEV
     
    5757     * @var string
    5858     */
    59     public static $version = '2.0.3';
     59
     60    public static $version = '2.0.3.1';
    6061
    6162    /**
  • coursepress/trunk/2.0/include/coursepress/data/class-course.php

    r1582451 r1587341  
    10691069            return false;
    10701070        }
    1071 
     1071        /**
     1072         * check Course settings
     1073         */
    10721074        $is_paid = self::get_setting( $course_id, 'payment_paid_course', false );
    1073 
     1075        $is_paid = cp_is_true( $is_paid );
    10741076        if ( ! $is_paid ) {
    10751077            // Try the other meta
    10761078            $is_paid = self::get_setting( $course_id, 'paid_course', false );
    1077         }
    1078 
    1079         if ( $is_paid ) {
    1080             // Check for supported integration
    1081             if ( class_exists( 'CoursePress_Helper_Integration_MarketPress' ) ) {
     1079            $is_paid = cp_is_true( $is_paid );
     1080        }
     1081        /**
     1082         * Check for supported integration: MarketPress
     1083         */
     1084        if ( $is_paid && class_exists( 'CoursePress_Helper_Integration_MarketPress' ) ) {
     1085            if ( defined( 'MP_VERSION' ) && MP_VERSION ) {
    10821086                $is_paid = CoursePress_Helper_Integration_MarketPress::$is_active;
    1083             } elseif ( class_exists( 'CoursePress_Helper_Integration_WooCommerce') ) {
    1084                 $is_paid = CoursePress_Helper_Integration_WooCommerce::$is_active;
    1085             }
    1086         }
    1087 
    1088         $is_paid = empty( $is_paid ) || 'off' == $is_paid ? false : true;
    1089         return $is_paid;
     1087                $is_paid = cp_is_true( $is_paid );
     1088                return $is_paid;
     1089            }
     1090        }
     1091        /**
     1092         * Check for supported integration: WooCommerce
     1093         */
     1094        if ( $is_paid && class_exists( 'CoursePress_Helper_Integration_WooCommerce' ) ) {
     1095            if ( class_exists( 'WooCommerce' ) ) {
     1096                $is_paid = CoursePress_Helper_Integration_WooCommerce::$is_active? 'on':'off';
     1097                $is_paid = cp_is_true( $is_paid );
     1098                return $is_paid;
     1099            }
     1100        }
     1101        /**
     1102         * when there is no integration, always return false!
     1103         */
     1104        return false;
    10901105    }
    10911106
  • coursepress/trunk/2.0/include/coursepress/data/shortcode/class-coursetemplate.php

    r1582451 r1587341  
    423423             * If there is no script, made a regular link instead of button.
    424424             */
    425             if ( empty( wp_script_is( 'coursepress-front-js' ) ) ) {
     425            $is_wp_script = wp_script_is( 'coursepress-front-js' );
     426            if ( empty( $is_wp_script ) ) {
    426427                /**
    427428                 * fix button on shortcode
  • coursepress/trunk/changelog.txt

    r1582451 r1587341  
    55CHANGELOG
    66=================================================
     7= 2.0.3.1 =
     8* Fixed: Fatal error thrown on old PHP version
     9* Fixed a bug when user can enroll in the course without paying to paid course.
     10
    711= 2.0.3 =
    812-------------------------------------------------
  • coursepress/trunk/coursepress.php

    r1582451 r1587341  
    22/**
    33 * Plugin Name: CoursePress
    4  * Version:     2.0.3
     4 * Version:     2.0.3.1
    55 * Description: CoursePress turns WordPress into a powerful online learning platform. Set up online courses by creating learning units with quiz elements, video, audio etc. You can also assess student work, sell your courses and much much more.
    66 * Author:      WPMU DEV
  • coursepress/trunk/readme.txt

    r1582455 r1587341  
    77Requires at least: 4.1
    88Tested up to: 4.7
    9 Stable tag: 2.0.3
     9Stable tag: 2.0.3.1
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    111111
    112112== Changelog ==
     113= 2.0.3.1 =
     114* Fixed: Fatal error thrown on old PHP version
     115* Fixed: a bug when user can enroll in the course without paying to paid course.
     116
    113117= 2.0.3 =
    114118* Fixed a bug with deleting sections within modules.
Note: See TracChangeset for help on using the changeset viewer.