Questions tagged [plugin-development]

WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Wordpress Does not grab the string sends useing AJAX response, wp_ajax hook

The problem with my code is that it seems to be working. The AJAX request is success, but it doesn't return any data with the current setup I have (e.g is return me Notice: Undefined index: time in ......
0
votes
0answers
15 views

Error code when migrate

I got this error code after migration to different server. " Warning: require_once(/home/customer/www/noname.com/public_html/wp-includes/widgets/class-wp-widget-pages.php): failed to open stream: ...
-1
votes
0answers
17 views

Online exam management plugin in Wordpress with following features? [closed]

I have found many wordpress plugin such as wp-pro-quz, QSM etc but none of these has the following features. Is there any plugin containing the following features?
0
votes
1answer
17 views

Dokan Marketplace store link in single product page

I use this this way to display product store link with [vendor_shop_name] shortcode in custom product page. /*Shortcode [vendor_shop_name] https://stackoverflow.com/questions/55364574/display-dokan-...
0
votes
0answers
19 views

Will I get an error if I try unscheduling a WP Cron scheduled task that wasn't scheduled?

So, I'm developing a plugin, I wanted to know if I call $timestamp = wp_next_scheduled( 'scheduled_hook' ); wp_unschedule_event( $timestamp, 'scheduled_hook' ); Without checking if it's scheduling at ...
0
votes
0answers
14 views

How to return statusCode with custom error message in graphql in wordpdress? [closed]

I want following result-- "errors": [ { "message": "Invalid language code passed!", "statusCode": 403 "extensions": { "category": "...
0
votes
0answers
49 views

How to set plugin auto-update Enabled by default?

I have the following problem. I have created a plugin for Wordpress. In the first versions of the plugin I forced users to auto update using this function: function my_plugin_auto_update ( $update, $...
0
votes
1answer
33 views

How to prepare (compress/zip) a plugin to enable updating instead of adding new instance?

I created my own plugins and install/update them by uploading the zip file in the dashboard. That worked well, but suddenly1 a new instance of the plugin gets added instead of updating the already ...
0
votes
0answers
33 views

How to create a wordpress endpoint to receive and handle a JSON POST request [closed]

I´m coding a plugin that needs to receive a JSON POST request from another website to update some data in my site, but I searched in all the internet and found nothing about how to do that, can some ...
0
votes
0answers
16 views

Create ACF Checkbox to get all ACF Values from Parent Page

I want to create a wordpress plugin which is be able to load the values of the parent pages ACF Fields into the Values of the subpages. Is there a way to do that? At the moment I have the code to get ...
0
votes
0answers
21 views

Error Undefined variable When trying to set a private variable in construct in a class [closed]

this is my class: class PagarmeDokanPagarmeFunctions{ private $api_key, $pagarme; public function __construct(){ require("vendor/autoload.php"); $this->$api_key =...
-1
votes
0answers
28 views

Echo appearing at top of page

I understand that an echo will appear at the top of the page where a return will not. But how do you deal with something like the below where echo the standard choice? <?php $file = ...
0
votes
0answers
20 views

How can i set path parameters for a webhook? [closed]

I'm using webhooks for a plugin developpement, and i struggle to get back data when the external Api call the hook. I have tried using the $_GET provided by the webhook function but it is empty. Is ...
0
votes
0answers
20 views

script seem not load with use wp_enqueue_script

edit : I unlocked using the rest api and not ajax (so no js) thanks to the response of Tom J Nowell I'm pretty new in wordpress plugin dev I want to load some js for a plugin with ajax request. To do ...
0
votes
1answer
26 views

How do I access the contents of Wordpress Classic editor in admin area with JavaScript?

I am working on a small Wordpress plugin which uses JavaScript to add html tags with a css class to the visual text view in the Wordpress editor. I use the Classic Editor. According to Chrome ...
2
votes
1answer
55 views

Set a specific page as 404 - not found via my own plugin

I'm developing a plugin that create some pages and set a specific template for each of these pages. It creates a page in which it sets a template for 404 - not found, how can set this specifc page as ...
0
votes
1answer
21 views

Automatically download, install and activate plugins that my plugin depends, how?

I'm developing a plugin that requires a couple of plugins from WordPress repository to work correctly. Is it possible to download and install from WordPress repository and activate one or more plugin ...
0
votes
1answer
36 views

Count products with custom metadata field in an order

I have a wordpress plugin which performs a count of purchased products in an order which are flagged with my custom metadata value. The custom metadata value is in the form of a checkbox within the ...
0
votes
1answer
10 views

Conditional Generation of Image Sizes using add_image_size

The add_image_size function is used to add image sizes in addition to the default thumbnail, medium, large, & full which are generated in WordPress by default. Is there any way to only add those ...
0
votes
1answer
12 views

How exclude or skip post type with get_next_post_link

I have a post type called families where I add personal information of each family, inside the data there is an option called status. *IMPORTANT: The fields are created with ACF CUSTOM FIELDS These ...
0
votes
0answers
21 views

Query String Filtering API

Currently, I'm working on a search application that searches/filters stores(Custom Post Type) based on the store-feature(Custom Taxamonies) IDs. When I use the WordPress Fetch API, I can get the full ...
0
votes
1answer
24 views

Settings API form - submit with AJAX

I'm creating a plugin where I have a dashboard that is done with Settings API. I'm trying to save data from that form via AJAX. Form: public function agy_dashboard_page() { ?> <form id=&...
0
votes
1answer
29 views

I'm having problems creating blocks for Block widgets

My gutenberg block js code wp.blocks.registerBlockType('beycanpress/cryptopaydonate', { title: 'CryptoPay Donate Box', icon: 'dashicons dashicons-money-alt', category: 'widgets', ...
0
votes
1answer
27 views

Integrating boxtal PHP library into a custom WordPress Plugin

I need to integrate this PHP library on my WordPress site. I read that you have to create a plugin or integrate it into the child theme. So I created a plugin and integrated the PHP library in the ...
0
votes
0answers
19 views

WC Fix Attributes - 'Add New' Not Searchable/Delayed

Installed the WC Fix Attributes plugin Version 1.0 | By Tofandel as found here: Slow Loading Attribute Select - WooCommerce Backend Works a charm and really speeds up searching existing attributes 10 ...
0
votes
0answers
28 views

How to Join wp_posts & wp_postmeta table using custom query

I am trying to create pagination for product details with the help of wp_posts & wp_postmeta table for my woocommerce custom code for admin area. There are 85 products in shop & i want to ...
0
votes
1answer
27 views

Plugins ignored a line breaks or <br> tag in the WordPress comment functions

I found out there is a plugins for ticket support. It uses the WordPress comments functions in the ticket system reply. The issue is the plugin will not accept a line break or with <br.>. How ...
0
votes
1answer
11 views

Order by post_date does not work in Previous and Next post pagination

I have added a previous and next pagination with thumbnail for my single post template but it does not showing the correct previous and next post. Also, saw its showing the previous and next post ...
0
votes
2answers
29 views

Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial

I am following the official WordPress "Create a Block Tutorial" located here: https://developer.wordpress.org/block-editor/handbook/tutorials/create-block/ I used this as a starting point ...
0
votes
1answer
26 views

Looking for a better way to initiate cron job

Is there any other good way to initiate an hourly cron job other than using register_activation_hook within a plugin? As looks like it will not be useful for websites that have already installed and ...
0
votes
1answer
18 views

Translations for my plugin don't show up

I'm pulling my hair out with this one: I want to provide translations for my plugin, but they're not showing up. I followed the documentation and took the following steps: Set up local wordpress ...
0
votes
1answer
20 views

How to extend SelectControl with data from my theme

I'm building a custom gutenberg block that should have a dropdown (SelectControl) to select which css class should be added to my block. So far, nothing special. My problem is that depending on the ...
0
votes
1answer
21 views

Use localized plugin name and description even when the plugin is disabled

I'm working on plugin development and I'd like to localize my plugin name and description, so that these two pieces of information are shown to other WordPress developers in their native languages (if ...
0
votes
0answers
18 views

How to change basename url for wp-admin?

I want to apply some conditions based on site url, e.g redirect login.php, default files etc If a uri is /wp-login.php we do use basename as written below $custom = basename($_SERVER['REQUEST_URI']); ...
0
votes
1answer
19 views

Plugins and caching

So, I've been tinkering with a basic firewall plugin and today I stumbled upon a problem. Caching. I had forgotten that I had LightSpeed cache installed one one of my test sites and went to work on my ...
0
votes
1answer
24 views

Dequeue / Deregister script and replace it with a new plugin

I think I've read a dozen posts about dequeuing and deregistering scripts, but I haven't been able to make it work properly in my situation. My situation: The "uListing" plugins are part of ...
1
vote
1answer
21 views

Run code once when block is created

I'm developing a custom plugin with react and I would like to create a unique identifier for each new added instance of my custom block as soon as it is added to the page. So I add my "custom ...
1
vote
0answers
14 views

Best way to save custom css for an block

I'm building a custom "row" plugin and would like to control some css-grid related stuff from the backend. What is the "best way" to save the css generated from the controls and ...
0
votes
1answer
31 views

How to add the sidebar to all the pages except the home page? [closed]

I am creating a theme and I need some idea to create a below structure on my all the page except on the home page. I know how to create a menu, sidebar, footer, and call dynamically on the page. My ...
0
votes
0answers
13 views

extraprops override existing props

i am trying to add z-index to all existing blocks, so i use filters. but in the save aspect there is an issue: lets say i use a group block, and inside it a spacer block, and so on. the style props of ...
0
votes
1answer
40 views

How to test nonce with AJAX - Plugin development

I built a plugin, but now on end, I am not sure whether my nonce integrated correctly, and I'm not sure how to test them. Can anyone help me test it or let me know if the nonce is integrated correctly?...
0
votes
1answer
22 views

Remove Zero Money From Previews Order woocommerce

I have had many orders in the past that the currency is different and has 4 extra zeros. I want to remove these 4 zeros from them and change their currency together. please help me
0
votes
0answers
10 views

Visual composer custom element error

I am creating a custom element where I need to load woo-commerce product categories as dropdown (in visual composer element edit option) but I am getting this error. can someone tell me where is the ...
0
votes
0answers
11 views

Add custom product data using javascript when add to cart button is clicked

Is there a way to add custom data to the cart using javascript? The data is from URL query params. I have tried using woocommerce_add_cart_item_data and setting query-vars etc, but my data is not ...
0
votes
0answers
12 views

Insert and read media from the WordPress library and call in the plugin

This is my question. I want an option to select a photo from the WordPress library in the plugin settings page so that the uploaded image can be used in different places on the site. I use these ...
0
votes
1answer
16 views

Include external po file for 3th party plugin to theme

I used 3th party plugin in my theme but some of them don't have my target language support.I want to add new language support to these plugins from my theme plugin.How can I do it?
1
vote
0answers
20 views

WordPress post_where & posts_join not working only for custom post type

I have a custom WordPress plugin built for booking courses etc. My custom plugin has some new tables in which custom data like slot date, time etc are stored. I am trying to modify archive query for ...
0
votes
1answer
44 views

Force download file from plugin (change output http headers)

I'm developing a plugin and I want to add a menu entry that forces a file download (a CSV). There are a few posts in this forum and over the internet with a similar solution, all of them are quite old ...
0
votes
0answers
57 views

Post form - AJAX won't upload featured image - Plugin development

I have a form for adding a post via AJAX and PHP. I have three fields. Text, textarea and file input field. Everything it's working, but it won't upload a featured image. When I remove the AJAX call, ...
0
votes
0answers
11 views

Creating plugin with front-end pages

I am trying to create a logged in-section for a wordpress site. I am trying to do this in the form of a plugin to be able to reuse it easily for another site. The idea is to create a new user role (&...

1
2 3 4 5
123