derweili / fb-messenger-bot-for-woocommerce

Stay in contact with you customers via Facebook Messenger. Send them notifications about their orders.
18 stars 7 forks source link

Not Getting the order receipts on messenger #4

Closed Juhenriqueta closed 7 years ago

Juhenriqueta commented 7 years ago

Hi there, I’ve configured the plugin following the steps on FAQ, but it’s not sending the Order Receipts to the messenger. I have no ideia how to fix it... can you help please! Many thanks!

derweili commented 7 years ago

Hi, are the facebook plugin displayed correctly? (send to messenger button and checkbox plugin) Did you add the right subscriptions to you webhook? Are there any JS errors on you page?

Juhenriqueta commented 7 years ago

Hi,

I can’t see send to messenger button, but I can see the checkbox on my checkout page.

Yes, I added the subscriptions as the FAQ instructions:

I can’t see JS errors and here is how it display on my product order page and settings:

Many Thanks! Juliana

On 16 Dec 2016, at 14:36, Julian Weiland notifications@github.com wrote:

Hi, are the facebook plugin displayed correctly? (send to messenger button and checkbox plugin) Did you add the right subscriptions to you webhook? Are there any JS errors on you page?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-267607039, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTrdFrJHd_qgUs90tZzQW0egm6ERFEks5rIqIIgaJpZM4LOuep.

derweili commented 7 years ago

Hi, I've added debug functions to the latest version of the plugin so please update to version 1.4

Then activate the debug log by enabling WP_DEBUG and adding following code to your wp-config.php

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Then do a test checkout and paste the debug log here (you can find the debug log in wp-content/debug.log)

Juhenriqueta commented 7 years ago

Hi, here is the debug log:

