追格小程序:积分商城发布产品报错,WordPress database error Table 'wp_zhuige_xcx_promotion_log' doesn't exist

追格_咖小啡/ 06月15日/ 小程序/ 浏览 802

近期有追格小程序用户反馈,积分商城发布产品报错,大致提示如下:WordPress database error Table 'wp_zhuige_xcx_promotion_log' doesn't exist


若不想过多折腾,可以按以下方式修改:


1、找到后端文件:/zhuige-xcx/public/rest/class-zhuige-xcx-post-controller.php


2、找到以下代码:


			$table_promotion_log = $wpdb->prefix . 'zhuige_xcx_promotion_log';
			$promotion_post_ids = $wpdb->get_col(
				$wpdb->prepare(
					"SELECT DISTINCT(`post_id`) FROM `$table_promotion_log` WHERE `endtime`>%d AND `status`='finish' ORDER BY `createtime` ASC", time()));


3、改为:


			if (ZhuiGe_Xcx_Addon::is_active('zhuige-promotion')) {
				$table_promotion_log = $wpdb->prefix . 'zhuige_xcx_promotion_log';
				$promotion_post_ids = $wpdb->get_col(
					$wpdb->prepare(
						"SELECT DISTINCT(`post_id`) FROM `$table_promotion_log` WHERE `endtime`>%d AND `status`='finish' ORDER BY `createtime` ASC", time()));
			}


4、保存并清理缓存即可。

发表评论

暂无评论,抢个沙发...

客服 工单