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
1answer
8 views

Does WordPress run install/uninstall functions on plugin upgrade?

In the current version of my plugin, I create a page on install, and remove it on uninstall. In a new, planned version, I've refactored such that I no longer need that page anymore. When a user ...
-1
votes
0answers
9 views

How do I give an editor full access to the 'Easy appointments' wordpress plugin? [closed]

Currently only admin can fully use the addmin panel of the 'Easy appointments' wordpress plugin. Such as new workers add, new location add etc. I want my editors to be able to handle the appointment ...
0
votes
0answers
8 views

woo-commerce payment methods [closed]

I am trying to develop the WC plugin with custom payment methods. everything is done but when I select a payment method I got an error below No Payment Option Selected! Can anyone help me out with ...
0
votes
1answer
35 views

Posts form with AJAX request - Plugin development

Trying to create a form with AJAX call on the Frontend where the users can submit a post. There is one text field, one textarea, and one file field. Here is the form: public function pp_html_template()...
0
votes
0answers
5 views

Local Pickup conflicting with other shipping methods

We have a fragile product (Product #1) that has a shipping class set to Local Pickup. When this is added to the card, the other shipping method is hidden - this works perfectly. The issue is if a ...
0
votes
0answers
8 views

how to detect user zipcode and save it to cart page in calculate shipping field and checkout page (state, city as per zipcode)?

how to auto detect user zipcode using geolocator ? and save it to cart page shipping calculate field (also save state city as per zipcode using google api) and also save as well as checkout and my ...
-1
votes
0answers
15 views

WYSIWYG Editor escaping output

So I am a plugin developer and my plugin approval request is pending. In my plugin settings, there is a WYSIWYG editor where admin is allowed to add HTML of his own I save the editor content in ...
0
votes
0answers
24 views

How to set Google Analytics tracking code on Wordpress plugin directory page?

I have a plugin in Wordpress Directory and I want to track (somehow) how many guests visit the plugin's page. As I see, there is already presented GA tracking code (tid: UA-52447-1, probably it's from ...
0
votes
0answers
13 views

Is there a good doc for woocommerce? [closed]

does anyone have any good woocommerce documentation ? The only one I could find was here and it is not even complete. Some hooks don't have any description just examples. Thanks !
0
votes
1answer
18 views

get_current_screen() return null

I want to put JavaScript code on certain pages in frontend. But the output return null . add_action( 'wp_footer', function () { $screen = get_current_screen(); var_dump( $screen ); }, 999 );
0
votes
0answers
17 views

How to enhance a self developed plugin by its own plugin architecture

The idea is to create a very basic plugin for wordpress and enhance it with internal modules and some more plugins (e-plugins) if activated. This base plugin would have all the basic code of a ...
1
vote
1answer
22 views

WP Plugin Developers - Accessing my wordpress site [closed]

I bought and installed a premium plugin from a major plugin developer. I don't want to expose the company here IF what I just experienced is in fact legal for them to do. I'm hoping a WP Plugin ...
0
votes
0answers
15 views

Allow a particular user to access a particular plugin?

Hi I am using a Tutor LMS website, so I wanted to give access to the tutor instructor(user) to access a single plugin Presto player in his dashboard. I tried many plugins to change the capabilities ...
0
votes
1answer
17 views

How leave selected checkboxes marked after they are selected and saved in the database

I created a simple plugin. There is an options page and on it, all existing user roles are displayed. Here is the code: <h2>Select user roles to send notifications:</h2> <?php ...
1
vote
0answers
20 views

How to prevent UNDO on guternberg block editor

I have one flag in my plugin, and when it active i want to disable UNDO function in post gutenberg editor. Can someone help me to achieve this ? Thank you.
0
votes
0answers
21 views

Trigger function on Remove block or add new block in Gutenberg JavaScript

I want to perform certain action, when gutenberg block is removed or new gutenberg block is added in post editor. How do i add lister to this two event in gutenberg javascript ? Thank you
0
votes
1answer
26 views

admin_notices show after load completed

This is my code: class App { public function run() { add_action('admin_menu', [$this, 'menu']); add_action('admin_notices', [$this, 'pip']); } public function ...
0
votes
0answers
31 views

Prevent Wordpress from sending set-cookie http header

For some reason Wordpress is setting "Set-Cookie" in the header of the entire site, this is telling my cache server not to cache the page, I tried to remove it via .htaccess, but it disabled ...
0
votes
0answers
8 views

Update cpt post/page with current date & time if post custom field value match to cpt post/page CF Value

My question is - I have a CPT Post name Company (CF Value - Google) and a Page titled Role (CF V - Engineer). So I want to auto-update with Post published time and date to company post and Role page ...
0
votes
0answers
29 views

How to Send Pingbacks for all Posts in WordPress?

I deleted all my pingbacks and wanted to generate them again. I found a some code on WordPress's site, which showed the function pingback($Content, $ID) It send pings to all links mentioned in content....
0
votes
0answers
85 views

Reliable way to add nonce to HTTP Header in WordPress?

I am trying to implement CSP on my wordpress site. Inspired by this question, https://stackoverflow.com/questions/50002041/adding-nonce-to-script-tag I tried to build a way to add nonces to my ...
0
votes
0answers
8 views

Why custom creation e-mail template file comes to mail box as html code? [duplicate]

I work on plugin development for sent user notifications after the new post_type is published. And now I have some stake. For clients important to have a plugin options page for configuration the mail ...
2
votes
0answers
15 views

Passing RichText attributes to function onChange

I have four RichText elements in a custom Gutenberg block I am developing, and they are all very similar except for the "name" attribute, which is currently hard-coded. What I need to do is ...
1
vote
0answers
20 views

Using a custom plugin to capture input data via Ajax and PHP

I'm very new to WordPress, so please excuse my possible lack of understanding. I'm super comfortable with good old vanilla HTML/JS/CSS, and transitioning my hard coded site into WP. My old site had ...
0
votes
0answers
24 views

How to create dynamic content with get_post_meta?

If i create php dynamic website i use the code something like this <input type="text" name="fname"> $name = $_POST['fname']; echo $name; In WordPress i have created a plugin....
1
vote
0answers
11 views

How to hook a custom user function to a wordpress core ajax action?

I need to call a 3rd party API when a permalink edit happens for a post.I found once an edit happens, it calls an ajax function with the core wp post action 'sample-permalink'. How to hook my custom ...
0
votes
1answer
14 views

Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?

I am using a button click to add TinyMCE dynamically. Everything is working except only one issue is that only the last one is writeable. Below is my HTML HTML <div id='add_content_box'></div&...
1
vote
0answers
41 views

Python with wordpress plugin

I am trying to do some experiments with python and wordpress plugins. I would like to have shortcode [python] with some functionalities. I was trying this metod - Method i tried, but when I do ...
0
votes
0answers
21 views

Adding a dropdown on the user admin

I all I'm following this: Add custom column to Users admin panel I need to add a dropdown in the user page (plus+ if I can create the dropdown with values from ACF). The dropdown would be for a ...
0
votes
0answers
27 views

How to create a custom post-new.php page for plugin , no wp menu

I am currently creating an administrator plugin to manage and edit a large amount of separate information about establishments. I recreated a page with the list of articles which is linked to a new ...
0
votes
0answers
20 views

wordpress plugin add page when activate

I have written a WordPress plugin and want to make new page when plugin activate I tried by the following its loading only html its not including css style-sheet which is included in html file if ( ! ...
0
votes
1answer
31 views

WordPress Favicon not Working For Images/Videos/PDFs

I am using WordPress with Neve theme, for my site, Favicon is working on posts/pages, but Favicons aren't visible for JPG/PNG/Videos. If I use the Theme Customizer and select the Favicon PNG image, it ...
0
votes
2answers
46 views

Delete data from database using row action

I have little problem how implement deleting data from database using row actions. I have my custom list which includes data from database table. function column_name( $item ) { $delete_nonce = ...
1
vote
1answer
27 views

Display post lists in 2nd paragraph

Hello great WordPress developers, I would like to list posts from a specif category in the 2nd or middle paragraph of the post. I tried adding some scripts to my function.php to achieve that, but I ...
0
votes
1answer
11 views

How to create WordPress custom end point with multiple parameters?

I want to get all WooCommerce orders from given date range. I can retrieve all orders at once. But I am confusing with passing the date range via API URL. Can anybody help me with this? I know it's ...
2
votes
2answers
95 views

Disable External Pingacks on WordPress Posts and Only Allow 'Self Pings'

I use wordpress for my Social Media site. WordPress Pings allow other blog posts to appear in comments when they link to us. I want to limit it to only blog posts created on my own site. Basically I ...
0
votes
0answers
37 views

Issues calling rest api from a custom plugin javascript

So, I have a custom plugin I'm working on for a WordPress site. I need to make an ajax call when a button is clicked. But when I make the call, nothing happens. So far I got this: I've already ...
1
vote
1answer
25 views

update post meta for checkbox in the admin when inserted in the front-end

Here's my problem, I allow a certain user type to create custom post type in the front-end of my site, with the wp_insert_post() function... users can put values within a form and there's couple of ...
0
votes
1answer
39 views

Custom plugin foreach wp_insert_post not working

I'm sorry, I speak a little English. Why not works? My plugin: ~/wp-content/plugins/mypluggg/mypluggg.php <?php /** * Plugin Name: mypluggg */ function videos() { // file_get_content()...
1
vote
1answer
8 views

Custom plugin icon not showing up

I've tried to create a plugin icon for a plugin I have installed on several sites that I wrote, but is not hosted on Wordpress.org. I've made icons as detailed in the Dev docs, but the icons do not ...
0
votes
1answer
30 views

Different custom templates for product category [closed]

I want to have multiple different templates depending on product category. Looking at Template for different category on woocommerce product I sort of got it working I've copied single-product.php ...
0
votes
1answer
21 views

How to create a custom WordPress page with my plugin?

I'm sorry, I speak a little English. How to create a custom WordPress page with my plugin? I would like see only a text. Example, what I would like: ~/wp-content/plugins/custompageforwp/...
0
votes
1answer
28 views

How to call a function using a shortcode

I want to display enrolled courses on a separate page using a shortcode to call the plugin function on the frontend. Which add_shortcode function do I use? Below is the function I am trying to call $...
0
votes
1answer
22 views

Cron: Update four post at Hour

I have function that update post content automatically based from custom field like this: function update_content(){ $mycustomfield = get_post_meta( get_the_ID(), 'customfield', true); $...
0
votes
1answer
15 views

WPGut - Updating failed and shortcode?

I have a problem updating the WordPress page with custom created shortcode and inserted it? Help, error status code: Updating failed. The response is not a valid JSON response. Shortcode: function ...
0
votes
0answers
15 views

Shortcode for multiple pages

I'm developing a plugin to show users profile list under specific role, each profile must have link for profile details page How can impletent this with the shortcode? I have noticed woocommerece ...
2
votes
0answers
30 views

How to insert text at the current cursor position in Gutenberg?

I am trying to insert text into Gutenberg at the current position for a speech to text solution. I am aware how to insert new blocks. const newBlock = wp.blocks.createBlock( "core/paragraph",...
0
votes
1answer
35 views

submit two file input fields in the same form

I have a form which has two file input fields, each input should be submitted in different metabox in custom post type, when I try to submit the form it takes only the first one and ignore the second ...
0
votes
0answers
24 views

admin_post hook not firing function inside class

I am trying to call a function inside a class, but somehow the function is not getting fired. When hooking into the same hook and just logging a string, the string gets logged. So the hook should work....
0
votes
0answers
13 views

wp_instert_post() and Gutenberg update error

I have made page with function wp_insert_post(), $page_id = wp_insert_post(array( 'post_title' => 'Name', 'post_status' => 'publish', 'post_author'...

1
2 3 4 5
122