• Resolved vah330

    (@vah330)


    I am using MyCred with Paid Membership Pro and the myCred Paid Membership Pro Addon.

    I recently upgraded to MyCred Version 2.4.5.4 with Addon Version 1.0.2 and PMP Version 2.8.3

    Ever since the upgrade the [mycred_show_if… shortcodes stopped working. The tags disappear from my WP pages but are not executed. For example I had:

    [mycred_show_if balance=”0″ types=”warnings”][mycred_total_balance types=”warning”] Warnings issued[/mycred_show_if]

    and on the resulting page I get BOLDED:

    [mycred_total_balance types=”warning”] Warnings issued

    The enclosed shortcode ‘mycred_total_balance’ isn’t executed either. If I have the [mycred_total_balance types=”warning”] shortcode on a separate line, it displays “1” (a correct result – without the quotes)

    It worked as expected previously. I don’t know what is responsible so I can look into it further.

    Help?

Viewing 15 replies - 16 through 30 (of 40 total)
  • A.Tariq

    (@arsalantariq)

    @vah330,

    We have tested it. It is working with all point types not just the default myCred point type. Please find attached the plugin.

    Download Link: https://we.tl/t-Ci32zkBGGv

    A.Tariq

    (@arsalantariq)

    @vah330,

    Have you tested it thoroughly?

    • This reply was modified 2 years, 9 months ago by A.Tariq.
    Thread Starter vah330

    (@vah330)

    I have not tested the latest download yet. I will try for Wednesday and let you know as soon as I do.

    Dan O.

    Thread Starter vah330

    (@vah330)

    Ok I downloaded and installed the files in mycred (10).zip. It still does not function correctly. This is the page code (updated slightly)

    
    
    Warnings = [mycred_total_balance types="warning"]
    Credits = [mycred_total_balance types="mycred_default"]
    Tests = [mycred_total_balance types="test"]
    
    [mycred_show_if balance=-1 ctype=”mycred_default”]0 Credits remaining[/mycred_show_if]
    [mycred_show_if balance=5 ctype=”mycred_default”]5 Credits remaining[/mycred_show_if]
    [mycred_show_if balance=10 ctype=”mycred_default”]10 Credits remaining[/mycred_show_if]
    
    [mycred_show_if balance=1 ctype="mycred_default"]Display this: [mycred_total_balance types="mycred_default"] unused search credits.[/mycred_show_if]
    
    [mycred_show_if balance=-1 ctype=”warning”]-0 Warnings issued[/mycred_show_if]
    [mycred_show_if balance=0 ctype=”warning”]0 Warnings issued[/mycred_show_if]
    [mycred_show_if balance=1 ctype=”warning”]1 Warnings issued[/mycred_show_if]
    [mycred_show_if balance=2 ctype=”warning”]2 Warnings issued[/mycred_show_if]
    
    [mycred_show_if balance=0 ctype=”test”]0 tests[/mycred_show_if]
    [mycred_show_if balance=1 ctype=”test”]1 test[/mycred_show_if]
    [mycred_show_if balance=2 ctype=”test”]2 tests[/mycred_show_if]
    
    

    I added a new myCred type “test” and this is the result now:

    Warnings = 1
    Credits = 10
    Tests = 2

    5 Credits remaining

    10 Credits remaining

    Display this: 10 unused search credits.

    0 Warnings issued

    1 Warnings issued

    2 Warnings issued

    0 tests

    1 test

    2 tests

    I don’t know how I can test it “thoroughly”. You can see that the [mycred_total_balance shortcode is recognizing the defult myCred type as well as both “warning” and “test” types but the [mycred_show_if shortcode is only recognizing the default myCred type.

    What else can I do to test?

    A.Tariq

    (@arsalantariq)

    Hi @vah330,

    Can you please share a screencast video regarding the process you are using with the backend settings so we can replicate it on our end right now we have tested and it’s working fine on our staging environment?

    Thread Starter vah330

    (@vah330)

    I don’t know what a screencast video is so I’m sure I can’t. I also don’t know what “process” you’re interested in.

    I edit a WordPress page with the code I showed and then press “update”. I then look at the resulting page and see the results I also posted. What process?

    Here’s the 2 screen shots:

    https://much2.com/temp/test%20points%20code.jpg
    https://much2.com/temp/test%20points.jpg

    Thread Starter vah330

    (@vah330)

    I now see that those other shortcodes are acting upon the default credit type not the other types I have added:

    Warnings = 1
    Credits = 1
    Tests = 2

    Display this: 1 unused search credits.

    0 Warnings issued

    1 Warnings issued

    0 tests

    1 test

    —–

    Warnings = 1
    Credits = 2
    Tests = 2

    Display this: 2 unused search credits.

    0 Warnings issued

    1 Warnings issued

    2 Warnings issued

    0 tests

    1 test

    2 tests

    A.Tariq

    (@arsalantariq)

    @vah330,

    We have replicated your scenario in our environment. The shortcode is working fine for multiple point types. See the attached screenshots.

    Screenshots: https://we.tl/t-8Kjofxk0JT

    Thread Starter vah330

    (@vah330)

    That shows you’re getting the exact same results as I am, not necessarily the correct results.

    Please try setting the default credits to 0 (zero) leaving the others as they are and then show me what displays for the shortcodes:

    0 Warnings issued

    1 Warnings issued

    2 Warnings issued

    0 tests

    1 test

    2 tests

    In my case none of those will display while they still should as those still have values, only the default does not.

    A.Tariq

    (@arsalantariq)

    @vah330,

    This shortcode is working as it should be working. I have set mycred_default point type to zero and I have logged in with the user which has zero balance for all point types. The final result is what it should be. Please find attached the screenshots.

    Screenshots: https://we.tl/t-foB3n0QOXy

    Thread Starter vah330

    (@vah330)

    I’m sorry but you’re not understanding me.

    Please give an account

    0 default credits
    10 warning credits
    10 test credits

    Then see what those shortcodes display. The warning and test values should still display by those shortcodes. In my case they don’t.

    Those shortcodes are only acting upon the default credit value not the other, individual added credit type values. They only use the value of the default credit type in the if… statement. Setting all to credits to 0 does will not illustrative the problem I am experiencing with those shortcodes.

    I don’t know how else to try to explain it.

    Please give an account

    0 default credits
    10 warning credits
    10 test credits
    `

    And see the results on the page with the shortcopdes.

    • This reply was modified 2 years, 9 months ago by vah330.
    A.Tariq

    (@arsalantariq)

    @vah330,

    We have done some code-level changes please use the below shared plugin also do let us know how it is working for you.

    Download Link: https://we.tl/t-pRcXT6lO6D

    Thread Starter vah330

    (@vah330)

    OMG. NO it is not working like it should. The [mycred_show_if balance… shortcodes are not working at all now.

    Here is the page code I’m using:

    
    
    Credits = [mycred_total_balance types="mycred_default"]
    Warnings = [mycred_total_balance types="warning"]
    Tests = [mycred_total_balance types="test"]
    
    [mycred_show_if balance=-1 ctype=”mycred_default”]0 Credits remaining[/mycred_show_if]
    [mycred_show_if balance=5 ctype=”mycred_default”]5 Credits remaining[/mycred_show_if]
    [mycred_show_if balance=10 ctype=”mycred_default”]10 Credits remaining[/mycred_show_if]
    
    [mycred_show_if balance=1 ctype="mycred_default"]Display this: [mycred_total_balance types="mycred_default"] unused search credits.[/mycred_show_if]
    
    [mycred_show_if balance=-1 ctype=”warning”]-0 Warnings issued[/mycred_show_if]
    [mycred_show_if balance=0 ctype=”warning”]0 Warnings issued[/mycred_show_if]
    [mycred_show_if balance=1 ctype=”warning”]1 Warnings issued[/mycred_show_if]
    [mycred_show_if balance=2 ctype=”warning”]2 Warnings issued[/mycred_show_if]
    
    [mycred_show_if balance=0 ctype=”test”]0 tests[/mycred_show_if]
    [mycred_show_if balance=1 ctype=”test”]1 test[/mycred_show_if]
    [mycred_show_if balance=2 ctype=”test”]2 tests[/mycred_show_if]
    
    

    and this is the result:

    Credits = 0
    Warnings = 1
    Tests = 2

    5 Credits remaining

    10 Credits remaining

    Display this: 0 unused search credits.

    0 Warnings issued

    1 Warnings issued

    2 Warnings issued

    0 tests

    1 test

    2 tests

    The [mycred_show_if shortcode isn’t even working for the default credit type now as you can see in the results above.

    Thread Starter vah330

    (@vah330)

    Can the [mycred_show_if shortcodes not retrieve those separate credit values using the ‘ctype’ parameter the same way the [mycred_total_balance types=”warning”] shortcode does using the ‘types’ parameter?

    .

    A.Tariq

    (@arsalantariq)

    @vah330,

    Sorry for the inconvenience caused, Please use the shared plugin now its working fine for all point types.

    Screenshots: https://we.tl/t-dF0IocrfVi

    Plugin Download Link: https://we.tl/t-NrVOnOnuqv

Viewing 15 replies - 16 through 30 (of 40 total)
  • The topic ‘mycred_show_if stopped working’ is closed to new replies.