devshakhawat / memberpress-two-tier-recurring-addon

working on memberpress addon
0 stars 0 forks source link

Feedback #2

Open mukto90 opened 2 days ago

mukto90 commented 2 days ago

1. PayPal subscription integration is not done

2. Membership data is not synced

You've altered the data to be sent to Stripe, so that Stripe creates payments/subscriptions with the correct amount. But, once a membership is created in MemberPress/WordPress, we need to update this with the correct amount as well.

3. JavaScript variables were not scoped

Example code:

    $('#mepr-product-billing-type, #_mepr_product_period_type-presets').on( 'change', function() {
        billingType = $('#mepr-product-billing-type').val();
        periodType  = $('#_mepr_product_period_type-presets').val();

        if( billingType === 'recurring' && periodType === 'yearly' ) {
            $('.mp_second_year').show();
        } else {
            $('.mp_second_year').hide();
        }

    })

If you don’t declare billingType with let, const, or var, JavaScript will treat it as a global variable (which is usually not recommended)

4. Unnecessary or dummy code/files

Example:

5. The use of boilerplate is discouraged

We assume you've used some sort of boilerplate as we see irrelevant code like-

    wpPot({
        destFile: 'languages/sktplugin.pot',
        domain: 'sktplugin',
        package: 'Skt_Memberpress',
        src: ['**/*.php', '!freemius/**/*.php']
    });

freemius is not relevant to our task.

mukto90 commented 2 days ago

We may add more feedbacks soon.