• Resolved dreadedhamish

    (@dreadedhamish)


    For a user flow it was suggested in another post to create a restricted page and send people there to trigger the subscription system.

    I’ve checked out the code, which leads me to ask:

    Would there be any issue creating a form that has matching fields, manually loading the JS file, and using that instead?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter dreadedhamish

    (@dreadedhamish)

    I guess I’d also need to wrap the custom form in the same logic that the plugin uses – so that my custom form would only show if the user didn’t have a current subscription, and instead show an “acess content” button. And it would get much more complicated if I have more than 1 type of subscription.

    I am really keen to remove steps needed to make a purchase!

    Plugin Author David Parker

    (@dlparker1005)

    Hi @dreadedhamish,

    Although customizing the signup/purchase flow within the plugin is theoretically possible, it would require a significant amount of custom development and testing to implement.

    When developing this plugin, one of our goals was to keep the plugin as streamlined as possible and require as few clicks as possible when users sign up on your website. Currently, the four times that we require user input are:

    1. Creating a new user on the site if the user is not already logged in
    2. Selecting a Stripe product to purchase if there are multiple purchase options available
    3. Clicking the “Checkout” button to be redirected to Stripe
    4. Completing payment in Stripe

    If you have any suggestions for streamlining the signup flow further, please let us know as having a simple signup process is a priority for this plugin.

    Thread Starter dreadedhamish

    (@dreadedhamish)

    I get it!

    I’m working on my own sign-up form, hard-coding the product ID and loading your JS. It got complicated quickly and I’m cutting and pasting more and more from your code (is user logged in, are they a current subsriber etc…).

    I can see others wanting a user flow that removes extra steps, and a simple form (that allowed specifying the product and redirect url) would be a great addition to this plugin, and not overly complicated, but I get desire to keep things simple!

    Thread Starter dreadedhamish

    (@dreadedhamish)

    @dlparker1005 Would this work?
    Move redirect_url from rwstripe.js to functions.php > rwstripe_restricted_content_message as a hidden field. rwstripe.js can then grab it from the form like the other elements.
    Then a form could be output anywhere using php and inserting a postID that has the desired subscriptions:

    <?php
      $product_ids = rwstripe_get_restricted_products_for_post( 308 );
      rwstripe_restricted_content_message( $product_ids ) 
      ?>

    and redirect_url would now be filterable, allowing you to then send them to the desired content after subcription.

    Plugin Author David Parker

    (@dlparker1005)

    Hi @dreadedhamish,

    That code looks like it should work, though it is important to thoroughly test on your website to ensure that it works as expected in practice.

    One thing that I notice is that you are not checking whether the customer has already purchased the product before showing the restricted content message. This means that customers will see the purchase link even if they have already purchased the product.

    Thread Starter dreadedhamish

    (@dreadedhamish)

    @dlparker1005 Are you open to moving redirect_url from the JS to the functions.php?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Any issue creating a custom subscribe form?’ is closed to new replies.