to redefine the AJAX action, you can try that
add_action(AE_Base::AJAX_PREFIX . "ae-profile-sync", function () {
$profile_action = $GLOBALS["et_freelance"]->profile_action;
// remove base action
remove_action(
AE_Base::AJAX_PREFIX . "ae-profile-sync"
,
[
$profile_action,
"sync_post",
]
, 10
);
// add new AJAX action
add_action(
AE_Base::AJAX_PREFIX . "ae-profile-sync"
, function () {
// new code here
}
);
}, 1); // priority 1 to launch this before the method sync_post
Related Posts:
- Is it possible to disable a function of a parent theme?
- How to override an unpluggable parent theme function?
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Copyright info change in Theme Child PHP
- Add footer.php to WordPress child theme
- Setting up the child theme so as to enable right-to-left WordPress?
- Understanding WordPress child theme custom JS loading
- Overriding a theme redux file in child theme
- Adding tawk.to code just before body tag on functions.php file
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- How to style options page in dashboard?
- Copyright info change – Corporate Plus Theme PHP [closed]
- How do I check or test a WordPress Auto Year Change Script?
- How to have different site identity logos on each page on Astra Theme [closed]
- Removing “Powered by” footer using child theme PHP [closed]
- Overide Variable in Child Theme
- child parent styles enqueue order
- How to style injected code in header section?
- Child Theme’s Read More Text
- Need advice on theme customizer and child themes
- Proper way to remove html code on child theme
- remove_action from parent theme using child theme functions.php
- File from parent theme imported to child theme doesn’t work – any ideas?
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Child theme overirde template-tags in a theme built on underscores in inc/template-tags
- PHP “warning include_once(): Failed to open stream” Simple HTML DOM in WordPress Child Theme
- Removing get_template_part in child theme
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes)
- How do I get the author’s page url from their ID?
- Remove class that has been added by parent theme
- How to check from which page the user is coming to the current page?
- Design view breaking on Pages
- How to stop PHP code running when in a child theme
- Displaying Logged-In User Name and avatar in WordPress Menu
- How to make thumbnail image fit into a div where image dimentions are completely different?
- Add before_content and after_content to register_sidebar
- How to access function from outside of a class within this class in WP plugin?
- Word Count Function Preventing Permalink Editing
- Using file_get_contents with Gravity Forms uploads folder to create images in the media library returning false
- Changing custom logo link
- Add a variable in functions.php and call it in single.php
- Linking text within textarea of custom meta box
- what is the best practice to add new field to an api route
- Auto-update products after they were published – Woocommerce
- php function to display commenter username or login
- How to change menu order item
- responsive.css in the WordPress should be prioritized
- How to get Post Type from the functions.php file
- Edit the_category (); for a hierarchical display
- Omit custom post type from wp-sitemap.xml based on meta key using wp_sitemaps_posts_query_args
- Multiple meta_key in one global $wpdb;
- Using data sent via AJAX in multiple functions on a WP plugin
- Utilize Function in Child Theme / Template File
- HTML Special Characters in URL string [closed]
- Create page template via functions.php?
- CSS change in woo commerce Place Order Text [closed]
- Add URL parameter to all internal links using a specific theme
- Warning: call_user_func() expects parameter 1 to be a valid callback, function
- Change MySQL PDO connection to a WPDB connection
- Randomize Color Scheme Selection in Theme
- AJAX function not working [closed]
- Modify WooCommerce used to get all orders in dashboard
- Can’t log in to WordPress wp-admin after adding code to functions.php
- Why would the child theme load in the Customize preview, but not on the site itself?
- How to change basename url for wp-admin?
- display condition based on post term and status
- Only the first image uploads
- Search by date in WordPress
- Hide a div if the fiels is empty
- Illegal string offset checkbox
- removing the standard dashboard widgets in WP so I Can replace with custom
- Gravity Forms: How to add PHP function to confirmation conditional shortcode?
- wpdb->query returns different value to phpMyAdmin
- Trying to add some custom text into WordPress Post title via function.php
- How to change order inside foreach using wp_enqueue_script?
- Change header on one page in WordPress
- I got big white screen when i attach main style sheet of Html in functions.php
- Using Javascript On Page – Header and Footer Now Missing
- Add Product Permalink in woocommerce admin order page
- Unzip_file causing Media file upload error
- Cleaner ‘for each’ loop for registering scripts in functions.php
- How do I make comment-reply-button with that takes to comment reply form on click
- How to generate customized filtered output for the gallery
- How to get all users by user_login as a json_encode array?
- Escaping a Single Quote in str_replace for Nav Function
- Allow BBPress participant role to trash topics
- Display Year and Month from custom field + Age Calculator
- How to remove image on single product and get product to span page?
- insert thumbnail image from php script
- WordPress rating by views [closed]
- Get author meta of all writers
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Replace TinyMCE with Custom Built Editor
- Particular meta tag – viewport – insertion when dealing with plugin
- WP Fatal error: Call to undefined function get_template_directory_uri()
- Remove default Image Sizes
- A better way to write this php function
- a problem in class in class-wp-hook.php
- How can I use AJAX in child theme template?
- change title of page dynamically