jpowersdev
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Empty tabs on some product pagesHi @binok,
Can you provide a link to one of the products you are having trouble with? Is this happening on every product or only on some of them?
This is usually caused by malformed HTML in the product description, often due to a shortcode. You might be missing a closing
</div>tag or something, which prevents the WooCommerce JS from correctly displaying the tab’s content when you click on it.Jon
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Shortcode for tabsForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Iframe with WPMLHi @laurentdardelet,
Is this happening in your tabs or is it happening generally? Could you also provide a link to a specific product you are having trouble with?
Jon
- This reply was modified 4 years, 6 months ago by jpowersdev.
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Remove TitleHi @plinakos,
I’m not sure what past thread you are referring to, could you provide a little more information? The code you have mentioned here is not part of our plugin. That being said, I can provide some direction.
The code as follows does the “scrolling” action:
$('a[href*="\\#"]').click(function(event){ $('html, body').animate({ scrollTop: $( $.attr(this, 'href') ).offset().top-$('.at-navbar').height() - top_header_height }, 1000); event.preventDefault(); });It basically says “anytime an anchor tag with a # at the beginning of the URL is clicked, scroll to the top of that element minus the height of the navbar”. The problem is, your tabs are hidden when you compute the offset, so it will always be 0. If you chain a
.parent()before the.offset(), it will solve your problem, but it will interfere with any other matching anchor tags that aren’t tabs.You could do a check before the
$('html, body').animate({line to determine if the current link is a tab and if so, set the desired scroll position to that of the parent container, otherwise do it the way it is currently defined.Let me know if that helps,
JonHi @annafjmorris,
It’s PHP, so the functions.php file of your theme is generally the place you would put it. That being said, your theme is a marketplace theme, so you’d need to either make a child theme or plugin to extend it.
Alternatively, there are some plugins that allow you to add PHP snippets to your site. For example: https://wordpress.org/plugins/my-custom-functions/
Jon
Forum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Import meta data nameHi @emoteek,
The tabs metadata key is
yikes_woo_products_tabs, but the content is stored as PHP serialized data. That’s probably not something you’d want to manage in an excel spreadsheet. You’re better off choosing a different format like JSON and modifying the WooCommerce importer to decode and serialize the tab data during the import process. We have a brief article on that here – https://yikesplugins.com/knowledge-base/importing-custom-tabs-using-the-built-in-woocommerce-csv-importer/There’s also a recent support thread on doing the full export & import process located here – https://wordpress.org/support/topic/export-not-including-data/
Let me know if that helps,
JonHi @annafjmorris,
Yes, there are several tickets out regarding TinyMCE in Core. My coworker opened the first one you sent over 🙂 It was regarding a similar issue with the timing surrounding TinyMCE’s initialization. It’s a very particular library.
I’m hoping the code I sent will fix your particular issue, but it may just be a general bug with TinyMCE. Please do let me know what happens.
Thanks,
JonHi @teshn,
Are you referring to Saved Tabs? If you change the title, that change should propagate out to all tabs that haven’t had their “Saved” status overridden on the product level. Here’s an article on Saved tabs and Overriding them: https://yikesplugins.com/knowledge-base/using-saved-tabs/
Jon
Hi @annafjmorris,
This is probably a race condition. I’m not sure why, but TinyMCE is consistently the last script to load on your site. I can’t reproduce these conditions in other environments.
Please add the following code to your site to force our scripts to load after TinyMCE:
add_action( 'admin_enqueue_scripts', 'yikes_modify_dep_array', PHP_INT_MAX); function yikes_modify_dep_array() { try{ global $wp_scripts; foreach( $wp_scripts->queue as $script ) { if (in_array($script, array('repeatable-custom-tabs','repeatable-custom-tabs-shared'), true)) { if (!in_array('wp-tinymce', $wp_scripts->registered[$script]->deps )) { $wp_scripts->registered[$script]->deps[] = 'wp-tinymce'; } } } } catch (Exception $error) { error_log($error); } }Make sure to take a backup or confirm that you have SSH/SFTP access before adding this code, in case there is a conflict.
Let me know how that goes,
Jon- This reply was modified 4 years, 6 months ago by jpowersdev.
Hi @annafjmorris,
I got your email, thanks.
I was able to reproduce the disappearing editor bug on your site. It looks like if I wait for the page to fully load before clicking “Custom Tabs”, it works. If I don’t wait until the full page loads, I get blank screens. But if I click away from the Custom Tabs section to another section (like the Inventory tab) and then back, it also works.
This seems to be due to the way TinyMCE is initializing the iframe. If you change the visibility of the editor before it runs the initial setup, it won’t do the setup. But then if you change the visibility again, it fixes itself.
Can you confirm this behavior on your end?
Thanks,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Export not including dataHi @danidub,
Great, glad you got it working! Let us know if you need anything in the future.
Thanks,
JonHi @neighbour,
Oh, great! Glad it’s still working.
No worries! That’s just how it goes. As soon as you ask, you figure it out 🙂
Thanks,
JonForum: Plugins
In reply to: [WP REST API Controller] Changelog not updatedForum: Plugins
In reply to: [Easy Forms for Mailchimp] Edit number of shortcodeHi @janedoe9988,
Each time you create a new form, the ID is incremented. You can’t edit the ID of the form without going into the database directly, and I wouldn’t recommend that.
Why do you want to edit it? There might be another solution here.
Thanks,
Jon