• Resolved mailtobb

    (@mailtobb)


    Hi,
    great plugin, thanks a lot!
    I have a small problem with the Google Customer Reviews Opt-In at the Woocommerce Thank You page. See screenshot (https://imgur.com/dbN3LnT). Is there way to disable email addresses obfuscation on that page?
    Thanks

    • This topic was modified 4 years, 1 month ago by mailtobb.
Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Hey!

    You can try setting the filter priority. I’d try 0 and 99999 see if that resolves it.

    
    define( 'EAE_FILTER_PRIORITY', 100 );
    

    https://encoder.till.im/guide#priority

    Thread Starter mailtobb

    (@mailtobb)

    Thanks a lot for your fast answer Till!
    However it didn’t resolve it.
    Is there a way to disable the obfuscation on a special page or a special location? Or can I obfuscate just selected e-mail-addresses?
    Thanks again for your help!

    Plugin Author Till Krüss

    (@tillkruess)

    Yes, you can exclude specific email addresses from being encoded:
    https://encoder.till.im/guide#callback

    Can you link me to the plugin, maybe I can submit a patch to fix the issue on their end.

    Thread Starter mailtobb

    (@mailtobb)

    Thanks again for your fast answer!
    Problem is, I want to obfuscate just one e-mail and exclude all others ??
    I am using this script to implement Google Customer Reviews on my Thank You Page https://qreuz.com/snippets/google-customer-reviews-snippet-for-woocommerce/

    Plugin Author Till Krüss

    (@tillkruess)

    Can you send me a link to that page?

    Thread Starter mailtobb

    (@mailtobb)

    https://www.beyersoil.com/shop/ If you want to get to the Thank You Page feel free to order with “überweisung”. I will delete that order afterwards.

    Plugin Author Till Krüss

    (@tillkruess)

    Thanks!

    You gotta make sure this email address isn’t encoded:

    View post on imgur.com

    The Google Optin encoded all content already.

    Thread Starter mailtobb

    (@mailtobb)

    Thanks!
    That e-mail address should be your encoded mail-address. I think it’s encoded via your plugin and then handed over to the Google Optin script. I don’t know how to stop encoding this address. But: I see that this is a very special problem, please don’t spend any more time on this, I will find another solution. Thanks a lot!

    • This reply was modified 4 years, 1 month ago by mailtobb.
    Plugin Author Till Krüss

    (@tillkruess)

    Can you post the window.renderOptIn snippet from your code base that you copied from that article?

    Thread Starter mailtobb

    (@mailtobb)

    function qreuz_google_customer_reviews_optin( $order_id ) {

    $order = new WC_Order( $order_id );

    ?>
    <script src=”https://apis.google.com/js/platform.js?onload=renderOptIn&#8221; async defer></script>

    <script>
    window.renderOptIn = function() {
    window.gapi.load(‘surveyoptin’, function() {
    window.gapi.surveyoptin.render(
    {
    // REQUIRED FIELDS
    “merchant_id”: 103068797, // place your merchant ID here, get it from your Merchant Center at https://merchants.google.com/mc/merchantdashboard
    “order_id”: “<?php echo esc_attr( $order->get_order_number() ); ?>”,
    “email”: “<?php echo esc_attr( $order->get_billing_email() ); ?>”,
    “delivery_country”: “<?php echo esc_attr( $order->get_billing_country() ); ?>”,
    “estimated_delivery_date”: “<?php echo esc_attr( date( ‘Y-m-d’, strtotime( ‘+5 day’, strtotime( $order->get_date_created() ) ) ) ); ?>”, // replace “5 day” with the estimated delivery time of your orders
    “opt_in_style”: “CENTER_DIALOG”
    });
    });
    }</script>

    <?php
    }
    add_action( ‘woocommerce_thankyou’, ‘qreuz_google_customer_reviews_optin’ );

    Plugin Author Till Krüss

    (@tillkruess)

    Try replacing:

    
    <?php echo esc_attr( $order->get_billing_email() ); ?>
    

    With:

    
    <?php echo esc_attr( html_entity_decode( $order->get_billing_email() ) ); ?>
    
    Thread Starter mailtobb

    (@mailtobb)

    It’s somehow decoded but the result is not the e-mail-address, it’s bastian@beyersoil.com

    Plugin Author Till Krüss

    (@tillkruess)

    What should it be?

    Thread Starter mailtobb

    (@mailtobb)

    My e-mail address ?? bastian@bey…oil.com

    Plugin Author Till Krüss

    (@tillkruess)

    What exactly is it showing now? Can you post a screenshot?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Google Customer Reviews Opt-In’ is closed to new replies.