| Server IP : 104.21.25.182 / Your IP : 216.73.216.252 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/public_html/wp-content/plugins/sfwd-lms/includes/deprecated/4.7.0.1/ |
Upload File : |
<?php
/**
* Deprecated functions from LD 4.7.0.1.
* The functions will be removed in a later version.
*
* @since 4.7.0.1
*
* @package LearnDash\Deprecated
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'learndash_get_course_enrollment_url' ) ) {
/**
* Returns course enrollment url.
*
* @param WP_Post|int|null $post Post or Post ID.
*
* @since 4.1.0
* @deprecated 4.7.0.1
*
* @return string
*/
function learndash_get_course_enrollment_url( $post ): string {
_deprecated_function( __FUNCTION__, '4.7.0.1', 'Learndash_Payment_Gateway::get_url_success' );
if ( empty( $post ) ) {
return '';
}
if ( is_int( $post ) ) {
$post = get_post( $post );
if ( is_null( $post ) ) {
return '';
}
}
$url = get_permalink( $post );
$settings = learndash_get_setting( $post );
if ( 'paynow' === $settings['course_price_type'] && ! empty( $settings['course_price_type_paynow_enrollment_url'] ) ) { // @phpstan-ignore-line -- Deprecated.
$url = $settings['course_price_type_paynow_enrollment_url']; // @phpstan-ignore-line -- Deprecated.
} elseif ( 'subscribe' === $settings['course_price_type'] && ! empty( $settings['course_price_type_subscribe_enrollment_url'] ) ) { // @phpstan-ignore-line -- Deprecated.
$url = $settings['course_price_type_subscribe_enrollment_url']; // @phpstan-ignore-line -- Deprecated.
}
/** This filter is documented in includes/course/ld-course-functions.php */
return apply_filters( 'learndash_course_join_redirect', $url, $post->ID );
}
}
if ( ! function_exists( 'learndash_get_group_enrollment_url' ) ) {
/**
* Returns group enrollment url.
*
* @since 4.1.0
* @deprecated 4.7.0.1
*
* @param WP_Post|int|null $post Post or Post ID.
*
* @return string
*/
function learndash_get_group_enrollment_url( $post ): string {
_deprecated_function( __FUNCTION__, '4.7.0.1', 'Learndash_Payment_Gateway::get_url_success' );
if ( empty( $post ) ) {
return '';
}
if ( is_int( $post ) ) {
$post = get_post( $post );
if ( is_null( $post ) ) {
return '';
}
}
$url = get_permalink( $post );
$settings = learndash_get_setting( $post );
if ( 'paynow' === $settings['group_price_type'] && ! empty( $settings['group_price_type_paynow_enrollment_url'] ) ) { // @phpstan-ignore-line -- Deprecated.
$url = $settings['group_price_type_paynow_enrollment_url']; // @phpstan-ignore-line -- Deprecated.
} elseif ( 'subscribe' === $settings['group_price_type'] && ! empty( $settings['group_price_type_subscribe_enrollment_url'] ) ) { // @phpstan-ignore-line -- Deprecated.
$url = $settings['group_price_type_subscribe_enrollment_url']; // @phpstan-ignore-line -- Deprecated.
}
/** This filter is documented in includes/course/ld-course-functions.php */
return apply_filters( 'learndash_group_join_redirect', $url, $post->ID );
}
}