Try with init hook
add_action('init', 'child_theme_hooks'); function child_theme_hooks() { add_filter(array('Raymond_NewsletterWidget', 'get_widget_form'), 'translate_subscribe_btn'); } function translate_subscribe_btn() { $new_form = str_replace('Subscribe', 'إشترك الآن', $form); return $new_form; }