Action hooks can pass variables do hooked callback functions. For example:
do_action( 'my_custom_action', $a_variable );
For that action, any callback function has access to $a_variable
:
add_action( 'my_custom_action', 'my_custom_function' );
function my_custom_function( $a_variable ) {
// etc.
}
The woocommerce_account_orders_endpoint
action hook is defined like this:
do_action( 'woocommerce_account_' . $key . '_endpoint', $value );
Where $value
would be passed to woocommerce_account_orders()
which uses it as the $current_page
argument.
Related Posts:
- When tax_query used, results disappear (0 =1 produced)
- WP_Query in functions.php
- Gravity Forms field entries into wp_query loop [closed]
- list tags with count in author profile page
- wp_is_mobile dequeue not working
- Having a Function Inside of the Loop
- Wp_query function to search from product_title ‘OR’ product tags name
- Display tags that only appear in one category
- Custom Query Not Paginating
- Reset postdata not working on WP_Query in functions.php
- Wp-query Order By problem
- How to apply the ‘current_page_item’ class to an archive page in `wp_list_pages()`?
- Filter for replacing the WP_query object for a given category
- Create a CUstom Archive by Year, but just for a Single Category
- Updating custom query var with multiple values
- WP_Query for Attachments not working as expected
- query_vars treat as single var from URL
- Optimizing multiple WP_querys into one call?
- Query is not work
- How to Delete Posts by title?
- Integrating custom API for post content into Admin interface & Public Website [closed]
- Insert image between X number of posts but on specific paginated pages?
- plugins_url vs plugin_dir_url
- How to use a custom post type archive as front page?
- Get list of years when posts have been published
- Redeclare a function in a child theme
- Is it possible to remove the “standard” post format?
- Do WordPress’ cron’s clean up expired transients?
- How to add first name & last name to default registration form?
- Masking logout URL
- How can I programmatically create “child” pages on theme activation?
- Warning/Notice about functions.php
- How to include one class/instance without using global variables
- Is checking whether the blog is installed necessary?
- Replace Archive Widget Link Text
- How do I deactivate a plugin for some roles
- How to display more audio file ID3 tags in WordPress
- Searching for content post
- Running CRON on Server with WP Function
- Using separate .php file for functions – how to run on site?
- Remove query string specific key value
- How to add custom fields to my custom registration form
- Add Featured image column into wordpress admin on pages AND posts
- How can I change the do_action function in footer (copyright area)
- How to display post content instead of excerpt
- Access Plugin data from Functions.php
- how to call a function only in specific pages and exclude it from other pages
- Which action does wp_update_user triggers?
- Use register_setting() in a loop
- Dynamic dropdown from database table
- Add dynamic links in WordPress custom theme
- WordPress website Rs changed to currency symbol
- Functions in custom theme
- Attempt to change jQuery version caused White Screen of Death
- check if author has published posts in custom post type, then send mail
- paginate_links() don’t properly work in search.php?
- Difference b/w Simple function call & do_action call
- What’s wrong with my use of plugin_url()?
- Hook into a function without a hook?
- Filter yoast canonical add_action priority [closed]
- Should I store functions in separate folder?
- How can I modify the element on all pages?
- AMP – Change rel=”canonical” from functions.php [closed]
- the_password_form functions not working together
- does wp function the_content(); accept another tag inside
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- Add back in child theme what the parent theme removed with remove_action
- replace text in Sort Box
- Get current user id
- Prevent loading of functions
- Get term slug by term id and then explode it
- Shortcode question
- call_user_func_array() expects parameter 1 to be a valid callback, function
- loginout function customization
- define css class in functions.php
- Adding tables to the WordPress Editor
- Add Login and logout buttons to top menu bar
- Dashboard blocker on network multisite for specific user roles
- implementing a centralized content “show-do-not-show” toggle?
- How to load a css file depending on the current role
- How to change images url in function.php?
- How to add HTML into error message
- Add a word after the post url if it is within a specific category
- Probleme shortcode with list author
- Security when outputing wp_oembed_get code
- How to show only specific category post by user role without plugin and restrict all other cats
- Unable to declare AOS library in functions
- Removing sanitize_title_with_dashes Function with The Real Title
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Graphic before title – Specific Category
- Edit meta fields from within template
- What to do to have access to WordPress functions
- Adding a meta box fields to child theme options page
- Changing the color of post title [closed]
- How to programmatically GET (to know) which Sidebar (or) which Menu is being used on Different Pages?
- Remove theme, change theme button and WP version on “Right Now” admin dashboard?
- Making an under maintenance page (without using plugins)
- How to modify this function to exclude also the post belonging to a specific category?
- Image width issue in IE [closed]