Questions tagged [pluggable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

How can I edit the wp_parse_auth_cookie function from the pluggable file in my functions?

I need to modify that function to decrypt the username that I have encrypted.
Miguel Angel Salas8's user avatar
0 votes
0 answers
28 views

How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?

cookie --> wordpress_logged_in -- admin%7C1684489617%7CTdPaXlizvGyWpJNhCrB8pUcX4725Lrte2OIOnKD3XSx%7Cfca768d6ff2014aefad62fc253b715926c8a907c05231182ba2f1c580836c2a4
Miguel Angel Salas8's user avatar
0 votes
1 answer
126 views

Customize Notification Email Sent to New User When Manually Created by Site Administrator

I am looking to customize the "Login Details" email sent by WP Core when an administrator checks off "Send User Notification" while manually creating a user from /wp-admin/user-new....
Evan Kirschenmann's user avatar
0 votes
1 answer
72 views

plugabble wp_authenticate function not works from wp-login.php

I created in my plugin a wp_authenticate function: if ( ! function_exists( 'wp_authenticate' ) ) : function wp_authenticate( $username, $password ) { inside this function, if it's the first ...
Infocurci's user avatar
0 votes
1 answer
447 views

WordPress login set cookie that survive browser exit (wp_signon function)

I've read all the relevant question here on StackExchange and I haven't found a solution. Here's the problem: I use a plugin to use Google OAUTH to login in Wordpress. All working correctly, but I can'...
Manuel Serrenti's user avatar
0 votes
0 answers
30 views

How can I insert code into the pluggable.php file without it getting deleted after a wordpress update

Regarding the code that is being inserted into the pluggable.php file: its a require statement that links to a php file that is used to overwrite the basic wp mail functionality. Thanks in advance.
albrt's user avatar
  • 1
0 votes
1 answer
233 views

Override a function defined in wp-includes/comment-template.php

I need to override the function get_cancel_comment_reply_link or cancel_comment_reply_link that are defined in wp-includes/comment-template.php These functions are not listed in pluggable.php. How ...
Basj's user avatar
  • 85
0 votes
1 answer
351 views

How to apply a function to the value $email of get_user_by to override email_exists?

More precisely questions : How to override email_exists via get_user_by ? I have chosen to render unusable/unreadable email adresses from database. I added a few elements(chars) to email address just ...
imagIne's user avatar
  • 45
0 votes
1 answer
101 views

Login cookies blocked after customizing hashing method

I get the following error when trying to login: Error: Cookies are blocked due to unexpected output. I customized the wordpress core functions wp_hash_password() and wp_check_password() to use SHA1 ...
Jan's user avatar
  • 3
0 votes
1 answer
27 views

Need to replace Currency Shortforms

I want to replace the currency shorten alphabet, it is currently in M, L and So on. I want to change to indian currency number format like K, L and CR below is code: if(!function_exists('...
Vijay Patil's user avatar
0 votes
1 answer
443 views

Is it possible to override only a part of another plugin's / theme's js (asset) file?

I try to go one step forward based on this question and instead of overriding the whole .js file of another plugin, i'm wondering is it possible to override/swap only a part of that js file ...
Viktor Borítás's user avatar
1 vote
1 answer
227 views

the file placed in the child theme is not included

I have modified the theme.php file located in the parent theme in the "Includes" folder, and I have placed it in the child theme also in the "Includes" folder, but my changes are not included. ...
reti's user avatar
  • 27
0 votes
1 answer
130 views

How to target post and pages and not all post types in admin?

I've got a strange issue with a plugin I'm modifying. What happens is that this plugin adds meta boxes in an dashboard options page so scripts and style sheets can be globally added to the header and ...
BlueDogRanch's user avatar
0 votes
0 answers
39 views

I have an fatal error on my funcyions.php

can someone please help me with this Fatal error: Uncaught Error: Call to a member function main() on null in /home/customer/www/real-amnesti.com/public_html/wp-includes/functions.php:1255 I haven'...
Suyog Sonawane's user avatar
0 votes
1 answer
4k views

How to execute init or woocommerce_init only for checkout page

I am making extra function for my own project. function devsol_customer_login() { if ( is_checkout() ) { ?> <form method="post"> <input type="text" class="woocommerce-Input ...
Iqbal's user avatar
  • 19
2 votes
1 answer
101 views

What is the criteria for pluggable functions?

Why are certain functions pluggable (overrideable) in WordPress core and others not? (I note on the Codex page regarding Pluggable Functions no more are to be added in favour of filter usage.) But ...
majick's user avatar
  • 5,061
0 votes
1 answer
527 views

is_user_logged_in() not working in AJAX validation call

Update: Error was a simple typo, disregard this question. I'm using the jQuery validate plugin to validate some forms. When I try to validate something using the is_user_logged_in() function, I get ...
Swen's user avatar
  • 1,324
0 votes
0 answers
1k views

is_tax not working for custom taxonomy

I am trying to over-ride a custom taxonomy file from my plugin. Actually, I have 2 custom taxonomies: destination & activities. I have successfully over-ridden the taxonomy template for activities ...
saurav.rox's user avatar
0 votes
1 answer
2k views

Override plugin class which has namespace

I would like to override this plugin class in child theme : class-config.php namespace um; if ( ! defined( 'ABSPATH' ) ) exit; if ( ! class_exists( 'um\Config' ) ) { /** * Class Config ...
ArbreMojo's user avatar
-1 votes
1 answer
4k views

Adding placeholder text field to woocommerce checkout [closed]

I am trying to add placeholder text to checkout page but it is not displaying any placeholder text on the first name and last name.It is displaying a new text field with the palceholder text which i ...
tester's user avatar
  • 111
0 votes
1 answer
725 views

Overriding a plugin's pluggable function in theme's function

I came across this snippet - https://gist.github.com/mikejolley/1751128 - that creates a function with the same name as an existing WC function as a means of overriding it. I also learnt that this ...
Edmund Chan's user avatar
1 vote
1 answer
4k views

Calling an API to do authentication / user login

I'm relatively new to wordpress and am working on a customized site. I have an API endpoint that I'd like to call to do authentication, because our users are going to have their credentials stored/...
ellen's user avatar
  • 345
3 votes
1 answer
2k views

How do I override template-tags.php in twentyseventeen theme

I created a child theme from the TwentySeventeen theme and it seems to work. I can override the content.php file by creating a matching folder and my own content.php in my child theme. /template-...
jchwebdev's user avatar
  • 765
1 vote
1 answer
2k views

Call to undefined function get_userdata in user.php

My website error log is full of [lsapi:error] [...] Backend fatal error: PHP Fatal error: Call to undefined function get_userdata() in /home/.../public_html/wp-includes/user.php on line 460 ... ...
Jan Doggen's user avatar
0 votes
1 answer
318 views

Prevent sending emails on user creation in OOP context?

I need to block any user creation email on the site, and I tried overriding any pluggable function that is responsible for mail sending. The only thing that works is $this->loader->add_filter( '...
dingo_d's user avatar
  • 1,919
0 votes
4 answers
1k views

How to override get_avatar() function?

I need for a specific plugin to override the wordpress function get_avatar() to bind the profile image to an other image with some condition. How can I do this ? Is there a specific hook or filter to ...
J.BizMai's user avatar
  • 820
0 votes
1 answer
522 views

Repeated headers in wp_mail

I am passing a custom header multiple times, for tagging reasons, to wp_mail(), but only the last instance of the header is actually getting sent. It appears that wp_mail() is filtering the custom ...
bicarlsen's user avatar
  • 141
2 votes
1 answer
346 views

WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way

I'm quite new to WordPress development. I'm using WordPress 4.9.2. I'm currently working on the following issue. I have several blog categories which have no relation to each other. For example "Our ...
dj_thossi's user avatar
  • 121
1 vote
0 answers
523 views

How to override Woocommerce functionality in Reports section?

I need to customize the Reports in WooCommerce, so I have to edit the core file class-wc-report-sales-by-date.php, such file doesn't use any hook. Check: https://github.com/woocommerce/woocommerce/...
Andrés Posada Llano's user avatar
1 vote
0 answers
5k views

Extend plugin Class through functions.php

Move manual fix applied to plugin source code to theme functions.php or as Code Snippet I've applied a manual fix to a plugin file. I'd like to make this fix more accessible and scalable by hooking ...
UncaughtTypeError's user avatar
0 votes
1 answer
237 views

Wordpress reading old version of functions.php, breaks site

I added a function to the child theme functions.php to check if a plugin class exists. The code was something like function check_class_exists() { if (class_exists('classname')) { echo "...
Naltroc's user avatar
  • 101
0 votes
2 answers
771 views

overwrite code snippet from parent to child theme

I'm trying to overwrite following code in the child theme. I want to load file /inc/soundtheme-admin.php from child folder. I copied same code snippet in child-theme/functions.php and also copied the ...
MKS's user avatar
  • 11
0 votes
1 answer
234 views

Set up functions to be overridden without using function_exists() by short-circuiting them?

A few years ago I read an article about short-circuiting functions with apply_filters() rather than using pluggable functions via function_exists(). I love the idea because of how flexible it is- I'm ...
GreatBlakes's user avatar
1 vote
0 answers
238 views

Replace part of a parent-theme customizer in the child-theme

I'm created a child-theme of the OnePress theme and would like to update a part of the inc/customizer.php function. Specifically, the theme customizer adds the following control: $wp_customize->...
Werner's user avatar
  • 111
0 votes
1 answer
152 views

Bug in pluggable.php? [closed]

Can anyone help out here? For several months by now, we start getting problems right after bringing up our website. (we had to restore old pluggable.php to avoid this error) Fatal error: ...
billm's user avatar
  • 51
3 votes
1 answer
3k views

Postman: wp_mail has been declared by another plugin or theme

I need use Postman for sending email using an SMTP server, but when installed, it shows this message: Postman: wp_mail has been declared by another plugin or theme, so you won't be able to use ...
abkrim's user avatar
  • 159
1 vote
3 answers
2k views

Providing fallback function and allow override by plugin

I'm using ACF (Advance Custom Fields) plugin in my theme. This plugin provides a simpler methods get_field() which we can use in place of WordPress native get_post_meta() method. Now, the issue is the ...
Faisal Khurshid's user avatar
5 votes
4 answers
20k views

turn off new user registration emails

I would like to turn off the emails that the admin gets when a new user registers. We are getting a lot of emails because of new registrations (they are legitimate registrations) but I just don't ...
rudtek's user avatar
  • 5,884
1 vote
1 answer
2k views

Wordpress Registration Email by Role

I'm wanting to send out a custom html email to a new user based on their role during registration. So, I have 2 roles that will be specifically registering on the site: photographer and subscriber and ...
jameslcarton's user avatar
6 votes
1 answer
260 views

How to override a function when isn't at functions.php

I am trying to override a function for a theme in the child-theme but I can't get it to work. At functions.php on the theme I can see this require_once line: require_once("inc/alterna-functions.php");...
ReynierPM's user avatar
  • 537
0 votes
0 answers
592 views

Pluggable Function wp_new_user_notification exists too early

I have recently updated from 4.1 to 4.4 directly and I can't override wp_new_user_notification anymore. Obviously the function should not exist when the plugins are loaded. I wrote a mu-plugin with ...
alpipego's user avatar
  • 356
0 votes
1 answer
66 views

Solution dealing with Child Theme / Parent theme functions

This week I was struggling a bit customizing an exsisting theme for a client. To prevent the theme from being overwritten each update I created a child theme. This allowed me to cusomize most of the ...
SdeWijs's user avatar
  • 43
3 votes
2 answers
1k views

syntax for remove_filter in parent theme with class

I'm trying to remove a filter on the register_url hook a parent theme added, that seems to have a class nomenclature I can't figure out. Ordinarily, a filter for this hook would be easily added like ...
Bob Diego's user avatar
  • 195
22 votes
10 answers
54k views

Disable email notification after change of password

I want to disable the email notification if a user or an admin changes the password of a user. After some Googling I came to find that I need to create a plugin and overwrite the ...
Interactive's user avatar
0 votes
1 answer
3k views

How to override filter in child theme?

I'm trying to override a parent theme filter in a child theme; I must have the syntax wrong as the override is being completely ignored. Here's what's in my child theme's functions.php: //* remove ...
Chez Ballou's user avatar
5 votes
1 answer
1k views

How to overwrite a JavaScript core function?

Since the newest WP version 4.3.1, there's a change in the WordPress core JavaScript file: /wp-admin/js/edit-comments.js At line 376, the WordPress dev added a check for how many table columns there ...
Becki Beckmann's user avatar
1 vote
2 answers
420 views

override pluggable.php functions

I just not only want to override a pluggable function (wp_new_user_notification) but I want to make sure that if any other plugin is overriding the same function, so my function , override that too or ...
StealthTrails's user avatar
0 votes
1 answer
973 views

Current user in plugin returns NULL

I am currently developing a plugin and I am trying to make use of the $current_user global. class Something { public function __construct() { $this->get_user(); var_dump( $this->user )...
mousesports's user avatar
0 votes
1 answer
2k views

How to override this theme function in child theme

I'm working in a child theme and I need to override a function in order to remove some unwanted items on a top menu. So I have research a bit and found a lot of docs, really, like this, this and this ...
ReynierPM's user avatar
  • 537
0 votes
1 answer
2k views

remove_action not removing add_action from constructor

I am trying to replace a message from a function that got hooked in a constructor from a class from woocommerce. This is what I tried to remove the message: What I tried. function remove_actions() {...
Adrian's user avatar
  • 113