Skip to content

Commit

Permalink
chore: bump version to 4.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sapayth committed Feb 13, 2024
1 parent c354eb8 commit 509108d
Show file tree
Hide file tree
Showing 13 changed files with 960 additions and 891 deletions.
26 changes: 26 additions & 0 deletions admin/html/whats-new.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
<?php
$changelog = [
[
'version' => 'Version 4.0.6',
'released' => '2024-02-13',
'changes' => [
[
'title' => __( 'Update deprecated uses for PHP versions and latest WordPress', 'wp-user-frontend' ),
'type' => 'Enhance',
],
[
'title' => __( 'Eye icon inside password field', 'wp-user-frontend' ),
'type' => 'Enhance',
],
[
'title' => __( 'Error after PayPal payment', 'wp-user-frontend' ),
'type' => 'Fix',
],
[
'title' => __( 'Reset password not working', 'wp-user-frontend' ),
'type' => 'Fix',
],
[
'title' => __( 'Subscription posting restriction not working', 'wp-user-frontend' ),
'type' => 'Fix',
],
],
],
[
'version' => 'Version 4.0.5',
'released' => '2024-01-31',
Expand Down
8 changes: 4 additions & 4 deletions assets/js-templates/form-components.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script type="text/x-template" id="tmpl-wpuf-builder-stage">
<div id="form-preview-stage" class="wpuf-style">
<h4 v-if="!form_fields.length" class="text-center">
<?php use WeDevs\Wpuf\Admin\Subscription;

_e( 'Add fields by dragging the fields from the right sidebar to this area.', 'wp-user-frontend' ); ?>
<?php _e( 'Add fields by dragging the fields from the right sidebar to this area.', 'wp-user-frontend' ); ?>
</h4>

<ul :class="['wpuf-form', 'sortable-list', 'form-label-' + label_type]">
Expand Down Expand Up @@ -375,7 +373,9 @@ class="option-chooser-radio"

<div v-if="'logged_in' === selected" class="condiotional-logic-container">

<?php $roles = get_editable_roles(); ?>
<?php use WeDevs\Wpuf\Admin\Subscription;

$roles = get_editable_roles(); ?>

<ul>
<?php
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend-form.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
= v4.0.6 (13 Feb, 2024) =
* Enhance - Update deprecated uses for PHP versions and latest WordPress
* Enhance - Eye icon inside password field
* Fix - Error after PayPal payment
* Fix - Reset password not working
* Fix - Subscription posting restriction not working

= v4.0.5 (31 Jan, 2024) =
* Enhance - Integrate headway and canny

Expand Down
2 changes: 1 addition & 1 deletion includes/Admin/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function is_submission_open( $form, $form_settings ) {

$has_post_count = $current_user->subscription()->has_post_count( $form_settings['post_type'] );

if ( ! $has_post_count ) {
if ( $current_user->subscription()->current_pack_id() && ! $has_post_count ) {
$user_can_post = 'no';
$info = __( 'Post Limit Exceeded for your purchased subscription pack.', 'wp-user-frontend' );

Expand Down
6 changes: 4 additions & 2 deletions includes/Admin/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct() {
/**
* Handle subscription cancel request from the user
*
* @return Subscription
* @return void
*/
public static function subscriber_cancel( $user_id, $pack_id ) {
global $wpdb;
Expand All @@ -74,6 +74,8 @@ public static function subscriber_cancel( $user_id, $pack_id ) {
'transaction_id' => $transaction_id,
]
);

delete_user_meta( $user_id, '_wpuf_subscription_pack' );
}

/**
Expand Down Expand Up @@ -1111,7 +1113,7 @@ public function force_pack_permission( $perm, $id, $form_settings ) {
$current_pack = $current_user->subscription()->current_pack();
$has_post_count = isset( $form_settings['post_type'] ) ? $current_user->subscription()->has_post_count( $form_settings['post_type'] ) : false;

if ( !$has_post_count ) {
if ( $current_user->subscription()->current_pack_id() && ! $has_post_count ) {
return 'no';
}

Expand Down
2 changes: 1 addition & 1 deletion includes/Traits/FieldableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ public function search( $array, $key, $value ) {
/**
* Get WooCommerce attributres
*
* @since WPUF_SINCE moved from Render_Form.php to FieldableTrait.php
* @since 4.0.6 moved from Render_Form.php to FieldableTrait.php
*
* @param array $taxonomy
*
Expand Down
Loading

0 comments on commit 509108d

Please sign in to comment.