Unanswered Questions
2,960 questions with no upvoted or accepted answers
4
votes
0
answers
194
views
permalinks with get variables
I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows
add_filter( 'query_vars','driver_vars' );
function driver_vars( $vars ) {
...
4
votes
1
answer
2k
views
Looking for callback function after Gutenberg is rendered?
On post/page editing screen, I want to call my functions as soon Gutenberg editor/whole page is fully rendered and visible. On WP 5.2.2, I have tried jQuery(document).ready(function () {}); and wp....
4
votes
2
answers
705
views
Wordpress scheduled task is called but not executed
I created a plugin with a cron to update all posts of a certain type every 5 minutes. I installed WP Crontrol to check if the cron is registered correctly and everything seems to be okay.
This is how ...
3
votes
0
answers
77
views
Block Editor: Filter getSaveElement and innerBlocks
I'm the author of the Falang multilanguage plugin for wordpress (https://wordpress.org/plugins/falang/), trying to add a feature allowing site admins to translate their site from inside the gutenberg ...
3
votes
0
answers
695
views
Gutenberg text field validation
I have been searching for ages but can't seem to find an exact method on how to perform text input validation when building custom blocks. I saw that for TextControl inputs you can just pass the ...
3
votes
0
answers
210
views
Gutenberg is there a way to know if the current block is reusable?
So I have developed some blocks using React, I save my css generated in the post meta, that's works fine. In the case of reusable blocks:
Whene we set a block as reusable this block will saved as ...
3
votes
1
answer
390
views
Loading class files via autoload method
We have core classes created for theme and we are moving those classes to client-mu-plugins. Is there any way we can load all of the classes without adding require_once function for every single files?...
3
votes
1
answer
3k
views
How can I add a custom header to a custom template in a plugin without using the theme folders
There is a lot of documentation on how to create custom headers for a theme. For example, if I wanted to add a header named:
header-custom.php
I would add this to my template file:
get_header('...
3
votes
1
answer
229
views
How can I translate the name of my Plugin for other languages?
How can I translate the name of plugin for other languages? For example:
When Wordpress is in pt-BR language, the plugin would be "Meu plugin".
If the Wordpress is in en-XX language, the plugin name ...
3
votes
0
answers
572
views
Solve cors problem using rest api or ajax
I'm building an app with nuxt using WP as a CMS, so I have this code in my functions.php to allow any origin (temporary) using the rest api and admin-ajax urls
function add_cors_http_header(){
// ...
3
votes
1
answer
318
views
Claim Listing functionality - how to send email to users when their claim has been approved or denied
We have a claim listing plugin, it allows items(posts) to be claimed by users. It requires the user to "register" in order to claim that item therefore they have to enter a username and their email.
...
3
votes
1
answer
3k
views
How to get orders with used coupon in WooCommerce
Im trying to get orders in WooCommerce (ideally through wc_get_orders) where the coupon code "some_code" was used.
My try:
function get_orders_with_coupon($coupon){
$customer_orders = ...
3
votes
0
answers
1k
views
Is it possible to intercept all ajax requests and get the parameters and the returns?
Is there any hook that always goes through it, where I can see all the requests, and also the returns after the "action" that is executed?
I need to intercept all requests, including requests from ...
3
votes
0
answers
259
views
Gutenberg - What is the best way to save/update post meta?
What would be the best way in Gutenberg to save/update post meta (not from a block). I can't find an API for it.
I was thinking of doing some ajax in componentDidMount using wp.ajax.post
Any advice ...
3
votes
0
answers
449
views
Wordpress password reset - why post rp_key?
I'm developing a plugin and after reading through wp-login.php, I can't seem to work out why some things are done the way they are.
Why does WordPress hide the reset password key from the URL?
After ...