if ( ! function_exists( 'str_replace_last' ) ) :
/**
* A function similar to str_replace except it only replaces the very
* last occurrence of the $search string.
*
* @since 1.0.0
*
* @param string $search
* @param string $replace
* @param string $subject
* @return string
*/
function str_replace_last( $search, $replace, $subject ) {
// Ensure subject is always a string (PHP 8.1 safe)
$subject = (string) $subject;
$pos = strrpos( $subject, $search );
if ( $pos !== false ) {
return substr_replace( $subject, $replace, $pos, strlen( $search ) );
}
return $subject;
}
endif;
Fatal error: Uncaught Error: Call to undefined function is_woocommerce_active() in /home/sealnlock/public_html/wp-content/themes/the-chosen-one/core/plugins/init.php:22
Stack trace:
#0 /home/sealnlock/public_html/wp-includes/class-wp-hook.php(341): thechosenone_add_woocommerce_support('')
#1 /home/sealnlock/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#2 /home/sealnlock/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#3 /home/sealnlock/public_html/wp-settings.php(742): do_action('init')
#4 /home/sealnlock/public_html/wp-config.php(87): require_once('/home/sealnlock...')
#5 /home/sealnlock/public_html/wp-load.php(50): require_once('/home/sealnlock...')
#6 /home/sealnlock/public_html/wp-blog-header.php(13): require_once('/home/sealnlock...')
#7 /home/sealnlock/public_html/index.php(17): require('/home/sealnlock...')
#8 {main}
thrown in /home/sealnlock/public_html/wp-content/themes/the-chosen-one/core/plugins/init.php on line 22