Advertisement
wpgenie

show my tickets content on My Account dashboard

Oct 5th, 2022 (edited)
942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. /* show my tickets content on My Account dashboard */
  2. add_action( 'woocommerce_account_content', 'wpgenie_myaccount_replace_dashboard_content', 1 );
  3.  
  4. function wpgenie_myaccount_replace_dashboard_content() {
  5.    // remove_action( 'woocommerce_account_content', 'woocommerce_account_content', 10 );
  6.    add_action( 'woocommerce_account_content', 'wpgenie_account_content' );
  7. }
  8.  
  9. function wpgenie_account_content() {
  10.    
  11.     global $wp, $wc_lottery_pn;
  12.  
  13.     if ( empty( $query_vars = $wp->query_vars ) || ( ! empty( $query_vars ) && ! empty( $query_vars['pagename'] ) ) ) {
  14.    
  15.         $wc_lottery_pn->plugin_public->woocommerce_lottery_my_tickets_past_endpoint_content();
  16.    
  17.    }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement