• Resolved thilipdonmax29

    (@thilipdonmax29)


    Hi Team,

    I need some information for post type order hooks when reordering the post in the backend which hooks I have to trigger to my function

    Kindly reply ASAP

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Maya

    (@tdgu)

    Hi,
    There are 2 filters available:

    1) pto/save-ajax-order trigger on AJAX, for all objects in the sort list. This send 3 arguments: $data, $menu_order, $id

    2) PTO/order_update_complete that triggers when the AJAX sort saving is complete.

    If using the advanced version check with this article https://www.nsp-code.com/advanced-post-types-order-api/action-sort-interface-on-order-update/

    Thanks

    Thread Starter thilipdonmax29

    (@thilipdonmax29)

    Hi Maya,

    Thank you for your support, Above hooks are working properly but our problem is when I call hooks that function call many times for example if I have five posts it should call five times

    add_action( 'pto/save-ajax-order', 'custom_order_post', 10, 3 );
    function custom_order_post() {	
    	echo "action working - ";
    	//trigger action completed
    	do_action('PTO/order_update_complete');
    	
    }

    My Response: https://prnt.sc/q2sxH9T9ZXTN

    Thread Starter thilipdonmax29

    (@thilipdonmax29)

    Hi Maya,

    Pls ignore above message, hooks working properly

    thanks for your support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post type order Hooks’ is closed to new replies.