plugin_path() . '/assets/js/admin/editor_plugin_lang.php'; return $arr; } /** * Register the shortcode button. * * @param array $buttons * @return array */ public function register_shortcode_button( $buttons ) { array_push( $buttons, "|", "woocommerce_shortcodes_button" ); return $buttons; } /** * Add the shortcode button to TinyMCE * * @param array $plugin_array * @return array */ public function add_shortcode_tinymce_plugin( $plugin_array ) { global $woocommerce; $plugin_array['WooCommerceShortcodes'] = $woocommerce->plugin_url() . '/assets/js/admin/editor_plugin.js'; return $plugin_array; } /** * Force TinyMCE to refresh. * * @param int $ver * @return int */ public function refresh_mce( $ver ) { $ver += 3; return $ver; } } new WC_Admin_Editor();