0

I'm building Storefront child theme. I'm trying to add woocommerce shortcodes plugin into the my theme.

Button added but can't load translation file.

custom tinymce button

class-wc-shortcodes-admin.php file

wc-shortcodes-editor-i18n.php

Translation file load codes in class-wc-shortcodes.php

    /**
 * TinyMCE locales function.
 *
 * @param  array $locales TinyMCE locales.
 *
 * @return array
 */
public function add_tinymce_locales( $locales ) {
    $locales['woocommerce_shortcodes'] = get_stylesheet_directory_uri() . '/inc/woocommerce-shortcodes/wc-shortcodes-editor-i18n.php';

    return $locales;
}
1
  • It looks as though this is pretty specific to WooCommerce so you might find it hard to get a good answer here. Officially plugin questions are off topic How to Ask Commented Aug 10, 2016 at 11:36

1 Answer 1

0

Changed get_stylesheet_directory_uri() to get_stylesheet_directory(), and it works.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.