Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../includes/dynamic-...
File: ProductCatImage.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Themify Builder Pro
[2] Fix | Delete
* @link https://themify.me/
[3] Fix | Delete
*/
[4] Fix | Delete
class Tbp_Dynamic_Item_ProductCatImage extends Tbp_Dynamic_Item {
[5] Fix | Delete
[6] Fix | Delete
function is_available() {
[7] Fix | Delete
return themify_is_woocommerce_active();
[8] Fix | Delete
}
[9] Fix | Delete
[10] Fix | Delete
function get_category() {
[11] Fix | Delete
return 'wc';
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
function get_type() {
[15] Fix | Delete
return array( 'image', 'url' );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
function get_label() {
[19] Fix | Delete
return __( 'Product Category Image', 'tbp' );
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
function get_value( $args = array() ) {
[23] Fix | Delete
global $product;
[24] Fix | Delete
[25] Fix | Delete
$value = '';
[26] Fix | Delete
if ( is_product_category() ) {
[27] Fix | Delete
global $wp_query;
[28] Fix | Delete
$cat = $wp_query->get_queried_object();
[29] Fix | Delete
$thumbnail_id = get_term_meta( $cat->term_id, 'thumbnail_id', true );
[30] Fix | Delete
$value = wp_get_attachment_url( $thumbnail_id );
[31] Fix | Delete
} else if ( ! empty( $product ) ) {
[32] Fix | Delete
$terms = get_the_terms( $product->get_ID(), 'product_cat' );
[33] Fix | Delete
if ( ! is_wp_error( $terms ) && ! empty( $terms[0] ) ) {
[34] Fix | Delete
$thumbnail_id = get_term_meta( $terms[0]->term_id, 'thumbnail_id', true );
[35] Fix | Delete
$value = wp_get_attachment_url( $thumbnail_id );
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
return $value;
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
function get_options() {
[43] Fix | Delete
return array(
[44] Fix | Delete
);
[45] Fix | Delete
}
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function