Theme Core file and plugin issue
I published my site and it's showing 503 error. This is happening with Shop page only. I debugged site and checked core plugin name : ovic-addon-toolkit is causing issue. Server resources are within in limit and I checked with hosting provider 2-3 times.
--- Already updated resource usage under htaccess.
---- Error log : PHP Notice: Undefined index: file in /home/ems1nl2h3bmz/public_html/wp-content/plugins/ovic-addon-toolkit/includes/classes/ovic-core-functions.php on line 672
[13-Sep-2021 08:13:11 UTC] PHP Notice: Undefined index: file in /home/ems1nl2h3bmz/public_html/wp-content/plugins/ovic-addon-toolkit/includes/classes/ovic-core-functions.php on line 673
=================
Function code
// Look through the attachment meta data for an image that fits our size.
$meta = wp_get_attachment_metadata($attachment_id);
$upload_dir = wp_upload_dir();
$base_dir = strtolower($upload_dir['basedir']);
$base_url = strtolower($upload_dir['baseurl']);
$src = trailingslashit($base_url).$meta['file'];
$path = trailingslashit($base_dir).$meta['file'];
if (!empty($meta['sizes'])) {
foreach ($meta['sizes'] as $key => $size) {
if (($size['width'] == $width && $size['height'] == $height) || $key == sprintf('resized-%dx%d', $width, $height)) {
if (!empty($size['file'])) {
$file = str_replace(basename($path), $size['file'], $path);
if (file_exists($file)) {
$needs_resize = false;
$src = str_replace(basename($src), $size['file'], $src);
}
}
========
Line 672 and 673
$src = trailingslashit($base_url).$meta['file'];
$path = trailingslashit($base_dir).$meta['file'];
613f10d990b41.pdf