[18-Dec-2016 23:59:42 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [18-Dec-2016 23:59:43 UTC] .htaccess contains redirect [18-Dec-2016 23:59:45 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [18-Dec-2016 23:59:45 UTC] .htaccess contains redirect [18-Dec-2016 23:59:47 UTC] .htaccess contains redirect [18-Dec-2016 23:59:48 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [18-Dec-2016 23:59:48 UTC] .htaccess contains redirect [18-Dec-2016 23:59:51 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [18-Dec-2016 23:59:51 UTC] .htaccess contains redirect [18-Dec-2016 23:59:53 UTC] .htaccess contains redirect [18-Dec-2016 23:59:58 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [18-Dec-2016 23:59:58 UTC] .htaccess contains redirect [18-Dec-2016 23:59:59 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:00 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:03 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:03 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:03 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:03 UTC] .htaccess contains redirect [19-Dec-2016 00:00:10 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:11 UTC] .htaccess contains redirect [19-Dec-2016 00:00:14 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:32 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:32 UTC] .htaccess contains redirect [19-Dec-2016 00:00:47 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:00:47 UTC] .htaccess contains redirect [19-Dec-2016 00:01:02 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:02 UTC] .htaccess contains redirect [19-Dec-2016 00:01:11 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:16 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:29 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:29 UTC] .htaccess contains redirect [19-Dec-2016 00:01:33 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:33 UTC] .htaccess contains redirect [19-Dec-2016 00:01:34 UTC] .htaccess contains redirect [19-Dec-2016 00:01:35 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:35 UTC] .htaccess contains redirect [19-Dec-2016 00:01:50 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:01:51 UTC] .htaccess contains redirect [19-Dec-2016 00:01:51 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:02:02 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:02:02 UTC] .htaccess contains redirect [19-Dec-2016 00:02:03 UTC] .htaccess contains redirect [19-Dec-2016 00:02:04 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:02:05 UTC] .htaccess contains redirect [19-Dec-2016 00:02:20 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:02:20 UTC] .htaccess contains redirect [19-Dec-2016 00:02:59 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:04:20 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:04:20 UTC] .htaccess contains redirect [19-Dec-2016 00:05:19 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:06:59 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:06:59 UTC] .htaccess contains redirect [19-Dec-2016 00:07:23 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:07:23 UTC] .htaccess contains redirect [19-Dec-2016 00:07:25 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:07:25 UTC] .htaccess contains redirect [19-Dec-2016 00:07:26 UTC] Send order status notification for completed order. [19-Dec-2016 00:07:26 UTC] send text message [19-Dec-2016 00:07:26 UTC] Der_Weili_Message Object ( [is_reference:protected] => [get_data_return:protected] => Array ( )

[recipient:protected] => 
[text:protected] => Your order has been completed

)

[19-Dec-2016 00:07:28 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:07:28 UTC] .htaccess contains redirect [19-Dec-2016 00:07:29 UTC] .htaccess contains redirect [19-Dec-2016 00:07:30 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:07:31 UTC] .htaccess contains redirect [19-Dec-2016 00:07:31 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:07:31 UTC] .htaccess contains redirect [19-Dec-2016 00:07:46 UTC] PHP Notice: Undefined index: lazyload in /home/jdellorganics16/public_html/wp-content/plugins/sb-woocommerce-infinite-scroll/sb-woocommerce-infinite-scroll.php on line 46 [19-Dec-2016 00:07:46 UTC] .htaccess contains redirect

many thanks!

On 18 Dec 2016, at 15:53, Julian Weiland notifications@github.com wrote:

Hi, I've added debug functions to the latest version of the plugin so please update to version 1.4

Then activate the debug log by enabling WP_DEBUG and adding following code to your wp-config.php

// Enable WP_DEBUG mode define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); Then do a test checkout and paste the debug log here (you can find the debug log in wp-content/debug.log)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-267828855, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTrR1YxcT4D57iHVeJ_6bqz-HHXEdcks5rJVb8gaJpZM4LOuep.

derweili commented 7 years ago

That's strange. All the debug information about the scripts loaded on the thank-you page and the debug information about the webhook are missing.

There are several log entries called ".htaccess contains redirect". Is the woocommerce thank-you page activated or do you redirect your customers to a custom one?

derweili commented 7 years ago

If you want me to check you setup you can add me as a developer to you facebook app (My FB ID is 100000754506878) and send me a link to your WordPress site. So I can check if i can find the error.

Juhenriqueta commented 7 years ago

Hi,

The woocommerce thank-you page is activated. I’ve added you as a developer to the Ellorganics app on facebook. Here is the link to my WP site: https://ellorganics.co.uk/home https://ellorganics.co.uk/home

Many Thanks! Juliana

On 19 Dec 2016, at 20:37, Julian Weiland notifications@github.com wrote:

If you want me to check you setup you can add me as a developer to you facebook app (FB ID is 100000754506878) and send me a link to your WordPress site. So I can check if i can find the error.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-268071567, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTrSHG6DVc9dG6lgn633_P8kGET9E0ks5rJusXgaJpZM4LOuep.

derweili commented 7 years ago

Hi, I'm not sure but maybe I found the problem: I forgot to to write it to the installation instruction: Go to you open you facebook app on and got to the messenger->settings->webhooks and add your facebook site to subscribe to your webhook.

Juhenriqueta commented 7 years ago

Hi,

I did this before I test the plugin… You didn’t put it in the instruction, but I new I had to do it ;)

Many Thanks!

On 21 Dec 2016, at 18:53, Julian Weiland notifications@github.com wrote:

Hi, I'm not sure but maybe I found the problem: I forgot to to write it to the installation instruction: Go to you open you facebook app on and got to the messenger->settings->webhooks and add your facebook site to subscribe to your webhook.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-268608539, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTrd6w9pwjWcx7V-MREzJ82nXiQLlxks5rKXWygaJpZM4LOuep.

derweili commented 7 years ago

Is there a way to do a test order? What version of the plugin du you use? Your webhook url is not correct. Since version 1.2 the webhook url changed to https://ellorganics.co.uk/mbot-callback-webhook/

Juhenriqueta commented 7 years ago

you can make a test order using PayPal sandbox… login: ellotest@test.com mailto:ellotest@test.com password: testello

I’m using the 1.4 version:

I could’t find the mbot-callback-webhook https://ellorganics.co.uk/mbot-callback-webhook/ on my server.

right now it is on: https://ellorganics.co.uk/wp-content/plugins/messenger-bot-for-woocommerce/webhook.php https://ellorganics.co.uk/wp-content/plugins/messenger-bot-for-woocommerce/webhook.php

Many Thanks!

On 21 Dec 2016, at 19:30, Julian Weiland notifications@github.com wrote:

Is there a way to do a test order? What version of the plugin du you use? Your webhook url is not correct. Since version 1.2 the webhook url changed to https://ellorganics.co.uk/mbot-callback-webhook/ https://ellorganics.co.uk/mbot-callback-webhook/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-268617381, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTraTDx_EfIXEkNOy_GlOUyeOSvcVvks5rKX5VgaJpZM4LOuep.

derweili commented 7 years ago

Your Webhook URL is definitely wrong. I made a test order and checked the scripts loaded on you website. they are all loaded correctly.

Please go to settings->Permalinks and save them again. Maybe its a rewrite rule issue.

After you saved the permalinks go to the Messenger Bot settings specify a "Verify Token". Then go to the Facebook App and enter the new Webhook URL https://ellorganics.co.uk/mbot-callback-webhook/ and the verify token.

If this won't work too, I could take a look at your WordPress Settings. Therefore I need admin permissions for a short time. I already created a customer account on you page. Just give it the admin user role.

Juhenriqueta commented 7 years ago

Hi,

I've given you an admin user role, so you can take a look and see what’s happening.

Many Thanks, Juliana

On 21 Dec 2016, at 21:27, Julian Weiland notifications@github.com wrote:

Your Webhook URL is definitely wrong. I made a test order and checked the scripts loaded on you website. they are all loaded correctly.

Please go to settings->Permalinks and save them again. Maybe its a rewrite rule issue.

After you saved the permalinks go to the Messenger Bot settings specify a "Verify Token". Then go to the Facebook App and enter the new Webhook URL https://ellorganics.co.uk/mbot-callback-webhook/ https://ellorganics.co.uk/mbot-callback-webhook/ and the verify token.

If this won't work to I could take a look at your WordPress Settings. Therefore I need admin rights for a short time. I already created a custom account on you page. Just give it the admin user role.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-268644580, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTrcuE_xtX5-vDDBV4Jzz8hKSC6tA6ks5rKZmygaJpZM4LOuep.

derweili commented 7 years ago

Hi, changing WebHook URL has fixed the bug. I made a test purchase and sucessfully got a order notification via facebook messenger.

Juhenriqueta commented 7 years ago

Hi,

Many many thanks!!! you rock! Working perfectly!

Have a great Christmas!

Juliana

On 22 Dec 2016, at 11:44, Julian Weiland notifications@github.com wrote:

Hi, changing WebHook URL has fixed the bug. I made a test purchase and sucessfully got a order notification via facebook messenger.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derweili/fb-messenger-bot-for-woocommerce/issues/4#issuecomment-268783439, or mute the thread https://github.com/notifications/unsubscribe-auth/AXdTrWr_w8n4GXU2X2Ee1KNVnib1YSvDks5rKmKVgaJpZM4LOuep.

derweili commented 7 years ago

I am glad that it now works as desired. Please give the plugin a 5 stars review on the wordpress.org plugin page. https://de.wordpress.org/plugins/messenger-bot-for-woocommerce/