Guest User

Untitled

a guest
Feb 17th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. /**
  2. * The following three hooks remove the session actions used in the autoship native ui.
  3. * Note when not using the Session variable the Native UI option should not be used for Schedule Orders.
  4. */
  5. function xx_remove_autoship_session_init_hooks(){
  6. remove_action( 'init', 'autoship_start_session', 1);
  7. }
  8. add_action( 'init', 'xx_remove_autoship_session_init_hooks', 0 );
  9.  
  10. function xx_remove_autoship_session_logout_hooks(){
  11. remove_action('wp_logout', 'autoship_end_session', 10);
  12. }
  13. add_action( 'wp_logout', 'xx_remove_autoship_session_logout_hooks', 9 );
  14.  
  15.  
  16. function xx_remove_autoship_session_login_hooks(){
  17. remove_action('wp_login', 'autoship_end_session', 10);
  18. }
  19. add_action( 'wp_login', 'xx_remove_autoship_session_login_hooks', 9 );
Add Comment
Please, Sign In to add comment