jpowersdev
Forum Replies Created
-
Forum: Plugins
In reply to: [Easy Forms for Mailchimp] Old Tags Deleted When New One AddedNo, that is not the expected behavior. I did some testing to double-check and the Tag is added to the list of existing Tags for that user regardless of the settings used when setting up the form. I would check your settings in Mailchimp itself.
You aren’t talking about Interest Groups, are you? Those are managed via a setting in the form customizer, you can choose to either update or replace the existing groups. That is outlined here: https://yikesplugins.com/knowledge-base/submission-form-settings/
Thanks,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] to large tabs, to many charactersHi @streamcare2,
There shouldn’t be any problem with that. I wonder, do you see any errors in your site’s debug log? Something is clearly failing, and if we can find some sort of alert or message it might point us in the right direction.
Alternatively, if you know that shorter tabs work, you could always make a shortcode that expands to a large amount of text, and just store the shortcode as the tab content. Is that a viable solution for you?
Let me know,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Change positioning of block tabsHi @andesigner,
The position of the tabs is managed by your theme. Our plugin only extends the list of tabs, it doesn’t do anything related to visual layout.
You will need to determine which file defines the layout of the product single page and look for the tabs so that you can move them. This is entirely dependent on the way your theme is built, so I won’t be able to provide any concrete guidance. That being said, this page lists the built-in WooCommerce templates and may be helpful.
Let me know if that helps,
JonForum: Plugins
In reply to: [WP REST API Controller] Plugin keeps on disabling the taxonomiesHi all,
This is similar to another active thread, so I am going to paste my response from there.
—
Our plugin uses the WordPress Settings API to generate the options page you are trying to submit. The option name for a given taxonomy is
wp_rest_api_controller_taxonomies_{$tax_slug}. Can you try taking a look at your site’s wp_options table and see if you have any options at all with that format? It’s possible that the option is saving correctly but the taxonomy is exempted for other reasons.What is the slug of the taxonomy in question? Does it have any sort of special characters that might prevent it from saving correctly?
Do you see any relevant errors in your site’s debug.log?
Thanks,
JonForum: Plugins
In reply to: [WP REST API Controller] taxonomies will not saveHi @meirk,
Our plugin uses the WordPress Settings API to generate the options page you are trying to submit. The option name for a given taxonomy is
wp_rest_api_controller_taxonomies_{$tax_slug}. Can you try taking a look at your site’s wp_options table and see if you have any options at all with that format? It’s possible that the option is saving correctly but the taxonomy is exempted for other reasons.What is the slug of the taxonomy in question? Does it have any sort of special characters that might prevent it from saving correctly?
Do you see any relevant errors in your site’s debug.log?
Thanks,
JonForum: Plugins
In reply to: [WP REST API Controller] Secure REST endpointsHi @bmcprocess,
This is not a feature of our plugin, but there are other plugins that can provide that functionality. GET requests are by default open on the WordPress API. For example, if you go to any WordPress site (that doesn’t explicitly lock it down) and visit
/wp-json/wp/v2/posts, you’ll see a JSON response with a list of posts.It looks like this plugin (https://wordpress.org/plugins/disable-json-api/) could be installed and used in tandem with our plugin. It seems to allow you to control which types of users have access.
Let me know if that helps,
JonForum: Plugins
In reply to: [WP REST API Controller] using _fields parameter nullify meta keys ?Hi @kaon68,
This is a similar problem to this one here. Basically, when you add query parameters to the request, it is no longer handled by our plugin’s customization. Since it is then a regular API request, you need to register the meta fields with WordPress.
Something like this is necessary for each meta field:
add_action('rest_api_init', function(){ register_rest_field('post-type-slug', 'meta_key', array( 'get_callback' => function($params){ return \get_post_meta($params['id'], 'meta_key', true); } )); });This can be done in a loop if you first define an array of necessary meta keys, then loop through the keys inside the
rest_api_initaction and register theget_callbackfor each one (as seen above).Let me know if that helps,
JonForum: Plugins
In reply to: [WP REST API Controller] how can I call some parameter ?Hi @aminaghamiri,
When you hit the main route that our plugin customizes (i.e. /wp/v2/ninja-table), our plugin registers callback on the fly to make those fields available. However, when you modify the route (i.e. by adding query params to filter out fields) it becomes necessary to register those fields separately.
In this case, you’d probably want to add something like this to your theme’s functions.php file:
add_action('rest_api_init', function(){ register_rest_field('ninja-table', '_ninja_table_columns', array( 'get_callback' => function($params){ return \get_post_meta($params['id'], '_ninja_table_columns', true); } )); });Doing that makes the field globally available to rest API routes and you should then be able to make a request for just that field.
Let me know if that helps,
JonForum: Plugins
In reply to: [WP REST API Controller] Tons of _oembed_ meta keys ?Hi @kaon68,
_oembed keys are created when WordPress caches the response from an Embed, for example using the [embed] shortcode or otherwise embedding something like a YouTube video.
These keys are stored as postmeta, so they show up on our plugin’s list of meta options. If you use a very large number of embeds on your site you will see many similar entries.
I appreciate the suggestion about filtering/minimizing meta values. We will look into adding this functionality.
Thanks,
JonForum: Plugins
In reply to: [Simple Taxonomy Ordering] Hierarchical drag not working properlyHi @vidya1194,
That is expected behavior. When reloading the page you should see the child taxonomies updated to the correct position in the list. Do you see that as well?
Thanks,
JonForum: Plugins
In reply to: [Easy Forms for Mailchimp] Old Tags Deleted When New One AddedFor these existing users, are they part of the same Audience/List? Tags are specific to an Audience-Email pair, so it’s possible to have users with one set of tags in one audience and another set in another audience, while both having the same email address.
Does that help?
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Full width bug in first tabForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Full width bug in first tabHi @sneike,
Try this instead:
window.onload = () => Array.from(document.querySelectorAll('.tabs.wc-tabs > li > a')).map( element => element.addEventListener('click', () => window.dispatchEvent(new Event('resize'))));The plugin just drops it in a script tag in the <head> element, so it’s running before the rest of the page loads.
Let me know if that works,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Full width bug in first tabHi Daniele,
I’m seeing the following snippet added to that plugin:
var resizeEvent = window.document.createEvent('UIEvents'); resizeEvent.initUIEvent('resize', true, false, window, 0); window.dispatchEvent(resizeEvent);That does dispatch a resize event, but only once. The snippet I sent you adds an event listener to the tabs, so that each time you click a tab the resize event is fired.
Let me know if that helps,
JonForum: Plugins
In reply to: [Custom Product Tabs for WooCommerce] Full width bug in first tabHey Daniele,
I’m sorry, I wasn’t very clear. That’s a JavaScript snippet. I believe you had used the Simple CSS & JS plugin for the previous ticket about linking to tabs. You can do the same thing with this snippet. And it’s no bother 🙂
I’m not really sure why it’s only the first tab. That first tab is the regular WooCommerce product description tab, so it may be treated differently by your theme.
Let me know if that helps,
Jon