glabideecomunicative
Forum Replies Created
-
Yes that is what I wanted to do, too bad.
I tried looking around in the code and I managed to turn off shortcode stripping but it still returns a lot of wrong products so I guess I’m giving up. Thanks anyway for the help!
I’ll try to explain myself better. My tab content is a collection of WooCommerce shortcodes, so basically:
[product sku="123"] [product sku="1234"] [product sku="12345"] ... more shortcodes ...Let’s say there’s 5 products with
[product sku="1234"]in their tabs. If I trash the product with sku=1234, the shortcodes are not deleted from the tabs and I have to find them manually.
To make this process quicker I was trying to use your plugin to search through the custom tab content. My search term is the ENTIRE shortcode, so[product sku="1234"]. My idea was that this would return a list of products that have that specific shortcode in their tabs, but it doesn’t seem to be working- This reply was modified 7 years, 1 month ago by glabideecomunicative.
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Translate tab titles with WPMLHey,
I assumed so. I digged around a bit and found a WPML hook that returns the current language (wpml_current_language) and also these snippets from a few days ago: https://wordpress.org/support/topic/change-custom-tabs-titles/I managed to get a small snippet together that does the job just fine. Once again I will leave it here in case someone else finds the thread.
add_filter( 'woocommerce_product_tabs', 'yikes_rename_default_woocommerce_tabs', 98, 1 ); function yikes_rename_default_woocommerce_tabs( $tabs ) { $lang = apply_filters( 'wpml_current_language', NULL ); if ( $lang == 'it' ) { if ( isset( $tabs['technical-data'] ) ) { $tabs['technical-data']['title'] = 'Dati Tecnici'; } // ... other tabs ... } return $tabs; }Not gonna lie, it’s basically your code with an extra if. But it works lol
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Translating tabs with WPMLThank you. In the meantime, I’ve found a workaround. I’ll share it here in case someone finds this thread.
What I’m doing now is: duplicate the product using the WooCommerce Duplicate button, change the language (using WPML’s menu in the sidebar), translate everything, publish and then click ‘Connect with translations’ under the language selection dropdown and search for the original product. By doing this I don’t have to re-add the tabs and the 2 different versions are still connected, and it still takes less time than re-adding all of my custom tabs to each product
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Translating tabs with WPMLI am duplicating the products by selecting the other language from the menu at the far right in this picture: https://imgur.com/a/SpaDzwA
WPML’s duplicate button is for some reason not present and WooCommerce’s duplicate button (this one? https://imgur.com/a/q84zjE7 ) simply duplicates it in English, and I want to translate it