Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
20 views

How to Trigger WP CRON at Local Timestamp?

I am trying to schedule WP Cron that should run every midnight at Local Timestamp, but it is taking UTC only. This the code I am trying with, if ( ! wp_next_scheduled( 'midnight_cron' ) ) { $...
1
vote
1answer
19 views

How developed with version control word press site on shared host?

I have web site online now I want to connect it with version control. It deploy on shared host. Because When change online it effect the site I want try local and deploy changes. I downloaded all ...
-1
votes
0answers
13 views

how to stay logged in without cookie validation

how to stay logged in without cookie validation? I want to skip cookie validation at server side and add custom validation
1
vote
1answer
15 views

Custom plugin - $post_id in wp_head

(english is not my language so I'm sorry if I don't explain really good) My custom plugin get an URL from custom metabox and add it into the header.php My problem is that I can't get $post_id in my ...
0
votes
0answers
19 views

How to display posts content inline?

I am recreating the concept of this website for my personal site, using the WP Flickity Slider plugin. The idea is that one clicks on one of the cards in the slider, and that the post is displayed ...
-2
votes
0answers
23 views

WOO-COMMERCE Capture payment from credit cards [on hold]

I am creating online payment plugin for woo-commerce, i have successfully added my payment method to checkout page, but i am not getting how to capture or check the payment status. For example from ...
1
vote
1answer
62 views

How do I write a shortcode that opens and closes?

I want to have a shortcode like this: [readmore]Lorem ipsum dolor sit amet, consectetur adipiscing elit...[/readmore]
0
votes
0answers
20 views

Is the Wordpress Nonce authentication enough for admin REST calls in a plugin

I have a plugin which also has some admin pages. These pages require some ajax calls that should be authenticated. So if the admin is logged in, these ajax calls are valid, and otherwise they should ...
0
votes
0answers
26 views

Pass $_POST data to a function

So I have updated my code, to pass that $_POST data, I opted to use to make the variables global. However, is there a way I could use hooks to achieve that same thing? function loginform(){ ...
0
votes
0answers
14 views

Need help with “WooCommerce Dynamic Pricing” discount

Need help with "WooCommerce Dynamic Pricing" I need to disable the discount function for a user role. I got this from the developer but it's not helping add_action( 'init', 'remove_on_sale_trigger' );...
0
votes
1answer
28 views

Ajax in Plugins: returns the whole page

I'm developing a small plugin for a client and my ajax calls returns the whole page as json response. I cannot find the bug. In the plugin main.php: function __construct(){ //.. $this->...
0
votes
0answers
12 views

How to get color name in PanelColorSettings in custom Gutenberg block?

I am developing a custom Gutenberg block with the PanelColorSettings component to set up the background color, here is my code <PanelColorSettings title={ __( 'Color Settings' )...
0
votes
1answer
23 views

Custom WordPress Pages

Recently, I have started developing a WordPress Events plugin as none of the off-the-shelf ones met the specific criteria for this project. I have ended up creating a few database tables for tracking ...
0
votes
0answers
11 views

change woocommerce register/login customer flow [closed]

Woocommerce needs either a username, an email address and a password for registration, by default. however, I want the registration and login page only to have the phone number and password field, ...
0
votes
0answers
11 views

Where to manage the settings for a custom plug-in widget?

I successfully followed the instructions at https://kinsta.com/blog/create-wordpress-widget/ and got my custom widget to show-up in the list of plug-ins in a local instance of Wordpress, and was even ...
0
votes
0answers
9 views

wp_head conflict with custom scripts [on hold]

When I add custom scripts ... public function onixion_display_header_scripts() { $header_scripts = get_option('onixion_header_scripts', false); if ($header_scripts) print $header_scripts; } ...
0
votes
1answer
17 views

Extend Woocommerce Widget Class - WC_Widget_Product_Categories

I'm trying to extend the woocommerce class used to create the product categories widget in my own plugin which adds a new taxonomy for woo commerce products called "departments". When I extend ...
0
votes
1answer
8 views

Get the password key when using the wp_new_user_notification_email filter

I'm trying to customize the email sent to newly registered users. I use the wp_new_user_notification_email filter in a plugin, and it's working fine to set the subject and message. However I would ...
0
votes
0answers
10 views

Can i show a custom button on WooCommerce Product if checkbox is added in product tabs?

I am trying to add an extra button only on some products. I've made a checkbox on the product type Simple Product - https://prnt.sc/l4wxkt . If this checkbox is checked then it should show an extra ...
2
votes
1answer
24 views

When is is_admin() available?

I see a lot of plugins that consist of a class that is instantiated in the same file, eg: class My_Plugin { function __construct() { add_action('init', array( __CLASS__, 'baz' ) ); } ...
0
votes
0answers
21 views

Installing plugins from an intranet bitbucket via WP Admin

I know this is a crazy question so here goes. Please don't ask why we are doing things this way I am just trying to pick your much smarter brains for help while also learning. Thank you! Here's ...
0
votes
1answer
15 views

How to stop activation addon if the main plugin is not activated

I´m writing an addon. I would like in the install function to stop the activation if the main plugin is inactive. class MyAddon { public function __construct(){ ...
0
votes
0answers
27 views

Remove action added in plugin class from theme

I am trying to remove action that is added via plugin in my theme. The below plugin class creates a portfolio page template but I don't want this page template in my theme. Is there any way to unhook ...
0
votes
0answers
19 views

infinite scroll + pagination in wordpress blogs

I am looking for some infinite scrolling with a pagination in a footer, something like https://codepen.io/SitePoint/pen/XXLrbE to implement in WordPress posts/woocommerce product. Can anyone of you ...
0
votes
1answer
12 views

Non editable custom taxonomy

I have reviewed Creating a non-removable taxonomy term but it has not answered my question. One of the built-in Taxonomy terms is the "post formats". This cannot be edited. What I would like to do is ...
0
votes
0answers
8 views

How to send the file in archive directory after import is complete

Currently I am using Wp all import plugin.Now I want to send the file in archive directory after Import is complete.Give me the solution as soon as possible. Thanks
0
votes
1answer
27 views

Creating a Callback URL for Wordpress Woocommerce to update Order Status

I want to create a Callback URL to update the order status when data in JSON format is POST to it. Post Format Example: "hash": "43745580XXXXXXXXXXXXXXXXXXXXXX", "status_feed": [{ "order_id":...
0
votes
0answers
30 views

Hiding class namespace from plugin's extensions

I'm developing a plugin using this boilerplate and I designed it to be extensible. The boilerplate supports namespacing and uses it and namespaces are bind to folder structure. The extensible part is ...
0
votes
1answer
43 views

What is the best way to create frontend pages from a plugin?

I would like my plugin to provide front-end pages; one which is a list of club members from a custom table and another that will show member details again from a custom member table. Ideally the pages ...
0
votes
1answer
81 views

OOP development and hooks

I'm currently working on writing my first OOP Plugin for Wordpress. To help out a little bit with structure I looked for, and found, a boiler plate that sets up the basics for me. In Main.php there'...
2
votes
1answer
19 views

How to avoid creating first submenu page that is same as menu page?

I've created menu page and four submenu pages. public function onixion_admin_menu_option() { add_menu_page('onixion','Onixion','manage_options','onixion-admin- menu',array(&$this, '...
-1
votes
0answers
8 views

How to do USPS Integration into WC Market Place plugin?

Hi guys I'm trying to setup a multi vendor store on Woo-commerce. After a lot of search I found a WC Marketplace plugin meeting all my needs.Now the issue is that the plugin have Paypal method ...
0
votes
1answer
21 views

woocommerce add a new bulk action in the bulk actions dropdown in the orders list

I'm trying to add a custom bulk action in the WooCommerce orders list that will a piece of code I've made for individual orders but need to make it work recursively. I'm aware of that: Custom ...
0
votes
1answer
22 views

How to Get Rid of Unwanted Backslashes in WordPress Form Input inside admin menu option

I'm building a simple plugin that allows adding custom scripts to header and footer. Everything seems to work fine, but there is a 'bug'. When I add Google Analytics script to header, it shows with ...
0
votes
0answers
14 views

wc_get_product_terms() throws “Notice: Undefined offset: 0”

I currently have debug mode enabled in wp-config.php. I'm trying to loop through all the products in a certain category on my store. $args = array( 'post_type' => 'product', 'product_cat' =...
-1
votes
0answers
16 views

The payment form is not displaying via this plugin

i have gone over this code so many times and i think i need a fresh pair of eyes to help me look through the code //configurations $current_payment_gateway = apply_filters('...
0
votes
1answer
26 views

How to include jQuery into my plugin so I can use it on plugin page?

How can I include jQuery file into my plugin so I can use it on plugin page?
0
votes
1answer
28 views

How to use PanelColorSettings in custom Gutenberg block?

I'm working on a custom Gutenberg block. I have used <PanelBody> <BaseControl> and <ColorPalette> to create some custom color pickers, however, it seems like it would be more ...
0
votes
0answers
15 views

Remove related WP-JSON custom endpoints on plugin uninstall

I am working on removing all the relevant data from my plugin within uninstall.php. I have been searching through the Codex and through numerous answers here and on Stack Overflow and I am either ...
0
votes
0answers
48 views

Solved: WordPress showing html <tags> instead of correct formatting text

Solved with disable '.$result->pitch_text.' and replace it with '.$result->pitch_text.'. Now presentation is correct. After installing TinyMCE for my textarea fields I see that the html tags are ...
0
votes
0answers
6 views

How to add a customizable paragraph block with text and using a shortcode for the para block and then embedding it anywhere.

:) Its my first question so pardon me , I want to implement something like: The admin or wp-admin should be able to add a customizable paragraph block with images,text and this paragraph block ...
0
votes
0answers
18 views

Why does the correct MySQL “UNIQUE Key” syntax not work in the dbDelta function?

this is the working Mysql code CREATE TABLE customtable ( id mediumint(9) NOT NULL AUTO_INCREMENT, email text NOT NULL, emailverifytoken text NOT NULL, UNIQUE Key (email(255)), UNIQUE Key (...
0
votes
1answer
48 views

How do I hook a custom discount to change a WC_Order price total on WooCommerce?

I am coding a WordPress plugin that goes on top of WooCommerce. This plugin basically allows WooCommerce to allocate store credits to a logged-in customer whenever he makes an order later marked as ...
0
votes
1answer
17 views

Plugin Options Page and Subpage

I'm working on a plugin which it's options need to be managed by admins and super admins [yes, it's a network site]. the idea is that super users can create resources which are then enabled by the ...
2
votes
1answer
32 views

update_option_{$option} Too Few Arguments

Adding a callback to "update_option_{$my_option}" results in the error Too few arguments to function. My callback accepts $old_value and $new_value. If I remove $new_value from the callback ...
0
votes
0answers
21 views

How create url rewrite for 3 different taxonomies in the same Custom Post Type

Hello I have a custom post type called "vehicles_cpt" to this are linked 3 taxonomias (year, make, model) I need to write a url like this https://localhost/2019/volvo/x7 redirect to the post that has ...
0
votes
1answer
32 views

Admin metabox with custom post type dropdown option not update choosed input after saving

I'm trying to build a little plugin for wp that add a button to custom post type page http://example.com/events that have a link to another custom post type page that I can choose from a dropdown menu ...
0
votes
2answers
25 views

Plugin management with my custom plugin

I'm developing a wordpress plugin for a project. I'm expected to manage other plugins in this plugin. For example, I will be able to install Akismet over my plugin. I have done things like install, ...
0
votes
0answers
17 views

Persisting data in a plugin to be used in a CPT template?

Please let me know if this kind of question is not allowed. I'm kind of in a pickle while developing a plugin for a client. I developed a "Welcome Area" CPT for my client to use for his clients ...
0
votes
0answers
28 views

Begginer's plugin advice

I have written a simple plugin that includes a function. I want to disable this function, from the plugin's wp-admin menu, but I am not aware of the way to do so. I was thinking of a check box that ...