free trial wont stay ticked on Protected content

I have the free trial add-on activated however when i tick free trail on my membership it says it has been saved and then when i leave the page and go back it is once again unticked

  • Patrick

    Hi there @Joe

    I hope you're well today!

    Whoops, that is confirmed on my test site.

    The number of days a free trial is set for does indeed save, But the actual checkbox remains unchecked so the free trial period does not get applied at registration.

    It like a typo or some other little error crept into a recent update.

    I've notified the plugin developer so he can investigate and get this fixed as soon as possible.

    Thanks for bringing this to our attention. :slight_smile:

  • Philipp Stracker

    Hi Joe,

    we have found and fixed the issue. It will be included in the release 1.1.0 - I cannot give you an ETA on this, but it will be out soon.

    If you are eager to get the trial flag working there is a quick bugfix that you can apply yourself - it will not look great, but it works :wink:

    - Edit file /wp-content/plugins/protected-content/app/view/membership/class-ms-view-membership-setup-payment.php
    - Find the following lines (it should be in line 301) and make this change:

    Current code:

    'trial_period_enabled' => array(
    	'id' => 'trial_period_enabled_' . $membership->id,
    	'type' => MS_Helper_Html::INPUT_TYPE_CHECKBOX,

    Working code:

    'trial_period_enabled' => array(
    	'id' => 'trial_period_enabled_' . $membership->id,
    	'type' => MS_Helper_Html::INPUT_TYPE_RADIO_SLIDER, // This line changed!

    This will replace the checkbox with a different toggle element which saves the trial-state correctly.

    Thanks, Philipp :slight_smile:

  • Philipp Stracker

    Hm... The message means that the payment response was invalid/not confirmed, so as a quick-solution you could test with a different payment gatway until we have resolved this.

    Some questions:
    - Does this happen only when trial membership is enabled or always?
    - Which payment gateway did you use to produce that message?

    Also could you follow these steps to get some more information on this issue:
    1. In your wp-config.php file add these lines:

    defined( 'WP_DEBUG', true );
    defined( 'WP_DEBUG_LOG', true );

    2. Produce the message by signing up to a membership
    3. Now open the file wp-content/debug.log - at the end there should be one/more entries on the payment with some additional information why it failed.
    Can you let us know about the information in these log entries?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.