我有一个安装了WooCommerce插件的Wordpress网站。我已经创建了一个cron作业,用于从gmail中读取电子邮件并在网站上相应地更新产品价格。我使用PHP IMAP功能连接和搜索收件箱中的邮件。此外,通过在WP-config.php中添加Fatal error: Out of memory (allocated 293339136) (tried to allocate 3932134 bytes) in /home/site/public_html/wp-includes/functions.php
来禁用Wordpress cron,并在服务器中创建新的cronjob以便每小时运行一次。
<span id="e-tt1_1" class="tt1">Trigger 3</span>
<span id="e-tt1_2" class="tt1">Trigger 3</span>
<span id="e-tt1_3" class="tt1">Trigger 3</span>
这里的问题是,即使收件箱中没有未读电子邮件,cron作业也会丢失内存错误($(document).ready(function() {
$('.tt1[id^="e-tt1_"]').each(function() {
var $scoop = $('#data_' + $(this).attr('id'));
$(this).qtip({
content: {
text: function(event, api) {
api.elements.content.html('Loading...');
return $.ajax({
url: 'pages/tooltip-pricing-essential1.html',
dataType: 'html'
})
.then(function(content) {
// Append the parsed HTML of the retrieved page to a dummy <div/>, and find all <$scoop> elements
//var elements = $("<div />").append( $.parseHTML(content) ).find('#data_e-tt1_2');
var elements = $("<div />").append( $.parseHTML(content) ).find($scoop);
console.log($scoop);
// Set the content of the tooltip to the selected element(s)
api.set('content.text', elements);
}, function(xhr, status, error) {
api.set('content.text', status + ': ' + error);
});
}
},
position: {
target: 'event', // Use the triggering element as the positioning target
my: 'bottom center',
at: 'right center',
adjust: { x: -15 },
viewport: $(window)
},
style: { classes: 'qtip-light qtip-rounded qtip-shadow' },
hide: {
fixed: true,
delay: 1500
}
});
});
});
)。