A name for an event that is executed at specific points throughout the WordPress core.

learn more… | top users | synonyms (2)

0
votes
0answers
35 views

Custom Message with Order status from WooCommerce Payment Gateway Callback to Order Thank You Page

I would like to pass on the custom message to order-received page in woocommerce. Here how i currently handle the callback from payment gateway if ( isset( $_REQUEST[ 'callback' ] ) { ...
-1
votes
1answer
442 views

Call a function with href

Is there any way to call a function inside plugin with <a href='plugin-function'> tag? I need this to show user details which will not be bound to any action hook.
1
vote
1answer
21 views

Custom post type unintentionally called in every page

A while ago I was following a Tutsplus video tutorial on creating custom post type, and so accordingly I made 2 similar small custom post types for myself. Today I was exploring ways on how can I ...
1
vote
2answers
131 views

add_action and Ajax

I'm developing a plugin and I've started from WPPB and Wordpress 4.3.1. I've named it dogmaweb. I need to submit a form to the plugin via Ajax. The form is created by the plugin itself. In my ...
1
vote
1answer
776 views

Insert new user with form submit 'init' hook

I'm posting a form to insert a new user and hooking my function to 'init'. This code is in my mu-plugins folder. The user gets inserted fine, but the page is not loaded after wards. My form action ...
0
votes
0answers
35 views

On WP 4.4, how to get the post id on comment_post hook

Since WP 4.4, seems like is not possible anymore to use get_the_ID() or the_ID() when hooking on comment_post action. How can I get the post_id when a new comment is saved?
0
votes
1answer
17 views

Run only on plug-in activation instead of wp_head

I have below function on my plugin which adds more capabilities to current user. // Role setting for add media function wh_edit_roles(){ if ( current_user_can( 'edit_posts' ) ){ $user = ...
0
votes
0answers
18 views

Adding a taxonomy filter

I'm am attempting to add a custom taxonomy filter. I have partially achieved this, I have a dropdown menu that displays all of the desired terms. However when I actually attempt to filter on these ...
0
votes
1answer
22 views

Wordpress user account activation

How to implement user account activation in WordPress, it's not a multi-site. Once user registered through site or admin panel, user should get an email with activation link. Once the link opened ...
0
votes
1answer
14 views

custom COOKIE on custom page

i have problem with create function for set cookie dynamically. when i try in custom page i have of course header is set and i tried something like this: in custompage.php: ...
8
votes
7answers
3k views

Remove an action from an external Class

I'm trying to do something similar to this question here: remove_action or remove_filter with external classes? I'm trying to remove the <!-- This site is optimized with the Yoast WordPress ...
16
votes
1answer
8k views

Why does save_post action fire when creating a new post?

I'm surprised by the fact that my function that I've tacked onto the save_post action fires when I click the "New Post" link in the Admin Dashboard. Note - this is before I've pressed Save or Update, ...
0
votes
2answers
43 views

how to repeat taxonomy in different places on wordpress

I need help with this. I need repeat taxonomy in two places, are post, and coupones post, this code is in clipper theme. this code put taxonomy stores in coupon. add_action('init', 'clpr_post_type', ...
0
votes
1answer
25 views

Adding a conditional to work on certain pages/page templates to an add_action()

function wpufe_auto_login_new_user( $user_id ) { wp_set_current_user( $user_id ); wp_set_auth_cookie( $user_id, false, is_ssl() ); } add_action( 'user_register', 'wpufe_auto_login_new_user' ...
0
votes
3answers
36 views

Sending Parameter Failed

This is so basic, but i couldn't understand why it's not working, i'm trying to send parameter from add_action(), this is my code in my function.php: function testingID( $testParam) { ...
0
votes
1answer
28 views

Am I using an action hook correctly?

I want to extend an existing plugin by writing my own. I think I instantiated it correctly because it appears on the plugin list in the dashboard (although I found it strange that I didn't need to ...
0
votes
0answers
15 views

Is there any hooks or filters to detect an action after user upload video to AWS (Amazon Web Service)?

I am using the plug-in AWS and offloads3 to upload video to AWS, however, I would like to find a hook or filter to detect a state when after user uploaded video/image successfully to Amazon web ...
0
votes
1answer
85 views

How can I hook into existing WordPress Bulk actions?

I am creating a plugin which syncs both standard WP data and custom fields within a custom meta box on post edit pages, to an external resource using SQL queries. However my functions are currently ...
0
votes
0answers
26 views

Is it bad practice to use $_POST['post_type'] in an action hooked on save_post?

In a custom plugin I wrote an action hooked on save_post that Only needs to fire when a particular Custom Post Type is modified Sometimes uses wp_insert_post to add a post of a second Custom Post ...
0
votes
0answers
29 views

Custom button on admin page doesn't trigger click event

I created a custom button on the "users" admin page. I have a script (loaded correctly) which should register the button click, but it doesn't. I followed an example where they hooked the ...
0
votes
1answer
20 views

check, if any “add_action” function contains string XXXXXXXXX

i want to filter out any function, that output such string : http://twitter.com/xxxxxx.js (this is example,i will need other strings to filter out..) is there any way, to find which "add_action" ...
1
vote
1answer
5k views

Disable WooCommerce action

I'm customizing a WooCommerce theme and am going to be moving the title. There is an action in content-single-product.php called: do_action( 'woocommerce_single_product_summary' ); in the ...
1
vote
2answers
67 views

action hook wp_head higher priority as all other plugins/hooks

I work a bit with the wordpress API and I want to try to include a <meta>-tag into my head area of my website. This is my code (works everything fine!): class dmd_noindex_options_page{ ...
0
votes
1answer
371 views

Automatically add attributes to woocommerce product?

I'm trying to make WooCommerce automatically add some attributes to a product when it's created. I'm trying to find the right hook to start with, so far the only one that seems correct is ...
0
votes
1answer
28 views

Add action to custom Function

I am trying to use plugin action in my custom function. Plugin is adding an action to wordpress registration form add_action( 'bp_before_account_details_fields', 'tv_bp_avatar_upload_form' ); But ...
0
votes
1answer
84 views

wp_ajax action is not run when ajax trigger

I'm trying to implement the ajax in wordpress world but now stuck. Function hook suppose to be called when ajax triggered is not happening. I check the network admin-ajax.php is called but ...
1
vote
2answers
2k views

wp_ajax action is not running

I'm writing a plugin. I want to run the method get_my_option when someone pressing a button in the settings page of my wordpress plugin. The ajax call is made but the method never runs. In the page I ...
0
votes
0answers
18 views

Add action after function defined in plugin

I'm trying to write my second ever plugin (my first was a derivative of Hello Dolly) and I have a function that does something, however my issue is that I don't know what action to use to call my ...
1
vote
0answers
33 views

Using pre_get_posts to Filter Posts

I'm trying to filter archive_research.php to show only the research with status=current. In functions.php: add_action( 'pre_get_posts', 'only_current' ); function only_current( $query ) { if ( ...
0
votes
1answer
96 views

Add my own function to existing WooCommerce hook

I'm trying to customise my WooCommerce child theme with parent theme Storefront. The parent theme creates single product template (content-single.php) like this: /** * @hooked storefront_post_header ...
0
votes
0answers
11 views

How to trigger an email when a posts metadata has been updated?

I'm really struggling on this one, so I appreciate the help from all of you guys/gals. I've built a progress bar type of application for a client. The basic setup is that each project (custom post ...
0
votes
3answers
40 views

Action 'init' function doesn't return variable

I have a function which checks if $_POST is set (a form which submits to the same page). I need to have it initialized before the page is loaded because the function will do a header redirect if the ...
-1
votes
1answer
399 views

Generate payment URL in custom email [closed]

When a particular order status is triggered, a custom email is sent to the shopper. I would like to include a link in the email for them to pay for the order. From my current understanding, the ...
0
votes
1answer
27 views

Echo string in admin panel footer beside version no

can anyone help me out about how to showing something lets say "Hello World" beside the version no that shows up in the wp admin dashboard footer? I've already tried the action named admin_footer and ...
0
votes
1answer
67 views

Validate form in functions.php, send errors back to template

I have a form in a template that upon submission should be validated, and any errors should be displayed, and if no errors, insert the data into the database. I'm new to wordpress, but my idea was ...
0
votes
2answers
117 views

Re-order Woocommerce single product and echo div around moved & duplicated Woocommerce hooks

How do I wrap a div around the actions in the code below? PHP in functions.php file: remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); add_action( ...
0
votes
1answer
30 views

How to change default text for specific post type

Prelude: Let's say the text "Comments are closed" is a default WP String and you wanna change that text string to something else like "Hello World!" if is_singular('post-type') is true. Issue: Now, ...
1
vote
0answers
58 views

Comment search plugin

I want to develop a plugin which places a search input field above the first comment on the post pages, filters the comments below that post, and only shows the comments which include the string that ...
0
votes
1answer
73 views

Woocommerce custom Plugin in wordpress [closed]

I want to access the ID of the product currently being displayed on the page. I am trying to do this in a separate custom plugin. I have tried global $post and global $product and get_the_ID() methods ...
7
votes
2answers
349 views

How to validate XML-RPC post creation and cancel when needed?

I have an IFTTT recipe that creates posts for me on some occasion, but for some weird reason it creates three, sometimes four posts of the same content. I would like to add an add_action ...
0
votes
1answer
34 views

Warning: call_user_func() expects parameter 1 to be a valid callback

This my code: $array_theme_options = array( array( 'id' => 'facebook_url', 'title' => 'Facebook Profile Url', 'callback' => 'display_facebook_element', ...
0
votes
0answers
36 views

Access Action Hook from Child Class in External Plugin Class

I am attempting to access an action hook that is declared in a plugin's child class. The plugin uses a singleton instantiation pattern: class WC_Freshdesk { protected static $instance = null; ...
0
votes
0answers
24 views

Add info to plugin list view on WP admin

I'm writing a plugin, and want to add some custom info to the plugin list view on the wordpress backend. Like, here: [] Is there an action or a hook I can use, I tried searching for it but couldn't ...
0
votes
1answer
37 views

wordpress automatic update does not run

Hey Im creating automatic update plugin for wordpress and i have added following code using add_action('init' add_filter( 'allow_major_auto_core_updates', '__return_true', 1 ); add_filter( ...
0
votes
1answer
33 views

Hide post title input for all roles except admin

How would this function need to be updated to exclude the admin? add_action('admin_init', 'wpse_110427_hide_title'); function wpse_110427_hide_title() { if (current_user_can('subscriber')) ...
3
votes
4answers
3k views

How to publish a post with empty title and empty content?

Why I'm doing this you might ask? I'm developing a website for a business with a portfolio where the gallery items are posts. These posts are populated through custom fields and category selections, ...
0
votes
0answers
23 views

Why is this require statement not working?

I am faced with this strange issue when the script loads it gives me an error: [04-Oct-2015 18:36:04 UTC] PHP Warning: require(../main/otherfile.php): failed to open stream: No such file or ...
1
vote
1answer
126 views

Actions that Run on Admin Edit Page Load After Posts Are Queried

What actions run on the edit page in the admin section of a post type? i.e. xyz.com/wp-admin/edit.php or xyz.com/wp-admin/edit.php?post_type=shop_order (custom post type) I need to run a function ...
0
votes
0answers
18 views

Hook To Get All Posts Deleted

I've added an which makes a call to an external service every time a post is deleted. However, it's on the delete_post hook, which works fine when I delete a single post, but if multiple posts are ...
0
votes
3answers
1k views

What is the action hook that deletes a taxonomy term from the backend? And how to retireve the term id before deleting it?

I need to delete some postmeta when deleting taxonomy terms from the backend. Before deleting the term, I need to retrieve the postmeta's meka_key and the term id that is going to be deleted. Use the ...