Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIKE: AMP Compatible Plugin #978

Open
ksmoore125 opened this issue Sep 21, 2018 · 1 comment

Comments

@ksmoore125
Copy link
Contributor

commented Sep 21, 2018

What would it take to make our existing WordPress Plugin AMP-compatible?

Please provide a high-level effort estimate and also if this would conflict with an of our existing features.

We have an existing AMP Plugin here:
https://www.ampproject.org/docs/reference/components/amp-access-laterpay

@ksmoore125 ksmoore125 added this to To do in LaterPay WP Plugin via automation Sep 21, 2018

@PatelUtkarsh PatelUtkarsh moved this from To do to In progress in LaterPay WP Plugin Sep 27, 2018

@pradeep910

This comment has been minimized.

Copy link

commented Sep 27, 2018

@ksmoore125 AMP-compatible code should not conflict with existing plugin if it's done right. Considering it's going to be used with AMP-WP plugin, I see that following efforts are involved:

  1. Add conditions is_amp_endpoint() for AMP compatible markups.
  2. Remove custom JS libraries and use AMP components instead.
  3. Add Pay now / Pay Later external links directly to the buttons / a tags as custom javascript won't work in AMP.
  4. Handle front end markup for AMP compatibility based on plugin settings given in “Appearance” such as content preview options, purchase button, subscription etc.

Apart from this, I would still have to find out how many things are being done behind the scene and see if it can be supported in AMP.

Issue with the current Laterpay AMP version

I checked existing examples of laterpay for AMP - https://ampexample.laterpay.net/ and https://ampbyexample.com/components/amp-access-laterpay/. I think this will have an issue.
AMP version of laterpay here uses the <amp-access> component. The teaser is show and paid content is hidden, but it exposes paid content on front end markup. https://www.ampproject.org/docs/reference/components/amp-access-laterpay
While the above can work fine for mobile devices, as there is no direct way to get access to the paid content on mobile. But normally, people can also access AMP version of the page on desktop as they have link to amp version of the page, in which case they can use developer tools to unhide the <amp-access>.

As you know AMP’s new 1.0 version is coming with Native, Paired and Classic modes. These modes are already available starting with 0.7 version with some coding changes. This is currently in beta version with new features and fixes.

If someone uses this amp plugin with ‘Native’ AMP mode, then users can have paid content hidden but exposed in the document/markup.

I would like to know if you are concerned with paid content being exposed like that.

MVP for Laterpay AMP support

Existing Laterpay Plugin provides 3 content preview options, standard / custom positions for purchase buttons and Display setting for Subscriptions & Time Passes.
We can support plugin options. However, I would like to know if you have any roadmap for this. How many options would like to support in the initial version?

@ksmoore125 ksmoore125 removed this from In progress in LaterPay WP Plugin Oct 9, 2018

@ksmoore125 ksmoore125 removed this from the ON HOLD: AMP Compatible Plugin milestone Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.