Соцлокер не функция - PullRequest
       76

Соцлокер не функция

0 голосов
/ 04 ноября 2019

Пожалуйста, кто-нибудь может мне помочь с этой ошибкой:

Я пытаюсь добавить скрипт социальной блокировки на мой сайт WordPress и получаю это сообщение об ошибке:

Uncaught TypeError: $(...). sociallocker не является функцией

http://prntscr.com/ps3kkt

вот код:

$page_js = "
    jQuery(function ($) {
        'use strict';
        blog.ItemDetails($);

        jQuery(document).ready(function ($) {
            $('#dst-social-lock').sociallocker({
                url: '".get_the_permalink($product->id)."?utm_source=ShareButton',
                theme: 'flat',
                facebook:{
                    appId: '".get_option('dst-facebook-api')."',
                },
                twitter: {
                     tweet: {
                         text: 'Free download ".$product->title." by ".$user->userName." on @blog #blog'
                     }
                },
                text: {
                    message: 'Share and download this product free.'
                },
                buttons:{
                    order: ['facebook-share','twitter-tweet','linkedin-share'],
                    counters: false,
                    lazy: true,
                    localStorage: false,
                    console: false
                }
            });
        });
    });
";
wp_add_inline_script('dst-script', $page_js);

Заранее спасибо

...