• function wpb_woo_my_account_order() {
    	$myorder = array(
    			'dashboard'          => __( 'Accountoverzicht', 'woocommerce' ),
    			'orders'             => __( 'Bestellingen', 'woocommerce' ),
    			'facturen' => __( 'Facturen', 'woocommerce' ),
    		'verlanglijst' => __( 'Favorieten', 'woocommerce' ),
    		'edit-account'       => __( 'Gegevens', 'woocommerce' ),
    		 'edit-address' => __( 'Adres', 'woocommerce' ),
    		'customer-logout'    => __( 'Uitloggen', 'woocommerce' ),
    	
    	
    	);
    
    	return $myorder;
    }
    add_filter ( 'woocommerce_account_menu_items', 'wpb_woo_my_account_order' );
    
    function my_custom_endpoints() {
        add_rewrite_endpoint( 'facturen', EP_ROOT | EP_PAGES );
    }
    
    add_action( 'init', 'my_custom_endpoints' );
    
    function my_custom_query_vars( $vars ) {
        $vars[] = 'facturen';
    
        return $vars;
    }
    
    add_filter( 'query_vars', 'my_custom_query_vars', 0 );
    
    function my_custom_flush_rewrite_rules() {
        flush_rewrite_rules();
    }
    
    add_action( 'wp_loaded', 'my_custom_flush_rewrite_rules' );
    
    function my_custom_endpoint_content() {
        include 'woocommerce/myaccount/facturen.php'; 
    }
    
    add_action( 'woocommerce_account_special-page_endpoint', 'my_custom_endpoint_content' );
    • This topic was modified 3 years, 6 months ago by Vikram Singh.
    • This topic was modified 3 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘page facturn.php not desplaying, below is the function i created’ is closed to new replies.